main content

problem-凯发k8网页登录

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 . 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

create optimization problem
create values for optimization problem
create optimization variables
display information about optimization object
display variable bounds
save optimization object description
save description of variable bounds
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 information about 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
display information about optimization object
solve optimization problem or equation problem
map problem variables to solver-based variable index
save optimization object description

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 functions prob2struct and solve 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 using varindex.
  • 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 for solve when the problem has named index variables by using the findindex function.

  • optimization expressions containing inf or nan 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 by prob2struct.
  • 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 and ga.

  • 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.
网站地图