Skip to Main Content Skip to Search
Product Documentation

Using Optimization in CAGE

Overview of Optimization in CAGE

You can use CAGE to solve many automotive optimization problems. For examples of problems you can solve with CAGE, see Optimization Problems You Can Solve with CAGE.

To reach the Optimization view, click the Optimization button in the left Processes pane.

In the Optimization view you can set up and view optimizations. The view is blank until you create an optimization. When you have optimizations in your project, the left pane shows a tree hierarchy of your optimizations, and the right panes display details of the optimization selected in the tree.

For any optimization, you need one or more models. You can run an optimization at a single point, or you can supply a set of points to optimize. The steps required are

  1. Import a model or models.

  2. Set up an optimization.

Optimization functionality in CAGE is described in the following sections:

There are tutorial examples to guide you through the optimization functionality. See the optimization sections in Gasoline Engine Calibration Case Study, Diesel Engine Calibration Case Study, Point-by-Point Diesel Engine Calibration Case Study, Example Composite Models and Modal Optimizations and Tutorial: Optimization and Automated Tradeoff, in the Getting Started documentation.

Parallel Computing in Optimization

If you have the Parallel Computing Toolbox™ product available, you can distribute optimization runs to a cluster of computers. The optimization runs are then executed in parallel. This option can significantly reduce the computation time for larger problems where each run is taking a lot longer than the time it takes to send the problem to another computer.

This functionality only appears in the menu if you have the Parallel Computing Toolbox product installed.

To use parallel computing in your optimizations:

  1. Select a scheduler for parallel computing. In CAGE select Optimization > Parallel Computing > Select Scheduler. The Parallel Computing Toolbox Scheduler dialog box appears. Select the configuration in the list that defines your scheduler, and click OK. You only need to do this once per user per machine.

    If you have a multicore or multiprocessor machine you can use the default local scheduler to run local workers. To use a remote cluster you first need to set up a configuration.

  2. To use parallel computing, select Optimization > Parallel Computing > Distribute Runs. A tick appears next to the menu item, and the Optimization Information pane shows Distributed runs: On. This setting is saved with your optimization. If you try to run the same optimization on a machine without parallel computing you see a warning.

  3. If your optimization requires additional files (such as user-defined optimization scripts, function model files, user-defined models) you must also distribute these to the workers. To specify these, select Optimization > Parallel Computing > Set Job Parameters. In the dialog box, add files and paths required on the workers. Paths must be relative to the worker.

  4. When you run the optimization, each run is performed on a worker. Running the optimization creates a parallel computing job, that distributes a task for each run.

    CAGE displays a modal status dialog box, displaying progress messages until the job is completed. If the job is being held in the scheduler's execution queue, you see the message Waiting for job to be started. While the job runs, the progress bar tells you how many tasks are complete and how many tasks are currently running.

For more information about these terms and settings, see Parallel Computing Toolbox on the MathWorks Web site.

Optimization Problems You Can Solve with CAGE

Point Optimization Problems

CAGE provides a flexible optimization environment in which many automotive optimization problems can be solved. These problems can be divided into two main groups, point and sum problems. This section describes point problems.

In a point problem, a single optimization run can determine optimal control parameter values at a single operating point. To optimize control parameters over a set of operating points, an optimization can be run for each point.

Examples of point problems that CAGE can be used to solve are described below:

To find out more about solving point optimization types of problems in CAGE, see Create an Optimization.

Sum Optimization Problems

In a sum optimization, a single optimization run can determine the optimal value of control parameters at several operating points simultaneously. All the control parameters for the operating points are optimized by calling the algorithm once (there's only one call to foptcon per run for a sum optimization). This approach contrasts with a point optimization, which has to make a call to the algorithm for every point to find the optimal settings of the control parameters.

To find out more about solving these types of problems in CAGE, see Set Up Sum Optimizations.

  


Recommended Products

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