Optimization Output Views

Using the Optimization Output View

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:

Use these toolbar buttons to select the following Graph Views:

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:

Using Acceptable Solutions

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:

Accept status is shown in the following ways:

Solution Slice: Optimization Results Table

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.

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.

Solution Slice: Results Surface and Results Contour Views

Surface View of Optimization Results

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:

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:

Left-click anywhere except an icon to rotate the plot.

Use the right-click context menu to control these options:

Contour View of Optimization Results

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:

Pareto Slice

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:

  1. 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.

  2. Decide which solution you want to use for the currently selected run. Use these tools to help you:

  3. 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 .

  4. 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.

Weighted Objective Pareto Slice

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.

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.

Selected Solution Slice

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.

  1. 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.

  2. 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.

  3. 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.

    1. 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.

    2. 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.

Objective Slice Graphs

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.

Objective Contour Plot

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.

Pareto Front Graphs

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.

Constraint Slice Graphs

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.

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.

Constraint Summary Table

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

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.

RunNL
130000.5
240000.6

Constraint: Restrict S between an upper and lower bound shown in the following table.

RunNLMin SMax S
130000.52030
240000.63040

When the optimization is run the optimizer returns the following optimal values of S, EXH and INT, as the following table shows.

RunNLOptimal SOptimal EXHOptimal INT
130000.521.338.59329.839
240000.63057.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.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS