Optimo population list

Hi all,
I’m currently using Optimo to conduct multi-objective optimization. There’s a little wrinkle though.

Seems that when I set the initial population list more than 3 (BTW, I have 8 variables & 3 fitness functions), dynamo only keeps saving back up files (see the screenshot), and never spits out any results (no errors reported either). I dont think there’re any issues with my fitness functions, as my nodes work perfectly when the population is small.

Just wondering if anyone has any clue of what might lead to this issue.
Thanks heaps.

Hi @jaaamie I have encountered problems working with Optimo in Dynamo 1.3.x but have experienced better results using 2.x, are you saving results each iteration or only interested in the final result?

Hey Jonathan,
Your thesis helped me heaps in playing tricks with Optimo! Thanks by the way.
I’m only looking for the final results and I’m running on Dynamo sandbox 2.4.
So last night, I left the computer to run the optimisation at the lab, and now I have it completed with a initial population of 5.
I kinda have a hunch why it took this long:
a. one of my fitness functions (AggregateCondctanceFF) is actually a mathematical combination problem.
b. my fitness functions are saved in a removable disk, my gut feeling is that this prolongs the time for optimo to fetch/send any data for optimisation purposes (not sure if this makes sense)

Now, I’m trying to make my python scripts in fitness functions more succinct and change all my variables to descrete variables in the hope that this would shorten the run time.
Meanwhile, I’m wondering if you have any tips on speeding up the optimisation process?

See the screenshot of my nodes (initial population =5, and the values are only set for testing purposes, I’ll have to connect the optimo nodes with other nodes that fetch data from my revit model in later stage).

Cheers,
Jamie
Lab_dynamo optimo_oldversion_2020-01-31_08-00-13|690x280

Hi @jaaamie

I’m glad that my thesis has helped crack some of the nut that is Optimo.

Generally avoid:

  • Nested for loops (in python)
  • If you can save to .csv rather than .excl do that (as this does not require your computer to enter the excel api.
  • Depending on the speed of the removable device, I doubt this is the issue though… Unless you have absurd amounts of data or a “slow” connection.

Do you write/read/analyze in any external programs, and if you do which kind of access do you have?

If you are to later connect your Revit model you will move from Sandbox to Dynamo for Revit (as this is needed to access a Revit model.

1 Like

Hey Jonathan,
Good points!
I now save my fitness functions in the same dynamo core directory where the other optimo files are stored.
In terms of the nested for loop, are you saying that it’s best to avoid the nested structure (meaning that using list compression in one line is okay), or generally to avoid such python behaviour?
I’m not sure which platform/method to use for analysis yet as my current optimisation process looks really worrying😅
I’ll need use some lagrangian relaxation in my fitness functions to penalise those invalid results.

Cheers,
Jamie

What I’m saying is that you should consider the structure of your script (python) as sorting out as many possibilities prior to iterating over nested lists might save you time in the long run.

If you’re up for a challenge it is my experience that C# nodes perform faster handle large amounts of data better than Python ones do.

If you’re exchanging data with external applications this will increase the processing time.

Cool, thanks.
My fitness functions now all run perfectly and smoothly. I’ll keep these in mind as I go.
Thanks again!

Cheers,
Jamie