
goat
Free optimization solver component for Rhino's Grasshopper
goat is an optimization solver component for Rhino's Grasshopper. Optimization affects shape, weight, cost and is a driving force of a modern design process. goat provides tools to solve design problems as optimization problems. It perfectly complements Grasshopper's default optimization tool galapagos by pursuing a deterministic approach, delivering fast and reproducable results. goat is based on David Rutten's galapagos GUI and interfaces NLopt, a collection of mathematical optimization libraries.
Download
The latest release of goat is version 3.0. It is for Rhino 5 and Rhino 6 and requires an up-to-date Grasshopper. For more information, check out the release notes.
After downloading, we recommend browsing through the installation instructions.
Activate
Tutorial: Geometry and Optimization
These slides gently introduce the basics of optimization in parametric modelling environments. At hand of four comprehensive examples, we set goat into action.
Documentation
Installation
If you have a previous version of goat installed, please see Update. Starting with version 3.0, goat ships in a handy self-installing package. Launch the setup tool to trigger the installation for the current user. You will be asked for an activation code when you are using goat for the first time. You obtain your free activation code here.
A note to experienced users: For system-wide installation, start Rhino, launch Grasshopper and select from the main menu File > Special Folders > Components folder. Copy all files and folders prefixed goat_ to Grasshopper's global components directory.
Usage
You may use goat just as galapagos in your Grasshopper project. For best results, you may even use both and run a few iterations with galapagos first and then perform the final optimization: goat was designed as drop-in replacement for galagagos.
After installation, you find the goat icon next to Galapagos' icons in the Special group of the Params toolbar. Clicking on the icon adds the goat component to your project.
Just as galapagos, the goat component has two docks:
- Variables are the unknowns of the optimization problem. They are the parametric handles goat will alter to achieve an optimal result for the objective. In the current version, you may connect the Variables dock to an arbitrary number of Number Slider elements. Gene Lists are not yet supported. Talking about genes: Variables are for goat what Genome is for galapagos.
- Objective is the current value of your optimization problem. This value shall be either minimized or maximized. Changing the variables changes the value of the objective. Defining the objective of an optimization problem is the most challenging task. In galapagos, the objective is called Fitness.
This simple example has a single number slider as variable. The variable is multiplied by itself and the result is the objective of the optimization problem. Double-clicking the goat component opens the settings dialog to configure the optimization.
Let's walk through the options of goat's configuration dialog:
- The first line tells goat, whether the objective shall be minimized or maximized. This choice depends on the design of your optimization problem.
- The next combo box selects the algorithm to solve your optimization problem. Goat implements not a single algorithm but interfaces several algorithms from the NLopt library. The choice of the optimization algorithm is another crucial step and depends on the characteristics of your optimization problem. We will go into more detail in the tutorial. As a rule of thumb, if there is a single optimum or you configure the Number Sliders close to the optimal solution, use a local method. If there are many local optima and you are far from the optimal solution, use a global solver.
The remaining four options help goat to identify, when an optimum has been found. goat will stop the optimization, if
- the relative change in the objective falls below a given threshold. This means that goat will stop when your fitness value doesn't change significantly anymore, typically a sign that an optimum has been reached.
- the relative change in the variables falls below a given threshold. This option is very similar to the previous one but affects change in the variables and not in the objective. The idea is the same, and we recommend to use this option in the first place.
- the value of the objective falls below / exceeds a certain value. This option is useful if you know what optimal value to expect from your objective.
- the running time exceeds a given amount of seconds. This is a safeguard option. If you set one of the other three parameters too tight, the optimization may fail to meet the stopping criteria. We recommend to use this option in the beginning to get a feeling for the other parameters.
Update
goat's setup tool will automatically uninstall any previously installed goat version 3.0+.
If a version of goat prior to 3.0 is installed on your computer, you must manually uninstall the respective files: Start Rhino, launch Grasshopper and select from the main menu File > Special Folders > Components folder and remove all files and folders starting with a goat_ prefix from there.
Uninstall
To uninstall goat, remove the all files and subfolders prefixed goat_ from your Grasshopper's Components directory. See the installation instructions to learn how to identify Grasshopper's Components directory.