Products & Services Solutions Academia Support User Community Company

Learn more about Model-Based Calibration   

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 and Diesel Engine Calibration Case Study, and see 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 distributed computing in your optimizations:

  1. You first need to set up a configuration that defines a scheduler for distributed computing.

    After you have set up a configuration, in CAGE select Optimization > Distributed 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.

  2. To use distributed computing, select Optimization > Distributed 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 distributed computing you see a warning.

  3. If your optimization requires additional files (such as user-defined optimization scripts, function model M-files, user-defined models) you must also distribute these to the workers. To specify these, select Optimization > Distributed 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 distributed 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.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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