Adding a Cost Function
A cost function can include one or more goals for an optimization analysis. Optimetrics manipulates the model's design variable values to fulfill the cost function. The optimization will stop when the solution quantity meets the acceptable cost criterion.
Following is the general procedure for adding a cost function with a single goal:
- Under the Goals tab of the Setup Optimization window, click Setup Calculations...
- In the Add/Edit Calculation window, follow these general steps to set up a cost function.
- Set the Context for the calculation.
- Choose the Category of available data type depending upon the Solution type of the design being optimized.
- Select the Quantity to add to the Calculated Expression field. Available quantities depend upon the Category selection.
- You may optionally make a selection from the function list to apply to the calculated expression.
- When the Calculation Expression has the desired equation, click Add Calculation to add the expression to the cost function table.
- Repeat to add additional calculations to the cost function or click Done to exit the Add/Edit Calculation dialog box and return to Setup Optimization.
- To modify the Solution on which the calculation is based, click in the Solution column and select the solution from which the cost function is to be extracted from the drop-down menu.
- To edit the calculation on which to base the cost function goal, select Edit from the drop-down menu.
- In the Condition
text box, click one of the following conditions from the drop-down menu:
<=
Less than or equal to
=
Equal to
>=
Greater than or equal to
Minimize
Reduce the cost function to a minimum value
Maximize
Identify a maximized condition
- In the Goal text box, type the value of the solution quantity that you want to be achieved during the optimization analysis. If the solution quantity is a complex calculation, the goal value must be complex; two goal values must be specified. The Minimize and Maximize options do not require you to specify a Goal value.
- Optionally, if you have multiple goals and want to assign higher or lower priority to a goal, type a different value for the goal's weight in the Weight text box. The goal with the greater weight is given more importance. If the goal is a complex value, the weight value must be complex; two weight values must be specified. The weight value cannot be variable dependent.
- Optionally, click the button for setting HPC and Analysis Options, which allows you to select or create an analysis configuration.
- Specify other options (such as acceptable cost, noise, and number of passes), and then click OK.
The Add/Edit Calculation window is displayed.
The optimization stops when the solution quantity meets the acceptable cost criterion.