Algorithm for Generative design

I am Civil Engineer and newbie for dynamo as well as generative design here and am trying to frame my research using generative design.

I would like to know do i will require to develop new algorithm for optimization in this generative design framework?

If i do need to, where I will be getting help from regarding this algorithms because am unknown to the field of programming.

Please guide

This is a rather open ended question, so I’ll give some open ended guidelines which will be loosely pulled from a blog post I am working on.

You’ll likely need Refinery so be sure to sign up for that beta. More info here:

You’ll also need to have a good outcome generating model built in Dynamo to use to iterate through the design. The model can be geometric or not, and can make use of any initial data which you can save into the dyn. CSV, Excel, Revit, Civil 3D, etc will all work - just place a Remember node accordingly and Dynamo will leverage this repeatedly. Note that larger data sets are slower to compute and therefore take longer to run, so simplify when possible. Building the model is honestly where the bulk of the effort will come. If you have no experience in Dynamo and it’s geometry nodes than this will take even more time. Computation time is also something to consider here - the faster your graph runs the more iterations you’ll get to do and therefore the better your results. For demonstrations to the customers I work with I shoot for sub 1 second run times. I have seen run times up to 1 minute work successfully, but with less iterations than might be required to find the optimum input combination.

Be sure that your model has taken into account the limits of what you’re designing. If you’re dealing with creating structural framing and the idea is to minimize the number joists with plywood spanning between them, a spacing of 100,000 feet will score best but isn’t physically buildable. So build your constraints accordingly. Similarly to sky hook structural systems, utilities via airwaves and teleporters are not possible at this time. This is really where a strong knowledge of the design task is a must - if your unknown constraints are too large you may find an optimally incorrect solution.

Next build your outputs. The idea is to boil the design down to a few numbers. Boiling design down to numbers is certainly hard though - we don’t really learn that in school and there is no ‘number’ for a designer’s intuition. Defining your objectives before you begin can really help. Some examples are the distances between objects meant to be adjacent; natural light in the space; visual privacy; buzz and distraction. All of these are key concepts which designers tend to ‘understand’ at a high level, so knowing that a 1 is better than a 5 (or vice versa) you can make a decision to go with this design or that one based on the data instead of lines on a page. The team from The Living which designed the Autodesk MARS offices has several good write ups of this on the web and some good AU countent published as well.

Ideally you’d build the output values so that you know what the ‘maximum’ and ‘minimum’ values are - ie. if the total design space is a 10x10 grid, the largest internal dimension is 14.14 units so your worst score is (number of desired adjacencies) * 14.14, while your best score is 0. Knowing the minimum and maximum values will allow you to express the results in a percentage which makes comparing numbers much easier, especially with larger numbers (98% & 99% vs 358049 & 353049). I also recommend trying to always ‘minimize’ values as that is the default optimization setting in Refinery.

Once you have a good model built and your inputs constrained and outputs calculating, make sure the model flexes. Test the high/low combinations for all variables - if something fails here it’ll likely fail there too. I find it’s often best to detach my sliders and use a list input with a List.GetItemAtIndex to pull a combination of values out of the combined list to test. Check ‘sum’ and ‘count’ values carefully as empty lists and nulls can cause some ‘0’ values accidentally which can throw off your optimization. If everything works wire the sliders back in and move on to Refinery.

If your graph fails to export to Refinery take action as directed - it’s usually a program specific API call which won’t work outside of the application. Keep in mind that Refinery is running an instance of the graph on multiple cores so you’ll get 6 instances of program x to open if you force it to launch. As such limiting data manipulation to raw Dynamo Sandbox alone is often ideal.

Once exported, start with a randomization as these will catch the most ‘oops’ moments the fastest. If that passes, move onto a 8x10 optimization study to see how things process. If that is successful, move to a larger optimization study - say 100x100 or similar. You’re now doing Optimization in a generative context. Remember that the selected result isn’t the ‘last step’ in the design process. Instead you should push the results into your usual platform (ie: Civil 3D, Advanced Steel, Revit, FormIt, etc.) and scrutinize them as you would work done by an intern in their first week on the job. Massage the results as needed to pick up with the usual design techniques as you usually would from here. In a good use generative design and optimization becomes another tool like CAD or BIM to help them more rapidly produce good work with a consistent ‘eye’ on the quantifiable results. It is not intended to ‘remove’ the design work from the equation.

As an added step you may want to pull the ‘massaged’ results back into Revit to use the same scoring metrics the computer was using after the ‘human touch’ is added. This will either allow the designer to either validate their intuition and the graph can be updated with the newly learned lesson, or the designer could learn why their alterations might not have been the ‘right thing to do’ and they can revisit the ‘why’ aspect of the design.

Hopefully this helps (and doesn’t spoil the blog post too much).


Thanks for your guidelines. I will take note of things you have suggested and definitely keep in mind while am working on a case.

Two things that are currently running in my mind:

  1. To i have to do any sort coding apart from visual programming?
  2. What level of complex civil construction structure can be considered to apply generative design? for e.g. complex space truss.

No, but more tools in your toolset will enable tackling more options in more varied ways. The more you know the more you can leverage and apply to other uses.

The limits are set by your hardware capacity, code and graph writing capabilities, and domain knowledge.

Hardware Capacity: if your CPU is so slow it takes 2 hours to run a graph most run in under a minute, you’ll struggle (assuming you even get the software to launch). Generally speaking shoot for faster run times which might require more power than a 10 year old laptop will be able to provide.

Code and Graph Writing Capability: if you don’t know how to draw a line, how will you manage to draw all the lines to build the truss? You have to have some degree of knowledge to use the software (albeit not a bachelors degree in computer science). If you are truest new I suggest you run though the entirety of the Dynamo Primer, start to finish and skip nothing. Even if the results aren’t something you think you will need - the methods used to create the results are more important that the final outcome. Journey not the destination and all that.

Domain Knowledge: if you don’t know how to design a space truss, you likely won’t be able to generate one. Or maybe you don’t know what’s important, doable, possible, non-compliant, etc. with drainage design, space planning, utility pathing, or the like then you’ll likely find the best performing wrong solution.


Thank you so much for giving clarity.

1 Like

Glad to have helped!

Is meta-modeling and generative design same? Are there any differences?

I would say no, they are not the same but can be used in combination with each other. Specifically the definition of meta modeling which relates to simplification of the design model.

Per Wikipedia: As an approximation of a higher-fidelity model for use when reducing computational cost is necessary

Examples of this in my experience with generative design are plentiful. For example when doing a space planning graph you might abstract the spaces to be only two dimensional rectangles and not creating the walls, floors, ceilings, doors, windows, equipment and the like when in the end they’ll be three dimensional spaces. By drawing only the space boundaries at the lowest level your cpu can more quickly calculate the result, and you can resume work on the full model once done.

How to you visualize pareto optimal solutions with more than three objectives?

The current option in primer being only visualizing 2 objectives at a time. Please do enlighten me if am missing something.

There are four visualization options: X axis, Y axis, color, and size. A 3rd will allow review. You can also come up with an ‘overall’ score which evaluates multiple metrics by adding values (assuming you were working in a normalized parameter value and all values are attempting to be minimized or maximized).

1 Like

Also you can have more than 4 outputs, but you can only visualize 4 at any given time in Refinery :slight_smile: