Using genetic algorithms in Dynamo for generating and evaluating design alternatives at an early stage

I have for my matser’s thesis at the Technical University of Denmark (DTU) been working on utilizing the package Optimo and the interaction between Dynamo and Robot Structural Analysis (RSA) for automated structural optimization of steel structures, as well as playing around with a way of visualization of data using parallel coordinates plots.
image

The main tools used in the project have been Dynamo, Python, Revit and RSA.

By interacting with the RSA API direct interaction is possible outside the possibilities included in the package “Structural Analysis for Dynamo”. Thus, all data exchange between the two software are driven by Dynamo.
image
Optimization of loading lines from Revit model

In short, the workflow automatically evaluates and through the Optimo package a genetic optimization (NSGA-II) of the structures is possible within a user defined design space. The work builds upon some great work carried out by @AHejnfelt, mrahmaniasl and @Dieter_Vermeulen
The results from each design alternative is saved to the user’s pc and the individual results are recorded for each iteration in a .csv file for result verification and later visualization.

Generally, the graph works as follows:

  1. User sets limit and stop criteria
    Tool: Dynamo
  2. Sub-divide structure
    Tool: Dynamo
  3. Adjust structure according to design space
    Tool: Dynamo / NSGA-II
  4. Reassemble structure as FEM
    Tool: Robot / Dynamo
  5. Calculate and evaluate structure
    Tools: Robot & Dynamo / Python
  6. Record results
    Tools: Python / .csv
  7. Return to step 2 if design criteria are not met
  8. Visualize results for user
    Tools: Python / .html (needs you to install plotly and pandas using pip)

For an in dept walkthrough of the graphs/scripts please read the thesis.

image
Optimization graph for truss structure

For visualization a Python script working outside of the Dynamo environment using the Plotly and Pandas packages is used for generating interactive parallel coordinates plots like the one below:

image
Parallel coordinates plot

As can be witnessed in the thesis the RSA API have been used for pulling model information as well as writing model information. All Python scripts utilized in the paper can be found in the Appendix of the paper.

The graph serves as illustration of the method but can be slightly adjusted to fit the user’s requirement on point of intervention and the model being worked upon. The thesis illustrates the potential of using computational tools and genetic algorithms for automatically optimizing upon structures.

The interoperability can still be improved between Dynamo and RSA and a memory-leak have been discovered iterating over several design alternatives with a linear increase in time required for evaluation of each iteration.

The graphs have been developed for Dynamo 1.3.2 and Revit and RSA 2018. But have been tested using Dynamo 2.x and work with minimal adjustments.

Packages used:
Structural Analysis for Dynamo v. 0.2.7
Clockwork v. 1.31.0
Optimo v. 0.1.2

Read More:
DTU Article: LINK

LinkedIn Article: LINK

Paper and .dyn/.dyf’s/.py/.html/.csv: LINK

41 Likes

Thank you for sharing. Very interesting stuff!

Very well done, @Jonathan.Olesen. Glad to see structural optimization being performed with Dynamo and RSA!
I’m going to refer to your work in my AU class handouts this year :slight_smile:

4 Likes

Good reference for metaheuristic implementation in BIM. :slight_smile:

1 Like