Description
Key Learnings
- Learn about a computation design approach for road design
- Learn how to maximize generative design to optimize the design and increase the insight of the design challenge
- Learn how to automate the creation of corridor models
- Discover the next steps for new use cases and implementations
Speaker
- PSPaolo SerraI'm a construction engineer by trade, worked as BIM Manager in an architectural firm for 5 years, now Principal Implementation Consultant for Autodesk since 2014. With Autodesk I've been delivering Customer Success Services to engineering Companies, supporting BIM workflows and Digital Transformation in their business processes. Main focuses are on automation, generative design, integration between AEC and ENI industries. Architecture enthusiast, Revit user since 2006, API and Dynamo knowledge seeker. I've created the CivilConnection Dynamo package that creates dynamic relationships between Civil 3D and Revit for Linear Structures BIM workflows. I'm also the co-creator of the Civil 3D Toolkit package for Dynamo for Civil 3D. I own the Punto Revit blog.
PAOLO EMILIO SERRA: Hello and welcome to Optimize Road Design with Dynamo for Civil 3D and Generative Design. My name is Paolo Emilio Serra. And I will be your host for today.
I'm a Principal Implementation Consultant with Autodesk. And over the years, I've been specializing around automation, Dynamo, and linear structures. Probably, you've heard about Civil Connection and the Civil 3D toolkit. So today, I want to talk about generative design and experience we've made with some of our customers in Autodesk consulting. These are my contacts. So feel free to reach out.
Learning objectives for today are define a computational design approach for road design, leverage generative design to optimize the design and increase the insights of the design challenge, automate the creation of corridor models, and assess the next steps for new use cases and implementations. We'll be trying to focus more on the how due to the short time frame that we have at our disposal.
And I will not show too many examples on Dynamo or Civil 3D. Before we start, I want to introduce some key concepts. When it comes to road design, we have some inputs that are not going to change for the duration of the generative design study. These are the surfaces. So basically, meshes of triangles, we have obstacles in boundaries, such as vegetation, existing buildings, or structures such as bridges or culverts. And of course, we have the key locations, so where our roads should-- the points that our roads should connect.
In terms of outputs, what we're expecting to create is a core model of Civil 3D. But in order to get there, we need to create other elements before. So these are the horizontal alignments, the vertical profile, and the cross-sections, because we need to calculate the cut and fill.
We're going to use Dynamo as a mean to define the computational strategies. Dynamo is a visual programming environment. If you're not familiar with it, please follow the link in the bottom left corner of this slide. The design optimization approach that we're going to follow is an iterative one.
It starts from collecting necessary information to create a model of the problem that we want to solve, a surrogate model. So something that is simplified and contains the key characteristics of the challenge that we're trying to solve. Then we need to implement different computational strategies to generate solutions that we want to evaluate against the objectives and the metrics that we're going to define, to establish what the optimum looks like.
And we're going to use generative design in Revit to evolve these scenarios. So over time, the solution will be generated and compared against others. And we will be able to measure and select the best based on data-driven approach that we can leverage in generative design in Revit. Once we have selected a solution, we can continue modeling our corridors. And we can send this information back to the authoring platform.
So here's an overview of the generative design workflow. Let's look at the data flow. We can use InfraWorks and the ArcGIS connection to download surfaces, boundaries, streams, buildings, and also the key location, for example, using a shapefile to define the initial inputs for our generative design study. Can transfer these data through the IMX format to Civil 3D. And we can refine the inputs as we see fit.
For example, we can modify the extension of the boundaries and reduce the area of the study. In Civil 3D, we have Dynamo. And we can use it to start defining the computational strategies. And in doing so, we need to define what are the user inputs as well as the variables that are going to be leveraged for the generative design piece, as well as the objectives. So we need to define what we want to minimize or maximize at the end of the study.
Once the study is set up, we need to be able to run it inside generative design in Revit. So this is important, because we cannot leverage any functionality that is present in Civil 3D. So we will have to do some gymnastic in order to create these intelligent objects, such as alignments and profiles.
In generative design in Revit, we have the tools to explore the results and visualize them and select the best option to send back to Dynamo. Once we have the best solution, we can automate the creation of the corridors. But in order to do so, we need to leverage Dynamo once again. And Dynamo, in combination with a custom package called the Civil 3D toolkit that expands the functionalities of Dynamo for Civl 3D out of the box, so we will have to create alignments, profiles, assemblies, and finally roll everything up into the corridors.
To set up the generative design, we need to come up with different computational strategies. And here are just some examples that I would like to talk about. So the minimum spanning tree for the alignments, how to reduce the number of triangles, and a cellular automaton for the profiles. When it comes to road design, typical objectives could be reducing, minimizing the number of clashes, minimize the cut and fill balance, or the cut and fill total amount, minimizing the total length of the road, maximizing the visibility, or minimizing the finished ground, so the extension of the top surface.
In the bottom left corner, you will see references to other Autodesk University classes where you can get more information around how to set up a generative design study. Now, there's a section for this class called How To. So we will cover how to create or deal with the computational strategies or setting up the metrics and the objectives for these particular objects. Let's start from the alignments.
How to create alignments, from the inputs, we have the key locations. And in the diagram on the right here, you see them represented in the xy plane as these green dots. We can leverage an algorithm called the minimum spanning tree that will enable the connection of these dots, making sure that the branches that you see here are the shortest possible. So this is something very fast. You probably need to write a few lines of Python. But I pointed out the link here where you can find several algorithms that implement this solution.
And what happens in reality is that you might find that this minimum spanning tree is failing because it's intersecting with existing obstacles, such as buildings. So this is where the generative design component kicks in. So what we could do is to introduce the concept of extra nodes to add more nodes to the key locations and compute a new minimum spanning tree.
So the way that you could do this is not the only one. So there are multiple solutions to the same problem. But in a nutshell, the designer is in control of this input grid, and rotation, the spacing, the number of subdivisions, and so on. And these particular inputs are not going to change for the duration of the study.
But what we want to achieve is for the generative design algorithm to select which points from the grid are the most ideal and how many. So we don't know that up front. And we need to find a clever way to add these extra nodes to the minimum spanning tree. So if we build it, once again, we have something that will not intersect the existing buildings. And this is just a simplification of what can look like as a set of alignments in Civil 3D.
We can even have more sophistication to create something more realistic, introducing the concept of buffer. And as you can see here, there are still intersections that are possible introducing this concept. So the goal is not to overconstrain the computational strategy. It is OK to have a logic that also produces imperfect solutions. That's absolutely fine.
The goal of the generative design is to explore the design space in order to find the optimal solutions, or I would say, which combination of inputs for the problem, the way that you define it, are going to produce the best solution. So it seemed the nature of this approach to be iterative, as I said. And so what you can do is to refine the grid, for example, or change the parameters that you're using for the generative design. And refine the solutions that you've found over and over, until you're satisfied with the results.
So how to teach the generative design how to select points from a grid and how many points without knowing beforehand how many points we want? So I've created this concept of selector function. And I'll try to show you how it works and why it is important.
So what we need to do is something that looks a lot like a random generator of numbers. So what we want is a dynamic number of variables. But the problem with the random generator is that it's OK for exploration of the problem, not so much for learning, and therefore, for optimization. Why? Because there's no clear correlation between the inputs that we're using and the outputs that are produced. So if we change a little bit the input, we should expect also a slight change in the output.
But that's not the case with random generators. So this is not consistent. And it will cause us pain when we need to select the best option and reproduce it for automation. So we need something else. So Dynamo provides these random generators. Also Python provides some a little bit more consistent generators, especially when it comes to lists. But they're still not OK, and by design.
So we need to find something else. So this is where the selector function concept comes in. It's something that will produce this dynamic set of variables. But it's happening via a continuous function. So in this case, I've picked an oscillating function, a very simple one, the sine function. And I've used only these three parameters to control the generation of these dynamic variables.
So they are the frequency coefficient, the start angle, and the range width. So how big is this green window, so to speak? And what it's going to do is that letting the generative design study change in these values, it's going to-- for the same amount in this case of variables required, it's going to produce different values along the y-axis.
So this gives us some control and will allow us to not clutter the generative design study type in order to solve a more complex problem. So this is how the selector function can look like in Dynamo. And you are free to modify the logic if you want. I'll give you another example here, when I'm selecting also between multiple selector functions. And the goal is to let the generative design algorithm to find which function works best for the problem that you're trying to solve.
Now, when it comes to road design, we need to find a way to deal with surfaces. The problem with surfaces is that they are large, several square kilometers, and with a lot of triangles, several thousands of triangles, Tens of thousands. So what we need to do, as you can see here on the animation to the right, is that you need to provide a way to filter the triangles that are important for the alignment.
And this is critical for the generative design study, because you can even have failures if you don't do that. Dynamo can run out of memory. Or it's going to take very, very long before you can actually complete a single cycle. And this is important, because the generative design study happens with multiple processes in parallel that are trying to solve the same problem with different inputs. So every second counts.
So to do that, it's recommended that you find the logic to create an optimized terrain surface, introducing this concept of buffer around the alignment. And combining these triangles inside a PolySurface. And again, for performance reason, it's highly recommended that you implement a recursion mechanism to combine these triangles in a more efficient way.
How to deal with profiles. Now, if we have an alignment and the optimized terrain PolySurface, we can quickly generate an intersection, a 3D PolyLine, or a feature line, if you will, that is draped on existing ground terrain. Now, the problem is that we cannot use any Civil 3D nodes, so to speak, when it comes to generative design. And we need to be able to reproduce the same intelligent objects and behaviors using pure Dynamo geometry.
So how to convert this 3D feature line into an actual profile to execute our design? Well, we can project the point that we found on the alignment curve, on the PolyCurve and determined the station from there. And then use the point Z coordinates for the elevation. And so we can recreate a representation of a traditional vertical profile for our design.
Now, after that, we need to introduce the position of the key locations, now, on the ground. And perhaps we want introduce some constraints. So for example for a range of plus and minus 50 meters around the key locations, we want a constant elevation. So this equates to add more points to the vertical profile. Now, not all the points that you can see here will be used in the final design.
And there are a couple of strategies that you can apply to define your own logic for creating a design profile. So we saw before, we could apply a similar concept of the selector function also for the profile. But I wanted to show something different, so something called a cellular automaton. And my hope is that you will see a different technique that you can apply. And it can be useful for other concepts as well.
So the cellular automaton is based on a series of iterative calculations that will find the best option following some rules. And you are in complete control of which rules and which order they're going to be performed, and so on. So let's make an example. If we have our existing ground profile, we can consider it as a sequence of points over vertical intersections, or PVIs.
So these points, at the very beginning, are all active, so to speak. And these points are aware of their neighbors. So the points that are preceding and the points that are following. And the state of these points of vertical intersections are either active or inactive. So if you think about it, a design profile is a sequence of these points of vertical intersection where some of them are inactive.
And so what is the concept of how do we determine which point we need to turn on and off, basically. Well, that is defined by a set of rules. Here, we just made an example. So for each PVI, you can compute the slope in and the slope out. And you can compare them against some maximum values that you can define by design. Or you can calculate the difference between the two lobes and see that this difference is within a certain range that, again, you define by design.
Or that the visibility for this particular PVI, the visibility distance along the alignment is above a certain limit, or that is contributing to the overall visibility of the profile, and so on. So these rules are completely customizable by the designer. And you can run this multiple times. And you can explore all the combinations of these tools. So that you can determine the best profile that is minimizing the number of slope failures or slope changes and the intensities of these changes and maximizes the overall visibility, so something that looks like this.
The cross-sections so how to deal with cross-sections, here we have to do some simplifications. So we're not going to consider cross-sections that contains all the different layers of materials. No, we're not going to do that. In this case, I've only considered a horizontal line that defines the road width. And I've added a couple of lines with a slope for the daylights. Of course, they could be different for cut and fill.
So these cross-sections needs to be-- they need to be propagated along the alignment. And they need to follow not just the alignment, but also the design profile. So they need to be adjusted on a vertical along the z-axis, basically. So the way that you could build this cross-section depends on the frequency that you decide to sample the alignment. And so this frequency, or if you will, the distance along the alignment is another key factor that is going to impact the performance.
So you need to be careful, especially when you're just setting up the design. You need to keep it very, very loose. So once you have identified a particular cross-section, you can also determine where the daylights are intersecting existing ground. And this will allow you to determine the leftmost and the rightmost points for a given station.
So these two points can be used to build a surface. How to do that? You can project them to two arbitrary horizontal planes, one called top plane and the other one bottom plane. So why are we going to use these? Because once we have this loft in between, this blue surface that you can see on the right, we see that these surfaces intersected or cut, split by the existing ground and the finished ground in two different ways.
So what happens is that the difference between the top surfaces is equal to the fill. And difference between the bottom surfaces instead returns the cut for that particular station. So knowing this, we can cumulate the areas of the cut and fill for all the cross-sections. And we can minimize the total cut, total fill, and the difference between these two. And as I mentioned before, we can minimize also the total area of the finished ground.
Now clearly, the road design is a complex multi-objective optimization. And this is just looking at a simplified version of it. But it's just to show you what's possible. So let's take a look at the optimization. How does it take place?
First, you need to create a study type. So it's a very good practice that from Dynamo for Civil 3D, now, you move into a different environment that does not contain any reference to Civil 3D nodes, so to speak. And this is by design. It's because the generative design algorithm is running on a separate set of processes that do not leverage any dedicated hosted nodes in Dynamo, such as for Revit or Civil 3D.
So once you've created the generative design study type and everything is successful, you should receive a message that looks like this. After that, you can start to leverage the study type to actually explore the design. So you need to select the method that you want to use, in this case, optimize, and you need to define the generation setting parameters that you are going to use.
For example, the population size should be big enough to allow the algorithm to explore a sufficiently large area of the design space. So that it can gain enough information at every cycle around the problem that you're trying to solve. So that it can drive the selection of the input values towards the optimal.
Exploring the results, so in this video that I recorded a couple of years ago, you will be able to see how the generative design can be applied for a road design. Now, in the interest of time, I'm just moving ahead. But you can click on the link in the video provided here.
So this is an example of how a generative design study can look like at the end once you've found-- once you finish the calculations. So how to transfer the results of a computation from one Dynamo session to the other? Well, generative design in Revit provides some features to capture the data, either for the fixed inputs or for the results within the Dynamo graph.
But my recommendation is that, especially for road design, you leverage a different approach, serializing the results to JSON. So you could achieve that either using Dynamo out-of-the-box tools, nodes, or Python, where you can customize the dictionaries containing the information of these geometries and other inputs.
So automation, so it's mentioning at the end, we are interested in creating a corridor in Civil 3D automatically. And we need to be able to read the results of the computation from the generative design, the best solution that we have determined at the end of the process. And once we have that kind of information, we need to be able to rebuild the backbone of the corridor.
So to do that, we're going to leverage the nodes contained in the Civil 3D toolkit package. So you can leverage the inputs that you're receiving from the JSON file to create alignments, profiles, assemblies, and subassemblies, or if you decide to create them manually and just leverage the template, it's also OK. You can create, then, the baselines and the regions, set the targets, in this case, the existing ground, and finally, rebuild the corridor. So in one graph, you can actually recreate the entire corridor.
So in the bottom left corner, you can see the reference to another Autodesk University class. And what I do recommend is to reach out on the forum, the Dynamo forum, the Civil 3D section, there's a dedicated thread for the Civil 3D toolkit. So I'll let you experiment with it. Conclusions and next steps.
So the performance is really critical when it comes to generative design. So every second counts. So what I ended up doing for other customers, for example, is develop my own geometry library to represent the mesh, to represent vertical profiles, and so on. So that I could keep an eye on the number of elements that were processed by them.
So the number of triangles are playing a critical role here, because they are participating in the intersection of multiple elements in a profile or the cross-sections. And the frequency of the cross-section is another critical parameter. So you need to be evaluating and finding a balance between the precision that you want at this stage-- this stage, which is still a conceptual one, and the results that you're expecting to achieve inside Civil 3D, for example.
For the alignments, well, you could add layers of sophistication, such as superelevation if you want to, or curves with a variable radii. So this is really up to you, what you're trying to approach here. And the same can be said for the profile. So we can introduce curves and even asymmetrical ones.
For new use cases, you should apply the same kind of concept that we have seen at the beginning, so analyzing the data flow, understanding what is fixed and what is not going to be-- what is going to change inside the generative design analysis and defining what are the computational strategies accordingly to what you have to produce. And what are the metrics that are going to be useful?
For example, for tunnels, you could consider the distance from the alignment to existing buildings as a parameter that you want to maximize. So that you reduce the effect of vibrations. And of course, there's always something related to costs that you can transform with a proxy. So for example, the amount of dirt you're moving, or in case of a bridge, for example-- or for a road again, if you can avoid to cross streams, so that you can avoid to use culverts or bridges.
And for example, reducing the maximum slope. So you don't have to use concrete or retaining walls. But you can actually just use a simple system using the road, using the dirt, and the terrain. So in a nutshell, what you have to do is to try to be innovative and experiment with different methods that will provide you the flexibility to explore the design space in the hope that you can achieve the results that you're after.
So this is just a switch in the approach in the methodology. But my hope was that to show you what is possible today if you just apply some creativity to do these kind of problems. So some learning resources specifically for Dynamo, generative design, you can find them here. So the Autodesk University is a good place to start. And then there are dedicated websites for generative design in Dynamo. And there's also a very active community and a lot of people that are willing to help, very knowledgeable. And you can also reach out there.
Here is a collection of the links or to other Autodesk University classes you found in the lower left hand corner of the slides throughout the presentation. You can find the slide deck on the class page in the class materials section. And you can access the links in the PDF version of this presentation. So with that, I thank you for watching. And if you find this class useful, please remember to put a like under it. Thank you, bye.
Downloads
Tags
Product | |
Industries | |
Topics |