Optional Assignment 01
Name | Date |
---|---|
Release | 2024-11-07 |
Overview
This assignment focuses on optimization within Grasshopper. Modeling an optimization problem in Grasshopper can generally be divided into the following parts:
- Define Variables: Start by identifying the variables you want to control (using
Number Slider
orGene Pool
). You should also specify the range for these variables. - Set the Objective: Define the goal or outcome you want to optimize.
- Model the Relationship: Create the relationship or function between the variables and the objective so that changes in the variables impact the objective meaningfully.
- Solve optimization: Use an optimization component to (hopefully) find a good solution.
In this assignment, we use the Galapagos
component for optimization. Galapagos
provides two methods for optimization: Genetic Algorithm (Evolutionary Solver) and Simulated Annealing. In simple terms, the genetic algorithm tries different solutions similar to natural evolution, keeping the best results and combining them to gradually improve. In contrast, simulated annealing starts by exploring widely and then slowly narrows down to find a nearby best solution. For more details, refer to the two blog posts about Genetic Algorithm and Simulated Annealing.
This assignment builds upon Assignment 04, which covers terrain analysis and modification. In Task A, we not only create a terrace in the desired area, but also adjust its elevation and scale factor to balance the amount of land to be cut and filled. In Task B, we further modify the path to the terrace, aiming for a more even slope distribution along the path. Each task is explained in more detail in the following sections.
Galapagos
because it is already integrated into Grasshopper and is relatively easy to use. However, Galapagos
can be limiting if you want to store multiple optimization results or perform multi-objective optimization. For these cases, we encourage you to explore other optimization tools in Grasshopper, such as Wallacei and Tunny.Part A: Terrace Creation
In this task, you will create a flat terrace within mountainous terrain. The basic shape and location are provided, but you’ll need to determine the elevation, size, and width of the terrace to meet specific requirements:
- Variables:
- Elevation of the Terrace Curve: Set between 15 - 25 meters with one decimal place.
- Scaling Factor of the Terrace Curve: Range between 0.5 - 1.5. (Hint: Use the
Scaling
component to adjust the terrace curve’s size. Be sure to set the scaling center to the curve’s centroid, which you can find with theArea
component.) - Width: Range between 1 and 20 as an integer. (This corresponds to the
Width
input of theMesh Flat
component.)
- Objectives:
- Balance of Cut and Fill Land: Aim for this balance to be close to 0.
- Hint: Check the
Total
output parameter of theCutFill
component. Remember to compute the absolute value of the output before minimizing.
Part B: Path Adjustment
In this task, you’ll refine a path leading to a flat terrace by adjusting its slope. Currently, if you create the path directly using the Mesh Component
, you’ll notice that it "flows" with the terrain. This means the path becomes "bumpy" wherever the terrain is uneven, as shown in the figure below. Your goal is to adjust control points on the path to achieve a more even slope.
- Variables:
- Adjust the control points in the z-direction within a range of -5 to 5 meters.
- Objectives:
- Minimize the sum of steep slopes along the path.
- Balance the cut-and-fill land, aiming for a net balance close to zero (as in Task A).
This task has a few tricky aspects: creating a path with the exact shape you want, measuring whether the path is smooth or bumpy, and optimizing for two objectives when Galapagos
only allows one. Here are some hints to help you get started:
- Creating a Custom Path: To shape the path precisely, start by constructing a 3D curve with the desired slope. Then, use the
Mesh Curve
component to adjust the terrain (set a high slope value, like 75). Finally, apply theMesh Path
component to generate the path. - Assessing Path Smoothness: A bumpy path has frequent, steep changes in elevation. To measure this, filter out slopes greater than 30° and sum these to assess the "bumpiness." We’ve provided some code in the input file to help with this calculation.
- Combining Objectives: Since
Galapagos
only takes one objective, you can combine the two by summing them. Try setting the final objective to the sum of steep slopes plus one-twentieth (1/20) of the cut-fill balance. This normalization keeps both objectives on a similar scale, though you’re free to explore other combinations!
Part C: Your Optimization Case
Think about a design problem that you can solve with optimization, enjoy modelling and optimization!
Input File
Meters
unit system in Rhino. You can switch to Meters
by using commands Units
if you are using other unit system.The corresponding input files are provided on the MscLA server.
Assignment_optional_01.zip
Submission
Name the submission file(s) with the following format:
LastName_FirstName_TimeForCompletion_OPAS01.xxx
Please submit the corresponding file(s) to the submission folder Submission_Optional_AS01
on the server:
9_HS_24\02_MScLA-Semester-1\07_Digital-Design-Methods\Assignment\Submission_Optional_AS01