Cubicle Adjacency Study by Optimo - Need Help with the Fitness Function

I’m experimenting with Optimo nowadays and trying to achieve a task I planned months ago from this thread. My plan is to set an adjacency study for the cubicles in an office.

I tried Vikram’s graph before and there, rooms are organized according to the area and adjacency rates they have. In my case, I need cubicles to have a distance between them by the adjacency requirements I define in an Excel file.

So what I basically am trying to do is to find the optimal layout with the cubicles whom adjacency relation is produced by MS Project/Excel.

Adjacency Rates.xlsx (9.8 KB)
Then I created dimensional properties for these cubicles which are arbitrary numbers:
Cubicle List.xlsx (8.9 KB)
I first created cubicles and placed them on random coordinate points.

Then, I created a set of rules in a custom node which determines the distances between the cubicles(fitness function) and this fitness function is connected to the nodes of Optimo which should create a loop that will eventually let the system propose a new layout for me. This is my initial thought but I couldn’t make it work.

And here is my Dynamo file and the custom node of fitness function which I believe is problematic:
Adjacency Fitness Func.dyf (356.7 KB)
AdjacencyofCubicle.dyn (97.8 KB)

Total graph:

My fitness function:

How can I fix the fitness function, any thoughts on this would be highly appreciated.

I couldn’t create an adjacency rate from MS Project or Excel, so in order to represent a fictional distance between these cubicles, manually I put values multiples of 10 in Excel such as:

I wrote these values of distances for the cubicle pairs as a matrice in excel file “Adjacency Rates” It has two sheets.

PS: .dyf file gets very complicated at the end, I couldn’t manage a clean list.



Very interesting, unfortunately I don’t have time to go through all of your stuff, I just thought you might find it easier to manage your input parameters (fitness function) if you did something like in this thread?

Hope that’s of interest,


1 Like

Mark hi,
I’m super sorry for my late response but I was far from all of my electronic devices in the meantime. You are right that I should simplify the graph. But data is more accessible for me when it looks like a spirograph :))
But I gave another chance to this graph today with a different attempt. I simplified the process by just 3 cuboids. I couldn’t do it, yet it looks super simple so maybe someone can help me with that. In this basic example, I want to have 3 cuboids located randomly according to the rule of being close together.

And the fitness function is like:

It warns me in the yellow bubble as:
Warning: NSGA_II.AssignFitnessFuncResults operation failed.
Index was out of range. Must be non-negative and less than the size of the collection.
Do you know what might have caused this?

Cuboid Trial.dyn (43.1 KB)
Trial Cuboid.dyf (52.3 KB)