Parameterisation
Overview
When considering what parameters to make inputs and outputs there are a few thoughts to consider. This will make your Generative Functions easy to work with in the app and allow the Platform’s exploration and optimisation algorithms to provide you with better results.
To ensure your Generative Function is effective:
- Use inputs and outputs that describe the design intent, normally this means the fewest possible to describe the design
- Stick to numeric inputs and outputs data types or Assets. The handling complex data section explains how to convert complex data types to numerical ones
- Validate inputs to prevent invalid data
- Try to choose faster analysis, to let you view your generated designs as soon as possible! Sometimes a tradeoff can be made to lower the fidelity of some analysis to get to results quicker.
Describe the design intent
Since inputs and outputs in your Generative Functions are the parameters you can control and measure in the app, they should directly reflect your design intent.
For example, in the cantilever example used in previous sections,
the location that the force is applied to the cantilever was described as a proportion of the length of the cantilever,
which could then be validated to be between 0 and 1 using Field
validation:
Had the force location been described in meters instead (force_location_m
),
then it wouldn’t have been possible to use Field
to validate that the force is always applied on the cantilever.
Which parameterisation is right depends on the design intent.
Similarly, the cantilever example could be extended to have the force can be applied in different directions. In this scenario, you may want to have a force defined in x, y and z (Cartesian system), or you may want to have a force magnitude and two angles to define the direction (spherical system), depending on which parameters are most useful to control.
This approach not only aligns your function with the design’s purpose but often reduces the number of parameters. For instance, instead of specifying 40 x-y coordinates to define a spline, consider defining a Bézier curve with just four parameters. Simplifying in this way makes the data more manageable and improves generation speed, as fewer data points are required.