The first step in preparing to carry out an optimization is to define an objective function that is to be maximized or minimized. The objective function can be any output in your model. The optimization is carried out based on the final value (the value at the end of the realization) of the objective function.
In most cases, the objective function will represent either a cumulative value (e.g., total accumulated cost), a peak (e.g., the highest water level observed during the simulation), or a valley (e.g., the minimum amount of money in an account during the simulation). Cumulative values can be computed using Integrators and Reservoirs in GoldSim, while peaks and valleys can be computed using Extrema elements. As a result, the objective function is often a function of one or more of these types of elements.
You can also define a constraint that must be satisfied by the solution. GoldSim will seek the optimal value of the objective function by varying the optimization variables within their bounds and will dismiss any solutions which do not meet the specified constraint condition.
The “Nature of Optimization Problem” section of the Define Optimization Settings tab is used to specify the objective function and any constraints:
To select the Objective Function you must click on “<Click to select>”. A browser dialog for selecting an output will be displayed. After you select the output and press OK, the selected output is then shown in the dialog:
You can delete the selected output by pressing the red X to the right, or you can click on the item and select a different output.
The Objective Function must be a scalar value.
The Goal drop-list allows you to select whether you want to maximize or minimize the objective function. The Precision drop-list allows you to control the precision of the optimization algorithm.
You can specify a constraint by checking the Required Condition checkbox and specifying a condition that must be true in order for a solution (i.e., a combination of values of the optimization variables) to be valid. The constraint must be a condition output or a conditional expression, and can be a function of the objective function, the optimization variables, and/or any other outputs in your model:
The Required Condition is evaluated at the end of each realization. Solutions that do not meet the specified condition will be dismissed, and no solutions that violate this constraint will ever be included in the complex that is developed by the optimizer.
Learn more about: