Learning Optimo + Robot Structural Analysis

Hi everyone, my name is Claudio and i’m a structural engineering student.
I’m trying to learn Optimo and add GA to my knowleadge but i’m having some difficoult. I made some exercise by myself but i have this error steadily in the NSGA_II.AssignFitnessFuncResults.

“Index was out of range. Must be non-negative and less than the size of the collection parameter name:index”

I think to have understood the mechanism behind this package but i know nothing about programming.
I’m sure it’s a stupid error i’m making but i can not undestand where it is. I’m using Robot Structural Analysis to calculate the structure but i had the same error in another exercise using only dynamo.

I post this example where i’m searching for the coordinate “Z” of the middle point of my beam (arc) that minimize the positive bending moments. It has nothing userful it’s just an exercise to learn.

I’m a new user and i can’t post more than 1 imagine per post.

Fitness Function 1

Fitness Function 2

Fitness Function 3

Hi @cleo.beca, pardon my ignorance, but what is Optimo?

Hi @Jorge_Villarroel, Optimo it’s a dynamo package to find optimal solution to several problems using an iterative process (this is a very poor explanation but i’m a newbie too)
You can find a more exaustive explanation at the following link.

1 Like

Thanks! I’ll give it a try.

Are you using Dynamo 0.7 to 0.9? I run into problems using Optimo on Dynamo 1.0+

I use dynamo 1.3 but i think that the problem is about the fact that i’m not able to make the populutation to be analyzed one by one.
Speaking about the example i’ve post i noticed that robot doesn’t create a file for every single member of the population but it use all the list.
For example; if i use a population of five elements i’ll have a SINGLE robot file with all the five member used together and not 5 different files with the population analyzed separately, and this obviusly mess up everything.

There is a lot to learn :sweat_smile:

Hi,I strongly suggest that you copy the fitness function out to your main canvas and try to get the desired list structure of fitnesses from just the first population list. And thereafter wrap it up as a custom node again. I’m generally forced to depend heavily on replication guides in design script to be able to get the right list structure.

1 Like

Done this and i learned to use different nodes and command, i finally thought i was in the right way but when i launch the analysis the same error came out in the NSGA_II.AssignFitnessFuncResults.

“Index was out of range. Must be non-negative and less than the size of the collection parameter name:index”

I mapped all the results to have positive value but nothing change. I can’t understand the meaning of the message unfortunaly, all values are positive and different from zero. If someone can explain me the meaning of the second part of the messagge "Must be less than the size of the collection parameter name:index” i’ll be thankfull.
I assume that it need a number of results equal to the number of the population, i’m i right?

I was finally able to run my fist optimization process and all went fine; however i noticed that if i increase the number of population or the number of iteration process the final node give me a null value, what’s the reason? There is no error in dynamo and robot creates and saves files without error too. If i take a look at the robot structural analysis result list (2nd pict) i notice that the last file is the optimized one, so why dynamo give me null value?

Have you tried contacting Mohamad directly (the developer of Optimo)? His contact information is on the website. He is a very nice gentleman and would be happy to help you. I know him from the time we were working on our PhD’s.

1 Like


I wrote him and i’m waiting for an answer becouse i’m literally blocked. Meanwhile i think i found the reason of the null value; if i work with small number, for example population = 3 and iteration number = 2 optimo give me a result and all the 6 files (3x2) are created and analyzed in Robot, however if i increase the numbers to get a more accurate solution, such as population = 7 and iteration number = 7 the process doesn’t come to an end it gave me the null value i mentioned in the previous post,even if there are no error in dunamo, if i look at the Robot files i should have 56 (7x8) files but they are way less. If someone have a solution i’ll be thankfull.

Is it possible for you to share the datasets?

1 Like

Here they are, here i’m trying to optimize e 3d truss and my goal is to have the minimium weight score, obtained adding self weight and a penalty for every overdesigned and overstressed elements.
The exercise is a copy of this one i took from Autodesk University and from this website.

Yeah, I forgot about my computer not having Robot installed at the moment… But have you been in contact with @Dieter_Vermeulen? He’s the author of these files.

I wrote him throught RevitbeyondBIM blog, should i use twitter or a PM?

I’m having this error steadily, this thing it’s getting frustrating.