| Model-Based Calibration Toolbox™ | ![]() |
| On this page… |
|---|
Using the Optimization Output View Solution Slice: Optimization Results Table Solution Slice: Results Surface and Results Contour Views |
When you have run an optimization an Output node appears in the optimization tree and the Optimization Output views appear. Use the toolbar buttons shown in the following figures to determine what is displayed in the table and the graph views. The first default view is the Solution Slice table and the Objective Slice Graphs.
Use these toolbar buttons or the View menu to select the following Table Views:
![]()
Solution Slice: Optimization Results Table and Solution Slice: Results Surface and Results Contour Views— See also Using Acceptable Solutions
Use these toolbar buttons to select the following Graph Views:
![]()
Free Variable Values Table — displays the values of the free variables for the currently selected solution.
Solution Information Table — displays information about the currently selected solution, including the Accept status, the algorithm exit flag and exit message, and other algorithm details such as the number of iterations.
Hover the mouse pointer over the Exit message to see the whole message. This message can tell you, for example, if an foptcon optimization run terminated because no feasible start point was found.
You can split and add these views as in the Design, Data and Boundary Editors. Use the right-click context menu, the View menu, or the buttons in the view title bars to do so.
![]()
The last four toolbar buttons are also in the Solution menu:
Select solution — This option is for multiobjective optimization, used for choosing your preferred solution for each operating point. See Selected Solution Slice.
Edit pareto weights — This option is used for evaluating weighted sums. See Weighted Objective Pareto Slice.
Export to data set — This option exports the table visible in the current view only to a new or existing data set. See Using Optimization Output.
Fill tables using optimal solutions — This option opens the Table Filling From Optimization Results Wizard. See Using Optimization Output.
The Solution menu also has Retain Output (also in the context menu when you right-click an optimization output node). If you select this option, the output node is retained, so if you rerun the optimization you get additional output nodes.
Note For help understanding your results, see Analyzing Point-by-Point Optimization Output or Interpreting Sum Optimization Output. |
CAGE automatically selects successful optimization solutions and highlights unsuccessful solutions for you to investigate. These selections are shown in the icons and check boxes next to the Run column in the Optimization Results table, and shown in the Results Surface and Results Contour views. You can change the selections using the check boxes for each solution, or right-click to change acceptable status of solutions in the graphical views.
You can use these selections to choose solutions within the table for use in:
Importing to other optimization starting values: Import from Output.
Accept status is shown in the following ways:
CAGE automatically selects the Accept check boxes for solutions where the algorithm exit flag indicates success (>0). These solutions show a green square icon next to the check box. Typically constraints are met within tolerance.
![]()
Solutions with a red round icon indicate that the algorithm exit flag does not report success (<0). Some constraints may not be met.
![]()
Solutions with an orange triangular icon indicate that the algorithm exit flag is zero. Some constraints may not be met. An exit flag of zero indicates the algorithm failed because it exceeded limits on the amount of computation allowed (e.g., the algorithm ran out of iterations or function evaluations). You could decide to accept these solutions or you could try changing tolerances and optimizing again.
![]()
Solutions where you have altered the check box status show an asterisk.
![]()
Violated constraints are shown by yellow cells with cross icons in the table. You can control the value used for this highlighting by selecting View > Edit Constraint Tolerance.
![]()
It is possible to have highlighted constraints within green accept status solutions. The algorithm can report success if constraints are met within tolerance on scaled values. The constraint display applies a tolerance to raw values, and you can also edit this tolerance to help you analyze results.
If you are viewing constraints with more than one value and have the view set to Compact, the cell is yellow if any of the individual values are infeasible.
You can view the algorithm output flag in a tooltip by hovering the mouse pointer over each colored accept status icon, or click to select a solution and you can view the algorithm Exit flag, Exit message and other details in the Solution Information table.
The icon and (editable) Accept status check box are also shown at the top right for the currently selected solution.
Note For help understanding your results, see Analyzing Point-by-Point Optimization Output. |
The Solution Slice view (click
) shows
a table with one solution at all operating points and all runs. The
solution is shown in both tabular and graphical forms — see Solution Slice: Results Surface and Results Contour Views for
information on the graphical views.
The following example shows a Solution Slice table display.

