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 the appropriate approach: problem-based or solver-based.

For nonlinear objective or constraint functions, currently you must use the Solver-Based Optimization Problem Setup.

Problem-Based Optimization SetupEasier to create and debug
Only for linear or quadratic problems with linear or integer constraints
Represent the objective and constraints symbolically
Solution time is longer because of translation time from problem form to matrix form
See the steps in Problem-Based Workflow
Basic example: Mixed-Integer Linear Programming Basics: Problem-Based or the video Solve a Mixed-Integer Linear Programming Problem using Optimization Modeling
Solver-Based Optimization Problem SetupHarder to create and debug
Represent the objective and constraints as functions or matrices
Solution time is shorter because there is no translation time to matrix form
To save memory in large problems, allows use of Hessian multiply function or Jacobian multiply function. See Quadratic Minimization with Dense, Structured Hessian or Jacobian Multiply Function with Linear Least Squares.
See the steps in Solver-Based Optimization Problem Setup
Basic example: Mixed-Integer Linear Programming Basics: Solver-Based