|
|
|
| R2011b Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
In this exercise you will use a copy of the NBI optimization from the last example to create a sum optimization.
Up to this point, you have found the optimal values of each objective function at each point of an operating point set individually. A sum optimization finds the optimal value of a weighted sum of each objective function over all free variables simultaneously. The weighted sum is taken over each operating point in the run, and the weights can be edited.
A sum optimization problem without constraints, for M operating points, is the same as M individual optimizations; the minimum of the sum is the same as the sum of the minima.
To illustrate this, consider the following example:
Say the objective function is f(a,b). Consider a to be the free variable and b to be the fixed variable. To set up a sum optimization, at different values of b, we want to find [a1, a2, a3 .. aM] which minimizes:
w1*f(a1,b1) + w2*f(a2,b2) + w3*f(a3,b3) + ... + wM*f(aM,bM), [1]
where w1, w2 etc. are the weights.
There are two ways of viewing this problem. It can be viewed as a big optimization problem in an M-dimensional space for the vector [a1, a2, a3, ..aM] as shown in [1]. Alternatively, as each element of the sum depends on its own subset of the free variables, the problem can be written as M separate optimization problems, as in [2]:
min wi*f(ai,bi) for i=1:M, [2]
Once the M individual problems are solved, the weighted sum can be constructed to get the answer.
When there are sum constraints present, it is not true that a M-point sum optimization problem is equivalent to solving M individual optimizations. In this case, all points must be evaluated together to find the optimal solution that meets the sum constraints across all of the points.
In a sum optimization, the objectives are typically sum objectives. You can use a mixture of point and model sum constraints in a sum optimization. The following instructions describe these settings.
Right-click the TQ_Model_Optimization_1 node in the Optimization tree and select Duplicate Optimization_1.
A copy of the Optimization_1 node called Optimization_2 appears in the tree. You do not need an existing NBI optimization to create a sum optimization. This example is used for convenience and also to illustrate copying optimizations. This feature can be useful when you are trying different settings to improve your optimizations while keeping previous attempts for comparison.
You use this copy to create a sum optimization. This means that instead of performing the optimization at each point individually, the optimization takes the sum of solutions at all points into consideration. You can apply different weights to operating points, allowing more flexibility for some parts of the optimization.
Select the node Optimization_2 and select Edit > Rename (or press F2). Edit the name to read SUM_NBI.
You will edit all the objectives in your existing optimization to be sum objectives.
Double-click TQ_Model (or right-click and select Edit Objective). The Edit Objective dialog appears.
To set up your new objective,
Repeat to edit NOXFLOW_Model. Set up a sum objective to minimize NOXFLOW.
You can also edit your constraint to be a sum constraint. You can use a mixture of point and sum constraints. Double-click NOXFLOW_Model1 and the Constraint Editor appears.
To set up your sum constraint,
Select Sum Constraint from the Constraint Type drop-down menu, then select NOXFLOW_Model under Input Model.
Edit the Constraint name to NOXFLOW_Constraint to help you later distinguish it from the NOXFLOW_Model in the Optimization view fixed variables pane.
Make sure the inequality is <=, and enter 450 in the constraint bound edit box as shown.

Press Enter to dismiss the dialog box and return to the Optimization view.
You want to perform a sum optimization across a series of operating points. Select Optimization > Convert to Single Run. Look at the change in the Variable Values panes. Instead of 6 separate runs you now have one run containing 6 operating points. Number of runs is now 1, and Number of Values is 6 for all variables (you use these controls to set the number of operating points within each run). Each solution will be a sum across all the points in the run.
Look in the Fixed Variables pane for the weights columns, last columns on the right. Enter 5 in the first row (run 1, point 1) for TQ_Model_weights, NOXFLOW_Model_weights, and NOXFLOW_Constraint_weights, to weight the first operating point by five, as shown.

You have modified your objectives and
constraint for a sum optimization, which is ready to run. Click Run
Optimization (
) in the toolbar.
There is a wait notice as the optimization runs. There are no progress messages as points are evaluated because sum optimizations do not evaluate points individually.
When the optimization is complete, examine the results at the output node. Select the Pareto Slice table. Look at the objective and constraint results for the ten solutions (number of solutions is specified in the Optimization Parameters dialog). In the Pareto Slice table, negative constraint values are within the constraint. Look at the constraint summary view, where the left and right information corresponds to the constraint inequality; the left value is the distance from the constraint.
For more information see Interpreting Sum Optimization Output in the CAGE User's Guide documentation.
![]() | Multiobjective Optimization | Automated Tradeoff | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |