Grasshopper

algorithmic modeling for Rhino

Hi everyone!

I am trying to run galapagos in my custom c# component. The object function is related to two hundreds of "process", where each process is associated with two parameters. Thus, we get 2 * 200 = 400 parameters in gene pool for Galapagos, which make the optimization nearly impossible to obtain a good result and run really slow.

What I want to do is to separate the optimization in a for() loop in C# component, and run Galapagos, with only 2 parameter in each iteration. It's reasonable to do so because the process in each iteration is independent.

The situation is exacerbated by the fact that I need to run kangaroo component in each single iteration to construct fitness funtion value. Thus, my strategy now is to write a gh cluster to pack the optimization process for single iteration, send in the parameter value in every iteration in the loop, run galapagos in the cluster and then harvest the result. My idea comes from Custom (vb, c#, python, etc) Component that loads a cluster and/or .... The algorithm work flow is depicted as followed:

However, I find no existed document about runing galapagos in C# compoent. My problem includes:

(1) what is the standard code template to run galapagos in C# component? from creating the components in a dummy doc, generate gene pool, set fitness function and trigger the solver? How to set the solve type, start the solver and set the threshold? (the option in picture depicted below)

2. Is it possible to trigger the galapagos inside a cluster from C# component? In my algorithm, I have to send the current process's parameter into the cluster, set the Galapagos solver to "Evolutionary" and then tigger "Start Solver". Can I use some related method from Galapagos class?

Any example snippets or code would be really helpful.

Thanks! Yijiang

Views: 992

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service