The Solution Slice view shows a table of one solution at all operating points and all runs in the problem. For single-objective optimizations there is only one solution per operating point, so the Solution Slice is the only useful view. For multiobjective optimizations with more than one solution per run, you can scroll through the solutions using the arrows or edit box at the top.
The table shows the selected solution at all operating points. The Optimization Results pane shows the fixed variable settings, the optimal free variable settings, and the evaluation of objectives and constraints at the optimal free variable settings.
Click inside the table to make the graph views (objective slice, constraint slice and pareto front) display the selected operating point.
The Objective Slice Graphs show the objective functions at the operating point selected in the table, with the solution value in orange.
If you have constraints you can also choose to display the Constraint Slice Graphs. These show the constraint functions at the selected operating point with the solution value in orange.
If you are viewing a multiobjective optimization you can also choose to display the Pareto Front Graphs, which show the available solutions with the current selection highlighted in red.
You can also display the Constraint Summary Table, which details the distance to each constraint edge for the selected operating point in the table. This table can be useful to see at a glance if a solution met all the constraints. If there are many constraints it can be time-consuming to use the constraint graphs to verify that the constraints are met.
Before you run an NBI optimization you can specify how many solutions you want the optimization to find, using the Set Up and Run Optimization toolbar button.
For information on selecting best solutions at each operating point for subsequent export to a data set or filling tables, see Selected Solution Slice.
The Results Surface view shows a 3D plot of one solution at all operating points and all runs in the problem. Use the axes popup controls to change what is plotted on each axis. You can plot the following against each other:
Fixed variable settings
Optimal free variable settings
Evaluation of objectives at the optimal free variable settings
The optimization results are plotted as points, and an extrapolation surface (of the z-axis quantity as a function of the x and y-axis quantities) is also displayed.
Each optimization result is displayed using the Accept icon, as shown in the Optimization Results table:
Successful
result
Failed
result
Problem result
User-altered
accept status.
Currently
selected result (black outline). Select results by clicking an icon
in the plot or a value in the table. Changing the currently selected
result in the Results Surface view also updates the result selected
in the table, and updates any plots displayed in the lower half of
the output view.

Left-click anywhere except an icon to rotate the plot.
Use the right-click context menu to control these options:
Results to Display
All – Show all optimization results for this solution
Acceptable – Show only the acceptable results for this solution
Green – Show the results with a positive exit flag
Orange – Show the results with a zero exit flag
Red – Show the results with a negative exit flag
Set Acceptable — mark an optimization result as acceptable if it is currently marked as unacceptable.
Any results whose acceptability has been changed are shown as stars in the plot
Set Unacceptable — mark an optimization result as unacceptable.
Extrapolate All — toggles extrapolation from acceptable solutions only (default) to using all results for extrapolation.
Surface Options
Reset Axes Orientation — Reset the axes orientation to the default.
Show Axes Grid — Toggle whether the axes grid is displayed or not.
Show Axes Box — Toggle whether the axes box is displayed or not.
Hide Surface — Toggle whether the surface is visible or not.
Show Stems — Use this option to additionally display stems projected from the data to the surface. These stems can be useful to show the location of results that are not used in the extrapolation and are hidden by the surface.
The Results Contour view shows a contour plot of one solution at all operating points and all runs in the problem. You can plot the following against each other: fixed variable settings, optimal free variable settings and evaluation of objectives at the optimal free variable settings.
The optimization results are plotted as points in the contour plot and extrapolation contours (of the z-axis quantity as a function of the x and y-axis quantities) are also displayed. The accept icon for each result is plotted as for the Results Surface.

Rotation is not permitted in the contour view.
The right-click context menu shares these options with the Results Surface view: Results to Display, Set Acceptable/Unacceptable, and Extrapolate All. Some additional items for the contour view:
Contour Options
Label Contour Lines
Fill Contours
Contour Levels — These contour options are identical to those for the objective contour view.
Show Axes Grid — Toggle whether the axes grid is displayed or not.
Hide Contour — Toggle whether the contour is hidden or not.
Display Contour — Toggle whether the contour is displayed or not.
The Pareto Slice table view (click
) is
for multiobjective optimization where there is more than one solution
at each run. The Pareto Slice shows a table of all solutions at one
run; you can scroll through the runs using the arrows or edit box
at the top.
To collect best solutions across different runs, you need to use the Select Solution function in the toolbar.
To select a solution for each run:
Enable the Selected Solutions view. Select Solution > Selected Solution > Initialize.
The Create Selected Solution dialog box appears.

The default 1 initializes the first solution for each run as the selected solution. You can edit the solution number here if you want. For example, if you select 4, solution number 4 is initialized as the best solution for every run. When you click OK, the toolbar buttons for the Selected Solution Slice view and Select Solution are enabled.
Decide which solution you want to use for the currently selected run. Use these tools to help you:
Display the Pareto Front Graphs (click
in the toolbar) which show the available solutions with the current selection
highlighted in red.
Use the pareto front graphs together with the Objective Slice Graphs to select the best solution for the run. If you have constraints you can also use the Constraint Slice Graphs and Constraint Summary Table to help you decide which solution to choose for each run.
When you have decided which solution you want to use
for the currently selected run, you can select it as best by clicking
Select Solution (
) in the toolbar.
You can also select best solutions in the Solution Slice view, see Solution Slice: Optimization Results Table .
Scroll through the runs and select a best solution for each. These selections are collected in the Selected Solutions Slice, where you can use them to fill tables or export to a data set. You can also import them to an optimization. See Selected Solution Slice.
Before you run an NBI optimization you can specify how many solutions you want the optimization to find, using the Set Up and Run Optimization toolbar button.

As in the other table views, you can use the Accept check boxes to choose a selection of rows within the table. In this table view, you can only use this to select solutions within a single run. Each different solution has a check box and colored icon for "Acceptable" status. There is only one exit flag per run, so all solutions have either red or green Accept status. You can override these selections using the check boxes if you want to choose solutions within a run, for use when importing to other optimizations, or for future reference. See Using Acceptable Solutions.
The Weighted Objective Pareto Slice view
(click
) shows a weighted
sum Pareto solution. This table shows a weighted sum of the objective
values over all runs for each solution. For a single objective optimization
there is a single cell, which is the sum of the objective across all
runs.
In the following multiobjective example, the value in the Objective1 column in the first row shows the sum of the solution 1 values of the first objective across all runs. The second row shows the sum of solution 2 Objective1 values across all runs, and so on for all ten solutions in this case. This information can be useful, for example, for evaluating total emissions across a drive cycle. The default weights are unity (1) for each run.

You can change the weights; for example, if you need a weighted
sum of emissions over a drive cycle, you might want to give a higher
weight to the value at idle speed. You can alter weights by clicking
Edit Pareto Weights (
) in
the toolbar. The Pareto Weights Editor appears.

In this dialog box, you can select objectives to sum, and select weights for any run by clicking and editing, as shown in the previous example. The same weights are applied to each solution to calculate the weighted sums. Click OK to apply new weights, and the weighted sums are recalculated.
You can also specify weights with a MATLAB vector or any column in the optimization output by selecting the other option buttons. If you select Output column you can also specify which solution; for example, you could choose to use the values of spark from solution 5 at each operating point as weights. Click Table Entry again, and you can then view and edit these new values.
Note Weights applied in the Weighted Pareto View do not alter the results of your optimization as seen in other views. You can use the weighted sums to investigate your results only. You need to perform a sum optimization if you want to optimize using weighted operating points. |
The Accept check box is disabled in this view. The exit flag is the minimum of all of the runs that are summed over, so the Accept status can only go green if all runs are green.
In a multiobjective optimization, there is more than one possible optimal solution at each run. You can use the Selected Solutions view to collect and export those solutions you have decided are optimal at each run.
After you enable the Selected Solution view, you can use the plots and table views to help you select best solutions for each run. These solutions are saved in the Selected Solutions view. You can then export your chosen optimization output for each point from the Selected Solutions view to a data set, or use your optimization output to fill tables or import to another optimization.
You cannot select best solutions until you have enabled the Selected Solutions view.
Select Solution > Selected Solution > Initialize.
A dialog box called Create Selected Solution appears. The default 1 initializes the first solution for each run as the selected solution.
Edit the solution number in this dialog box if you want. For example if you select 4, solution number 4 is initialized as the best solution for every run. When you click OK, the toolbar buttons for the Selected Solutions view and Select Solution are enabled.

