Global Optimization Toolbox

Defining, Solving, and Assessing Optimization Problems

Global Optimization Toolbox provides functions that you can access from the command line and from the Optimization app in Optimization Toolbox. Both the command line and app let you:

  • Select a solver and define an optimization problem
  • Set and inspect optimization options
  • Run optimization problems and visualize intermediate and final results
  • Use Optimization Toolbox solvers to refine genetic algorithm, simulated annealing, and pattern search results
  • Import and export optimization problems and results to your MATLAB® workspace
  • Capture and reuse work performed in the Optimization app using MATLAB code generation

You can also customize the solvers by providing your own algorithm options and custom functions. Multistart and global search solvers are accessible only from the command line.

Visualization of Rastrigin's function that contains many local minima and one global minimum (0,0). The genetic algorithm helps you determine the best solution for functions with several local minima, while the Optimization app provides access to all key components for defining your problem, including the algorithm options.

Visualization of Rastrigin's function (right) that contains many local minima and one global minimum (0,0). The genetic algorithm helps you determine the best solution for functions with several local minima, while the Optimization app (left) provides access to all key components for defining your problem, including the algorithm options.

The toolbox includes a number of plotting functions for visualizing an optimization. These visualizations give you live feedback about optimization progress, enabling you to make decisions to modify some solver options or stop the solver. The toolbox provides custom plotting functions for both the genetic algorithm and pattern search algorithms. They include objective function value, constraint violation, score histogram, genealogy, mesh size, and function evaluations. You can show multiple plots together, open specific plots in a new window for closer examination, or add your own plotting functions.

Run-time visualizations generated while the function is being optimized using genetic algorithm plot functions selected in the Optimization app.

Run-time visualizations (right) generated while the function is being optimized using genetic algorithm plot functions selected in the Optimization app (left).

Using the output function, you can write results to files, create your own stopping criteria, and write your own apps to run toolbox solvers. When working from the Optimization app, you can export the problem and algorithm options to the MATLAB workspace, save your work and reuse it at a later time, or generate MATLAB code that captures the work you’ve done.

MATLAB file of an optimization created using the automatic code generation feature in the Optimization app. You can export an optimization from the app as commented code that can be called from the command line and used to automate routines and preserve your work.

MATLAB file of an optimization created using the automatic code generation feature in the Optimization app. You can export an optimization from the app as commented code that can be called from the command line and used to automate routines and preserve your work.

While an optimization is running, you can change some options to refine the solution and update performance results in genetic algorithm, multiobjective genetic algorithm, simulated annealing, and pattern search solvers. For example, you can enable or disable plot functions, output functions, and command-line iterative display during run time to view intermediate results and query solution progress, without the need to stop and restart the solver. You can also modify stopping conditions to refine the solution progression or reduce the number of iterations required to achieve a desired tolerance based upon run-time performance feedback.

Next: Global Search and Multistart Solvers

Try Global Optimization Toolbox

Get trial software

MATLAB para usuarios de Excel

View webinar

FREE Optimization Interactive Kit

Get the kit now