In problem-based optimization you create optimization variables,
expressions in these variables that represent the objective and constraints,
and solve the problem using
solve. For the problem-based steps to take, see Problem-Based Workflow.
See First Choose Problem-Based or Solver-Based Approach for choosing between problem-based optimization and solver-based optimization.
Note: If you have a nonlinear function
that is not a polynomial or rational expression, convert it to an
optimization expression by using
fcn2optimexpr. See Convert Nonlinear Function to Optimization Expression.
For a basic nonlinear optimization example, see Solve a Constrained Nonlinear Problem, Problem-Based. For a basic mixed-integer linear programming example, see Mixed-Integer Linear Programming Basics: Problem-Based.
|Create optimization problem|
|Create optimization variables|
|Display variable bounds|
|Display optimization problem|
|Display optimization variable|
|Save description of variable bounds|
|Save optimization problem description|
|Save optimization variable description|
|Convert function to optimization expression|
|Create empty optimization constraint array|
|Create empty optimization expression array|
|Display optimization constraint|
|Display optimization expression|
|Save optimization constraint description|
|Save optimization expression description|
Problem-based steps for solving optimization problems.
Expressions define both objective and constraints.
Pass extra parameters, data, or fixed variables in the problem-based approach.
How to create and work with named indices for variables.
Shows how to review or modify problem elements such as variables and constraints.
How to evaluate the solution and its quality.
Tips for obtaining a faster or more accurate solution when there are integer constraints, and for avoiding loops in problem creation.
To create reusable, scalable problems, separate the model from the data.
Solution to the problem of two optimization variables with the same name.
This example shows how to create initial points for
when you have named index variables by using the
Optimization expressions containing
NaN cannot be displayed, and can cause unexpected
Save time when your objective and nonlinear constraint functions share common computations in the problem-based approach.
Using multiple processors for optimization.
Automatic gradient estimation in parallel.
Example showing the effectiveness of parallel computing
in two solvers:
Considerations for speeding optimizations.
How the optimization functions and objects solve optimization problems.
Lists all available mathematical and indexing operations on optimization variables and expressions.