After you enable the Selected Solutions view, you can use the table views and the plots in the graphs (Objective Slice, Pareto Front, and Constraint Slice graphs) to help you select best solution for each run.
Click in the Pareto Slice (or Solution Slice) table to select a point to display in the graphs until you can decide which solution you want for a point.
Click Select Solution (
) in the toolbar
to select the current solution as best.
Repeat steps a and b until you have selected solutions for all points.
These solutions are saved in the Selected
Solutions view. This view collects all your selected solutions
together in one place. For example, you might want to select solution
7 for the first run, and solution 6 for the second, and so on. You
can then use your chosen optimization output for each point to fill
tables (see Filling Tables from Optimization Results), or choose the
Export to Data Set
toolbar and Solution menu
option (see Exporting to a Data Set),
or use these solutions as starting points in another optimization
(see Import from Output).
An example of the Selected Solutions view is shown. It looks similar to the Solution Slice view, except the solution controls at the top are not enabled. You cannot change solution number in this view. The solution chosen as best (in the other views) for the currently selected run is displayed in the grayed-out edit box.
As in the other table views you can use the Accept check boxes to choose a selection of rows within the table. See Using Acceptable Solutions.

The objective slice graphs are displayed by default for optimization
output views, or you can select
in the
toolbar.

The objective slice graphs show the objective functions at the point selected in the table, with the solution value in orange. Whether the table is displaying a solution slice or pareto slice, the cell you select in the table is always displayed in the graphs. The objective graphs show cross section plots of the objective function against each free variable in the problem.
The yellow areas show a region outside a constraint tolerance (such as a boundary constraint exported from the Model Browser part of the Model-Based Calibration Toolbox product, or any other optimization constraint). All constraint regions in optimization displays (as in the rest of the toolbox) are shown in yellow.
Use the right-click context menu to toggle constraint display and alter graph size.
The Objective Contour Plot (click
) shows
the contours of the objective against any pair of control parameters,
at the run selected in the table, with the solution value at the center
of the orange cross-hairs. Yellow areas show a region outside a constraint
tolerance (see the following figure). This view can be useful for
exploring objective functions—a visual way to help avoid local
minima.

Select parameters to plot in the drop-down lists, and if you have more than one objective you can select from the Objective drop-down list.
Use the right-click context menu to toggle constraint display, contour labels, fill contours, and colorbar, and control other options such as number and placing of contour levels.
The Pareto Front Graphs (click
) are for multiobjective
optimization where there is more than one solution at each run. The
Pareto Front graphs show the available solutions for the selected
run with the current selection highlighted in red. Click in the tables
or graphs to select solutions. The selected solution is displayed
in all other graphs (objective and constraint).
Before you run an NBI optimization you can specify how many solutions you want the optimization to find, using the Set Up and Run Optimization toolbar button to access the Optimization Parameters dialog box.

You can use the Pareto Front graphs, shown in the preceding figure, in combination with the table views (Solution Slice and Pareto Slice) and the other plots in the graphs (Objective Slice and Constraint Slice graphs) to help you select best solutions for each run. You can collect these solutions together in the Selected Solution Slice.
The Constraint Slice graphs (click
) show
the constraint functions at the selected operating point with the
solution value in orange. Click inside the tables to select solutions
to display. Yellow areas on the graphs show a region outside a constraint
tolerance, as shown in the following figure.

