floor plan optimization through evolutionary simulationfloor plan optimization through evolutionary...

11
Floor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary computation (EC) is an umbrella term for a range of problem-solving techniques based on biological models of adaptation, evolution, and genetic inheritance. Given a population of individual values or circumstances, EC evaluates the individuals in terms of their ‘fitness’, or their ability to best approximate the intended condition the user has defined. Multiple generations of individuals are simulated, and those which display the highest fitness score in each generation are used as the baseline for the next generation. In this way, a ‘survival-of-the-fittest’ computational method is achieved, where continuous improvement in individuals allows the user to determine the most effective condition from a very large candidate pool. Example Applications: EC can be applied in nearly any field which involves variable optimization. The flexibility, adaptability, and autonomy of this calculation method means that it offers a powerful tool for situations where large numbers of variables must be optimized. Evolutionary Optimization: This tutorial involves the use of Rhino Grasshopper’s Galapagos evolutionary solver tool in order to find the lowest-size-necessary layout of rooms in plan view. This Grasshopper script can be applied to any number of objects in whatever shape is necessary; in this case three rooms of irregular size and shape will be used. This simulation has the potential to be applied to any buidling program where the rough room dimensions are known, and where space-saving is important for building envelope and cost-per-square-foot reasons. Some examples of EC include: - Determining the best positioning, size, and material of structural members - Developing the catchiest pop song through aggregation and evolution of beats and hooks - Biomimetic evolution of robotic systems to better approximate organic movement - Creating ‘learning’ artificial intelligences for video game opponents - Encryption and code-breaking - Financial strategies and investment management - Marketing and advertisements

Upload: others

Post on 11-Mar-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Floor Plan Optimization through Evolutionary SimulationStephen Holman, Kevin Kerr, Nicholas Perseo

Background:

Evolutionary computation (EC) is an umbrella term for a range of problem-solving techniques based on biological models of adaptation, evolution, and genetic inheritance. Given a population of individual values or circumstances, EC evaluates the individuals in terms of their ‘fitness’, or their ability to best approximate the intended condition the user has defined. Multiple generations of individuals are simulated, and those which display the highest fitness score in each generation are used as the baseline for the next generation. In this way, a ‘survival-of-the-fittest’ computational method is achieved, where continuous improvement in individuals allows the user to determine the most effective condition from a very large candidate pool.

Example Applications:

EC can be applied in nearly any field which involves variable optimization. The flexibility, adaptability, and autonomy of this calculation method means that it offers a powerful tool for situations where large numbers of variables must be optimized.

Evolutionary Optimization:

This tutorial involves the use of Rhino Grasshopper’s Galapagos evolutionary solver tool in order to find the lowest-size-necessary layout of rooms in plan view. This Grasshopper script can be applied to any number of objects in whatever shape is necessary; in this case three rooms of irregular size and shape will be used. This simulation has the potential to be applied to any buidling program where the rough room dimensions are known, and where space-saving is important for building envelope and cost-per-square-foot reasons.

Some examples of EC include:

- Determining the best positioning, size, and material of structural members

- Developing the catchiest pop song through aggregation and evolution of beats and hooks

- Biomimetic evolution of robotic systems to better approximate organic movement

- Creating ‘learning’ artificial intelligences for video game opponents

- Encryption and code-breaking

- Financial strategies and investment management

- Marketing and advertisements

Page 2: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Open Rhino 3d and type in the command ‘Grasshopper’ to access the Grasshopper design suite.

Galapagos is located in Grasshopper’s ‘Params’ tab, in the ‘Util’ toolbox. Click the icon and then click anywhere in the Grasshopper canvas to insert the function.

2: Locate & Place Galapagos Function.

Galapagos performs its evolutionary calculations based on the parameters you set using sliders. In this exercise we will insert a total of 9 sliders.

Example Exercise: Floor Plan OptimizationIn this example, Grasshopper Script and the Galapagos Evolutionary Solver plug-in will be used to generate an evolutionary solution to the problem of creating a smallest-total-area floor plan from a variety of different rooms.

3: Insert Sliders.

1: Launch Grasshopper.

Page 3: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Create closed room outlines in Rhino 3d using your preferred curve tools. Add Curve components in Grasshopper and link them to the curve objects by right clicking on the Grasshopper component, selecting Set one Curve, then clicking on the curve object. Repeat for all curves.

4. Draw and Set curves.

Add a Rotate function (Transform > Euclidean) and link it to the first slider in the A (angle) input. Change the domain of the slider to 0-360 by right-clicking on the slider, selecting Values, and setting the Max to 360. Ensure that your angle value is in degrees by right-clicking the A input and selecting the degree setting. Also ensure that your first curve has been linked to the Rotate function in the G (geometry) input.

5. Create and Link Rotate Function.

Add a Move function (Transform > Euclidean) and link its G input to the G output of the Rotate function.

6. Create and Link Move Function

Page 4: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Add a Vector X,Y,Z component (Vector > Vector) and create two sliders and connect them to the X and Y axis. Connect the Vector Component from V (Vector) to T (Motion) on the Move component.

7. Create Vector X,Y,Z Component.

Add a Boundary Surface component (Surface > Free Form) and connect the E (Edges) to the G (Geometry) on the Move component.

8. Create a Boundary Surface.

Set curves to each new added script. Note that the complexity will increase as the number of geometries increases, and this will affect your computation time. In this instance, we will create three geometry chains.

9. Copy and Paste script based on number of desired geometry.

