Main Content

Problem-Based Optimization Setup

Create optimization variables, create problem with objective and constraints, call solve

Global Optimization Toolbox has two approaches for optimization: problem-based and solver-based. See Decide Between Problem-Based and Solver-Based Approach. In problem-based optimization, you create symbolic-style optimization variables. Then you create expressions in these variables that represent the objective and constraints. Finally, solve the problem using solve. For details, see Problem-Based Optimization Workflow.

Note: If you have a nonlinear function that is not composed of polynomials, rational expressions, and elementary functions such as exp, then convert the function to an optimization expression by using fcn2optimexpr. See Convert Nonlinear Function to Optimization Expression and Supported Operations for Optimization Variables and Expressions.

For a basic example, see Compare Several Global Solvers, Problem-Based.

Functions

expand all

optimproblemCreate optimization problem
optimvaluesCreate values for optimization problem
optimvarCreate optimization variables
showDisplay information about optimization object
showboundsDisplay variable bounds
writeSave optimization object description
writeboundsSave description of variable bounds
fcn2optimexprConvert function to optimization expression
optimconstrCreate empty optimization constraint array
optimeqCreate empty optimization equality array
optimineqCreate empty optimization inequality array
optimexprCreate empty optimization expression array
showDisplay information about optimization object
writeSave optimization object description
evaluateEvaluate optimization expression
findindexFind numeric index equivalents of named index variables
infeasibilityConstraint violation at a point
prob2structConvert optimization problem or equation problem to solver form
showDisplay information about optimization object
solveSolve optimization problem or equation problem
varindexMap problem variables to solver-based variable index
writeSave optimization object description

Objects

OptimizationConstraintOptimization constraints
OptimizationEqualityEqualities and equality constraints
OptimizationExpressionArithmetic or functional expression in terms of optimization variables
OptimizationInequalityInequality constraints
OptimizationProblemOptimization problem
OptimizationValuesValues for optimization problems
OptimizationVariableVariable for optimization

Topics

Problem-Based Steps

Steps for Global Solvers

Set Options

Tips for Problem-Based Optimization

Parallel Computing

Problem-Based Algorithms