In problem-based optimization you create optimization variables,
expressions in these variables that represent the objective and constraints
or that represent equations, and solve the problem using
solve. For the problem-based steps to take for optimization
problems, see Problem-Based Optimization Workflow. For
equation-solving, see Problem-Based Workflow for Solving Equations.
Before you begin to solve an optimization problem, you must choose the appropriate approach: problem-based or solver-based. For details, see First Choose Problem-Based or Solver-Based Approach.
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. For a basic equation-solving example, see Solve Nonlinear System of Equations, Problem-Based.
|Convert function to optimization expression|
|Create empty optimization constraint array|
|Create empty optimization equality array|
|Create empty optimization inequality array|
|Create empty optimization expression array|
|Display optimization object|
|Save optimization object description|
|Evaluate optimization expression|
|Find numeric index equivalents of named index variables|
|Constraint violation at a point|
|Convert optimization problem or equation problem to solver form|
|Solve optimization problem or equation problem|
|Map problem variables to solver-based variable index|
|System of nonlinear equations|
|Equalities and equality constraints|
|Arithmetic or functional expression in terms of optimization variables|
|Variable for optimization|
Problem-based steps for solving optimization problems.
Problem-based steps for solving equations.
Expressions define both objective and constraints.
Pass extra parameters, data, or fixed variables in the problem-based approach.
Syntax rules for problem-based least squares.
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.
Use multiple processors for optimization.
Perform gradient estimation in parallel.
Example showing the effectiveness of parallel computing
in two solvers:
Investigate factors for speeding optimizations.
How the optimization functions and objects solve optimization problems.
Lists all available mathematical and indexing operations on optimization variables and expressions.