# Welcome

Welcome to the **Generative Design Primer**, which aims to introduce AEC practitioners of all experience levels to an exciting new approach to design using generative design workflows.

![](/files/-LrPm4W8pcNv-NV3jerw)

## About

This primer will help you:

* **understand** what generative design is by defining the base concepts and terminology you need to know.&#x20;
* **explore** how these techniques can be used to solve practical challenges commonly found in AEC design projects.
* **learn** how to use Autodesk’s newest generative design tools such as Generative Design for Revit and Dynamo, through practical workflows.

## Why Make a Primer?

Autodesk is working to **democratize technologies** that can help designers in the AEC industry automate the creation of design options and optimise those designs to achieve better outcomes.

![](/files/-LrPm4WA7-lSFgBft8Ih)

Using these technologies requires new skills and new ways to think about design. We created this primer to explain the terminology, ideas, and methods you will need to understand to begin using generative design workflows and tools that support this new approach to design.

*Note: there are many different applications of generative design/art, and this primer does not aim to cover them all. This primer is focused on AEC methodologies and how these apply to both Generative Design/Dynamo*

**matterlab** was commissioned to kick-start the development of this primer, we thank them for all their efforts in establishing this valuable resource.

[![](/files/-LrPm4WCbPTDoWVerSPW)](https://www.matterlab.co/)

## Open-Source

This primer is an open source project initiated by the **Computational Design and Automation team** at Autodesk and we are dedicated to providing high-quality content on generative design in this primer.

Contributions are of course welcomed. You can contribute to the primer in the following ways:

* You can report any issue you may have found on our [issues page](https://github.com/DynamoDS/GenerativePrimer/issues).
* If you’d like to improve, clarify, or add content to the Primer, please head over to our [Github repository](https://github.com/DynamoDS/GenerativePrimer).
* Have an example workflow of generative design? Head over to our [contribution guidelines](https://github.com/DynamoDS/RefineryPrimer/blob/master/CONTRIBUTING.md) and see how you can add it to the Community examples section.

## Contact

Let us know about any issues with this document.

<aecgdfeedback@autodesk.com>

## License

Copyright © 2021 Autodesk

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at the following link:

<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


# Introduction to Generative Design

In this chapter, we’ll look at key concepts that are essential to understanding generative design and how Generative Design for Revit and Dynamo works.

![](/files/-LrPm43oGFufCjyC6Jg8)

In this section, we will explore the following topics:

* the fundamental concepts needed to understand generative design
* a definition of generative design in the context of AEC
* an introduction to Generative Design for Revit and Dynamo
* examples of using generative design to solve design problems
* common approaches used
* related concepts

Let’s start by looking at something you are likely to be familiar with and already using today: computational design.


# Computational Design

*`Computational design`* is not any one algorithm or off-the-shelf process you can utilize. Rather, we describe it as an approach whereby a designer defines a series of instructions, rules and relationships that precisely identify the steps necessary to achieve a proposed design and its resulting data or geometry.

Crucially, these steps must be computable, meaning they can be understood and calculated by a computer.

![](/files/-LrPm4G0OlDezQLF3mI0)

> *Above: Image of an NURBS manipulations from Martin Stacey - UCL.*

Put simply, computers are very good at performing calculations and executing pre-defined steps.

When approaching a design computationally, the designer would focus on developing the procedure that would create a design - not the design itself. The process of iterating through options and data are offloaded to a computer. This saves time, money and effort, and lets the designer focus on the creativity of the design process.


# Generative Design

In this section, we’ll look at what the term 'generative design' means in relation to the AEC industry.

We will look at the following:

* [What is Generative Design?](/01-introduction/01-02_generative-design/01-02-01_what-is-generative-design)
* [Why Should I Use Generative Design?](/01-introduction/01-02_generative-design/01-02-02_why-should-i-use-generative-design)
* [What Goes into a Generative Design Process?](/01-introduction/01-02_generative-design/01-02-03_what-goes-into-a-generative-design-process)
* [Examples of Generative Design](/01-introduction/01-02_generative-design/01-02-04_examples-of-generative-design)

![](/files/-LrPm4-KXCPmGWBUknRz)

> Massing analysis - Alkmaar Housing Commission - The Living


# What is Generative Design?

You may have encountered the term 'generative design' in the context of producing design permutations, creating geometry from some simple inputs, or even just building computational graphs using Dynamo or Grasshopper.

We see generative design (**/ gen·er·a·tive de·sign /** noun) as:

> A collaborative design process between humans and computers. During this process, the designer defines the design parameters and the computer produces design studies (alternatives), evaluates them against quantifiable goals set by the designer, improves the studies by using results from previous ones and feedback from the designer, and ranks the results based on how well they achieve the designer’s original goals.

![](/files/-LrPm3CRWObOFBHk0uUm)

> *Above: Some generated alternatives - Mars Innovation District - The Living*

Generative design is a specific application of the computational design approach, with the following distinctions:

* The designer defines goals to achieve a design (rather than the exact steps).
* The computer helps the designer to explore the design space and generate multiple design options (not just one).
* The computer enables the designer to find a set of optimal solutions that satisfy multiple competing goals.
* The designer compares multiple design scenarios to find a set of design options that fits the design goals.


# Why should I use Generative Design?

In a nutshell, generative design is a goal-driven approach to design that leverages automation so that designers and engineers can:

* have better insight into their designs;
* make faster, more informed design decisions; and
* explore more options using the power of computers.

## Better Outcomes and Insight

As the designer, you specify which outcomes you want to achieve for your design and how they are measured. With your guidance, the computer produces sets of optimal designs, along with the data used to prove which design performs best against your goals. By analyzing how the generated designs measure up against the set goals, you can gain valuable insight into which design aspects impact the outcome and how.

![](/files/-LrPm3kjU7IwV_8vySUn)

> Maximization of active shared spaces - Mars Innovation District - The Living

## Faster, More Informed Design Decisions

Generative design can help you find better designs for your project more quickly by leveraging what computers are good at: computation and repetition.

Computers can generate and evaluate a huge number of design variants in only a fraction of the time it would take an individual designer, allowing you to learn what does and doesn't work at an accelerated pace.

![](/files/-LrPm3klpvy6gnPCIlg1)

> *Above: Design options generated - Mars Innovation District - The Living*

## A Greater Variety of Options

With a generative design approach, the initial design parameters you input are used to generate your potential design solutions, with the only limitation being how much computer power and time you have.

For example, using traditional computational design techniques, it's feasible for you to explore ten variants (or more, perhaps). However, using generative design, an algorithm can generate thousands of variants in mere minutes.

![](/files/-LrPm3knnjzEiE5tJiV-)

> *Above: Design options generated - Bionic Partition for Airbus - The Living*

## A Collaborative Approach

The aim of a generative design approach is not to replace designers - it is to augment human capability with computation power. A good generative design process will almost always generate a range of outputs for the designer to choose from. It doesn't choose for you.


# What goes into a Generative Design Process?

## Stages

As previously discussed, a generative design approach allows for a more integrated workflow between human and computer.

When using a generative design approach, this workflow involves the following stages: generate, analyze, rank, evolve, explore, and integrate.

### Generate

The design options are created or generated by the system, using algorithms and parameters specified by the designer.

![](/files/-LrPm4DIUol_rBzHo3V9)

### Analyze

The designs generated in the previous step are now measured or analyzed based on how well they achieve the goals defined by the designer.

![](/files/-LrPm4DKwP3drg1yTDbB)

### Rank

The design options are ordered or ranked based on the results of the analysis.

![](/files/-LrPm4DMGTqTJVfS3aUV)

### Evolve

The process ranks the design options to figure out in which direction they should be further developed or evolved.

![](/files/-LrPm4DOcSGl09-MF-pI)

### Explore

The designer compares and explores the generated designs, inspecting both the geometry and evaluation results.

![](/files/-LrPm4DQ1Z6EoqAltUPj)

### Integrate

The designer chooses a favorite design option and integrates it into the wider project or design work.

![](/files/-LrPm4DSkrOcLNz5zjya)


# Anatomy of each stage

Each of these stages can be further broken down into *`define`*, *`run`* and *`results`* steps. The *`define`* step is the responsibility of the designer, while the *`run`* and *`results`* steps are performed by the computer.

Using this breakdown, let's look at what th&#x65;*`generate`* stage would entail.

### Define

![](/files/-LrPm3pF8tNW9V6UFRtY)

For the *`define`* step, the designer will need to do the following:

* Establish the generation algorithm - this is the logic that defines how designs are generated, which may include things like constraints and rules.
* Provide the generation parameters - these are the variables or inputs needed for the previously-defined algorithm.

This *`define`* step is present and vital for all stages of the generative design process, as the validity of outputs relies on the quality of the designer’s contribution in this step.

With clear and concise logic, the computer can provide suitable outputs.

### Run

![](/files/-LrPm3pHaCvnOfPKEdFP)

Once everything is defined in the algorithm and its accompanying parameters, the computer begins to *`run`*, meaning it starts to generate different design options. This process might happen locally on the designer's computer or, for more intensive calculations, it may happen using cloud computing.

### Results

![](/files/-LrPm3pJ6RE40LZNqlfM)

The things that are generated during the *`run`* step are the final outputs from each stage. These are then used as inputs or parameters in subsequent phases.

For example, the designs created in the *`generate`* phase will be used as one of input parameters in the *`analysis`* phase.

## Overall Process

We can map these stages and steps together in a single diagram, allowing us to visualize the order of each stage and their dependencies.

![](/files/-LrPm3pLm5zpsvJzsEEV)

The diagram shows us that:

* Each stage and step is dependent on the previous one.
* The entire study process is repeatable, as each iteration learns from the previous results.


# Examples of Generative Design

In this section, we'll look at several examples that illustrate how generative design can help you achieve your design goals.

1. [MaRs Innovation District of Toronto](/01-introduction/01-02_generative-design/01-02-04_examples-of-generative-design/01-02-04-01_mars-innovation-district-of-toronto)
2. [Furniture Design](/01-introduction/01-02_generative-design/01-02-04_examples-of-generative-design/01-02-04-02_furniture-design)
3. [A Further Analogy](/01-introduction/01-02_generative-design/01-02-04_examples-of-generative-design/01-02-04-03_a-further-analogy)


# MaRs Innovation District of Toronto

To design the new office and research space in the MaRs Innovation District of Toronto, Autodesk used generative design processes.

Starting with high-level goals and constraints, the design team used the power of computation to generate, evaluate and evolve thousands of design alternatives. The result was a high-performing and novel work environment that would not have been possible without this approach.

## Generate

![](/files/-LrPm4bGKpddbbAJKeoO)

> *Above: Design goals - Mars Innovation District - The Living*

The designers created a geometric system that meant the computer could explore multiple configurations of work neighborhoods, amenity spaces and circulation zones. This work represents the *`define`* step of the *`generate`* phase.

Using this algorithm, the computer varied the parameters to produce thousands of design options.

## Evaluate

![](/files/-LrPm4bINItTCQGp7WQ5)

> *Above: Design option evaluated and selected- Mars Innovation District - The Living*

For this stage, information was collected from employees and managers about work styles and location preferences. Based on this data, six primary and measurable goals were defined:

* work style preference
* adjacency preference
* low distraction
* interconnectivity
* daylight
* views to the outside

The designers then created an algorithm to measure how any given floor plan could be measured against each of the goals above. Known as *`evaluators`*, these algorithms represent the *`analyse`* and *`rank`* stages of the generative process.

After the algorithms were formulated, the computer used them to evaluate each of the designs generated in the previous stage against the defined goals.

## Explore

![](/files/-LrPm4bPUoBZTRr0NSwr)

> *Above: Design Options - Mars Innovation District - The Living*

After the designs were evaluated, the designers looked at the *`solution space`* to explore the generated designs together with their evaluation results.

Taking into account each defined goal, they identified the design that best achieved the goals overall.


# Furniture Design

Looking at a simpler example, let's consider the process of designing a typical, four-legged table.

Using a standard approach, you as the designer would manually define the length, width, height and material of the table. The resulting output is a single, physical object with a fixed, immutable form. Here, you have the option to test several distinct sets of dimensions and material combinations to end up with three or four prototypes (or however many iterations you wanted).

![](/files/-Lv616zxyO1t5JrrrErw)

In a generative design approach, you would instead create an algorithm that specifies:

* a range of permissible values for each dimension;
* a series of available materials and their properties (such as cost/m²); and
* a set of goals that measure how successful a table design is.

## Generate

Then, you would use a computer to run the algorithm and generate a series of designs that fall within the ranges you previously specified.

Some designs will be short and wide, others will be tall and thin, but each will satisfy the user-defined constraints. This is key, as many designs can be generated very quickly, much more than any human could feasibly examine.

![](/files/-LrPm367TSwagxQ0CkPz)

> Let's imagine the computer looked at 20 different values for each of: length, width, height, table/leg material combinations. The resulting solution space would be 20\*20\*20\*20 = 160,000 designs, which is way too many options for a person to reasonably evaluate.

*Above: Matrix showing 36 generated table designs, varying width, length, and height.*

## Evaluate

The next step is to define how the generated designs are evaluated. This is your opportunity to clearly express your design goals.

![](/files/-LrPm3698_l-gIG0wMji)

*Above: A range of table designs (sizes), colour-coded based on evaluator function result (cost).*

Let's see how different design goals could be expressed in this *`evaluation`* stage:

| Design goal                                                    | Analysis method                                                                                                           | Ranking method                                                    |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| lowest cost per desk, with minimum 800mm x 600mm size          | desk size: at least 800mm x 600mm in size = *`yes/no`*   and  desk cost: area \* material cost/m² = currency *`$`* value) | lowest cost first and only options that satisfy area requirements |
| most profitable  (largest desk area with lowest material cost) | desk area = outputs m²  and  unit cost (area \* material cost/m²) = currency *`$`* value                                  | largest area and lowest cost                                      |

The matrix above exemplifies how you can use this stage in the generative design process to design for wildly different scenarios.

In the first scenario, lowest overall cost is the driving goal, so we can expect small desk sizes and cheap materials while still satisfying the size requirement. This scenario would be relatively simple for humans to replicate, so generative design would only come in handy when the variation or complexity of material costs is high.

For the second scenario, we're aiming to maximize return on investment (ROI) for each desk. This means that we can expect larger, more expensive desks than the first scenario, but that still have the best overall ROI. It wouldn't be unexpected for this process to identify a desk with cheap legs and more expensive tabletop materials as a viable option.

This second scenario is a good illustration of using generative design to work towards multiple and competing goals, which is very hard for humans to replicate.

![](/files/-LrPm36BWRpnT7aeUHf8)

*Above: Visualizing evaluator function results as a color range.*

As you can see, both of these examples follow the same fairly generic process, which is why there are so many possible applications of generative design in areas as diverse as aviation, automotive and building design, manufacturing, and product design.


# A Further Analogy

Let’s now look at generative design through the lens of something most of us do on a daily basis: finding the quickest commute route to work.

In this example, let's say you’re looking to go from Brooklyn to Manhattan. You go to your favorite route-comparison website and ask it to find you the quickest route between these two locations.

![](/files/-LrPm3N1s_8uKsoXgPrb)

*Above: The Citymapper website showing possible routes between Brooklyn and Manhattan, while also considering multiple modes of transportation.*

To help illustrate this analogy, let's make a table comparing the expected activities when searching for the quickest commute route and what their equivalent would be in a generative design process.

| Map activity | Equivalent in generative design process |
| ------------ | --------------------------------------- |

| Person (you) sets first parameter: go from Brooklyn to Manhattan | Stage: generate Step: set generation parameters |
| ---------------------------------------------------------------- | ----------------------------------------------- |

| Computer generates possible routes from Brooklyn to Manhattan, taking into consideration all the available transportation modes, their operating status and set routes | Stage: generate Step: run generation algorithm |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |

| Person sets goals: quickest route | <p>Stage: rank</p><p>Step: define ranking objectives</p> |
| --------------------------------- | -------------------------------------------------------- |

| Computer evaluates each of the identified routes based on your goals | <p>Stage: rank</p><p>Step: run ranking</p> |
| -------------------------------------------------------------------- | ------------------------------------------ |

| Computer attempts to solve your goals and returns the list of routes, putting most suitable ones first | <p>Stage: evolve</p><p>Step: run evolution</p> |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------- |

| Person evaluates the list of best options and makes a choice more efficiently than if they had to do it themselves | <p>Stage: explore</p><p>Step: evaluate options</p> |
| ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |

| Person chooses preferred route and sends travel instructions to their phone | <p>Stage: integrate</p><p>Step: integrate preferred option</p> |
| --------------------------------------------------------------------------- | -------------------------------------------------------------- |

It's important to note that, because the computer knows about multiple modes of transport (walk, cycle, bus, train, etc.), it can combine them to find the best option. This means the goal we set the computer can have a big effect on the routes that are generated.

For example, if we specified that we wanted to travel by car, or that we needed step-free access, the resulting routes would be completely different.

![](/files/-LrPm3N665hIKKMPrazd)

*Above: Citymapper website showing routes that have step-free access.*

In this example, we can see that the generated routes take longer than in the first example, as the new goal is to have 'step-free access' instead of 'quickest commute'.

Though this example may be stretching the imagination (as a computer doesn't generate new transport modes, it just generates new routes using existing modes), this analogy demonstrates similar steps as those found in a generative design workflow.


# Anatomy of a Good Generative Design Process

As a general rule for developing good generative design workflows:

> Ask and answer as many questions about the activities and aspects involved in each of the [stages of generative design](/01-introduction/01-02_generative-design/01-02-03_what-goes-into-a-generative-design-process) ('generate', 'analyze', 'rank', 'evolve', 'explore', 'integrate') as you can think about.

To guide you through this process, below you'll find a helpful framework with notes, questions and pointers. This is by no means an exhaustive list, so feel free to make it your own - and maybe even contribute to this primer!

![](/files/-LrPm38BGINXmk9Z58Sp)

## Step 1: Define Your Problem

Have a clear understanding of what you want to achieve, asking yourself:

* What do you want to design?
* What are the design parameters?
* What is the reasonable range for these parameters?
* What conditions must the design satisfy?
* What must not be present in a final design?
* What makes the design a success or a failure?
* What aspects would you like to maximize or minimize?

![](/files/-LrPm38D4fvz9w1kJHsm)

Answering these questions will not only clarify the problem in your mind but it will also help break the problem into smaller components that will be used in each stage of the generative design process.

The more relevant questions you formulate and the more precisely you answer these questions, the more relevant your outputs will be from the generative process.

**Example**

> Imagine you’ve been asked by a client to design a school. You need to nail down precisely the site restrictions, number of students, teaching profile, total budget and any other mission-critical requirements as soon as possible.

As a designer, you wouldn't agree to design the school without a sufficiently defined brief. This step is crucial because a generative process cannot consider any goals that it has not been instructed to consider.

## Step 2: Sketch It Out

Now that you've written down a rough definition of the problem, it's time to look at potential solutions!

Start with the end design in mind. Think about what you want to achieve and work backwards from there, letting each section guide the next one.

Don't be afraid to draw, diagram, mind-map or use any other technique you prefer to help you document the following.

![](/files/-LrPm38FpWKq0L8qPn4b)

For the **generate** phase:

* **If possible, write down your design steps**. Generally, if you can define the concrete steps used to design something, it is much easier to create a computational model.
* **Specify constraints and anything else that will impact your design**. Is it sizes, quantities, environmental or cost factors?
* **If you are generating geometry, define the driving parameters**. Is it one of the constraints or something else?
* **If relevant, think about any dependencies or relationships between different elements in your design**. For example, when designing a masterplan, does the height of one building affect the height of its neighboring buildings? If so, define how these relationships are expressed.

For the **evaluation** phase:

* **Think about any design aspects that you'll need to measure or analyse.** Make sure you're not defining any metrics that measure the same thing, just in different ways.
* **Figure out your options for measuring or quantifying.** Are there an existing methodologies you can learn from?

Evaluation will drive the optimization process, so it contributes significantly to the overall process. As such, poorly defined evaluation criteria will result in less than stellar solutions.

For the **exploration** and **evolution** phases:

* **What key result do you want?** &#x20;
* **What kind of decision are you trying to make?** Is it choosing a single outcome (such as a design solution), an approach (comparing multiple types of solutions) or something altogether different?
* **What influences that decision?**

## Step 3: Define Inputs and Outputs

Now you need to consider your overall process - the constants and variables in your defined brief, and the solution as well. Think about the following:

* Identify which inputs will change at each stage and what this means for their value ranges.
* Identify the inputs that will remain the same across the process and across the solutions you generate.
* Be aware of 'the curse of dimensionality'. Don't over-complicate your generative design process by adding too many initial inputs and outputs. Instead, start with the minimal needed inputs and gradually add more if needed as you become more aware of what your design needs.
* Think about your goals for this step. What do you need to measure? Will the output affect next steps? If so, how?

![](/files/-LrPm38_6BxISXqjcF1N)

## Step 4: Determine Evaluation Criteria

This step will help you to target what you're most interested in discovering. Having precise rules for evaluation is critical for a generative design process to be successful.

Without anything to evaluate, the generative process will produce a random and arbitrary set of designs that may not be useful to any designer.

![](/files/-LrPm38bIKXwtPcIpK-c)

Importantly, even though adding more evaluation criteria may seem counter-intuitive as it makes the process more complex (as there is now an unavoidable trade-off that must be considered), it also means that what will be produced from it will be more realistic and relevant to your needs.

For example, if your goal is 'make a big table at minimum cost', you could add conditions to your algorithm that say 'make the largest table possible' and 'use the fewest materials possible'. While there are now more variables to consider overall, by including these conditions your algorithm will be more able to generate options for your design that are relevant and viable than if you had not included them at all.

Algorithms perform best when conditions are combined and a solution that balances them must be found.

## Step 5: Decide How to Use the Results

To get the most out of your generative design process, it's important to remember that the final step isn't necessarily where the process ends. Ask yourself some of the following questions.

* How do you want to review the results? Do you need 3D visuals, a data table, graphs or all of the above?
* Who is your target audience and what do you want them to decide on?
* How many options are you going to present to your target audience? Bear in mind that too many options to consider can be overwhelming. However, too few can make the process look shallow. Make sure to find the best balance based on the information you have.
* What do you want to do with the results? What's the next step?
* Does generative process happen only once or does it repeat? If it repeats, what changes between iterations and what can be learnt from previous ones?

![](/files/-LrPm38d4_gfOQnvitLw)


# Visual Programming

![](/files/-LrPm3wAGWHR-vRah3wf)

Visual programming is a form of coding that, unlike textual programming, does not require compiling code or familiarity with a textual programming language, such as C# or Python. Instead, it uses a visual interface where a user connects small nodes of pre-defined functionality. Together, these nodes form a larger network of functionality that can achieve complex goals.

This approach is easier to learn than textual programming and makes tasks that were previously reserved for expert coders accessible to everyone.

![](/files/-LrPm3wCZ9vsvsRQfjvH)

Recently, there has been a significant shift in the AEC industry towards visual programming. This change is becoming commonplace for many teams as the industry begins to move away from traditional tools like CAD (Computer Aided Design).

While there will always be a place for CAD tools, visual programming applications enable a new approach to design. Design no longer needs to be a series of static modelling operations, but rather a dynamic, customizable flow of tasks.

If you’d like to explore this in more detail, please refer to the sections on visual programming in the following primers (these documents are separate from this one):

* [Dynamo Primer](https://primer2.dynamobim.org/a_appendix/a-1_visual-programming-and-dynamo#what-is-visual-programming)
* [Grasshopper Primer](http://grasshopperprimer.com/en/index.html?index.html)


# Dynamo

Dynamo is an [open-source](https://github.com/DynamoDS/Dynamo) visual programming application from Autodesk that aims to be accessible to non-programmers and programmers alike.

It gives users the ability to visually script behavior, define custom pieces of logic and run custom code segments using various textual programming languages.

Dynamo can be used as a standalone product (Sandbox) or can plug into other products such as Revit, Civil 3D, Alias, FormIt, Advance Steel, and Robot Structural Analysis.

![](/files/-LrPm4IElG9KZ_PNmA8M)

For more information on Dynamo please refer to the [Dynamo Primer](https://primer2.dynamobim.org/).


# Generative Design for Revit and Dynamo

Generative Design for Revit and Dynamo is Autodesk’s latest application for generative design workflows that allows users to explore, evaluate and optimize their Dynamo designs.

The generative design toolset allows users to set multiple (and sometimes competing) design goals, generate a series of solutions and make decisions by automating the creation and evaluation of designs.

![](/files/-LrPm32bpXkMmknBw-JD)

The key benefit of using generative design workflows are that it makes it easier to optimize a design, as it handles all the back-end work of generation and iteration, presenting the user with either a single design solution or a collection of optimal solutions that best align with his or her goals.

Generative Design for Revit also allows someone who is not Dynamo-savvy to use generative design workflows since it runs already created scripts, directly from the Revit interface.

![](/files/-LrPm32d4-vWoioQ4JhV)

In short, Generative Design for Revit and Dynamo enables users to tackle the *`generate`*, *`evaluate`*, *`evolve`* and *`explore`* stages of a generative design process.

![](/files/-LrPm32kHGhKicAvRPvs)

As a technical note, generative design tools work in the following ways:

* allows a user to leverage Dynamo Package Manager and run custom nodes (including Python nodes).
* runs locally on a user’s computer.&#x20;
* can be accessed from Dynamo for Revit or Dynamo Sandbox.
* includes a node to cache Revit or other external data without the need to rely on external processes that could be computationally expensive.

Generative Design is currently available in Revit 2021.


# Deeper Dive to Generative Design

In this chapter, we'll dive into more complex concepts in the world of generative design.

![](/files/-LrPm32RmtcINqa1itqY)

We will explore the following topics:

* [Algorithms](/02-deeper-dive/02-01_algorithms)
* [Optioneering](/02-deeper-dive/02-02_optioneering)
* [Optimization](/02-deeper-dive/02-03_optimization)
* [Genetic Algorithms](/02-deeper-dive/02-04_genetic-algorithms)
* [Other Techniques](/02-deeper-dive/02-05_other-techniques)


# Algorithms

![](/files/-LrPm32pUFisbdKTja8e)

In this chapter, we'll learn about:

* [What Are Algorithms?](/02-deeper-dive/02-01_algorithms/02-01-01_what-are-algorithms)
* [Generators](/02-deeper-dive/02-01_algorithms/02-01-02_generators)
* [Evaluators](/02-deeper-dive/02-01_algorithms/02-01-03_evaluators)
* [Solvers](/02-deeper-dive/02-01_algorithms/02-01-04_solvers) (and how Generative Design behaves as a solver).

First, let's understand what the term 'algorithm' means in relation to the AEC industry and generative design.


# What are Algorithms?

There's been a growing public interest in algorithms in recent years, and this shift has in some ways created an idea that algorithms are far more complex and advanced than they actually are or need to be. In essence, an algorithm can be thought of as:

> A set of instructions that typically help to solve a problem.

![](/files/-LrPm32pUFisbdKTja8e)

## Algorithms in Generative Design

A generative design approach involves several steps with distinct types of algorithms that encode logic at each step.

The methods used in each step are very different from each other, so we generally categorize them in the following way:

| Step                               | Algorithm Type |
| ---------------------------------- | -------------- |
| generation of new design studies   | generators     |
| evaluation of each study           | evaluators     |
| ranking and solution achieves goal | solvers        |


# Generators

![](/files/-LrPm3PMEg2fQ14wqq1R)

Generators are the logic pathways that create new potential solutions in a generative design approach. In other words, they are the engine of the algorithm - they give the rest of the program something to evaluate.

Generators can be very simple, for example, a function that outputs totally random designs; or they can be highly sophisticated, for example, a network model that learns over time. Regardless of their complexity level, what they do overall is generate new data in whatever form the user desires.

In the table example we saw earlier, the generator was the block of code that created the different table designs. In another example, a generator could spit out a series of floorplans.

In the simple Dynamo example below, the highlighted node acts as the generator and creates the cuboid in the image. It takes the input values and generates a design option using these variables.

When the values change and the programme is re-run, the generator node is called into action again to create a new design option. In a generative design process, this generator could be a single function or a series of functions pieced together that produce hundreds - or even thousands - of different options.

![](/files/-LrPm3POIMDUHbWT1eGB)


# Evaluators

Evaluators (also known as 'discriminators') are fed potential solutions from the generator and assess how good or bad these options are.

For example, in a generative building design, an evaluator might describe the average amount of sunlight that a façade will be exposed to over a one-year time period.

In design, evaluators must be specified mathematically. This is because they have to provide a number for the algorithm to use to discriminate between solutions.

![](/files/-LrPm3nTdfbeZ6x4dWw8)

Again, in the simple Dynamo example below, the highlighted nodes are evaluators. They are nodes that query a particular property of the design option - in this case, the volume and surface area of the cuboid.

These evaluators allow the user or program to interrogate each design option and pick the best one based on aspects they want to include e.g. 'maximum volume', 'minimum surface area', etc.

![](/files/-LrPm3nVQ_4qFViOH-PH)


# Solvers

'Solvers' are a tools that can automatically run a script many times that contains both generators and evaluators.

![](/files/-LrPm3sJVV9DhWCx3-pF)

Solvers typically require inputs to be very specific. Often, the greatest challenge is defining your problem in a way that a solver can understand.

To take a simple example, your phone’s calculator is a solver for addition, subtraction, and division – but it only works if you punch things in correctly.

A solver can use different methods to process these scripts in different ways. The methods currently available in Generative Design are listed below.

## Randomize

'Randomize' generates a specified number of design options by randomly assigning a value to each of the input parameters. This process is used for optioneering processes in Generative Design.

![](/files/-LrPm3sLBJnZnaTSLT4z)

## Optimize

'Optimize' is the method for doing an optimization run with Generative Design. During an optimization run, Generative Design will develop the design based on the evaluator's outputs.

The optimization process works by creating multiple 'generations' (or iterations) of a design, where each iteration will use the input configuration from previous generation to optimize the new design options.

![](/files/-LrPm3sNvht5VWRgR0QN)

## Cross Product

'Cross Product' lets you explore the entire design space of your design by combining each step of every parameter with the other parameters available.

![](/files/-LrPm3sPSsL_9eVYTGFY)

## Like This

'Like This' will make Generative Design apply slight variations to your current input configuration. Using this method, you can explore different variations of a design that you already like.

![](/files/-LrPm3sRsuixIUNOR1P_)


# Optioneering

## What Is Optioneering?

Optioneering involves creating design options that are visibly related to their parameters. It can be used to explore a design space quickly when you might not know what metrics you want to optimize for yet.

After performing optioneering methods, the designer can sort and filter design variants to identify which options fit their design goals.

![](/files/-LrPm3v8HYsISzSC9uhh)

The image above illustrates a simplified example of optioneering. Imagine you want to mix a cocktail drink. You can gather some possible ingredients and mix them in different measures. A visual way of representing and exploring alternatives is an optioneering graph. There, you can align all of the ingredients (variables) and, by varying their quanitities, you can show the different possible outputs.

## Advantages

* Gives you a direct relation between variables (or input) and design results (or output).
* Helps you to define the design span that you want to explore.&#x20;
* Enables the user to change variables manually.&#x20;

## Going Back to Architecture

In the AEC industry, you have variables instead of ingredients and design options instead of cocktails - but the concept remains the same.

![](/files/-LrPm3vAqL4Jfyqps1C8)


# Optimization

![](/files/-LrPm33LxQQxDRTD6ewd)

In this chapter, we’ll look at:

* [What Is Optimization](/02-deeper-dive/02-03_optimization/02-03-01_what-is-optimization)[?](/02-deeper-dive/02-03_optimization/02-03-01_what-is-optimization)
* [Objective Functions](/02-deeper-dive/02-03_optimization/02-03-02_objective-function)
* [Constraints](/02-deeper-dive/02-03_optimization/02-03-03_constraints)
* [Data](/02-deeper-dive/02-03_optimization/02-03-04_data)
* [Defining Goals](/02-deeper-dive/02-03_optimization/02-03-05_defining-goals) (and objective criteria)

First, let's explore what optimization means in relation to the AEC industry and generative design.


# What is Optimization?

![](/files/-LrPm455eipMYle9Rhex)

Optimization is an inherently mathematical subject. It is about maximizing or minimizing some mathematical function to arrive at the best possible solution to a problem, and involves creating design options that are shaped by certain outcomes as they are being created.

Optimization problems arise in all kinds of fields, from aerospace engineering to architectural design. However, regardless of domain, every optimization problem has three features:

1. An objective function.&#x20;
2. Constraints.
3. Data.


# Objective Function

An objective function is the output that you want to maximize or minimize. It is what you will measure designs against to decide which option is best.

The objective function can be thought of as the goal of your generative design process.

In finance, the objective function is usually to maximize portfolio value; in aerospace engineering the objective is often to minimize weight.

![](/files/-LrPm3kD9vCl59GcI-ZD)

> The key to objective function is that it must be quantifiable - you must be able to put a number to it.

In generative design workflows, we are not limited to one objective ('single objective optimization') - we can also have multiple objectives or goals that we are trying to optimise our design against ('multi-objective optimization').

## Single Objective Optimization

Single objective optimization is when we have only one objective function.

In this scenario, the computer will return a single optimal solution e.g. the surface with largest area.

## Multi-Objective Optimization

![](/files/-LrPm3kFTPG5v144Os2J)

Multi-objective optimization involves using multiple objective functions.

Usually, optimizing designs involves multiple objectives that compete simultaneously. In this context, optimization becomes a matter of finding the best trade-off between objectives, rather than finding the single best solution.

Even though adding more objectives makes the optimization process more complex, it also means the designer can choose from a set of optimal solutions instead of just one.

Imagine having to optimize a structural design. We want the structure to be as light as possible, but at the same time we want it to be as rigid as possible. Here we have have two competing objectives where one will produce the lightest solution and the other the most rigid solution. In between those, there will be a huge number of designs that vary in weight and stiffness.

The designs that cannot be improved in one objective without compromising the other are known as a 'pareto optimal solutions'. For a solution to be placed in the 'pareto optimal set', it cannot be dominated by another solution.

If a solution is worse than another solution on all objectives, it is dominated and will not be included in the pareto optimal set.


# Constraints

![](/files/-LrPm4HMsOaw4omeOpPe)

A constraint is a condition that the solution of an optimization problem must satisfy. In the table example we saw earlier, the constraints could be:

* 'the table must have four legs'&#x20;
* 'the table must be at least 50cm wide'&#x20;
* 'the table may be no more than 1m tall', or&#x20;
* 'the table cannot be blue'.

Constraints give a model its realism; they ensure that a solution only includes realistic values or values that the user knows are critical to the design brief.

If a model is unconstrained, it's likely to return absurd results that aren’t useful, for example, here it could be a circular table that is three metres high with a single leg that balances on a point.

Constraints are vital because they ensure that a generative design algorithm outputs something realistic and reasonable.


# Data

Data is the fundamental 'stuff' that you feed into your optimization model - the inputs and outputs that the objective function and constraints use to produce design solutions.

![](/files/-LrPm48sS40KYi8jHRoz)

In design, data could be the density or price of construction materials, how many hours of sunlight a room can expect to receive in a day, or any goals that are important to your design exploration that you can define mathematically. In finance, data could be the assets you can buy or sell, and their prices; or, in the aerospace industry, data could be the unit weights and costs of carrying a certain kind of fuel.

The optimization model in the generative design toolkit takes this data and uses it to maximize or minimize values as specified by the designer.

Real-world optimization problems are invariably solved algorithmically and there are often many algorithms that can solve the same problem. The most common algorithm used in Generative Design for architectural and engineering workflows is called the 'genetic algorithm'. We will cover this later on.

![](/files/-Lrp-IioAdhlebqEv9aR)


# Defining Goals

When it comes to generative design processes, it is vital that you know your design parameters inside and out.Every good generative design project starts with a clear and precise understanding of the design problem and a clear description of the goals.

Algorithms are great at churning through thousands of design options very quickly, but they don’t perform nearly as well if they're given vague or imprecise instructions. You must be able to define your problem in a mathematical way (i.e. with some sort of number that can be used to rank outcomes).

![](/files/-LrPm4L-XJC6KF_4cxE2)

Some good questions to ask when formulating design goals are:

* What do you want to achieve? &#x20;
* Which features must your ideal design have?&#x20;
* Which features cannot appear in your ideal design?&#x20;
* Do you simply want to see a lot of design options?&#x20;
* Do you want to optimize your design for some specific characteristic?&#x20;
* Do you want to optimize your design for multiple competing characteristics?&#x20;
* What would you like to maximize? Why?&#x20;
* What would you like to minimize? Why?&#x20;
* Can your maximization or minimization question be quantified mathematically? If so, how precisely?

Being able to confidently answer at least some of the questions above is a good first step to figure out precisely which objectives your computational procedure should have.


# Genetic Algorithms

![](/files/-LrPm3WJBXxToVOIHGBz)

In this section, we’ll look at genetic algorithms.

We will cover the following:

* [What Is a Genetic Algorithm?](/02-deeper-dive/02-04_genetic-algorithms/02-04-01_what-is-a-genetic-algorithm)
* [Inizialization Phase](/02-deeper-dive/02-04_genetic-algorithms/02-04-02_initialization-phase)
* [Evaluation Phase](/02-deeper-dive/02-04_genetic-algorithms/02-04-03_evaluation-phase)
* [Selection Phase](/02-deeper-dive/02-04_genetic-algorithms/02-04-04_selection-phase)
* [Crossover Phase](/02-deeper-dive/02-04_genetic-algorithms/02-04-05_crossover-phase)
* [Mutation Phase](/02-deeper-dive/02-04_genetic-algorithms/02-04-06_mutation-phase)


# What is a Genetic Algorithm?

A genetic algorithm - specifically [NSGA II](http://vision.ucsd.edu/~sagarwal/nsga2.pdf) - is a kind of optimization algorithm that is popular in generative design applications.

Genetic algorithms tend to be very useful when your objective function is highly complex, subject to randomness, or is discontinuous.

In technical terms, it is an example of an 'adaptive heuristic algorithm'. You might also hear it referred to as an 'evolutionary algorithm' - this is because genetic algorithms were inspired by the process of evolution by natural selection.

In a genetic algorithm, the 'fittest' individuals (or the potential solutions) from a 'population' of possible solutions are selected for reproduction and their 'genes' are passed on to future 'generations'.

![](/files/-LrPm3TE4jREjNhPQqcS)

In generative design processes, the \_'\_genes' are the parameters of our model. These are the values that drive our design and will either consist of a single value or a range of acceptable values.

![](/files/-LrPm3TGJMO3bLBEkZt9)

A typical genetic algorithm has five phases:

1. [Initialization](/02-deeper-dive/02-04_genetic-algorithms/02-04-02_initialization-phase)
2. [Evaluation](/02-deeper-dive/02-04_genetic-algorithms/02-04-03_evaluation-phase)
3. [Selection](/02-deeper-dive/02-04_genetic-algorithms/02-04-04_selection-phase)
4. [Crossover / Reproduction](/02-deeper-dive/02-04_genetic-algorithms/02-04-05_crossover-phase)
5. [Mutation](/02-deeper-dive/02-04_genetic-algorithms/02-04-06_mutation-phase)

![](/files/-LrPm3TI57kjTUXtuCts)

Each of these phases repeats itself over generations (or iterations), where each iteration uses the data from the previous generation to inform the next.


# Initialization phase

The genetic algorithm begins with an initial population from which the selection process begins.

Each 'individual' - or design option - in the population is a potential solution to the overall design problem. Each individual has a unique set of features - long legs, short legs, wide top, thin top, heaviness, lightness, etc. These features are the design options' genes and are what we use to evolve our design.

Some of these features are desirable, others are not. The algorithm leverages the differences between the design options to converge to the best possible solution.

![](/files/-LrPm3Lnj3P-00k41NBx)

Importantly, a genetic algorithm always begins with a set of potential solutions. When doing generative design with Generative Design for Revit and Dynamo, this initial population is created randomly, based on a 'seed' of fundamental input data.

Often, a generative design algorithm is even used to create the initial population that can be fed into a genetic algorithm. In the initialization phase, it is important to consider how this initial population might vary. For example, if there is little or no variation in the population, then there is little chance that a good evolution will happen.

![](/files/-LrPm3LptoICTKBift6o)

To ensure there is good variation in your initial population, it is important to remember *\*\**&#x74;he following:

* At least some of the genes need to have a range so that their values can change between generations.
* The population size needs to be 'large enough'. The question of when a population is large enough is difficult to answer. Generally, it depends on the project, the number of genes, and the gene value range. A good rule of thumb is to set the population size to at least 3x the number of inputs. If the results don't start to converge to an answer, you may need to increase the population size.


# Evaluation Phase

## What Do You Mean by ‘Fitness’?

A 'fitness' function is essentially the objective function for the genetic algorithm - it's the thing you want to maximize or minimize as you develop your design; the thing you care most about achieving overall.

A fitness function is used to evaluate how close (or far off) a given design solution is from meeting the designer’s goals.

The genetic algorithm is designed to improve the model's fitness again and again, so defining a fitness function precisely and accurately is vital.

![](/files/-LrPm3A_ELFtx1qwBLCI)

Some examples of fitness functions that could be used in a generative design context include:

* 'Maximize hours of daylight for each desk in an office'.&#x20;
* 'Maximize circulation in common areas'.
* 'Minimize number of distinct part types needed to assemble an object'.
* 'Minimize number of total parts needed to assemble an object'.&#x20;
* 'Maximize the structural strength of a critical component in a product'. &#x20;
* 'Minimize the fuel needed to power a vehicle'.&#x20;
* 'Minimize the weight of a design'.&#x20;

You can see here that these suggestions are always framed as either a maximization or minimization problem. As discussed above, this formulation is crucial for an optimization approach to be effective.

![](/files/-LrPm3AbB26vN2x51uSf)

Another thing to consider is that it's desirable for fitness functions to be calculated very efficiently by a computer; that is, a good fitness function can be calculated quickly. With experience, a user comes to learn which kinds of fitness functions are likely to be particularly fast or slow.

One of the great strengths of a genetic approach is that the fitness function can be quite complicated without impacting the genetic algorithm's ability to execute.

In fact, a single genetic model can have multiple competing fitness functions for example, minimizing the weight of a design while also making it as structurally sound as possible (this is also known as 'multi-objective optimization').

![](/files/-LrPm3AdzV0fG65jeCBA)

Only once a fitness function has been defined can the selection phase of a genetic algorithm begin.


# Selection Phase

At each iteration, a certain proportion of the population (or, a subset of potential design solutions) is 'selected' to 'breed' so that their features can be passed on to the next generation. Because the goal of a generative algorithm is optimization, we want it to converge high-quality traits in order to provide the best solution possible.

This value is currently fixed in Generative Design and is not yet available as a setting.

Given this, it makes sense to select only those solutions with the best possible features for breeding.

![](/files/-LrPm3WPG0lCCvzNwp-8)

Remember that individuals with a higher fitness score have better genes ([see previous section for a detailed discussion of fitness and fitness functions](/02-deeper-dive/02-04_genetic-algorithms/02-04-03_evaluation-phase)).

In the selection stage, selection is done on the basis of the fitness value created by the fitness function. Individuals with a higher fitness score are more likely to be selected to breed. In this way, good features are preserved in the population and passed on to future generations.

As a final note, in certain circumstances it can be exceedingly difficult - or even impossible - to define a useful fitness function. If one can be defined, we need to be able to describe it with a numerical fitness value for it to be useful.

Randomized sampling and simulation are two useful workarounds for when we faced with this challenge.


# Crossover Phase

The 'crossover phase' is is the breeding stage. Crossover can be very complex but, at a basic level, two 'parent' solutions are selected to breed. Some proportion of each parent’s features are selected and swapped (or crossed over) with the other’s, thereby generating a pair of 'offspring' solutions that are similar, but not identical to, their parents.

The new offspring will have a combination of both parents' features.

![](/files/-LrPm4BmlQBt0JeTm4bw)

The goal, of course, is for the offspring to be fitter than their parents. In general, after each round of breeding, the average fitness score of the population will have increased, although this is by no means guaranteed.

This happens because only the fittest parents are selected for crossover. Repeating the selection and crossover process leads to greater average fitness with each successive generation. The intention is then to converge genes to achieve the best possible fitness levels.


# Mutation Phase

Here, randomness is introduced to algorithm. With mutation, certain offspring are subject to (low probability) random mutations at each crossover, meaning that some of their traits randomly change (or mutate) and are not inherited from their parents.

![](/files/-LrPm35WdCzu-9fAk8ML)

The motivation for mutation is that, with some luck, a mutant offspring may have even better features than its parents, making it more likely to be selected for crossover in the next stage and that its good genes become entrenched in the population.

The logic is the same in biological evolution - for example, mutation allowed sea creatures to finally walk on land. Mutation is therefore useful for ensuring genetic diversity.

In technical terms, mutation helps to ensure that the algorithm doesn’t get stuck at a local optimum – that is, a set of features that are arguably quite good but still not the best.

This might happen when a set of good features is identified early on and the algorithm quickly breeds a lot of offspring with these features. Without mutation it can be hard to break out of this cycle and find an even better solution.

By lowering the odds of a random mutation at each crossover, the algorithm is more likely to converge to a global optimum - the best possible solution for that problem.


# Other Techniques

![](/files/-LrPm3c4Pn1RXIZXgXxL)

There are many techniques that can be used to tackle a Computational Design problem.

In addition to the genetic algorithm, other examples include:

* solving with pen and paper&#x20;
* manual guess and check&#x20;
* set packing or partitioning algorithms&#x20;
* gradient descent &#x20;
* stochastic (or, random) local search and filtering results to find a desired maximum, minimum, or median values.
* linear, integer, or quadratic programming &#x20;

Some of these techniques are quite basic and easy to implement (see the '[Optioneering section](/02-deeper-dive/02-02_optioneering)'); others are far more sophisticated. Choosing the right technique for your application is tricky and much more of an art than a science. Often, it comes down to the precise design question you are tackling and your familiarity with a given technique.


# Genetic Algorithm Q\&A

## 1. What is the “Seed”? in Optimization settings?

> The seed uses an internal random number generator (RNG) to set up a starting point for generating the initial population as well as other logic, such as crossover, mutation, and selection.

## 2. If we set the number of seeds on two instead of one, would we produce two different starting populations of one bird type (for example two different bird populations on two islands)?

> Yes, since the random number generator (RNG) uses a different seed, the initial population will also be different.

## 3. If I set 20 for my population size and 2 for my seed, will be my starting population for the first generation 20\*2=40?

> No. The seed is completely independent of the population size. In this case, the population size in every generation is 20. The seed is a starting point set by a random number generator (RNG), which affects the sequence of random numbers it produces. These random numbers are then used to drive various procedures in a genetic algorithm.

## 4. What exactly can I change with the adjustment of the seed? I am aware that the result will change in general, but what exactly do I do with it? And what does that have to do with the evolutionary process in NSGA-II?

> Various components in our customized implementation of NSGA-II involve stochastic logic, such as design of experiments (DoE), crossover operators, mutation operators, selection operators, and occasionally tiebreaking in NSGA-II itself, etc. They rely on a random number generator (RNG) to create random inputs for their behavior. The seed is made available mainly for the following reasons:
>
> 1. Although NSGA-II is generally considered a global optimization algorithm, in practice only a limited subset of the entire design space is explored in one optimization run. Using different seeds in multiple optimization runs allows exploration from different starting points and in different directions.
> 2. To collect statistics over multiple experiments involving a stochastic process, it is common practice to run the process multiple times with different random settings (seed) to reduce influences of outliers from randomness.
> 3. With all the other settings known and the seed fixed, it is possible to reproduce the exact outputs for debugging, analysis and sharing. The seed itself does not carry specific meaning. With all the other optimization settings fixed, it can be understood as a unique input used to create a specific set of solutions.

## 5. What happens in the background when Generative Design is set to the “optimize” method

> The optimize method uses NSGA-II. A detailed description of the main loop of NSGA-II can be found in the paper titled A Fast Elitist Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization: NSGA-II . A few key features of NSGA-II:
>
> * Elitism
> * Dominance-based
> * The use of crowding distance
>
> Generative Design in Revit formulates the design problem into as a multi-objective optimization problem, and designs into as solutions with inputs and outputs. Internally, Generative Design in Revit executes a customized implementation of NSGA-II, which produces, evaluates, and evolves these solutions, in parallel if applicable, in search of high-performing designs in terms of objectives.

## 6. Can the cross over and mutation settings be controlled in Generative Design in Revit?

> As of GD version 23.2.19.0 – no, cross overcrossover and mutation settings cannot be controlled. Crossover is set at 0.8 and Mutation is set at 0.4. We consider NSGA-II as an algorithm framework with components such as crossover operators, mutation operators, design of experiments (DoE, for creating initial populations), etc. The crossover probability and the mutation probability are more like parameters specific to the corresponding components, and they may vary or be tuned based on the problem formulation or experiments.

## 7. How does mutation probability work?

> The mutation operator in a genetic algorithm randomly changes the inputs of a solution in certain ways, known as mutation. The mutation probability determines how likely mutation is applied to each solution during the evolution process.
>
> The randomness introduced by mutation helps keep the population from getting stuck at a local optimum prematurely by encouraging the population to explore directions that would not be possible with crossover alone, the latter of which aims to create improved child solutions by recombining the good parts of parent solutions. However, excessive mutation would disrupt the population so much that no good solutions can be produced or be kept (by the selection operator) over time. Thus, the mutation probability is typically a lot lower than crossover probability.

## 8. Why do I get a different number of design options in the Explore Outcomes dialog than the number I entered in the Population Size in the Create Study dialog?

> This is due to the archive strategy used in Generative Design in Revit. In our terminology, an archive strategy determines which solutions are kept as the final solutions to be returned from optimization, and there are multiple options which are not exposed via UI. Note that there is an optionyou are able to export results with all of the discarded options included.
>
> One trivial archive strategy is to simply return the last population of the evolutionary process, as mentioned in the question. In this case, the number of final solutions is exactly the population size.
>
> The archive strategy used in Revit GD is Pareto Set (<https://en.wikipedia.org/wiki/Pareto\\_front>). It contains the best solutions from the entire evolutionary process based on dominance, and the number of solutions might be larger or smaller than (or rarely the same as) the population size.
>
> The reason for using Pareto Set is that populations in genetic algorithms often sometimes suffer from deterioration in terms of objectives over time (generations), and high-performing solution solutions can be lost during the process if we simply return the last population. However, there are tradeoffs between various different archive strategies. For instance, the number of solutions in a Pareto Set could be less predictable.


# Hello Generative Design for Revit and Dynamo!

In this chapter, we’ll look at how we can use generative design principles to solve real-world design problems. We will do this by looking at a few common design challenges.

![](/files/-LrPm3V-nnGetd7v8fjj)

Although a generative design approach may sounds complex, it's important to remember that it's not limited to solving complex design problems; it can solve simple ones too.

In fact, once a designer has a computational design process set up, generative design approaches can help solve design questions easily, eliminating large amounts of manual work for easy and complex design problems alike.


# Installing Generative Design

The generative design toolset is available to all AEC Collections subscribers starting with Revit 2021.

[https://www.autodesk.com/solutions/generative-design/](https://www.autodesk.com/collections/architecture-engineering-construction/building-design?plc=AECCOL\&term=1-YEAR\&support=ADVANCED\&quantity=1#internal-link-generative-design-in-revit)

![](/files/-LrPm3ik0LIes91xPBZp)

## The Generative Design Community

The Generative Design Community is part of the Dynamo community. Visit <https://forum.dynamobim.com/c/generative-design/21> to set up your account with your Autodesk credentials to gain access to:

* Provide feedback and ask questions to the AEC Generative Design team.
* Discuss and collaborate with fellow Generative Design community members.

![](/files/-LrPm3ioA4ycEXAo734n)

*Above: The Generative Design community homepage.*

## Installing Generative Design for Revit and Dynamo

Starting with Revit 2021, Generative Design is available to all AEC Collection subscribers and can be found in the Autodesk Desktop App or [manage.autodesk.com](https://manage.autodesk.com).

After you have Generative Design for Revit installed, feel free to explore all of the learning resources on the [help guide](https://help.autodesk.com/view/RVT/2025/ENU/?guid=GUID-4E62D48A-783C-45F7-BD0D-F58E986E93F8).


# Setting up a Graph for Generative Design

## Setting Up a Graph for Generative Design

### Inputs

To set up a Dynamo graph for use with generative design tools, right-click on each node used to drive the graph and ensure that the *`Is Input`* option is checked. Renaming the node with a standard approach such as *`IN_description`* will help to distinguish these inputs in the Create Study dialog. Or you can group inputs together and give the group a descriptive header.

1. Right-click on each node used to drive the graph and ensure that the 'Is Input' option is checked.
2. Rename the node as explained above.
3. For slider nodes, set values for Min, Max, and Step values.

*Note: Current supported inputs include 'Number' or 'Integer' slider, 'Boolean', 'Number', 'string' or 'Revit Selection' nodes.*

![](/files/-LrPm3RD34f1FGvJhqME)

### Outputs

To define outputs for use with the generative design tools, right-click on the Watch nodes and select the *`Is Output`* option. Renaming the node with a standard approach such as *`OUT_description`* will help to distinguish these outputs in Generative Design. Or you can group outputs together and give the group a descriptive header.

1. Right-click on the watch nodes and select the Is Output option.
2. Rename the node as explained above.

*Note: Currently all outputs must be watch nodes with a 'Number' data type.*

![](/files/-LrPm3RH8kKdkEBK-8MQ)

### Export to Generative Design

Once both inputs and outputs are set up correctly and your graph is saved, it can be exported for use with the generative design toolset.&#x20;

To create an export to use with Generative Design, do the following:

1. In Dynamo, navigate to the menu > Extensions > enable Graph Status. Under Graph Type, save the graph as Generative Design. When the graph is saved, Generative Design will create a copy of your graph, which will be available to launch.

![](/files/-LrPm3RNzwzr4-i2unYG)

Generative Design will also create a dependencies folder with relevant packages loaded.

![](/files/-LrPm3RLGX53jf_B8E2j)

### Launch Generative Design

To launch Generative Design, do the following:

1. In Revit, navigate to Manage > Create Study in the Generative Design tab.

![](/files/-LrPm3RJXK5E3ndzTM0N)

Once the Create Study dialog has launched, you can map to your own folders where you saved your studies.

![](/files/lmNQFd5h5W0tcvNjWLLX) ![](/files/NUpqTQhihRR6RRCiln9V)

***

## Getting Creative with Inputs

### Creating an Interactive Date/Time Picker with Generative Design

We often run analyses that depend on time of day. Within Revit, we can use the time from the current model. But there are other ways.

In Dynamo Core, we have the ability to define a `DateTime` object with the following node:

![](/files/-MSEVYnVEnOdqYCIC2vv)

`DateTime.FromString`

Using this node, we can provide inputs that are usable in Generative Design by combining them into one string.

![](/files/-MSEVYnXzxBD4KVZPDZ7)


# Running Generative Design

Studies can be run using different methods. In the Create Study window, you can choose from four different generation methods (find out more about this in the [Solvers](/02-deeper-dive/02-01_algorithms/02-01-04_solvers) section).

## How to Run an Optioneering Process

An optioneering process lets you explore all possible solutions that the graph can produce. Generative Design will generate the solutions based on the constraints that were defined in the Dynamo graph.

To run an optioneering process, follow these steps:

1. Launch **Create Study** from the Generative Design menu in Dynamo.
2. Select a graph and select **Randomize** from the **Method** drop-down as the generation method (see the [Solvers](/02-deeper-dive/02-01_algorithms/02-01-04_solvers) section for more information).
3. Under **Inputs**, make sure that all the desired inputs are present. For inputs that should not change on each run, uncheck the box alongside it and set the desired value.
4. Under **Generation Settings**, choose how many solutions you want to create.
5. Under **Generation Settings**, select a random seed (or number) to begin the randomization with, or use the default value.
6. Under **Issues**, resolve any items.
7. Finally, click **Generate** to run your optioneering process.

<figure><img src="/files/VzEvJoCI5HTrQ1h902FB" alt="A graph in Define Study with x, y, and z inputs using the Randomize method"><figcaption></figcaption></figure>

## How to Run an Optimization Process

An optimization process uses the computer to evolve your design to find the most suitable options, based on the constraints and goals provided.

Generative Design uses [NSGA-II](https://www.iitk.ac.in/kangal/Deb_NSGA-II.pdf), an elitist multi-objective genetic algorithm to optimize results.

To run an optimization process in Generative Design, follow these steps:

1. Launch **Create Study** from the **Generative Design** menu in Dynamo.
2. Select a graph and select **Optimize** as the generation method (see the [Solvers](/02-deeper-dive/02-01_algorithms/02-01-04_solvers) section for more information).
3. Under **Inputs**, make sure that all of your desired inputs are present. For inputs that should not change on each run, uncheck the box alongside it and set the desired value.
4. Under **Set goals**, go through each objective and set the optimization goal you want to achieve - Maximize or Minimize.
5. Under **Set constraints**, you can optionally set a minimum and maximum for each output.
6. Under **Generation settings**, set a population size or use the default value. This represents the number of options that Generative Design will create in each generation. &#x20;
7. Under **Generation settings**, can set the number of generations you want to create, or use the default value. Remember that each new generation is a range of options that falls between the two best designs from the previous generation.
8. Under **Generation Settings**, select a random seed (or number) to begin the optimization with, or use the default value.
9. Under **Issues**, resolve any items.
10. Finally, click **Generate** to run your optimization process.

<figure><img src="/files/YuXbIcGBMHtPgRO22588" alt="A graph in Define Study with x, y, and z inputs using the Optimize method"><figcaption></figcaption></figure>


# Visualizing Results in Generative Design

After running a generative process, the results will be displayed in the Explore Outcomes dialog in both geometric form and through a series of charts or tables. All of the resulting views are connected and selecting an option in one view will highlight it in the other displays.

## Grid view

The grid view shows each option as a 3D geometrical thumbnail that can be individually rotated, zoomed, and panned to explore the design in more detail.

The order of the thumbnails can be sorted based on the inputs or outputs of the Dynamo script, with a toggle for both ascending and descending values.

<figure><img src="/files/3NzRZowxqxfMFGiJ7717" alt="Grid view of outcomes in Generative Design"><figcaption></figcaption></figure>

## List view

The list view is another option for viewing outcomes. When chosen, it lists each option in a table, with each column representing the values for the inputs and outputs.

<figure><img src="/files/NQVxk3old9xIRrKzAt2w" alt="List view of outcomes in Generative Design"><figcaption></figcaption></figure>

## Scatterplot

The first chart in the Explore Outcomes dialog that visualizes data is a **scatterplot**. This is a type of mathematical diagram that uses Cartesian coordinates to display values across a set of data.

Generative Design allows you to select which values are displayed along both the X- and Y-axes, as well as which ones drive the size and color of the circles in this 4D view. The values can be chosen from the inputs or outputs you defined in the Dynamo graph in the previous steps.

Selecting a circle from the graph space will also highlight the chosen option in grid or list view. This graph can be filtered by clicking and dragging on each axis.

<figure><img src="/files/VI5tGJUdONcoi8qgKgLE" alt="Scatterplot in Generative Design"><figcaption></figcaption></figure>

## Parallel Coordinates

The other chart available in Explore Outcomes is a **parallel coordinates** graph, which is the default option. This chart shows a set of vertical parallel lines, equally spaced, that represent the inputs and outputs of the graph. Each design option is represented as a polyline whose vertices sit on each parallel axis. The position of the polylines vertices on the axis corresponds to the value of the input or output.

The graph can be filtered by dragging the selection on each vertical axis.

![](/files/-LrPm3jabhXjil4yUNai)

## Choosing the Right Visualization

The kind of visualization you choose for your project may vary depending on what kind of process you are running:

* If you are running an *`optioneering`* process, it may be beneficial to visualize it using a parallel coordinates chart, as it will be easier to filter options after you run them to explore different goals.
* If you are running a multi-objective *`optimization process`*, it may be beneficial to visualize it using a scatterplot chart, as it will make it easier to find the best trade-off between two objectives and see the Pareto front. For more information on multi-objective optimization and the pareto front refer to our section on the [objective function.](/02-deeper-dive/02-03_optimization/02-03-02_objective-function)


# Refinery Toolkit

The Refinery Toolkit is a collection of packages to accelerate generative design workflows in Dynamo.

![](/files/-M4QXyv-a34FYOOl4i_M)

## The toolkits

There are currently two packages included in the toolkit, each focusing on enabling specific types of workflows:

* SpacePlanning Toolkit
* Massing Toolkit

### Space Planning Toolkit

This toolkit offers a range of nodes that help with general space-planning workflows in Dynamo and Revit.

![](/files/-M4QXyv1ZHWBSZMK4KEa)

![](/files/-M4QXyv38zZJ0mPgVQca)

[Read more about the SpacePlanningToolkit](https://github.com/DynamoDS/RefineryToolkits/tree/master/src/SpacePlanning).

### Massing Toolkit

This toolkit offers resources and information about optimization and design option generation for massing.

![](/files/-M4QXyv5mCSmarcJADiq)

[Read more about the MassingToolkit](https://github.com/DynamoDS/RefineryToolkits/tree/master/src/MassingSandbox).

[Read more about the MassingToolkit for Revit](https://github.com/DynamoDS/RefineryToolkits/tree/master/src/MassingRevit).

## For more Information

For more information on the Refinery Toolkit, please visit the following page:

<https://github.com/DynamoDS/RefineryToolkits>


# Installing the Refinery Toolkit from the Dynamo Package Manager

The Refinery Toolkit is available to install in Dynamo's Package Manager.

1. In Dynamo, navigate to the **Packages** menu and click **Package Manager...**

<figure><img src="/files/VUd6lOhiwU9SwZTkPVM4" alt="Package Manager menu option under Packages in the Dynamo menu"><figcaption></figcaption></figure>

2. In the search bar, search for **Refinery Toolkit** (it should be the first item in the list). Click Install, and accept the dialogs that appear. For more information on what the toolkit does, please refer to the [GitHub repository](https://github.com/DynamoDS/RefineryToolkits).&#x20;

<figure><img src="/files/d6NawPNm8B1Wm71P78i4" alt="Searching for refinery in the Package Manager search"><figcaption></figcaption></figure>

3. Refinery Toolkit nodes will now be ready to use!

<figure><img src="/files/kdKKIhYrh5ix50xDzzaA" alt="Refinery toolkits under Add-ons in Dynamo"><figcaption></figcaption></figure>


# Using the Refinery Toolkit


# Space Analysis for Dynamo

The Space Analysis package is a collection of nodes for analyzing architectural and urban spaces.

## Supported Workflows

There are currently a few node categories to work with inside of the Space Analysis package. The included nodes support the following workflows.

* Acoustics
* Path Finding
* Visibility

### Acoustics

Acoustic simulation.

![](/files/-MSEVXwDCsmxV5QHNzw6)

### Path Finding

Path finding - with support for single or multiple start and endpoints / paths.

![](/files/-MSEVXwJ8-w-tb8TULoy)

![](/files/-MSEVXwT3nyxro0b0oqg)

## Visibility

Visibility Analysis.

![](/files/-MSEVXwVen5DUSZZ7TcK)

*image courtesy of* [*keanw.com*](https://www.keanw.com/2019/03/the-space-analysis-package-for-dynamo-and-refinery-is-now-available.html)


# Installing the Space Analysis for Dynamo package from the Dynamo Package Manager

Space Analysis is available to install in Dynamo's Package Manager.

1. In Dynamo, navigate to top menu and click **Packages** > **Package Manager...**

![](/files/tj8kZHFyUb9viWZYzTIe)

2. In the search bar, search for SpaceAnalysis, without a space between the words (it should be the first item in the list). Click **Install** and accept the dialogs to install the package. For more information on what the Space Analysis package can do, please refer to this [Autodesk University Class from Kean Walmsley](https://www.autodesk.com/autodesk-university/class/Hands-Project-Rediscover-generatively-designing-Autodesk-Torontos-office-2019).

<figure><img src="/files/I6mFRZvWMInN3jVXqI2o" alt="Searching for spaceanalysis in the Package Manager"><figcaption></figcaption></figure>

3. Space Analysis nodes will now be ready to use!

![](/files/TPkv7cuKkRGKTsjIhTej)


# Using the Space Analysis Package

The package comes with a number of sample files provided to help you get started with each of the supported workflows.

It is highly recommended to start with the samples as they contain detailed notes and instructions on how to use each of the nodes.

## Package Structure

The space analysis package is organizes into 5 main categories in the Dynamo library.

* **Core** : Core provides the framework for all space analysis workflows. This category contains the common [**SpaceLattice**](#Defining-a-Space-Lattice-with-Core-Nodes) object that is utilized in all space analysis workflows.
* **Acoustics** : This category contains nodes that support approximate acoustic analysis workflows.
* **Pathfinding** : Support for path finding workflows. This utilizes [Djikstra’s shortest path algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm). The pathfinding algorithms in this toolkit work on a grid (space lattice), with the size and resolution defined by the graph creator.
* **Visibility** : Support for visibility analysis using a [view cone](/03-hello-gd-for-revit/03-06_space-analysis/03-06-02_using-space-analysis), or a [view point](#Single-Point-Analysis).
* **Utils** : Miscellaneous utilities for use within the package.

***

## Defining a Space Lattice with Core Nodes

The Space lattice object is the base object for space analysis workflows. It is essentially a 2d grid with diagonal connections.

### Inputs:

* **boundingBox** - The Dynamo bounding box to generate a space lattice object for.
* **barriers** - A list of lines that represent areas where there would be no lattice present
* **resolution** - Space between two adjacent points of the lattice. ***(This uses your project units, so be sure to verify what those are prior to running)*** default value = 0.2

#### Simple Space Lattice with Barriers

![](/files/-MSEVY9TTNK2ek5cew1a)

Sample File: [spaceAnalysis-CreateSimpleSpaceLattice.dyn](https://github.com/DynamoDS/RefineryPrimer/blob/master/assets/hello/spaceAnalysis-CreateSimpleSpaceLattice.dyn)

Be sure to peek at the sample files in the extra folder for use-cases of the space lattice object.

***

## Acoustics

Space analysis supports general acoustic analysis which are very useful for Generative Design applications. While these analyses are not *necessarily* validated. They can be very useful to use for constraints. *(These nodes can be used towards a design goal of "buzz factor")*.

### Additional Resources for Acoustics:

* [Introducing Acoustics in Space Analysis](https://www.keanw.com/2019/06/say-what-acoustics-in-space-analysis.html)
* [Multiple Source Acoustics](https://www.keanw.com/2019/09/build-your-own-soundsystem-space-analysis-now-supports-multi-source-acoustics.html)

***

## Path Finding

2D Path finding algorithms are included in space analysis. These are achieved using and implementation of [Djikstra’s shortest path algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm).

A difference between space analysis path finding and the Path Finding in Autodesk Revit is, Space Analysis has no dependency on the Revit API - making it a perfect companion to Dynamo sandbox.

### Simple Two Point Path Finding

Probably the simplest example of this would be to use a start point and end point with a barrier in-between.

In the space analysis samples, this is demonstrated in: `spaceanalysis-pathfinding-01-one-path.dyn`

![](/files/-MSEVY9YZ0L3W9IKHlGT)

### Additional Resources for Pathfinding:

* [Using Space Analysis for Pathfinding](https://www.keanw.com/2019/04/using-the-space-analysis-package-for-pathfinding-and-visibility-in-dynamo.html)
* [A Nice Introduction to Dynamaps and Space Analysis by ThatBIMGirl](https://www.keanw.com/2019/06/a-nice-introduction-to-dynamaps-and-space-analysis-by-that-bim-girl.html)
* [Comparing Space Analysis Path of Travel to Revit 2020's Version](https://www.keanw.com/2019/04/dynamo-space-analysis-and-revit-2020s-path-of-travel.html)

***

## Visibility

Space Analysis offers a few different ways of analyzing visibility. While there are a few overlapping pieces between Space Analysis' visibility tools and [Refinery Toolkit's](https://github.com/DynamoDS/RefineryPrimer/blob/master/03-hello-GD-For-Revit/03-05_refinery-toolkit/03-05-02_using-the-refinery-toolkit.md), they can both compliment each other or simply give us other criteria to perform generative workflows on.

### Single Point Analysis

Given a [**SpaceLattice**](#Defining-a-Space-Lattice-with-Core-Nodes) object, a view point and boundaries. We are able to define a view field and perform an analysis.

![](/files/-MSEVY9eQV_V-yXJh7-1)

*Related Sample File: spaceanalysis-visibility-01-one-point-local-visibility.dyn*

More information regarding single point analysis is available in the sample files within the tool kit.

## Multi-Point Analysis

Given a [**SpaceLattice**](#Defining-a-Space-Lattice-with-Core-Nodes) object, multiple view points and boundaries. We are able to define a view field and perform an analysis.

![](/files/-MSEVY9lAd4zWPGdGOAn)

*Related Sample File: spaceanalysis-visibility-03-two-points-union-vs-intersection.dyn*

## View Cone Analysis

View cone analysis works similarly to Refinery Toolkit. With Space Analysis View Cone analysis your results will report "possible view range" within the analysis zone. While Refinery Toolkit will report if a given viewpoint is visible.

![](/files/-MSEVY9nIsZ9QdGm-jLg)

*Related Sample File: spaceanalysis-visibility-04-one-point-view-cone.dyn*

All samples for Space Analysis are available in the `extra` folder in the install directory.

Typically this is, `C:\Users\USERNAME\AppData\Roaming\Dynamo\Dynamo Core\2.10\packages\SpaceAnalysis\extra`


# Using Revit alongside Generative Design

There are many ways to integrate generative design processes with current workflows. One key method is to use it to analyze current or create new Revit geometrical and non-geometrical data.

One key method is to use it to analyze current, or create new, Revit geometrical and non-geometrical data.

![](/files/-LrPm4kxw3gWcm7x_cY-)

In this section, we’ll look at:

* [Using Data from Revit](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-01_using-data-from-revit)
* [Data.Remember Node Inputs](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-02_data-remember-node-inputs)
* [How to Test Revit Data Capture](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-03_data-capture)
* [A Detailed Example Workflow](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-04_detailed-example-workflow)
* [Sharing Logic and Results](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-05_sharing-logic-and-results)
* [Current Limitations](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-06_current-limitations)
* [Accessing Generative Design Directly from Revit](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-07_accesing-refinery-directly-from-revit)


# Using Data from Revit

![](/files/JNgRL7rVfAmrt26tpci6)

Using Generative Design in Revit can be a very powerful approach to quickly explore multiple design options. To ensure your studies are being executed efficiently, make sure to use the Remember and Gate nodes appropriately. This will enable to control data that is imported from Revit and data that is used by the generative design workflow. It is important to place these nodes because generative design requires multiple iterations and making each iteration dependent on Revit may require heavy computation time.

As seen below the Remember nodes and the Gate nodes will limit performing heavy computation tasks by only taking simple data inputs, as described in the [Data.Remember Node Inputs section](/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-02_data-remember-node-inputs), to perform generative design studies.

![](/files/YWZNkXSiAROmgu7EUwnf)

## Remember Node

The Remember node is used to store information from Revit, allowing you to use certain parameters from Revit elements in a generative design workflow.

<img src="/files/nsczC6ytHf8dczfHQTjp" alt="" width="208">

## Gate Node

The Gate node controls the flow from the generative design workflow to Revit, allowing you to create or modify Revit elements once, when you select **Create Revit Elements** inside generative design.

<img src="/files/30ufoNlaIECwhWnz6Y2b" alt="" width="315">


# Remember Node Inputs

This node is designed to capture the output of any node and cache the results in the .dyn file when the graph is saved.

It can hold both non-geometric data (such as strings and numbers) and geometric data (such as solids, points and surfaces) in a serialized format. This means that if, for example, you want to retain values in certain parameters or the underlying geometry of a wall or door, this node can handle both.

Currently, the node is limited to these data types. Attempting to pass through other data, such as a collection of Revit Elements, Generative Design will return an error saying 'cannot store data of type'.

![](/files/-LrPm4FQiJZkBJuR9h8x)

So, when you run the node inside Dynamo for Revit, the values will be stored. This means that, when you re-open your graph, this 'temporary data' will still be available to you - it will flow downstream from the Remember node as if it had come directly from the execution of the nodes that were upstream.

![](/files/-LrPm4FSfGYKwRuvMdjG)


# How to Test Revit Data Capture

To begin a workflow that uses Revit data, do the following:

1. Create a graph in Dynamo for Revit (aka D4R).
2. Use the common Revit nodes ('Categories', 'Select model element', etc.) to pull information from Revit into Dynamo.
3. Add as many Remember nodes to the canvas as you need. These nodes should be placed in between the Revit nodes and the rest of the graph. Make sure the information being passed through is the correct data type (as mentioned in the previous section).&#x20;
4. Run the graph so all Revit execute and all the Remember nodes have data passing through them.

You can now Create Study directly from Dynamo for Revit, or run it in Dynamo Sandbox to make sure you have captured all of the data that Generative Design will need to run independently of the Revit process. To do this, follow the next steps:

To do this, follow the next steps:

1. Save the graph and close Dynamo/Revit.

![](/files/-LrPm4YXHe6QyB23MmVg)

1. Open Dynamo Sandbox and the graph you just created. &#x20;
2. Re-run the graph. Everything upstream will become an unresolved node - bear in mind that the Remember node will retain the cached information.

![](/files/-LrPm4YZQAb-iIqF6s4o)

Now, Generative Design can use the data and geometry from Revit without needing to start Revit in the background each time.


# Detailed Example Workflow

In the following example, we will use the steps from the previous section to cache data from Revit and perform an optimization process to find the best solution. Then, we'll push the result back to Revit.

*Note: All sample files for this example can be found in the* [04\_sample\_files](https://github.com/DynamoDS/RefineryPrimer/releases) *folder in the GitHub repository.*

## About This Example

The intention of this workflow is to find the best location for a desk in the office floor plate, where it maximizes the number of views to the outside.

To do this, the information we need to cache in the Remember node includes all the geometry relating to the bounding elements of the room (walls, doors, windows, and internal obstructions).

![](/files/-LrPm4nYZyblORt1-VNy)

With this data, we will perform an optimization process to determine the best location for the desk from the thousands of permutations, before using the result and pushing the value back into Revit.

## Script Creation

The first step is to create our script. Remember, our script needs to contain both the generator (to create the different options) and the evaluators (to assess the performance of each option against our criteria).

![](/files/-LrPm4n_YZKmovFfbaNZ)

## Remember Node

In this example, there is little work required to extract the correct geometry from each of the Revit elements.

For this workflow, we need a set of polygons across a common plane. To get this information, we use a combinations of nodes in Dynamo to extract it from the walls, windows, and internal columns. Once we have this geometry, we can use the Remember node to cache the values in the script.

![](/files/-LrPm4nbqcwooJTfLyc-)

## Gate Node

In this example the Gate node can be used to create an instance of a desk in the desired location assigned by Generative Design.

![](/files/-M4QY6hSo99ai_uGlspr)

## Generator

The generator of the script determines how Generative Design will move the point around the available space to find the best location.

![](/files/-LrPm4ndKKUx1TDmqgZY)

## Evaluators

The evaluator of the script determines how each design option scores in relation to our overall goal. Remember the goal of this workflow was to maximize the number of views to outside.

To enable this, we have a custom node that takes in the following inputs:

* view segments (windows)
* origin (point location)
* boundary (overall floor plate)
* internals (any internal obstructions)

The output of the node returns both a visual and non-visual output:

* visible segments (sections of windows that can be seen from the point)
* score (a number between 0-1 that denotes a percentage amount of the total 360° view from the point)

![](/files/-LrPm4nfEGB9NhE0dQ8e)

## Dynamo Sandbox

With the graph correctly set up and run once in D4R to cache the data, we can close Dynamo and Revit and open Dynamo Sandbox.

As we know from the previous example, the Revit nodes upstream of the *`Data.Remember`* node are marked as unresolved, but on running the graph the values are still cached in the *`Data.Remember`* nodes.

![](/files/-LrPm4nhrIiOlF8qJpGx)

## Generative Design

Now we are ready to automate our search. In the Create Study dialog, select **Optimize** (for more details on how to run an optimization process, please refer to the [Optimization](/02-deeper-dive/02-03_optimization) section).

For this study, we want to **Maximize** the result. The automation works to solve the design problem, taking into account the pre-defined population size and amount of generations .

In Generative Design, select **Optimize** (for more details on how to run an optimization process, please refer to the [Optimization](/02-deeper-dive/02-03_optimization) section). We also want to maximize the result, so select **Maximize**.

Generative Design then works to solve the design problem, taking into account the pre-defined population size and amount of generations .

![](/files/-LrPm4noaSm-QDFrQogI)

## Revit

To use a design option from Explore Outcomes, we simply click through either the charts or tables to select our design option. More detail on this is found in the [Optimization](/02-deeper-dive/02-03_optimization) section.

When you choose your option in Explore Outcomes, the input values used by the generator in Dynamo will be set to the same nodes. Saving the graph saves these values back to the Dynamo file. If we close Dynamo Sandbox at this point and reopen Revit, we can also add additional Revit nodes to the end of the graph. This will take the point generated by the best option in Generative Design and place our desk (family instance).

Saving the graph saves these values back to the Dynamo file. If we close Dynamo Sandbox at this point and reopen Revit, we can also add additional Revit nodes to the end of the graph.

This will take the point generated by the best option in Generative Design and place our desk (or family instance).

![](/files/-LrPm4nq-6sO7tPwTeFO)


# Sharing Logic and Results

Another good aspect of the Remember node is that it gives users the ability to share Dynamo scripts and workflows that have a reliance on Revit files without having to share the Revit file itself.

If both individuals have Generative Design available in Dynamo Sandbox, then scripts can be easily shared between users while maintaining the necessary information from the Revit file.


# Current Limitations

The Remember node has the following known limitations.

It currently only works with the following data types:

* Strings
* Numbers
* Booleans
* All Dynamo Geometry Types
* Date-Time
* Location
* Images
* Lists
* Dictionaries
* Nested Lists
* Nested Dictionaries
* Mixed Lists and Dictionaries


# Accessing Generative Design Directly From Revit

In Revit 2021 and newer you'll find an add-in that lets you access generative design tools directly from Revit. This add-in is intended for users who are not familiar with Dynamo so that they can explore Generative Design without needing to create their own workflows (similar to Dynamo Player).

## Accessing Generative Design

To access Generative Design in Revit, you'll need to do the following:

1. Firstly, go to the Manage tab on your toolbar.

![](/files/ehL0JMIrcPJff6p6LF3V)

2. In the Generative Design panel on this tab are two options: **Create Study** and **Explore Outcomes**. Click **Create Study** to begin.

![](/files/ie1ykwyWtQ2xDiwlGdNt)

3. You will notice that previously created workflows appear in this window. By default, Generative Design launches with a number of sample workflows. You can add personalized workflows via Dynamo, and you can add those workflows to this window. To proceed, select a workflow you want to try.

![](/files/ld2O3EhoHf3lIqKGyMhV)

4. Follow the instructions for each section of the dialog. If a Revit input is required, select it in Revit and then return to the Create Study dialog. If you're selecting multiple elements, make sure to press **Finish** in Revit once you have selected all elements you want to include.

![](/files/-M4QY6j_dTYDPyfsMi21)

5. Once all inputs are satisfied, click **Generate**. This will start the automated processing and present you with the same window you'll have seen from the Create Study function in the Dynamo environment.&#x20;

From here, you can explore all of your different options through the charts and tables. If you select a design, you can then export your results to Revit by clicking on the **Create Revit Elements** button.

![](/files/-M4QY6jbwdsmiLtPAV4p)


# Sample Workflows

This section will explore a series of workflows that can be found in the 07-00\_sample\_files folder in the GitHub repository.

![](/files/-LrPm31Xfn7tKHzhE7dr)

The following sample workflows are available:

* [Getting Started Workflows](/04-sample-workflows/04-01_getting-started-workflows)&#x20;
* [Architectural Workflows](/04-sample-workflows/04-02_architectural-workflows)
* [MEP Workflows](/04-sample-workflows/04-03_mep-workflows)&#x20;
* [Structural Workflows](/04-sample-workflows/04-04_structural-workflows)
* [BIM Workflows](/04-sample-workflows/04-05_bim-workflows)
* [Community Examples](/04-sample-workflows/04-06_community-examples)

Click the link below to download a .zip with all of the sample workflows, or go to each workflow's page to download them individually. You can also find these sample files on the [Releases](https://github.com/DynamoDS/RefineryPrimer/releases/tag/latest) page of the repository.

[All sample workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/Revit2023.zip)

[All sample workflow files for Revit 2024](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/Revit2024.zip)

[All sample workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/Revit2025.zip)

[All sample workflow files for Revit 2026](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/Revit2026.zip)


# Getting Started Workflows

![](/files/-LrPm41-15trwtaGZmkQ)

This section will run through some simple workflows to get you started with generative design workflows:

* [Highest point of a surface](/04-sample-workflows/04-01_getting-started-workflows/04-01-01_highest-point-of-a-surface)
* [Minimum volume and maximum surface](/04-sample-workflows/04-01_getting-started-workflows/04-01-02_minimum-volume-and-maximum-surface)


# Highest Point of a Surface

The *`01-01_EvaluateSurface.dyn`* graph in the examples uses a single objective optimization approach to find the highest Z point on a sinuous surface.

The objective of the graph is to get the orange sphere to the highest peak of the surface.

[Workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2023_01-01_HighestPointOfSurface.zip)

[Workflow files for Revit 2024](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2024_01-01_HighestPointOfSurface.zip)

[Workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2025_01-01_HighestPointOfSurface.zip)

[Workflow files for Revit 2026](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2026_01-01_HighestPointOfSurface.zip)

![](/files/-LrPm31-lnW6iMJ3lmga)

U and V Point values are used to move the sphere across the surface. Because these values are the driving inputs, they need to be marked as *`IsInput`* for the Create Study dialog to recognize them.

![](/files/-LrPm3113EoRxhoysi-L)

In order to know when the sphere is at the highest peak, a measure of the Z value is made every time the sphere moves - this represents the fitness value.

When creating a study of this graph, follow these steps:

1. Use the 'Optimize' generation method.
2. Under 'Inputs', make sure that all inputs are checked.
3. Under 'Outputs', set the 'Z Point Value' to 'Maximize' . If you want the lowest point, set it to 'Minimize' .&#x20;
4. Under 'Settings', input your 'Population Size' and the number of 'Generations' you want. &#x20;
5. Under 'Issues', resolve any items.
6. Click 'Generate' to run the optimization process.

![](/files/-LrPm3137df1TJDOp9SB)

As this is a single optimization problem, the system will return only one, global optimum result - in this case, the highest peak on the surface.


# Minimum Volume and Maximum Surface

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.

[Workflow files for Revit 2022](https://help.autodesk.com/view/RVT/2022/ENU/?guid=GUID-3B0AA77C-27BA-4967-8026-690D42611FC4)

[Workflow files for Revit 2023](https://help.autodesk.com/view/RVT/2023/ENU/?guid=GUID-3B0AA77C-27BA-4967-8026-690D42611FC4)

[Workflow files for Revit 2024](https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-3B0AA77C-27BA-4967-8026-690D42611FC4)

[Workflow files for Revit 2025](https://help.autodesk.com/view/RVT/2025/ENU/?guid=GUID-3B0AA77C-27BA-4967-8026-690D42611FC4)

[Workflow files for Revit 2026](https://www.autodesk.com/RevitGenDesign_ThreeBoxMassing2026_ENU.zip)

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.

![](/files/-LrPm3LdxgBxHQt-EIR3)

*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.

![](/files/-LrPm3Lfg6D_PzH3Xwg6)

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.

![](/files/-LrPm3LhvLCI6fbc54R3)

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

1. Use the 'Optimize' generation method.
2. Under 'Inputs', make sure that all inputs are selected.
3. Under 'Outputs', set 'TotalSurfaceArea-MAX' to 'Maximize' and 'TotalVolume-MIN' to 'Minimize'.
4. Under 'Settings', input your 'Population Size' and the number of 'Generations' you want. &#x20;
5. Under 'Issues', resolve any items.
6. Click 'Generate'.

![](/files/-LrPm3LjvEsCwA-EhZHx)

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.


# Architectural Workflows

This section will explore a series of workflows related to architecture.

![](/files/-LrPm30tSyq7oW6WDeyS)

In this section, we will look at:

* [Building Mass Generator](/04-sample-workflows/04-02_architectural-workflows/04-02-01_building-mass-generator)
* [Building Positioning Based on Solar Analysis](/04-sample-workflows/04-02_architectural-workflows/04-02-02_building-positioning-based-on-solar-analysis)
* [Office Layout](/04-sample-workflows/04-02_architectural-workflows/04-02-03_office-layout)
* [Grid Object Placement](/04-sample-workflows/04-02_architectural-workflows/04-02-04_grid-object-placement)
* [Entourage Placement Exploration](/04-sample-workflows/04-02_architectural-workflows/04-02-05_entourage-placement-exploration)


# Building Mass Generator

![](/files/-LrPm40zbx_hpgDKD2MX)

## Description

This graph, used with the *`Randomize`* mode, will generate a series of random towers, sitting across a stipulated site boundary.

The tower will randomize heights, floor plate designs and orientations, allowing for a large number of potential design solutions within minutes.

We will work with the Randomize method because in this example we are interested in navigating through a variety of building shapes rather than optimizing an evaluator. Some of the variables used in this workflow are intended to create variation rather than optimization, so using this method is more appropriate.

[Workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2023_02-01_BuildingGenerator.zip)

[Workflow files for Revit 2024](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2024_02-01_BuildingGenerator.zip)

[Workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2025_02-01_BuildingGenerator.zip)

[Workflow files for Revit 2026](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2026_02-01_BuildingGenerator.zip)

## Static Inputs

| Name          | Description                                                        |
| ------------- | ------------------------------------------------------------------ |
| Site boundary | Select the site boundary lines from the Revit model (model curves) |

## Variable Inputs

| Name                 | Description                                                                        |
| -------------------- | ---------------------------------------------------------------------------------- |
| Site offset (mm)     | A number to define the offset from the site boundary                               |
| Building height (mm) | Range for the total height of the tower                                            |
| Floor height (mm)    | Range for the floor-to-floor height of the tower                                   |
| U Values (%)         | U Parameters at surface for the seven points that will create the base floor plate |
| V Values (%)         | V Parameters at surface for the seven points that will create the base floor plate |

## Functions

The script is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description, where the name indicates the type of function being run and the description explains in more detail the process.

The graph takes the site boundary from Revit, the offset, and the U and V values from the user inputs and generates the base floor plate for the new tower inside the allowed space. Using the building height and the floor-to-floor height, the script then generates all the other floors based on the initial floor plate with slight variations. Once all the floor plates are created, the script creates the external walls by lofting the outer floor boundaries.

With the geometry of the building generated, the script then evaluates the design based on the outputs defined.

## Evaluators

| Name                     | Description                                                                                                |
| ------------------------ | ---------------------------------------------------------------------------------------------------------- |
| Public realm area (m2)   | The total area available at ground floor that sits outside of the floor plate but inside the site boundary |
| Total building area (m2) | The total area of the entire building                                                                      |
| Lift provision area (m2) | The total area of the lifts required for the building                                                      |

## Visualization

When geometry is created in Dynamo, often other geometry is needed to facilitate the overall process.

Please note that all unnecessary geometry has been switched off in Dynamo - this is to ensure the geometry displayed shows the final geometric output. Any nodes with the preview switched off will not display the output visually in Explore Outcomes.

In this case, only the site boundary (the tower's external walls and floors) will be visible. This will provide the user with the ability to critique the design options based on aesthetics within the thumbnail or detail view.

A series of context buildings have been included in the Revit sample file for a better understanding of the exercise.

## Benefit of Using Generative Design

When running the script in Dynamo, a single design option is generated for each run, based on the current user inputs. However, by running the script in Generative Design for Revit and selecting Randomize as the generation method, many more options can be generated at the same time.

Due to the nature of this graph, it works best when using the 'Randomize' mode. Although the outputs can be used to maximize or minimize the various areas, the optimization approach won't work as there is no pattern for the algorithm to use. By using the 'Randomize' mode, Generative Design can produce hundreds - if not thousands - of different iterations, allowing the user to rank and explore the options to find the best option.

## Results

Once running the study type is finished, the outcomes can be explored through the tables and graphs available.

The image below shows an example output from a randomized study based on 40 solutions.

![](/files/-LrPm413ERsVpBZke4d2)

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=FVnKMHEXmaQ>" %}

{% content-ref url="/pages/-LrPm2WPBVsrJDv1idcZ" %}
[Architectural Workflows](/04-sample-workflows/04-02_architectural-workflows)
{% endcontent-ref %}


# Building Positioning based on Solar Analysis

![](/files/-LrPm47ORikle10Qml9C)

## Description

This graph will move and rotate the position of a selected mass within a site boundary to minimize or maximize the solar incidence by area ratio. This workflow relies heavily on the 'Solar Analysis' node from Dynamo, which makes external calls to a web service to collect the necessary information for analysis.

As a result, each iteration can take a while to run. For the options where the movement or rotation causes the building to fall outside of the site boundary, the results are heavily penalized to ensure the analysis doesn't run.

[Workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2023_02-02_BuildingPositioning.zip)

[Workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2025_02-02_BuildingPositioning.zip)

## Static Inputs

| Name                  | Input Description                                                  |
| --------------------- | ------------------------------------------------------------------ |
| Site boundary         | Select the site boundary lines from the Revit model (model curves) |
| Surrounding buildings | Select the surrounding context that will affect solar analysis     |
| Main building         | Select the mass (building) that will be repositioned               |
| Site offset           | A number to define the offset from the site boundary               |
| Floor height          | Floor-to-floor height used on the solar analysis                   |
| Location coordinates  | The real-world coordinates used for the solar analysis             |

## Variable Inputs

| Name                        | Description                                                                           |
| --------------------------- | ------------------------------------------------------------------------------------- |
| Building rotation (degrees) | The angle between 0° and 360° that will rotate the building from its initial position |
| U value (%)                 | U parameter from the site surface where the building will be located                  |
| V value (%)                 | V parameter from the site surface where the building will be located                  |

## Functions

The script is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description, where the name indicates the type of function being run and the description explains in more detail the process.

The graph uses the Revit mass (or building) and extracts the geometry in Dynamo. All the surrounding context higher than 30m tall is also referenced as in Dynamo geometry.

The generator of this script provides a new location (based on the U and V values), along with a new rotation. The building is then moved to the new location point and rotated to fit the new angle. Once the building is in its new location and in line with the site boundary, the solar analysis takes place by reviewing all external vertical surfaces of the building and calculating their solar incidence.

## Visualization

When geometry is created in Dynamo, often other geometry is needed to facilitate the overall process.

Please note that all unnecessary geometry has been switched off in Dynamo - this is to ensure the geometry displayed shows the final geometric output. Any nodes with the preview switched off will not display the output visually in Generative Design. In this case, only the main building and the resulting solar analysis will be visible.

The solar analysis is represented on the external surfaces of the building as a colored grid points. These points range in color from yellow to red, where yellow indiciates a low amount of incidence and red inidicates an amount of incidence.

## Evaluators

| Name                   | Description                                                                         |
| ---------------------- | ----------------------------------------------------------------------------------- |
| Area out (m²)          | Area of the building that sits outside the site boundary                            |
| Free area (m²)         | Area of the internal site boundary that is not occupied by the building floor plate |
| Average incidence (m²) | The average incidence of the external walls of the building                         |

## Benefits of Using Generative Design

Without automating the design option creation process, running this script in Dynamo, the user would have to manually move the building until they finally managed to find the desired location and rotation. This process would take hours if not days (unless they were incredibly lucky).

As the aim in this example is simple (finding the best location and rotation for either the minimum or maximum incidence), the *`Optimize`* method can be used; larger site offset values would limit the space the building can move and so would also reduce the potential for it falling outside of the site boundary.

## Results

Once the study has completed, the results can be explored through the tables and graphs in the Explore Outcomes dialog.

The image below shows an example output from an optimized study based on ten generations with a population of 20. The outputs were defined as minimized for both *`OUT_Area Out(m2)`* and *`OUT_Avg.(kWh/m2)`*.

![](/files/-LrPm47S5OzP3eXKfA-O)

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=qMHmQceCACM>" %}

{% content-ref url="/pages/-LrPm2WPBVsrJDv1idcZ" %}
[Architectural Workflows](/04-sample-workflows/04-02_architectural-workflows)
{% endcontent-ref %}


# Office Layout

<div align="center"><img src="/files/-LrPm35e4EQKFyn6WXvD" alt=""></div>

## Description

This graph will generate a series of desk layouts based on a floor plate and neighborhood boundaries. Desks are placed in rows either horizontally or vertically, alongside a reserved space for amenities, such as breakout spaces or tea points.

The intention is to find a solution that maximizes the number of desks in the layout, while still maintaining a high area for amenities.

[Workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2023_02-03_OfficeLayout.zip)

[Workflow files for Revit 2024](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2024_02-03_OfficeLayout.zip)

[Workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2025_02-03_OfficeLayout.zip)

[Workflow files for Revit 2026](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2026_02-03_OfficeLayout.zip)

## Static Inputs

| Name                        | Description                                                           |
| --------------------------- | --------------------------------------------------------------------- |
| Floor plate                 | Select the floor geometry                                             |
| Neighborhood boundaries     | Select the neighborhood boundaries (model curves)                     |
| Desk width (mm)             | Width of the office desk                                              |
| Desk depth (mm)             | Depth of the office desk                                              |
| Back-to-back tolerance (mm) | Distance between two desks where people would be sitting back-to-back |

## Variable Inputs

| Name                  | Description                                                                                     |
| --------------------- | ----------------------------------------------------------------------------------------------- |
| Boundary start points | The movement of the start point of each of the neighborhood boundaries along the floor boundary |
| Boundary end points   | The movement of the end point of each of the neighborhood boundaries along the floor boundary   |

## Functions

The script is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description, where the name indicates the type of function being run and the description explains in more detail the process.

This graph extracts the underlying surface from the floor geometry and builds perimeter curves. The neighborhood boundaries sit along these perimeter curves and can move within a tolerance defined by the script. This movement causes the neighborhood sizes to change, providing new floor plates and new layouts respectively. The amenity space is defined as an offset space based from the longest curve and the desks then occupy the remaining space in the most efficient way.

## Visualization

When geometry is created in Dynamo, often other geometry is needed to facilitate the overall process.

Please note that all unnecessary geometry has been switched off in Dynamo - this is to ensure the geometry displayed shows the final geometric output. Any nodes with the preview switched off will not display the output visually in Explore Outcomes.

In this case, only the perimeter lines of the floor plate, neighborhood boundaries, amenity spaces and office desks will be visible. The amenity spaces are shown in grey to differentiate them from the rest of the geometry.

## Evaluators

| Name                    | Description                                   |
| ----------------------- | --------------------------------------------- |
| Amenity space area (m²) | The total area occupied by the amenity spaces |
| Number of desks (u)     | The total number of office desks              |

## Generative Design

Designers can spend hours laying out repetitive areas such as offices and toilets. By creating an algorithm with clear goals like this (maximum number of desks and maximum amenity space), optimize can be used as the solver to arrive at the best solution quicker.

## Results

Once generation has completed, the results can be explored through the tables and graphs in the Explore Outcomes dialog. The image below shows an example output from a randomized study based on 35 solutions.

<div align="center"><img src="/files/-LdPo2dGLj44dsB7Wuf7" alt=""></div>

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=bVWQS47he4Y&t=11s>" %}

{% content-ref url="/pages/-LrPm2WPBVsrJDv1idcZ" %}
[Architectural Workflows](/04-sample-workflows/04-02_architectural-workflows)
{% endcontent-ref %}


# Grid Object Placement in a Room

![](/files/-M4QY5Fb3ZutJCwa5apP)

## Description

This graph uses the optimize method to place objects in a room/space using a grid/stepped grid formation. The graph will compare the percentage of total coverage, the number of objects placed and the overlap in area of object influence, as various configurations are explored through Generative Design.

Although a simplified approach, this graph can be used as the foundation to explore more complex and personalized criteria that relate specifically to your project or practice.

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

This workflow features two possible grid arrangements you can choose from, depending on which fits best your workflow:

* rectangular grid
* stepped grid

## Grids

### Rectangular grid

![](/files/-M6008xGaxYpHU1-RO7J)

With a rectangular grid, elements are aligned in both X and Y axis. This type of formation is useful when you require regularity and straight lines of circulation between elements. Typical use of this grid is for laying out items such as beds, school desks, shop gondolas, etc.

[Workflow files for Revit 2023](https://www.autodesk.com/revit-gendesign-sample-gridobjectplacement-enu)

[Workflow files for Revit 2024](https://www.autodesk.com/revit-gendesign-sample-grid_object_placement-enu)

[Workflow files for Revit 2025](https://www.autodesk.com/revit-gendesign-sample-grid_object_placement-enu)

[Workflow files for Revit 2026](https://www.autodesk.com/RevitGenDesign_GridObjectPlacement2026_ENU.zip)

### Stepped grid

![](/files/-M6008xHVkIuEAmuMkAh)

In a stepped grid, objects are not aligned by each axis to avoid a rigid x-y formation, creating a diamond pattern. This type of grid is usually used to avoid the overlap of the objects' radius of influence. The stepped grid is usually used to locate items such as tables, plants, theatre seats, etc.

[Workflow files for Revit 2023](https://www.autodesk.com/revit-gendesign-sample-steppedgridobjectplacement-enu)

[Workflow files for Revit 2024](https://www.autodesk.com/revit-gendesign-sample-stepped_grid_object_placement-enu)

[Workflow files for Revit 2025](https://www.autodesk.com/revit-gendesign-sample-stepped_grid_object_placement-enu)

[Workflow files for Revit 2026](https://www.autodesk.com/RevitGenDesign_SteppedGridObjectPlacement2026_ENU.zip)

## Static Inputs

| Input                            | Description                                                                                              |
| -------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Room                             | Room in which objects are placed                                                                         |
| Radius of influence              | Object radius of influence for optimization calculation                                                  |
| Minimum distance to wall         | This sets a minimum value for the random seed to determine the distance from the object grid to the wall |
| Maximum distance between objects | This sets a maximum value for the random seed to determine the distance between objects within the grid  |

Constraints for radius, minimum, and maximum values can only be changed using Dynamo.

## Variable Inputs

| Name                     | Description                                                                                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Wall distance (seed)     | Gives a random value for the separation of the grid start to the wall. This value is constrained by the minimum and maximum distances to wall in the static input. |
| Object distance X (seed) | Distance in between objects in the grid's X-axis. This value is constrained by the minimum and maximum distances between objects in the static input.              |
| Object distance Y (seed) | Distance in between objects in the grid's Y-axis. This value is constrained by the minimum and maximum distances between objects in the static input.              |

## Graph Description

The graph is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description, where the name indicates the type of function being run and the description explains the process in more detail.

This graph will input a model element, a room and variables for placing a grid. The rooms surface and perimeter are used to calculate further metrics. Next, random values are assigned for the wall distance between the wall and the beginning of the grid, and the grid X- and Y-axes separations.

These values are used to create points along the room. The graph then determines how much each object's area of influence overlaps with one another, and with the perimeter of the room.

Using optimization, the object's coverage and number of objects is maximized while the total object overlap is minimized.

## Evaluators

| Name                         | Description                                                    |
| ---------------------------- | -------------------------------------------------------------- |
| Percent Coverage (%)         | Percentage of room covered by the object's radius of influence |
| Area Coverage (m²)           | Total area covered by the object's radius of influence         |
| Number of Objects (u)        | Number of objects placed in the room                           |
| Internal Object Overlap (m²) | Internal object overlap                                        |
| External Object Overlap (m²) | External (perimeter) object overlap                            |
| Total Object Overlap (m²)    | Total overlap of both internal and external objects            |

## Results

Explore Outcomes will display various grid configurations. In this example, you can see results in the X- and Y-axes, according to their X and Y seed. Each result is displayed as a point, where the point’s size is determined by the number of objects of each result.

![](/files/-M4QY5FhRbkZYXQwuQkj)

Once generation has finished, the results can be explored through the tables and graphs in the Explore Outcomes dialog. The image below shows an example output from an optimized study based on four generations with a population of 20.

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=IC0JqqeIjwg>" %}

{% content-ref url="/pages/-LrPm2WPBVsrJDv1idcZ" %}
[Architectural Workflows](/04-sample-workflows/04-02_architectural-workflows)
{% endcontent-ref %}


# Entourage Placement Exploration

## Description

![](/files/-M4QY46Gbw2uhY1CkO3w)

This graph will generate a series of scenes with different entourage elements. Entourage elements are placed in clusters that imitate the organic positioning of random elements within a space.

Begin by selecting a space/room, then the entourage elements (people, trees, etc). After that, set your different cluster constraints, and finally review the metrics related to how these elements relate to each other.

This workflow is intended to be used with the 'Randomize' mode. Because of this, no optimization criteria is needed however some outputs are provided to give a better view of (some of) the attributes of each scene.

With this workflow you can save time by quickly generating multiple scenes without having to manually place each element.

[Workflow files for Revit 2023](https://www.autodesk.com/revit-gendesign-sample-randomizeobjectplacement-enu)

[Workflow files for Revit 2024](https://www.autodesk.com/revit-gendesign-sample-randomize_object_placement-enu)

[Workflow files for Revit 2025](https://www.autodesk.com/revit-gendesign-sample-randomize_object_placement-enu)

[Workflow files for Revit 2026](https://www.autodesk.com/RevitGenDesign_RandomizeObjectPlacement2026_ENU.zip)

## Static inputs

| Name                   | Description                                                            |
| ---------------------- | ---------------------------------------------------------------------- |
| Room                   | Room in which the entourage will be placed                             |
| Families for entourage | Family instance for each element you want to include in your entourage |

## Constraints

| Name                                      | Description                             |
| ----------------------------------------- | --------------------------------------- |
| Minimum /Maximum cluster count (u)        | Range for number of clusters            |
| Minimum /Maximum spacing per cluster (m)  | Range of spacing per each cluster       |
| Minimum /Maximum elements per cluster (u) | Range of number of elements per cluster |

## Variable inputs

| Name                      | Description                                   |
| ------------------------- | --------------------------------------------- |
| Seed cluster count        | Determines amount of clusters                 |
| Seed cluster Us/Vs        | Determines UV position of each cluster        |
| Seed spacing in cluster   | Determines spacing for each cluster           |
| Seed elements per cluster | Determines amount of elements in each cluster |
| Seed element location     | Determines element location per cluster       |

## Functions

The script is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description. The name indicates the type of function being run and the description explains the process in more detail.

The script will begin by extracting the surface of a room. This room will be used for placing the entourage elements. Then, it'll continue to create a series of clusters of elements. After that, it'll filter and place only the elements that are inside the designated room, before continuing by randomly assigning a family instance to each point. Metrics will be calculated relating the new family instances and the point of interest.

## Visualization

The results in Explore Outcomes will display the surface of the room selected, the point of interest and the entourage elements as lines. We suggest you combine this with the 3d view used so that you get results as you export them to Revit.

![](/files/-M4QY46KoJuvo9Vr158U)

## Evaluation

There is no optimization in this example, however some metrics will provide information on the scenes you've created.

| Name                   | Description                             |
| ---------------------- | --------------------------------------- |
| Number of elements (u) | Number of elements created in the scene |
| Overall spacing (mm)   | Distance between elements in the scene  |

## Results

Once generation has completed, the results can be explored through the tables and graphs in the Explore Outcomes dialog.

The image below shows an example output from a randomized study based on 40 solutions.

![](/files/-M4QY46MO0sKeDFdf_Xg)

## A More Organic Random Using Gaussian Distribution

One of the key elements to understand when placing elements randomly is Gaussian distribution.

By using Gaussian normal distribution instead of the regular, randomized method you can control the clustering of elements so that your placement will feel more organic.

![](/files/-M4QY46OItqRyACZL8wj)

For further reading on this, please refer to the following website:

* <https://natureofcode.com/book/introduction/>&#x20;

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=iJKM51kkgq0&t=3s>" %}

{% content-ref url="/pages/-LrPm2WPBVsrJDv1idcZ" %}
[Architectural Workflows](/04-sample-workflows/04-02_architectural-workflows)
{% endcontent-ref %}


# MEP Workflows

This section provides workflows related to MEP processes.

In this section, we will look at:

* [Distributing Spotlights in an Office Space](/04-sample-workflows/04-03_mep-workflows/04-03-01_distributing-lights-in-an-office-space).

![](/files/-LrPm3eIpoqM0hgvMvO3)

[Download MEP workflow files](https://github.com/DynamoDS/RefineryPrimer/releases/download/samples-v1/04-03-01_Distributing-lights.zip).


# Distributing Spotlights in an Office Space

![](/files/-LrPm38J6ckxUV5KCcdD)

## Description

This graph used the `optimize method` to optimize light distribution in a hypothetical office layout by minimizing both the number of lighting fixtures and over-lit points, but simultaneously maximizing the number of lit points on the floor surface within the space.

The graph works by calculating unobstructed distances from light sources to an evenly-distributed series of analysis points within the floor of the selected Revit room.

[Workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2023_03-01_DistributingLightsInSpace.zip)

[Workflow files for Revit 2024](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2024_03-01_DistributingLightsInSpace.zip)

[Workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2025_03-01_DistributingLightsInSpace.zip)

[Workflow files for Revit 2026](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2026_03-01_DistributingLightsInSpace.zip)

## Static Inputs

| Input            | Description                                                                                                                                         |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Obstacles        | Revit model to pull obstruction geometry - this checks possible geometries (walls, columns, curtain panels, etc.) that may interfere with light ray |
| Room             | Selected Revit room for the lighting calculation                                                                                                    |
| Light Power (mm) | Maximum distance a light ray can cast                                                                                                               |
| Grid Size (mm)   | Grid of analysis points for the lighting calculation (a smaller grid would result in a more accurate but slower calculation)                        |

## Variable Inputs

| Name                              | Description                                              |
| --------------------------------- | -------------------------------------------------------- |
| Lighting max width distance (mm)  | Maximum distance between lighting fixtures on the X-axis |
| Lighting max length distance (mm) | Maximum distance between lighting fixtures on the Y-axis |
| Light power (mm)                  | Maximum distance a light source can reach                |

## Functions

The script is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description, where the name indicates the type of function being run and the description explains the process in more detail.

The graph places an evenly-distributed number of analysis points within the floor of the room selected. It also places a grid of light sources along the ceiling of the room, defined by the variable inputs.

A ray records the distance from each light source to its analysis point, and each analysis point is colored according to the total amount of light received from all light sources. The ray trace is only considered if no geometries obstruct its way.

Using optimization, the number of light sources and the overlit analysis points are minimized while the overall number of lit points within the room are maximized.

## Visualization

When geometry is created in Dynamo, often other geometry is needed to facilitate the overall process.

Please note that all unnecessary geometry has been switched off in Dynamo - this is to ensure the geometry displayed shows the final geometric output. Any nodes with the preview switched off will not display the output visually in Explore Outcomes.

In this case, only the obstructing geometry, light sources and final coloured analysis points will be visible. The analysis points are coloured from blue to red, where blue indicates that the points are less illuminated and red indicates they are more illuminated.

## Evaluators

| Name          | Description                                            |
| ------------- | ------------------------------------------------------ |
| Light sources | Number of light sources/fixtures resulting on the room |
| Lit spots     | Number of overall illuminated analysis points          |
| Overlit spots | Number of overlit analysis points                      |

## Benefits of Using Generative Design

Without using automated workflows like generative design, the designer would usually place light sources by evenly distributing them along spaces and performing lighting calculations later. In regular-shaped rooms, this method is straightforward, however if the rooms shapes are irregular then it can become complicated and result in blind spots.

Using generative design, the optimization method can speed up how light sources are distributed.

## Results

Once generation has finished, the results can be explored through the available tables and graphs in the Explore Outcomes dialog.

The image below shows an example output from an optimized study based on ten generations with a population size of 20. The outputs were defined as minimized for both 'underlit spots' and 'overlit spots'.

## Acknowledgements

We want to thank Jared Linden Digital Applications Developer at Hoare Lea for contributing this workflow to this document.

![](/files/-LrPm38MeLywJlcoLvuf)

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=S27Kz7SOCIM>" %}

{% content-ref url="/pages/-LrPm2WTQwJSIH-4NL5n" %}
[MEP Workflows](/04-sample-workflows/04-03_mep-workflows)
{% endcontent-ref %}


# Structural Workflows

![](/files/-LrPm485rTG7PFFNUWRg)

Coming Soon!

Do you have generative structural workflows already? This Primer is open-source, so please read [how you can get involved and contribute](https://refineryprimer.dynamobim.org/#open-source) or drop us a line at <refineryfeedback@autodesk.com>.


# BIM Workflows

This section provides workflows related to BIM processes.

In this section, we will look at:

* [Placement of Views on Sheets](/04-sample-workflows/04-05_bim-workflows/04-05-01_placement-of-views-on-sheets)
* [Option Generation of Viewports on Sheet](https://github.com/DynamoDS/RefineryPrimer/tree/0c2cb0cca1740f104da2189d42e04776101d79bf/04-sample-workflows/04-05_bim-workflows/04-05-02_option-generation-viewports-on-sheets.md)


# Placement of views on sheets

![](/files/-M4QY3HvNtF5mTr1Z0Qi)

## Description

This graph takes all cropped views from the current Revit document and places them onto sheets. It will create all the sheets you need to accommodate the existing cropped views, and then will generate different options for the ways the views can be laid out.

By using generative design methods, we can find solutions that minimize the number of sheets and reduce the amount of whitespace.

[Workflow files for Revit 2023](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2023_05-01_ViewPlacementOnSheets.zip)

[Workflow files for Revit 2024](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2024_05-01_ViewPlacementOnSheets.zip)

[Workflow files for Revit 2025](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2025_05-01_ViewPlacementOnSheets.zip)

[Workflow files for Revit 2026](https://github.com/DynamoDS/RefineryPrimer/releases/download/latest/2026_05-01_ViewPlacementOnSheets.zip)

## Static inputs

| Name                                          | Description                                                                                                                                                                                  |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Sheet title block                             | Title block that will be used for each sheet created                                                                                                                                         |
| Sheet margins (mm) (right, left, top, bottom) | Margins within the title block that determine the available sheet area in which the cropped views are placed. These four parameters are given to avoid placing views on top of title blocks. |
| Viewport Margin (mm)                          | Individual margin for each view (the right, left, top and bottom margins are equal)                                                                                                          |

## Variable inputs

| Name         | Description                                             |
| ------------ | ------------------------------------------------------- |
| Shuffle seed | Index that will shuffle the viewport order of placement |

## Functions

The script is made up of a series of functions, which are divided into groups inside the graph. Each group has a name and a short description, where the name indicates the type of function that is being run and the description explains the process in more detail.

The graph collects all the views from the selected view types that have been cropped, before extracting their dimensions and adding a margin to them. It also takes a default title block and, based on the margins specified as inputs, calculates the area where the views are going to be placed. Then, it shuffles the order of the views and begins placing them onto the sheet starting from the top-left corner.

The placement direction goes horizontally from left to right, adding as many rows as possible in each sheet. When there is no space left on a sheet, it generates another one and continues to place the views until all of them have been placed.

Once all the views have been placed on sheets, the script evaluates the design based on the number of sheets created, the leftover free area in those sheets and how suitable the order of the views is.

## Evaluators

| Name                         | Description                                                              |
| ---------------------------- | ------------------------------------------------------------------------ |
| Number of sheets (u)         | Total number of sheets created to accommodate all views                  |
| Sheet space not occupied (%) | Percentage of the space left over in the generated sheets                |
| Order percentage (%)         | Percentage measuring how good the order is in the shuffled list of views |

## Benefit of Using Generative Design

Without generative design, in running this script in Dynamo the user would be required to manually reorder the list of views manually until they manage to find the desired layout. This process would take hours, if not days (unless the user was incredibly lucky).

As the aim of this example is simple (finding the best arrangement for the views and maximizing the space used in the sheets), the optimize approach can be used.

The shuffle seed included in the script helps Generative Design to keep a record of the best-shuffled option and optimize the results from there.

## Results

Once generation has finished, the results can be explored through the tables and graphs in the Explore Outcomes dialog.

The image below shows an example output from a randomized study based on 50 outputs. Although this graph would usually be used for optimization, in this case a randomize method was used to display the variety of results that the script may produce.

From the graph below, you can see that most results require two sheets (represented as small circles) but some require three sheets (big circles). The Y-axis represents how well ordered the views are placed.

![](/files/-M4QY3HybTCAuTcU1OGS)

## Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=PLFox8XqpVM&t=3s>" %}

{% content-ref url="/pages/-M4QXxU-lb2dQ4SFWct1" %}
[BIM Workflows](/04-sample-workflows/04-05_bim-workflows)
{% endcontent-ref %}


# Community Examples

We want the community to submit their generative design case studies to this primer.

This chapter will showcase these examples so they are available for the wider community.

Note: These community examples are not updated to support newer versions of Dynamo, Revit, or packages.

![](/files/-LrPm3k0ebw1qivBgtCX)

In this section, we will look at:

* [Guidelines for Uploading Examples](/04-sample-workflows/04-06_community-examples/04-06-01_guidelines)&#x20;
* [List of Community Examples](/04-sample-workflows/04-06_community-examples/04-06-02_list-of-examples)


# Guidelines

## Submitting Changes on the Primer

If you have any suggestions for the primer, we will gladly review them. You can submit your comments by clicking on the following link:

<https://github.com/DynamoDS/RefineryPrimer/blob/master/CONTRIBUTING.md>

## Submitting Examples

If you have an example you would like to submit, please create a pull request in GitHub containing your workflow. You can do this by:

#### **1. Upload your files:**

* Place all necessary files for your workflow in a .zip file.
* Name your file using the following format:

\[Author's last name (the first three letters only, capitalized)]\_\[Short description of workflow].zip

Example:`RAH_FloorsFromSolarAnalysis.zip`

* Create a pull request by adding this .zip file to the following folder:`04-sample-worflows/04-06_Community-Examples/04-06-00_Community_Examples`
* Make sure your file runs on the last version of Refinery and Revit.
* In your file, please include:
  * your Dynamo file
  * a brief Description of your example
  * the Revit file from the most recent version (optional)
  * a video tutorial (optional)
  * an in-depth description in .PDF format (optional)

#### 2. Create Brief Description

* Inside the .zip file you just created, create a folder titled: 'Description'
* Add a brief description and an image to this folder.
* The image should be:
  * format: .png
  * size: width 720px, height 300px
* The brief description should include:
  * title of workflow
  * author of script
  * Dynamo packages required to run script
  * a description of how the workflow works and why it is useful
  * an image of the workflow (optional)
  * links to files uploaded in the `Example_Files` folder.
* Check the first workflow example ([High Performance Building Design Based on Daylight Analysis](https://github.com/DynamoDS/RefineryPrimer/blob/master/04-sample-workflows/04-06_community-examples/04-06-02_list-of-examples.md)) as a reference on how to upload files.

## Dynamo Files: Basic Guidelines

To ensure that all sample files presented in this page are easy to understand, we recommend you do take the following steps. There is a beginner [template](#Generative-Design-Dynamo-Template) provided below for you to get started with your contribution quickly!

### Create a Title Block

A title block will help the user identify all the requirements needed to run the workflow (Revit version, required dynamo packages, etc.). The title block will also provide a description that will help explain what the workflow does and how is it useful.

> You can copy a panel from an existing document and change the information in it so it suits your workflow

![](/files/-M4QY0MaYASuGL6bHrSr)

### Organize Nodes Into Groups

Organizing nodes into groups will help the user to understand how the workflow is structured. Groups should have comments that indicate the general purpose of the group of nodes.

![](/files/-M4QY0McsiJUO_EYU6MC)

### Follow Color Guidelines

We use a consistent color pallet through out our workflows. Don't forget to use this color pallet in your workflow.

#### Inputs - Pink

![](/files/-M4QY0MelrhciUQ7vD6A)

#### Generators - Green

![](/files/-M4QY0Mg_-Z8_98XCA5M)

#### Display - Blue

![](/files/-M4QY0MivuyBSvF1Ecv3)

#### Metrics - Orange

![](/files/-M4QY0MknRGOCSzxWkht)

#### Remember/Gate - Purple

![](/files/-M4QY0MmaBDNz4WdcPKt)

***

## Generative Design Dynamo Template

Using templates in Dynamo is a good best-practice for making legible, understandable graphs.

For generative design related examples, we have created the following template that encompasses the above ideas.

In addition to the breakdown above, we have provided sample node groupings in the template.

![](/files/-MSUKuqxi4FzbvYM7frI)

The sample DYN to download is available here:

[\_generative\_template.dyn](https://github.com/DynamoDS/RefineryPrimer/blob/master/assets/sample/_generative_template.dyn).

[\_generative\_template\_2.13.dyn](https://github.com/DynamoDS/RefineryPrimer/blob/master/assets/sample/_generative_template_2.13.dyn).


# List Of Examples

## Architectural Workflows

### High Performance Building Design Based on Daylight Analysis

**Author**: Vina Rahimian

**Required Dynamo packages:** Ampersand, Solar Analysis for Dynamo, Refinery Toolkit for Massing, Refinery Toolkit for Space Planning.

**Description:** Use site context and a zoning boundary created in Revit to create a generative building form with maximum indoor daylight and PV potential analysis as the key focus.

[Download workflow files](https://github.com/DynamoDS/RefineryPrimer/releases/download/samples-v2/RAH_ThreeSolidTowerSolarAnalysis.zip).

![](/files/-M4QY6j0cJHzF-SXN-Cj)

### Single Objective Optimization- Optimal Umbrella Location for Shaded Seating

**Author**: John Pierson

**Required Dynamo packages:** Clockwork, Solar Analysis for Dynamo, Generative Design for Revit

**Description:** The graph optimizes an umbrellas orientation (angle to sun, rotation) based on solar analysis results. It takes a Revit family as input, optimizes the parameters and drives those parameters on the original Revit element. This example aims to provide a great example use-case of the `Data.Gate` node and the `Remember` node.

**Expanded Documentation:** Detailed documentation for this workflow can be found [here](https://github.com/DynamoDS/RefineryPrimer/tree/0e11a8440d37e6e825ec97fb8405756fff65903c/04-sample-workflows/04-06_community-examples/04-06-00_Example-files/PIE_UmbrellaOrientation/PIE_UmbrellaOrientation_Detailed.md).

**Video Overview:**

[Download workflow files](https://github.com/DynamoDS/RefineryPrimer/tree/0e11a8440d37e6e825ec97fb8405756fff65903c/04-sample-workflows/04-06_community-examples/04-06-00_Example-files/PIE_UmbrellaOrientation/PIE_UmbrellaOrientation.zip).

![](/files/-MaFClyy0y-s7O4HnNMc)

### Sightline Analysis for Restrooms

**Author**: John Pierson

**Required Dynamo packages:** SpaceAnalysis, Clockwork, archilab

**Description:** The graph will evaluate the sight lines for a restroom given a water closet Revit element. This can be expanded upon to include multiple sight lines, generative placement of the element, etc. This sample's primary goal is to demonstrate how to use the Space Analysis package in a Revit context.

[Download workflow files](https://github.com/DynamoDS/RefineryPrimer/tree/0e11a8440d37e6e825ec97fb8405756fff65903c/04-sample-workflows/04-06_community-examples/04-06-00_Example-files/PIE_RestroomSightlineAnalysis/PIE_RestroomSightlineAnalysis.zip).

![](/files/-MSEVefKR11qQlEreqrA)

## \</p>

## MEP Workflows

MEP workflows will be exhibited here.

## Structural Workflows

Structural workflows will be exhibited here.


# Generative Design in Your Office

In this section we will discuss how generative design can be used within your office.

![](/files/-M4QY33SC_do8GjY8Ooh)

We will look at the following:

* [What generative design can be used for?](/05-gd-in-office/05-01_what-generative-design-can-be-used-for)
* [What generative design can't be used for?](/05-gd-in-office/05-02_what-generative-design-cant-be-used-for)
* [How to convince stakeholders to use generative design](/05-gd-in-office/05-03_how-to-convince-senior-stakeholders-of-using-gd)
* [The role of a generative designer.](/05-gd-in-office/05-04_the-role-of-a-generative-designer)
* [Hiring a generative designer](/05-gd-in-office/05-05_hiring-a-generative-designer)


# What Generative Design Can Be Used For?

![](/files/-M4QY5CZPVAOWuxz-JJT)

Generative design helps with common design problems that don't have a single, clear solution. As designers, we often encounter problems like this that have more than one possible solution, complex inter-dependencies, and/or contradictory requirements.

For example, we might have a good idea of what a building needs to be properly designed, but no straightforward recipe to achieve it. This is often defined as a [wicked problem](https://en.wikipedia.org/wiki/Wicked_problem), and this is the type of problem that generative design is used for.


# What Generative Design Can’t Be Used For?

![](/files/-M4QY5pDoXd1OcqwHBn_)

If you want to implement Generative Design for Revit in your office, it's important to understand what it can and cannot do, and to communicate this information correctly to your team.

Unrealistic expectations of Generative Design could cause users to become disillusioned by it and risk losing further interest in investing in generative design applications in the future.

## **Myths and Misconceptions:**

Although Generative Design is great at solving problems, there are certain problems that are not appropriate for the application.

Guiding a team into allocating the appropriate amount of time and effort into the most relevant problems can be just as important as solving the problem itself. Some of the common mistakes are described below:

### **Obvious Solutions**

![](/files/-M4QY5pHtszaCZs1dHPN)

One of the advantages of Generative Design is that it can help you clarify multi-dimensionality and complexities that go way beyond human understanding.

Although some of the examples presented in this primer are simple, the true potential of Generative Design is achieved by incorporating conflicting criteria with the right amount of complexity. To avoid wasting time - and to ensure Generative Design becomes a valuable resource - users should focus on problems that do not have obvious solutions.

*Note: If your problem has obvious solutions then you may need more variables.*

### Confusing Visual Programming Problems with Generative Design Problems

![](/files/-M4QY5pJKdJ72HFo1g-n)

Even though Generative Design works with Dynamo, it is important to differentiate between problems that need an automated process and problems that need exploration.

As a rule of thumb, if you intend to solve a problem that deals with automation, use Dynamo; if you intend to explore multiple solutions, use Generative Design.

### Incorrectly Defined Problems

![](/files/-M4QY5pL1yQfLRJOfHF6)

A generative design problem always needs a set of variables or inputs. These inputs are manipulated by the user and their variation should result in a design space to explore.

If these variables are too limited, Generative Design won't be able to offer a variety of results to the problem.

### No Clear Relationship Between Variables and Intention

![](/files/-M4QY5pNObaOEKgGf8P9)

Unfortunately, Generative Design cannot create design parameters for you. It would be similar to asking Google for the meaning of life.

If you don’t have clear goals to evaluate or clear ways of defining which designs are acceptable, then Generative Design can’t help you. There should also be a clear understanding on how the intention relates to your inputs.


# How to Convince Senior Stakeholders of Using Generative Design?

![](/files/-M4QY61FLwUKlX7nvBj6)

One of the main goals of Generative Design for Revit is to make generative design (as a process) more accessible and functional to all people within the AEC industry.

Because of this, it's important that the benefits of using Generative Design can be clearly communicated to people who are less familiar with it.

## Convincing Seniors/Stakeholders

If you are clear that Generative Design for Revit can improve performance in your office and confident that with generative design you'll be able to explore a wider design spectrum than through traditional methods, you may need to figure out how to communicate these advantages to someone who hasn't used it or who has little interest in understanding its capabilities.

Below are some tips that may help you talk to senior stakeholders and people outside of the AEC technology spectrum to use or invest in generative design.

### Focus on Practical Issues Local to Your Practice

![](/files/-M4QY61HERhRpseZ1_Df)

Instead of focusing on the all the potential benefits generative design can offer, start by thinking of day-to-day concerns it may be able to help you with. Think about what is stopping your team from being more productive and ask if generative design can help you solve it.

### Start with Easy Problems

![](/files/-M4QY61JmgNJw1FJTM4Y)

Start with small, easy problems before tackling bigger, more complex problems.

Try to break complex problems into simpler, more generic problems so that the time that you spend on workflows can be re-used later.

### Make Reasonable Time Frames for Solving a Problem

![](/files/-M4QY61LcW18_ygXZAkz)

Every problem you intend to solve should have an estimated time-frame and cost defined. This will make it easier to evaluate which problems are worth tackling initially and which problems will have the highest return on investment (ROI).

### Don't Oversell It

![](/files/-M4QY61NsoQKZeYn2yPU)

As mentioned in the section '[What Can't Generative Design Be Used for?](/05-gd-in-office/05-02_what-generative-design-cant-be-used-for)', it is important to manage expectations when it comes to talking about generative design's capabilities to ensure that people have a clear understanding of what it is for and how it can help.


# The Role of a Generative Designer

The generative designer is someone in charge of using, maintaining and exploring practical applications for generative design in their work environment.

The role can involve one or more people, so it is important to define their responsibilities correctly. Some of the possible responsibilities of a generative designer are described below.

## Identifying the Possible Problems

![](/files/-M4QY5c8RCOr1uTu6AjX)

Although identifying a possible problem for generative design may seem like a straightforward task, making sure that the problem contains certain characteristics that are worth solving may cause this responsibility to become more complex.

Some of the criteria that should be considered include: making sure the problem is relevant to the scale of your office; framing problems so they can be reused in different contexts; and making sure the complexity of the problem is manageable by your generative design team.

## Workflow Creation

![](/files/-M4QY5cAsynzF1h9aDEc)

Workflow creation deals with the nuts and bolts of generative design. This person would be responsible for creating the actual workflow and relations for variables, results and evaluation criteria.

The ideal candidate for this role would be skilled in Dynamo and visual programming, as much of their time would be spent in developing workflows within this platform.

## Evaluation

![](/files/-M4QY5cCfcnwFq9VDsEX)

Ideally, this would be someone outside of the generative design process - someone who is aware of the team needs who can be more objective in evaluating how useful, relevant and efficient the generative design workflows were.


# Hiring a Generative Designer

![](/files/-LrPm3eVahTENDP42FHt)

Professional consultants are available to help get you up and running with generative design workflows. Professional consultants that have been vetted by Autodesk can be found at the [Service Marketplace.](https://servicesmarketplace.autodesk.com/providers?search=\&search_within=\&services_speciality%5B6406%5D=6406\&ci=All\&sort_by=search_api_relevance\&utm_source=dotcom\&utm_medium=referral\&utm_content=aec-gen-design)

Another option is to hire help directly to your team. You can find some pointers on this below.

## Job Description for Generative Design Help

### About This Opportunity

As a Computational Designer, you'll be responsible for developing and encoding our firm’s design philosophies using digital design and scripting tools.

### Job Description

* Work collaboratively with a team of designers and developers.
* Translate complex design strategies into developer-friendly and scriptable concepts.
* Work with a variety of data inputs and output methods.
* Develop flexible parametric geometric models.
* Develop models that integrate simulation and optimization components.
* Research design strategies and implement research into scripts.
* Create 2D and 3D visualizations of data and designs.

### Required Skills and Qualifications

* Master's degree in Architecture or related design field.
* Strong design skills.
* Strong visualization skills (2D drawing and 3D modeling/rendering).
* Strong communication skills (ability to translate concepts at the business, designer, and developer levels).
* Experience in visual scripting languages (such as Autodesk Dynamo).
* Familiarity with basic/intermediate level computer programming concepts and scripting languages (Python, C#, DesignScript).

### Additional Suggestions for Hiring Core Developer(s)

* Basic computer graphics/geometry knowledge.
* Experience with Autodesk Dynamo and/or Rhino Grasshopper.
* Experience with CAD of any sort.
* Knowledge of 3D computer graphics languages is desirable.
* .NET, C#, Python experience is recommended
* Proficient with Windows.
* Interest or experience in industrial or architectural design and related fields.
* Interest or experience in computational design technologies.


# Next Steps

In this section we will look at other topics loosely related to generative design.

![](/files/-M4QY4AvZP_1RnZhkwd2)

The topics we will look at include:

* [Machine Learning](/06-next-steps/06-01_machine-learning)


# Machine Learning

In this section we will introduce machine learning and explain how it relates to generative design.

![](/files/-M4QY6KeI49Rn73ddZfQ)


# What is Machine Learning?

![](/files/-M4QY5AK7mefrz0BWydD)

Machine learning (ML) has become an area of interest over the last few years. From virtual assistants to financial data interpretation, ML has become an important tool in creating models to explain data behavior and make predictions for future outcomes.

Rather than trying to define ML here, we suggest that you visit the following sites to get more in-depth information of the subject. For the purposes of this chapter, we will assume that you have a basic understanding of ML and will focus on the key aspects that relate to generative design.

### Articles

* <https://expertsystem.com/machine-learning-definition/>
* <https://www.geeksforgeeks.org/machine-learning/>

### Courses

* <https://www.coursera.org/learn/machine-learning>
* <https://www.edx.org/learn/machine-learning>

### Videos

* [Google Cloud Platform - AI Adventures YouTube playlist](https://youtu.be/HcqpanDadyQ)
* [OxfordSparks - What is Machine Learning?](https://www.youtube.com/watch?v=f_uwKZIAeM0)
* [The Royal Society - What is Machine Learning?](https://royalsociety.org/topics-policy/projects/machine-learning/videos-and-background-information/)

## What is Machine Learning?

Machine learning (in this context) is a way of analyzing data and using it to predict future behaviors.

![](/files/-M4QY5AMPnDZVXqzO-_y)

### So Why the Big Hype?

Due to the immense amount of data that we have and produce in contemporary society, these methods have become an extremely useful, powerful, accurate, and efficient way of exploring data. ML has many applications, from classifying cancerous cells in images to predicting whether or not a customer will buy a product.


# Is Generative Design Machine Learning?

Although many people are using machine learning as an industry buzzword, it is important to differentiate between the terms `generative design` and `machine learning`.

Essentially, the answer is no, generative design is not machine learning. While machine learning is used to analyze and predict, generative design creates and generates.

## Machine Learning

<figure><img src="/files/-M4QY64adZ640ziargcN" alt="Step 1: Data. Step 2: Computer finds patterns in data. Step 3: Computer predicts, creates rules, forms relations, etc."><figcaption></figcaption></figure>

## Generative Design

<figure><img src="/files/-M4QY64cauKtuFPDJwIc" alt="Step 1: Inputs, variables, relations between variables, optimization criteria. Step 2: Computer tries multiple design configurations. Step 3: Computer presents options that optimize certain criteria."><figcaption></figcaption></figure>

The diagram above shows how these terms differ in their processes. You can think of machine learning as a pattern finder and generative design as a creator.


# Can Machine Learning and Generative Design Work Together?

Machine learning can be a great tool for complementing generative design when large datasets are available.

Technically, we could try to leverage ML at any stage of the generative design process, but one of the most promising applications of ML is in creating a more realistic starting condition for the generative design system.

Often when starting a generative design process, the computer will create a first design using random inputs or values and then further explore options and optimize them. Machine learning can be very effective in creating this initial design based on accurate historical data, which the generative design process will then use to produce potentially better or more relevant designs.

Simply put, better input data should lead to better outcomes.

<figure><img src="/files/-M4QY6BmU1EffWq_ghUw" alt="Injecting machine learning to complement the generative design process by producing better first designs based on data"><figcaption></figcaption></figure>


# Appendix

The appendix chapter provides a series of useful links and external resources for additional reading.

![](/files/-LrPm3Q7c1_fZn4--3fr)


# Glossary

**Algorithm** / al·go·rithm / noun

> A process or set of rules to be followed in calculations or other problem-solving operations with a computer.

**Computational design** / comp·u·ta·tion·al de·sign / noun

> Explicit rules that systematically model the behavior of a proposed design and the resulting data and geometry. Not many project data are kept as static objects; instead, the procedure to create them is saved. Project geometry and data are generated from the execution of mathematical and logical procedures.

**Cross-product** / cross pro·duct / verb

> aka Cartesian Product - the product of two or more sets that contains all ordered pairs between the sets.

**Evaluate** / e·val·u·ate / verb

> To judge the quality of something based on how well it performs in one or more objective functions.

**Evolve** / e·vol·ve / verb

> To gradually make something better over generations.

**Explore** / ex·plore / verb

> To consider different ways of interpreting results and rankings.

**Generate** / gen·er·ate / verb

> To produce or create a design. Requires one or more input parameters that are combined in an algorithm to produce a design study. The resulting model or data is not necessarily a viable design.

**Generative design** / gen·er·a·tive de·sign / noun

> A system that produces design studies (alternatives), evaluates them against quantifiable goals, improves studies by learning from previous results, and ranks results based on their distance from the goals. The project is kept as a system, with affordances to choose one or a small subset of alternatives as a final set of project data and geometry.

**Global optimum** / glo·bal op·ti·mum / verb

> The best solution out of all the possible solutions.

**Goal** / goal / noun

> A quantifiable target value or range for a project or feature of a project.

**Iterative** / it·er·a·tive / verb

> Doing something repeatedly, often to make it better.

**Local optimum** / lo·cal op·ti·mum / verb

> The best solution within a group of solutions that are slightly different, but still worse than the global optimum.

**Multi-objective** / mul·ti ob·ject·ive / adjective

> Using two or more objectives when optimizing a solution.

**Optimization** / op·ti·mi·sa·tion / verb

> Maximizing or minimizing a mathematical function to arrive at the best possible solution to a problem.

**Optioneering** / op·tion·eer·ing / verb

> Enter a desired number of results and design algorithm and make the computer generate solutions.

**Permutation** / per·mu·ta·tion / verb

> A unique iteration of a design.

**Seed** / seed / noun

> A value that initializes a random function.

**Solver** / solv·er / noun

> An algorithm specifically designed to find the solution to a precisely defined problem.


# Reference Material

## Dynamo

### Getting Started with Dynamo

* [Dynamo Primer](https://primer.dynamobim.org/)
* [Dynamo learning materials](https://dynamobim.org/learn/)

### Dynamo Questions and Inspiration

* [Dynamo Forum](https://forum.dynamobim.com/)
* [Dynamo gallery](https://www.dynamobim.org/)

## Design Script

* [Dynamo DS language guide v1](https://dynamobim.org/wp-content/uploads/forum-assets/colin-mccroneautodesk-com/07/10/Dynamo_language_guide_version_1.pdf)
* [DesignScript documentation](https://dynamobim.org/wp-content/links/DesignScriptGuide.pdf)
* [DesignScript class materials from BiLT conference](https://github.com/Amoursol/dynamoDesignScript) by [Sol Amour](https://github.com/Amoursol)

## Generative Design

* [Generative Design main page](https://www.autodesk.com/solutions/generative-design/architecture-engineering-construction)

## Generative Design

* [General blog posts](https://medium.com/generative-design) on Medium.com
* [Design Modeling Terminology](https://archinate.files.wordpress.com/2018/06/dstasiuk-design-modeling-terminology1.pdf) by [Nathan Miller](https://github.com/archinate)
* [Evolutionary Principles](https://www.grasshopper3d.com/profiles/blogs/evolutionary-principles) by [David Rutten](https://github.com/DavidRutten)
* [Autodesk Generative Design E-Book](https://www.autodesk.com/content/dam/autodesk/www/solutions/generative-design/autodesk-aec-generative-design-ebook.pdf)
* [Autodesk applications of Generative Design in AEC](https://www.autodesk.com/solutions/generative-design/architecture-engineering-construction)


# Need Professional Help?

![](/files/-LrPm3eVahTENDP42FHt)

Professional consultants are available to help get you up and running with generative workflows. Professional consultants that have been vetted by Autodesk can be found at the [Service Marketplace.](https://servicesmarketplace.autodesk.com/providers?search=\&search_within=\&services_speciality%5B6406%5D=6406\&ci=All\&sort_by=search_api_relevance\&utm_source=dotcom\&utm_medium=referral\&utm_content=aec-gen-design)

Or hire help directly to your team. Here is an idea of what to look for:

## Job Description for Generative Design Help

### About this Opportunity

As a Computational Designer, you'll be responsible for developing and encoding our firm’s design philosophies using digital design and scripting tools.

### What You'll Do

* Work collaboratively with a team of designers and developers
* Translate complex design strategies into developer-friendly and scriptable concepts
* Work with a variety of data inputs and output methods
* Develop flexible parametric geometric models
* Develop models that integrate simulation and optimization components
* Research design strategies and implement research into scripts
* Create 2D and 3D visualizations of data and designs

### Sound Like You?

* Master's degree in Architecture or related design field
* Strong design skills
* Strong visualization skills (2D drawing and 3D modeling/rendering)
* Strong communication skills (ability to translate concepts at the business, designer, and developer levels)
* Experienced in visual scripting languages (such as Autodesk Dynamo)
* Familiarity with basic/intermediate level computer programming concepts and scripting languages (Python, C#, DesignScript)

### For the Core Developer Hire(s), Suggesting to Add the Following to Their Qualifications:

* Basic computer graphics/geometry knowledge
* Experience with Autodesk Dynamo and/or Rhino Grasshopper
* Experience with CAD of any sort
* Knowledge of 3D computer graphics languages desirable

  .NET, C#, Python experience recommended
* Windows platform
* Interest or experience in industrial or architectural design and related fields
* Interest or experience in computational design technologies


