The Optimization Tool

The Optimization Tool is a collection of optimization algorithms that can be used within STK's Analyzer capability. Currently over 30 algorithms are available including gradient based optimizers, genetic algorithms, multi-objective algorithms, and other heuristic search methods (see Algorithm Comparison Chart). A common graphical user interface is provided to define optimization problems. An algorithm selection wizard is also provided to make it easy to choose algorithms that will work best for the problem at hand.

Launching the Optimization Tool

To access the Optimization Tool, click the Optimization Tool button on the Analyzer toolbar.


Defining the Design Problem

To perform an Optimization Study, an objective function and at least one design variable must be specified. To select variables, drag them from the Component Tree and drop them into the Optimization Tool. Design variables are always inputs. Objectives and constraints can be either inputs or outputs. If an input is used as an objective, it must also be a design variable.

If the objectives or constraints have lower/upper bounds defined for the corresponding Analyzer variables, it may cause the model evaluation to fail. If the selected optimizer does not handled failed runs, it will stop. To avoid such problems, consider removing bounds from the Analyzer variables. Instead, apply constraint bounds through the constraints table in the Optimization Tool GUI.

Defining Single Objective Optimization Problems

The objective functions can be specific variables or equations composed of multiple output variables. An equation can be entered directly in the edit box to define the objective. Note that the ability to define equations allows for complex objective formulations.

For each objective, specify whether you want to minimize or maximize the objective or find a design where the objective has a specific value (Solve For) in the Goal drop-down box.

Defining Multiple Objective Optimization Problems

Many engineering design problems are naturally formulated as an optimization with more than one objective. For example, the optimization problem may need to maximize performance while cost is to be minimized. There will be a trade-off between the competing objectives such as cost and performance. There are two ways to solve multi-objective optimization problems using the Optimization Tool.

Multiple Objective Algorithms

The first approach is to use algorithms that are specifically designed to solve multi-objective problems such as Darwin Genetic Optimizer, NSGA-II and DAKOTA MOGA. These algorithms seek to find a set of designs that is called "Pareto Set" instead of finding a single best design. The Pareto designs represent trade-off among competing objectives, from which the user will pick a design using his/her engineering judgment.

Single Objective Algorithms

The second approach to have the Optimization Tool combine the separate objectives into a single objective function which can be optimized with one of the single objective algorithms such as OPTLIB Gradient Optimizer, and DOT Sequential Quadratic Programming. The combined objective function is computed as a linearly weighted sum of the individual objectives using the weights specified in the Weight column. To set up the problem, drag and drop each objective variable from the component tree, set the goal, and specify a weight. The Optimization Tool will automatically generate the combined objective function. If objectives are of different order of magnitude, adjust the weights to make weighted values be roughly the same magnitude. If one objective is more important than another, increase its weight accordingly to make it more dominant in the combined objective. The challenge of this approach is that it will produce different results depending on weight values and it may require several tries to obtain satisfactory results. For this reason, the first approach of using inherently multi-objective algorithms is recommended for most cases.

Constraints

Constraints restrict particular variables to a region or value. In other words, a bound specified in the list of constraints prevents a design point from being found that causes that output variable to occur outside the specified region. Equality constraints can be defined by typing the same value in both the upper and lower bound positions, although it is usually recommendable to provide a small constraint margin. Each constraint must have either an upper or a lower bound, but can have both. As with the objective, constraints may be equations composed of multiple variables.

Design Variables

The design variables are the variables that the optimizer will modify to meet the objective. The following properties may be specified for each design variable:

  • Start Value (optional) - If specified, the optimizer will set the design variable to this value prior to starting the optimization process. Note that some algorithms do not use the start value because initial values are randomly generated.
  • Lower Bound (only required for continuous variables) - If specified, the minimum value to which the optimizer is allowed to set the design variable.
  • Upper Bound (only required for continuous variables ) - If specified, the maximum value to which the optimizer is allowed to set the design variable.

For continuous variables, the start value, upper bound, and lower bound can be modified by typing directly into the table fields.

For discrete variables, the start value will be a drop-down box containing all of the available values for the discrete variable. The available values can be modified using the "..." button in the Edit column.

Selecting an Algorithm

The optimization algorithm can be selected using the Algorithm drop-down box.

Each algorithm has its own strengths and weaknesses (e.g., some solve quickly for smooth continuous variables, while others can handle discrete variables). If you are unfamiliar with available algorithms, click the Choose button to open the Algorithm Selection Wizard.

Once all of the parameters for the Optimization Tool have been defined, you are now ready to run the study. For easy access the same test setup in the future, add the Optimization Tool configuration as a favorite.

Performing the Design Study

When the Optimization Tool is run, it will systematically set values for design variables as it attempts to minimize, maximize, or solve for the objectives. To start the optimization run, press the Run button. The status bar at the bottom of the interface will display Status messages about the progress of the optimization run. Elapsed Time displays how much time has passed since the optimization was started.

Every time that Optimization Tool runs your analysis, the results of that run will be saved in the Table. A 2D Scatter Plot is automatically launched when the Optimization Tool runs and updates as the data is collected.

Resuming an Unfinished Design Study

Some algorithms support resuming a design study that was not fully completed (such as one that crashed or that was halted & saved). This allows you to continue an unfinished study from near where you left off, instead of having to start again from the beginning. Depending on the design of the alorithm being used, some runs may have to be discarded and re-run. For example, NSGA II can only restore back to the beginning of the last checkpoint run. If a design study is capable of being resumed, the Resume button on the tool will be enabled. Any changes to the algorithm/tool options will disable the Resume capability.

Note that design studies that successfuly completed but did not converge cannot be resumed. To see which algorithms support this feature, refer to the individual algorithm help pages.

Viewing the Optimization Output

Details of the optimization run can be viewed by pressing the View Output button. This button can be pressed either while the optimizer is running or after it has stopped.

Optimization Options

Algorithm parameters can be modified via the algorithm options dialog, which is accessed by selecting the Algorithm Options from the Options split button. For more information about the options available for each algorithm, please consult the algorithm's help page.

Optimization Tool options that apply to all algorithms can be accessed by selecting Optimization Tool Options from the Options split button.

Help

To access the help specific to an algorithm, select Algorithm Help from the Help split button. To access this help document, select Optimization Tool Help from the Help split button.

See Also: Algorithm Selection Wizard | Optimization Tool Options | Optimization Tool Output