This example shows the constraint EXTEMP ≤ 1290° C.
The constraint graphs (the blue lines) show how the Left Value of each output of a constraint (in this case, the EXTEMP model) depends on the free variables in the optimization (in this case S, EXH and INT). The Left Value is compared with a plot of the Right Value output (in this case, 1290° C) on the same axes.
The red horizontal line denotes the Right Value (i.e., the upper bound on EXTEMP) which in this case is 1290° C). Because this value is an upper bound, the yellow region above the red line shows where the constraint is infeasible. Yellow is shown above the Right Value plus the tolerance — on many graphs the distance is too small to see between the red line and the tolerance line where the yellow begins. By default, this tolerance is taken from the optimization constraint tolerance. You can control the value used for this highlighting by selecting View > Edit Constraint Tolerance.
The vertical orange lines show the optimal values of the free variables; the intersection of these with the blue lines is marked with a blue triangle on the Constraint1 axis—this intersection is the Left Value (1290° C) at the optimal settings. These are the Left and Right values in the Constraint Summary table for Constraint1. See Constraint Summary Table.
Note Use the right-click context menu to alter graph size. |
If a constraint is violated at the solution value, the Y axis is highlighted in yellow, as shown in Constraint 2 in the following example. If constraint values are greater than the tolerance, the row is highlighted in yellow. By default, this tolerance is taken from the optimization constraint tolerance. You can control the value used for this highlighting by selecting View > Edit Constraint Tolerance.

See also Range Constraint Output for an explanation of range constraint graphs, and Constraint Graphs for specific sum optimization features, such as a table gradient constraints.
The Constraint Summary Table (click
) view
displays the constraint values for the selected solution in the table.
This view can be useful to see at a glance if a solution met all the
constraints. If there are many constraints it can be time-consuming
to use the constraint graphs for verification. If you are using equality
constraints or tight table gradient constraints, the graphs can appear
entirely yellow and you can only see whether a feasible solution has
been found by looking at the Constraint Summary Table, shown in the
following figure.

Constraint values greater than the tolerance appear in bold, and the row is highlighted in yellow. By default, this tolerance is taken from the optimization constraint tolerance. You can control the value used for this highlighting by selecting View > Edit Constraint Tolerance. These results should be checked as they may show the optimization failed to find a solution within the constraint, or they may be within tolerance (very close to zero). Constraint values less than zero are within the constraint.
Constraints are evaluated as inequalities, e.g., the first constraint, RESIDFRACatMBT, as shown in the preceding figure, is RESIDFRACatMBT ≤ 25%. The Left Value shows the left side of the inequality at the optimal settings of the free variables (in this case, the output of the residual fraction model (RESIDFRACatMBT), which is 21.652). The Right Value shows the right side of the inequality (in this case, the upper bound, 25%). The constraint value is the difference between the Left and Right values, and the distance to the constraint edge.
In this case, the second constraint, MBT_Boundary, is violated, so the row is yellow, and the positive Constraint Value is highlighted in bold.
For additional information on working with constraints, see the following topics:
Range Constraint Output for an explanation of range constraints in the summary table.
Constraint Summary for specific sum optimization features, such as table gradient constraint outputs.
The range constraint output is best explained using an example problem.
Control parameters or free variables: S, EXH, INT
Fixed variables: N, L
Objective: Maximize TQ(S, EXH, INT, N, L) at the fixed values shown in the following table.
| Run | N | L |
|---|---|---|
| 1 | 3000 | 0.5 |
| 2 | 4000 | 0.6 |
Constraint: Restrict S between an upper and lower bound shown in the following table.
| Run | N | L | Min S | Max S |
|---|---|---|---|---|
| 1 | 3000 | 0.5 | 20 | 30 |
| 2 | 4000 | 0.6 | 30 | 40 |
When the optimization is run the optimizer returns the following optimal values of S, EXH and INT, as the following table shows.
| Run | N | L | Optimal S | Optimal EXH | Optimal INT |
|---|---|---|---|---|---|
| 1 | 3000 | 0.5 | 21.33 | 8.593 | 29.839 |
| 2 | 4000 | 0.6 | 30 | 5 | 7.767 |
Range constraints implement the following expression:
Lower Bound (LB) ≤ Expression ≤ Upper Bound (UB)
In CAGE, this expression is implemented as two upper-bound constraints, namely:
![]()
A range constraint returns two values at each operating point within a run, as shown in the following expression:
![]()
The two values that the range constraint returns are the distance from the lower bound, RangeConOut(1), and the distance from the upper bound, RangeConOut(2), respectively.
The constraint in the example problem is
LB(N,L) ≤ S ≤ UB(N,L)
CAGE implements this constraint as
![]()
and returns the following two values at each operating point within a run to the optimizer (in this point-by-point example there is only one point per run):
![]()

