Optimization Plug-In for Grasshopper: How to use Galapagos' interface and gene pool?

Finally it works! Thanks a million times!

The bit I missed was basically avoiding SolveInstance() to run again, with this:

        if (_form != null)
            return;

or in my case, instead of a form, just a class instance

        if (opti != null)
            return;

Thomas, I owe you many glasses of beer! :smiley:

Hi all,

Trying to use Thomas’ custom C# component in Rhino 6, GH build 1.0.0007, and am getting this error:

“1. Error (CS1703): An assembly with the same identity ‘Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ has already been imported. Try removing one of the duplicate references.”

I tried commenting out “using Microsoft.CSharp.RuntimeBinder”, no luck.

Does anyone see any issues running this code in GH for Rhino6? Or, are there new solutions for accessing the gene pool component within a custom C# component?

Thomas’ original file, in case you dont wanna scroll up:
genepool.gh (11.6 KB)

Hi Scott,

Have a look at this GitHub repository, which provides a shell for optimization in Grasshopper, including support for genepools. The code for genepools is in Grasshopper_InOut.cs.

I haven’t looked at it in a while. but for all I know it should still work.
(I had a look at the component I posted here, but I have no idea why it isn’t working anymore.)

Cheers,
Thomas