problem-凯发k8网页登录
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 . for details, see .
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 . see and
.
for a basic example, see .
functions
objects
optimization constraints | |
equalities and equality constraints | |
arithmetic or functional expression in terms of optimization variables | |
inequality constraints | |
optimization problem | |
values for optimization problems | |
variable for optimization |
topics
problem-based steps
learn the problem-based steps for solving optimization problems.
define expressions for both the objective and constraints.
pass extra parameters, data, or fixed variables in the problem-based approach.
create and work with named indices for variables.
review or modify problem elements such as variables and constraints.
evaluate the solution and its quality.
steps for global solvers
- decide between problem-based and solver-based approach
explore considerations for problem-based and solver-based optimization with global optimization toolbox solvers.
identify the types of problems you can solve in the problem-based approach and their associated default solvers.
specify initial points for global optimization toolbox solvers in the problem-based approach.
learn how the problem-based optimization functionsprob2struct
andsolve
handle integer constraints.
set global optimization options
how to set and change optimization options in the problem-based approach for global optimization toolbox.
to set options in some contexts, map problem-based variables to solver-based usingvarindex
.- pattern search options
explore the options for pattern search. - genetic algorithm options
explore the options for the genetic algorithm. - particle swarm options
explore the options for particle swarm.
explore the options for surrogate optimization, including algorithm control, stopping criteria, command-line display, and output and plot functions.
explore the options for simulated annealing.
tips for problem-based optimization
obtain a faster or more accurate solution when the problem has integer constraints, and avoid loops when creating a problem.
create reusable, scalable problems by separating the model from the data.
learn how to solve a problem that has two optimization variables with the same name.
create initial points forsolve
when the problem has named index variables by using thefindindex
function.
optimization expressions containinginf
ornan
cannot be displayed, and can cause unexpected results.
save time when the objective and nonlinear constraint functions share common computations in the problem-based approach.
find the values of extra parameters in nonlinear functions created byprob2struct
.- output function for problem-based optimization
use an output function in the problem-based approach to record iteration history and to make a custom plot.
parallel computing
learn how solvers distribute work for parallel computing.
direct a solver or hybrid function to use multiple processes.
example showing the effectiveness of parallel computing in two solvers:fmincon
andga
.
investigate factors for speeding optimizations.
problem-based algorithms
learn how the optimization functions and objects solve optimization problems.
explore the supported mathematical and indexing operations for optimization variables and expressions.