The Optimization Results pane shows the fixed variable settings, the optimal free variable settings, and the evaluation of objectives and constraints at the optimal free variable settings. In this example, the output of the range constraint at the optimal free variable settings is shown in the Constraint1 column. For each operating point in a run, two values are returned from the range constraint.
Looking at the first run:
Optimal S value = 21.33°
To calculate the distances returned from the range constraint:
Distance from lower bound: RangeConOut(1) = –21.33°+20° = –1.33°
Distance from upper bound: RangeConOut(2) = 21.33°–30° = –8.67°
These are the values shown in the Constraint1 column. Remember that negative constraint values mean that the constraint is feasible. The same values appear in the Constraint Summary Table for the selected run, in the Constraint Value column, as shown in the following figure.

The Constraint Value gives a measure of the distance to the constraint boundary for each constraint output. If the Left Value > Right Value and greater than the tolerance for any of the constraint outputs, the constraint value is bold and the row is highlighted yellow. By default this tolerance is taken from the optimization constraint tolerance. You can control the value used for this highlighting by selecting View > Edit Constraint Tolerance. This means that this constraint distance should be checked to see if the constraint is feasible at that point.

The Objective Graphs show cross-section plots of the objective function against each free variable in the problem. The left plot is a plot of the objective function against S, with EXH and INT at their optimal values, for the second run. The range constraint for the second operating point (30 ≤ S ≤ 40) can be seen; within the constraint region is white, and all other regions outside the constraint are yellow.

The constraint graphs for a range constraint shows how the Left Value of each output of a range constraint depends on the free variables in the optimization. The Left Value is compared with a plot of the Right Value output on the same axes. This comparison is illustrated for the example problem at the second run, as shown in the top left graph.
Constraint1(1) is the first Left Value of the range constraint, RangeConLeft(1), for the first run in the example problem. The top-left graph shows a blue line, which is a plot of RangeConLeft(1) against S (the constrained variable) with all other free variables set to their optimal values. The red horizontal line denotes the Right Value (RangeConRight(1), i.e., the upper bound on S) which in this case is -20°. Because this value is an upper bound, the yellow region above the red line shows where the table gradient constraint is infeasible. The vertical orange line shows the optimal value of S; the intersection of this line with the blue line is marked with a blue triangle on the Constraint1(1) axis—the triangle marks the Left Value (-21.3°) at the optimal settings. These are the Left and Right values in the Constraint Summary table for Constraint1(1).
Constraint1(2) is the second Left Value of the range constraint, RangeConLeft(2), for the first run in the example problem. The bottom left graph shows a blue line plot of RangeConLeft(2) against S with all other free variables set to their optimal values. The horizontal red line denotes the Right Value (RangeConRight(2) ) which in this case is 30°. Because this value is an upper bound, the yellow region above the red line denotes where the table gradient constraint is infeasible. The vertical orange line shows the optimal value of S; the intersection of this with the blue line is marked with a blue triangle on the Constraint1(2) axis—the triangle marks the Left Value (21.3°) at the optimal settings. These are the Left and Right values in the Constraint Summary table for Constraint1(2).
In this example, the range constraint does not depend on EXH or INT, so the constraint graphs against these variables are blank.
![]() | Using the Optimization Parameters Dialog Box | Using Optimization Output | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |