This is a multi-objective optimization problem, with two competing objectives. This example consists of three cuboids with different variable parameters, such as height and location. The objectives of the graph are to find an option with minimal volume and maximum combined surface area.

This sample file is available in the most recent version of Generative Design in Revit.

The three cuboids ('C1', 'C2' and 'C3') represent buildings and can vary in different ways:

C1 can only change in height.

C2 and C3 can vary in both height and location.

We describe these two goals as 'competing' because both goals vary in the same direction meaning that increasing the floor area increases the surface area and visa versa. As a result, there is no one optimal solution maximizing floor area and minimizing surface area and we get a set of optimal solutions on Pareto front.

*Above: The three cuboids joined together to form one solid.*

It is important to make sure here that all the nodes controlling the size and location of the cuboids are set as 'IsInput' in the Dynamo graph.

Whenever an input parameter is changed, the option's volume and total surface area will be re-calculated. These two values are the 'fitness' values and need to be set as 'IsInput' in the Dynamo graph.

When running this graph, you will need to follow these steps:

Use the 'Optimize' generation method.

Under 'Inputs', make sure that all inputs are selected.

Under 'Outputs', set 'TotalSurfaceArea-MAX' to 'Maximize' and 'TotalVolume-MIN' to 'Minimize'.

Under 'Settings', input your 'Population Size' and the number of 'Generations' you want.

Under 'Issues', resolve any items.

Click 'Generate'.

A multi-objective optimization run will not return one single result, but instead it will show all of the 'non-dominated' options. A 'non-dominated' option means simply that you can't make an option that is better in one of the objectives without compromising another.

By arranging the scatterplot with the 'TotalSurfaceArea-MAX' on the Y-axis and the 'TotalVolume-MIN' on the X-axis, it's easy to browse the options and find the best trade-off solution.