Page 5: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Add a Bounding Box Component (Surface > Primative) and connect each of your Boundary Surfaces to the C (Content) input by holding Shift while linking. Ensure that your Bounding Box component is set to “Union Box” mode by right-clicking in the black BBox text and checking Union Box.

10: Create and Link Bounding Box

Add an Area component (Surface > Analysis) and link the B (Box) output from the Bounding Box component to the G (Geometry) input on the Area component.

11: Create and Link Area Component.

Add a Collision Many|Many component (Intersect > Physical) and link each of the S (Surface) outputs from the Boundary Surface components to the C (Colliders) input in the Collision Many|Many component.

12: Create and Link Collision Many|Many Component.

Page 6: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Add three List Item components (Sets > List) and connect the C (Collision) output from the Collision Many|Many component to the L (List) inputs in each of the List Item components. Set the indices of each List Item to 0,1, and 2 respectively by right-clicking on the i (Index) input and using the Set Integer option.

13: Create and Link List Item Components.

Add a Gate Or component (Maths > Operators) and link the i (Index) outputs from the first two List Item components (with indices of 0 and 1) to the A and B inputs on the Gate Or component.

14: Create and Link Gate Or Component.

Add another Gate Or component (Maths > Operators) and link the R (Result) output from the previous Gate Or component to the A input on the new Gate Or. Link the i (Index) output from the third List item component (with the index of 2) to the B input on the new Gate Or.

15: Create and Link Second Gate Or Component.

Page 7: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Add a Stream Gate component (Sets > Tree) and link the R (Result) output from the second Gate Or component to the G (Gate) input on the Gate component.

16: Create and Link Stream Gate component.

Add a Multiplication component (Maths > Operators) and set the A value to any high number (ex. 1000) by right clicking on the A value and selecting Set Data Item. Connect the A (Area) output from the Area component to the B input on the Multiplication component. Connect the R (Result) output from the Multiplication component to the S (Stream) input on the Stream Gate component.

17: Create and Link Multiplication Component.

Add an Addition component (Maths > Operators) and connect the 1 (True) output from the Stream Gate component to the A input on the Addition component. Connect the A (Area) output from the Area component to the B input on the Addition component.

18: Create and Link Addition Component.

Page 8: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Click and drag from the Galapagos Fitness input to the R (Result) output of the Additon component. It is important that this connection begin with the Galapagos function as this step will not work otherwise.

19: Link Addition component to Galapagos function.

Right click on the Galapagos Genome input and select the All Sliders option. This causes Galapagos to link to all sliders introduced in the beginning of the script.

20: Link All Sliders to Galapagos function.

Double click on the Galapagos function to open a new window. Set the Fitness box to Minimize so that the script will calculate the smallest optimal floor plan. Click on the Solvers tab and execute the script by clicking the Start Solver button!

21. Open and Run Galapagos.

Page 9: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

Three executions of the final script have been carried out to demonstrate the different results that can be achieved through this technique.

Results.

Completed Solution

Solution stopped near completion

Completed Solution

Page 10: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

All of the sliders are storied in this area. This is traditionally done because sliders are the one aspect of a script that the user is most likely going to change on the fly.However, because this script uses the Galapagos component the sliders are unlikely to see use.

These three components are used to transform the curves referenced in from rhino. They are hooked up to the sliders to allow Galapagos to control them.

This portion of the scrip is used to check if the curves overlap. “Collide Many|Many” outputs a list of boolean values based on whether its inputs intersect at all. The staggering tree of logic gates is used to reduce this information down into a simple binary state. Either there are intersections, or there are not. If there are intersections, the area is multiplied by an arbitrarily large number, to ensure that any outcomes that produce intersections are by default undesirable outcomes.

These components are where grasshopper is being told what rhino objects to look at. They are call parameters (or params.) Grasshopper is capable of refereing most types of rhino objects.

Boundary Srf is the Grass-hopper equivalent of “Planar Surface” in Rhino. It’s used here because it increases the stability of the collision process.

This portion of the script is the fitness criteria. It draws a bounding box around the curves, in their current configuration, then checks for its area, which Galapagos seaks to minimize.

Finished Grasshopper Script

Page 11: Floor Plan Optimization through Evolutionary SimulationFloor Plan Optimization through Evolutionary Simulation Stephen Holman, Kevin Kerr, Nicholas Perseo Background: Evolutionary

All of the sliders are storied in this area. This is traditionally done because sliders are the one aspect of a script that the user is most likely going to change on the fly.However, because this script uses the Galapagos component the sliders are unlikely to see use.

These three components are used to transform the curves referenced in from rhino. They are hooked up to the sliders to allow Galapagos to control them.

This portion of the scrip is used to check if the curves overlap. “Collide Many|Many” outputs a list of boolean values based on whether its inputs intersect at all. The staggering tree of logic gates is used to reduce this information down into a simple binary state. Either there are intersections, or there are not. If there are intersections, the area is multiplied by an arbitrarily large number, to ensure that any outcomes that produce intersections are by default undesirable outcomes.

These components are where grasshopper is being told what rhino objects to look at. They are call parameters (or params.) Grasshopper is capable of refereing most types of rhino objects.

Boundary Srf is the Grass-hopper equivalent of “Planar Surface” in Rhino. It’s used here because it increases the stability of the collision process.

This portion of the script is the fitness criteria. It draws a bounding box around the curves, in their current configuration, then checks for its area, which Galapagos seaks to minimize.