# By-passing 10 variations limit in Dynamo Generative Design

Hello!

I’ve recently found myself slightly restricted by the limit of 10 variations per input in Dynamo’s generative design (for “Space Evenly” runs). For my project, I’d like to run 1,000 different and random (u,v) coordinates of an object on a surface. I’ve managed so far to increase the number of locations to 100 by having 10 u locations and 10 v locations defined by separate inputs that can be permuted with each other (see script below). To avoid having to run this script in generative design 10 times, I’d like to find a way of bringing in a 3rd input that would also have 10 variations, so I can get my 1,000 locations all within the same run.

My main idea so far would be to create 10 lists of u and v coordinates and have nested lists, either directly in Dynamo or with Python nodes. I wanted to first check here if there were any shorter and more elegant solutions for me to achieve my 1,000 variations in generative design.

Thanks!

Eva

Why use Space Evenly if you want random inputs? Space Evenly is meant for designating specific inputs to pair across all other inputs “evenly”. Meaning it’s not actually random anymore. It’s sorta the equivalent to Dynamo’s cross-product lacing.

Instead you should use the Optimization option to generate 1000 random options.

If you want to make sure that your options are reasonably “spread out” you can use rounding to include some sort of “step” between values, or you can create a random list that meets your criteria ahead of time and shuffle that list to create a random selection.

Thanks Nick! I actually have 4 other inputs part of my generative design study which need to be spaced evenly and “tested” on 1,000 random options, so my way on combining space evenly and randomization was through the creation of these lists of random numbers. I would think the Optimization would work in that case but happy to try it out if there is a way of integrating my space evenly approach for the other inputs as well?

In that case you can use a simple “randomization” method for those 1000 components like a list shuffle. Don’t even worry about generating them with the GD methods.

However your initial idea of nesting lists in lists would also work, but it seems like extra effort when you could just shuffle everything.

1 Like

Thank you, I will work on that!

I don’t ever recommend ‘space evenly’ studies being ‘does the upper and lower limit work?’ in initial authoring.

That said, you can utilize a combination of two sliders. Assuming the base parameter is 0, and the upper is 1, you can have one slider control 0.0…0.9, and the other control 0.01…0.09. Add value 1 to value 2 and you get `0.00, 0.01, 0.02… 0.09, 0.10, 0.11… 0.97, 0.98, 0.99` which covers 100 options. You miss out on 1.00; but some fancy rounding, remapping, or a 3rd slider of 0.01 can fix that.

I don’t ever recommend ‘space evenly’ studies being ‘does the upper and lower limit work?’ in initial authoring.

I’m not sure I understand this part, would you mind elaborating?

Great slider combination suggestion! Thanks

Basically the genetic algorithm removes the need for ‘space evenly’. Space evenly studies require an OBNOXIOUS amount of compute to help the designer understand the design space.

Take the 3 box massing sample. To do a series of 10 on each variable you’d need to do 10,000,000 studies. Results would range from 20 to 200 for box 1 height, sampled at [20, 40, 60, 80, 100, 120, 140, 160, 180, 200]. Notice how there are no 'variable of 10, or 30, or 15, or any other distance other than multiples of 20; This means that if a perfect value was say 170 as it maximizes views while preventing too much solar exposure, you’d miss it entirely. This lack of resolution in the samples continues over each other variable, so you wind up doing 10 MILLION studies and find nothing promising.

Alternatively we could set the slider tolerance to 1 unit, run a 100x100 optimize study and then let the genetic algorithm take it from there. Generative Design would run an initial sample of 100 studies and take the top 25 results and use those to inform the next sample of 100. And that will repeat until you’ve taken 100 samples 100 times for a total of 10,000 samples. In the end it will find not 170, but 174 (so more accurate), and it will do so in 1/100th of the compute time.

Space evenly is good for finding out if ‘min/max’ combos cause errors, but or if there is a range of input values which fail for some reason; similarly like this has value in exploring the design space. I do not recommend doing the 10,000,000 samples though; your CPU has better things to do with it’s time.

1 Like