This is a rather open ended question, so I’ll give some open ended guidelines which will be loosely pulled from a blog post I am working on.
You’ll likely need Refinery so be sure to sign up for that beta. More info here: https://dynamobim.org/project-refinery-0-62-2-now-available/.
You’ll also need to have a good outcome generating model built in Dynamo to use to iterate through the design. The model can be geometric or not, and can make use of any initial data which you can save into the dyn. CSV, Excel, Revit, Civil 3D, etc will all work - just place a Remember node accordingly and Dynamo will leverage this repeatedly. Note that larger data sets are slower to compute and therefore take longer to run, so simplify when possible. Building the model is honestly where the bulk of the effort will come. If you have no experience in Dynamo and it’s geometry nodes than this will take even more time. Computation time is also something to consider here - the faster your graph runs the more iterations you’ll get to do and therefore the better your results. For demonstrations to the customers I work with I shoot for sub 1 second run times. I have seen run times up to 1 minute work successfully, but with less iterations than might be required to find the optimum input combination.
Be sure that your model has taken into account the limits of what you’re designing. If you’re dealing with creating structural framing and the idea is to minimize the number joists with plywood spanning between them, a spacing of 100,000 feet will score best but isn’t physically buildable. So build your constraints accordingly. Similarly to sky hook structural systems, utilities via airwaves and teleporters are not possible at this time. This is really where a strong knowledge of the design task is a must - if your unknown constraints are too large you may find an optimally incorrect solution.
Next build your outputs. The idea is to boil the design down to a few numbers. Boiling design down to numbers is certainly hard though - we don’t really learn that in school and there is no ‘number’ for a designer’s intuition. Defining your objectives before you begin can really help. Some examples are the distances between objects meant to be adjacent; natural light in the space; visual privacy; buzz and distraction. All of these are key concepts which designers tend to ‘understand’ at a high level, so knowing that a 1 is better than a 5 (or vice versa) you can make a decision to go with this design or that one based on the data instead of lines on a page. The team from The Living which designed the Autodesk MARS offices has several good write ups of this on the web and some good AU countent published as well.
Ideally you’d build the output values so that you know what the ‘maximum’ and ‘minimum’ values are - ie. if the total design space is a 10x10 grid, the largest internal dimension is 14.14 units so your worst score is
(number of desired adjacencies) * 14.14, while your best score is 0. Knowing the minimum and maximum values will allow you to express the results in a percentage which makes comparing numbers much easier, especially with larger numbers (98% & 99% vs 358049 & 353049). I also recommend trying to always ‘minimize’ values as that is the default optimization setting in Refinery.
Once you have a good model built and your inputs constrained and outputs calculating, make sure the model flexes. Test the high/low combinations for all variables - if something fails here it’ll likely fail there too. I find it’s often best to detach my sliders and use a list input with a List.GetItemAtIndex to pull a combination of values out of the combined list to test. Check ‘sum’ and ‘count’ values carefully as empty lists and nulls can cause some ‘0’ values accidentally which can throw off your optimization. If everything works wire the sliders back in and move on to Refinery.
If your graph fails to export to Refinery take action as directed - it’s usually a program specific API call which won’t work outside of the application. Keep in mind that Refinery is running an instance of the graph on multiple cores so you’ll get 6 instances of
program x to open if you force it to launch. As such limiting data manipulation to raw Dynamo Sandbox alone is often ideal.
Once exported, start with a randomization as these will catch the most ‘oops’ moments the fastest. If that passes, move onto a 8x10 optimization study to see how things process. If that is successful, move to a larger optimization study - say 100x100 or similar. You’re now doing Optimization in a generative context. Remember that the selected result isn’t the ‘last step’ in the design process. Instead you should push the results into your usual platform (ie: Civil 3D, Advanced Steel, Revit, FormIt, etc.) and scrutinize them as you would work done by an intern in their first week on the job. Massage the results as needed to pick up with the usual design techniques as you usually would from here. In a good use generative design and optimization becomes another tool like CAD or BIM to help them more rapidly produce good work with a consistent ‘eye’ on the quantifiable results. It is not intended to ‘remove’ the design work from the equation.
As an added step you may want to pull the ‘massaged’ results back into Revit to use the same scoring metrics the computer was using after the ‘human touch’ is added. This will either allow the designer to either validate their intuition and the graph can be updated with the newly learned lesson, or the designer could learn why their alterations might not have been the ‘right thing to do’ and they can revisit the ‘why’ aspect of the design.
Hopefully this helps (and doesn’t spoil the blog post too much).