Hi,
I’m struggling hard with a script. The script optimizes only one objective [max radiation]. It needs to optimize the location of 4 buildings on a plot. Each building has 3 sliders [move X, move Y, and rotate]. Overall 12 sliders. Overlapping between buildings is not allowed. For that purpose, I wrote a Python code that cares about avoiding such cases [gives 0 radiation value].
Checking manually works fine, meaning that the overlapping cases are not considered and other cases calculate the radiation fine.
But when I run the optimization, it fast tries to converge towards solutions that overlap so I get nothing after the optimization, not even one solution. Here I’m assuming that my logic is not the proper one for this process and that’s why I am posting this thread.
Attached the script. Hopefully it is not messy to understand. What is important is how to set the genes and the Control Panel properly.
The script uses Ladybugtools and pufferfish as not native plugins.
Thank you for your prompt answer.
I watched the video a while ago. I don’t believe the problem is related to Null pool cases. As a matter of fact,the script is not giving any null result. As i wrote, for those cases where there is overlapping of buildings I assign a value for the objective.
Worst than that, the optimization is not getting any single result. Al the optimization takes about a minute to finish. This is what I don’t understand. Right now, I’m clueless how to approach this case.
Thanks,
-A.
The key point I’m making is that for overlapping results, you should force them to be null. This ensures they are excluded from the optimization results and not counted. If you don’t want overlapping results in the mix but still assign them a value, it contradicts the intended logic.
Instead, the null indicator should be used strategically to navigate the design space intelligently.
PS: unfortunately I could not run your file as I am missing the ladybug at the moment, will try to run it and get back to you
Hi @milad.showkatbakhsh ,
I created a version that doesn’t need ladybug. Instead, it assigns, randomly, a value for valid options [no overlapping].
I followed the recommendations of the video and added the “Null objective”.
The status now is that all cases are null. As previously mentioned, the search space looks for the slider values that cause overlapping instead of the opposite. Not even one valid case is obtained.
I’m sure I’m missing something basic here and will appreciate if you have the time to look at the attached here. Check offset overlaping before optimization_TMP_01_DummyRadiation.gh (93.8 KB)
I’m certain you’ll catch my faulty logic,
Thanks,
-A.
P.S. If you have Metahopper installed you can set the slider default values, where you get a valid solution.