Problem-Based Optimization Workflow - MATLAB & Simulink (original) (raw)

Note

Optimization Toolbox™ provides two approaches for solving single-objective optimization problems. This topic describes the problem-based approach. Solver-Based Optimization Problem Setup describes the solver-based approach.

To solve an optimization problem, perform the following steps.

In addition to these basic steps, you can review the problem definition before solving the problem by using show orwrite. Set options for solve by using optimoptions, as explained in Change Default Solver or Options.

Warning

The problem-based approach does not support complex values in the following: an objective function, nonlinear equalities, and nonlinear inequalities. If a function calculation has a complex value, even as an intermediate value, the final result might be incorrect.

Note

All names in an optimization problem must be unique. Specifically, all variable names, objective function names, and constraint function names must be different.

For a basic mixed-integer linear programming example, see Mixed-Integer Linear Programming Basics: Problem-Based or the video versionSolve a Mixed-Integer Linear Programming Problem Using Optimization Modeling. For a nonlinear example, see Solve a Constrained Nonlinear Problem, Problem-Based. For more extensive examples, see Problem-Based Nonlinear Optimization, Linear Programming and Mixed-Integer Linear Programming, or Quadratic Programming and Cone Programming.

See Also

fcn2optimexpr | optimproblem | optimvar | solve | optimoptions | show | write

Topics