Updating values only after solution has converged?

Hello community,

I am fairly new to GH and Butterfly, and any help or input is much appreciated!

I’m trying to perform a shape optimization using Butterfly in GH. The goal is to change the shape to minimize the drag coefficient. Here is a snapshot:

This is before the solution is run (not converged yet). As you can see, the values for drag and lift in the right panels get calculated regardless of whether the solution has run or not. However, the initial values are wrong, and will ruin the optimization results. I need to find a way to only plug the final values into opossum, after the solution has converged.

Any ideas how that could be done?


Butterfly_Solution has the outputs is_runnning and timestep. To determine if the calculation is finished, you can check the status of these outputs.
The timestep seems to be looking at the solver log file, so when you initialize a calculation, you will need to delete the log file.

I found the solution here: https://github.com/ladybug-tools/butterfly/issues/131
Setting the solution _interval input to -1 prevents updating the solution until it has completed

1 Like