How to Speed Up Generative Design For Revit?

I have attached really basic example of a Dynamo script for Generative Design for Revit to best illustrate my problem. I simply want GD to return 0 for all three slider inputs. This is possible but only after running for a longer than expected time.

When I run with the default settings it finishes and the answer is basically “incorrect”. It would mean I couldn’t trust my script because I could do better as a human manually changing the sliders.

When I set the population size and generations higher I finally get my answer of 0,0,0. This is after running it 4 times, each time incrementing the values to run the graph longer.

If I expand this into a more complex graph, and speaking from experience, I have to set it so high that It basically just crashes after running all night.

I am interested in getting an answer, not an option. I assume this problem is because of the immense burden on a computer once you start to think about this relative to permutations.

  • Does anyone know the limitations on the software itself?

  • Our company is looking at getting a heavy hitting virtually accessed computer with scalable GPUs etc, could I run this on there and expect greater speed or would the software itself be limited?

  • Can I somehow run the graph in the cloud?

  • I see it uses the CPU, but does it use GPUs?

  • Any ideas how I can run graphs to a more concrete answer? I need it to be as good as me manually inspecting and moving sliders. The advantage being, I can go and work on other things, and hopefully it will find an even better solutions than I could have.

Thanks,

Another big question which likely would be better suited as a conversation… Glad to have you in the community asking such questions publicly, as there is way too much misinformation out there.

Your toy problem is problematic for a few reasons. First there is no clear relationship between your inputs and your output. Second there is a clearly identifiable solution.

Since you’re working on a toy problem, there isn’t much concern with the ‘obvious’ solution issue, but as you review the technology you need to keep the intended use in mind. If we apply the same logic to a calculator we wouldn’t have an addition button, as we can calculate 2+2 in our head faster than we can with a calculator. The complexity of the problem is what brings the value to the toolset. Similarly generative design works in the context of complex problems with no clear outcome. But as you’re looking to verify the tool works we can skip this for now.

And so let’s concentrate on the other issue: the lack of clear relationship between the inputs and the outputs. What I mean by that is that you want a net vector of 0. So the way Generative Design works is by running a random sampling of inputs, gets results from the outputs, and takes the top performing results and uses them to run the next study. Let’s say the first population of inputs were:
(16,45,52)
(30,55,36)
(42,35,32)
(55,42,12)

The ‘highest weighted’ X input would be 42 even though 16 was the ‘best’ of the X values. Y’s strongest highest weighted would be 35 which is unfortunately their best scoring though it didn’t have any really good values overall. And Z’s highest weighted is 32, despite having a better value of 12 on the board.

So the lesson learned is that if you know the direct impact of the input on the output, provide a metric for it. In this case it’d be ‘provide a minimal output’ for each of the X, Y and Z values. Admittedly not very sexy, but it would speed up the exploration quickly.

That said, it’s likely better still to provide a more reasonable toy problem. I like ‘fitting two cabins on a wooded lot’ as it provides ample input/output examples and has more value than ‘point in space’ based examples. You’ll have to fast forward though some initial ‘what’s new’ content, but I did a demo of this for the Chinamo users group a few years back which you can watch here: https://m.youtube.com/watch?v=42SylTdN3CY

Yes - there aren’t many other than ‘it must run well in Dynamo with less than 750mb of RAM for the session (this number varies but it is a good rule of thumb).

Not really much gain there. Dynamo runs in the CPU, using one core, so fast single core speed will matter the most. Generative Design is limited to 6 concurrent Dynamo instances at a time (no more, no less) so a massive amount of cores won’t help at all.

Not at this time, but it is something that has previously existed (look up the old Project Fractal), and may come back someday if/when Dynamo can run in the cloud again.

Nope.

More or less what I said before adding all the quotes… you’ll want a more diverse problem and solution. Reducing the number of inputs also helps as well (ie: utilize permutations of your lists instead of multiple get item at index nodes to reorder stuff).

As you get into ‘real’ stuff be sure to post here as the community can help quite a bit. :slight_smile:

2 Likes

Thanks Jacob, your response is very helpful.

When I get a chance I will post a more complicated script. I have one that places multiple crane locations around a building relative to lifting tilt panels. This takes into account the weights and crane chart distances relative to that. Less crane setups = less wasted time = cost savings on site.

I thought this was working great but then realized I could do better modifying the sliders manually and keeping my eye on the visual locations and output numbers — Could be that I am just misusing the tech. The dynamo script works perfectly for this, and the process does offer multiple solutions, so I could miss the better option by doing it manually.

You have me thinking though. It sounds like I need to find a way to set it up in the closer to correct position and let it work through the left over possibilities.

This is a really good example use case actually. So much so that my colleague and friend @Dieter_Vermeulen published a sample workflow for this very task: Construction Dynam(o)ite at AU 2016 | Revit beyond BIM
You can also check out some video links here: https://www.youtube.com/playlist?list=PLMPk1RvtjI0favzGeUHTppQHgyKwRJJGe

The technology has changed quite a bit since then (this was the Project Fractal days, which predated Project Refinery which is the precursor to Generative Design) so things will look quite different, but I can confirm that the concepts still work. If you are “seeing” solutions faster than the tool it may be that your example has less complexity than this needs due to the crane type or masses, or that the use cases into which you’re placing are less complex than needed to benefit from the tool.

Looking forward to your next topic on this exploration. :slight_smile:

Thanks for this Jacob, I will take a look at both your previous video recommendation and this one as well.

1 Like