This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Optimization Problem Setup

Choose solver, define objective function and constraints, compute in parallel

For linear programming and mixed-integer linear programming, choose between this solver-based approach and a problem-based approach. See Linear Programming and Mixed-Integer Linear Programming.

To represent your optimization problem for solution in this solver-based approach, you generally follow these steps:

• Choose an optimization solver.

• Create an objective function, typically the function you want to minimize.

• Create constraints, if any.

• Set options, or use the default options.

• Call the appropriate solver.

For a basic nonlinear optimization example, see Solve a Constrained Nonlinear Problem. For a basic mixed-integer linear programming example, see Mixed-Integer Linear Programming Basics: Solver-Based.

Featured Examples

Was this topic helpful?