After you have defined the objective function, you need to identify one or more optimization variables that can be adjusted by GoldSim as it seeks to optimize the objective function. Optimization variables often represent “decision variables” in your model – variables that you have direct control over (e.g., how much money to spend, when to implement something, the properties of a facility that you are simulating) GoldSim requires you to specify an initial value (an initial guess) for each variable, as well as an upper and lower bound between which the variable will be allowed to range.
Obviously, the objective function should be dependent (either directly or indirectly) on all of the optimization variables.
The bottom half of the Define Optimization Settings tab allows you to specify an arbitrary number of optimization variables:
You can add optimization variables by pressing the Add… button.
When you do so, a browser dialog will be displayed for selecting an output. Optimization variables must be scalar Stochastic elements or Data elements. They can be values or conditions.
The dialog will only list Stochastic elements and Data elements (no element types other than Stochastics and Data elements will be listed). It will list Data and Stochastic elements that are arrays, but if you select one, it will display an error message.
Note: A clone can be selected as an optimization variable, but two “sister” clones (clones of each other) cannot both be selected. If you try to do so, GoldSim will display an error message.
Note: Only scalars can be specified as optimization variables. If you wish to optimize a member or members of a vector or matrix, you can do so by creating individual scalar Data elements that define the members of the vector or matrix.
Note: If a Stochastic is selected as an optimization variable, the Probability_Density and Cumulative_Probability outputs for the element in the model will always evaluate to 0 during the optimization runs.
After selecting an element as an optimization variable, the following dialog will be displayed:
The Name, Description, Display Units and Type are automatically transferred from the linked element (and cannot be edited here). If you’ve selected the wrong element, you can reopen the browser for selecting optimization variables by clicking on the Name.
For each optimization variable, you must specify the range over which the variable will be varied during the optimization by defining a Lower Bound and an Upper Bound. The bounds must be numbers and cannot be links to other elements in the model.
You are also required to specify an Initial Value for each optimization variable. This should be your “initial guess” for the optimal value of each variable. The Initial Value is not critical, but if it is chosen well (i.e., if it is relatively close to the true optimum), it could speed up the optimization. The Initial Value must be a number and cannot be a link to other elements in the model.
If you check the Restrict this variable to integer values only, during the optimization process, GoldSim will only use integer values for the variable.
Note: During the optimization process, GoldSim completely overrides the values of the elements chosen as optimization variables. That is, the manner in which they are defined (e.g., the distribution type for a Stochastic optimization variable) has no impact on the optimization.
Note: During the optimization process, each run is treated as a deterministic simulation. Hence, all Stochastic elements not defined as optimization variables use their deterministic value.
Once you have specified bounds and an initial value, you can click Prev or Next to view the other optimization variables, but the new optimization variable will not be added until you click the OK button.
Optimization variables can be removed by highlighting them in the dialog and pressing the Remove button.
You can edit the settings for an existing optimization variable by double clicking on the optimization variable in the dialog, or by highlighting the optimization variable and pressing the Edit… button.
Learn more about: