Controlling Galapagos (or another optimizer) via script?

Hi there,

It would be great if there were a way to control an optimizer via C# or Python script. I know that this question has been here before. Still, it was quite a while ago. So I’d love to know if there is anyone out there who knows if there is a way to accomplish this with the scripting interface directly without needing to simulate human input or by utilizing reflecting.

I’m looking for in detail to interact with the solver via C# script (python could work as well). Meaning being able to see for how long the solver has been running for and starting and stopping it via API calls. I’m looking to accomplish this as I have multiple fitness tests that I need to loop through. Another way to do that would be with the multi-objective solver, but that doesn’t fit my needs as my fitness calculation is pretty comprehensive.

Thanks a lot!

Here are the two other posts I could find on this topic:

Here is a visual explanation of what I’m looking for:

Screenshot 2021-12-27 at 22.27.43

Do you mean you want to use Grasshopper data for optimization?
You can use RhinoCompute from Python or other scripts to run Grasshopper data and perform optimizations.
What about the way it is not done on Grasshopper?

Hi @hiron,

Yes, I’d like to use Gh data for optimization. I’ve looked into Rhino Compute and that might be my best option. However, I was wondering if it would be possible to control the Galapagos component directly through a scripting component inside of Grasshopper. That would automate a huge part of the work I’m doing as I could automatically restart the optimization process with a new model after a certain amount of time allowing it to optimize for many models without human input needed.

1 Like

Any solution for that issue? It would really make my day (:

Hi @Bensho
Now I am building my own optimization component “Tunny”.

What do you think is your solution for this?
Something where there is a bool input to the component and the optimization runs while it is True and stops when it is False?
If you give me specifics, I will think of an implementation.

3 Likes

This is a tool to control Galapagos and save the results

4 Likes

Hi Hiron,
I saw the Tunny on the food4rhino. Haven’t tried it as it is Windows only, but this is not a dealbreaker (:
So I guess a start/stop button would be great as a starting point.
I can explain the use case: We are building an app that runs outside of Rhino (like a web app), and it does some optimization using Galapagos, but any optimizer would do the work. it is ok the calculation is made on the background, but I would love to be able to press a Go button on the UI and the optimizer starts working, till it is stopped, or finishes the optimization (by predefined time/ generations… ) All presets can be done by us, the users don’t need to deal with it…
Hope it is clear…
Thanks. and please keep me updated (:
Cheers,
Hanan.

1 Like

Hi Seghier,
You rock! Yesss! I saw your post a few days ago already and I loved it.
I also saw you are working on controlling Galapagos from the control panel, which fits better my use case, so I am waiting for the release (:
Keep me posted when it is out.

Thanks for the message.
Cheers,
Hanan.

1 Like

You can use buttons and publish them to RCP panel but sometimes the buttons don’t respond that’s why i use Rhino toolbar buttons

1 Like

I tried to play with it, but for some reason, it doesn’t work… Does it use the Wizard plugin? if so I will try in on Windows…

I can’t know
Can you share a video?