Create optimization problem structure
problem = createOptimProblem('solverName')
problem = createOptimProblem('solverName','ParameterName',ParameterValue,...)
problem = createOptimProblem('solverName')
creates an empty optimization problem structure for the solverName
solver.
problem = createOptimProblem('solverName','ParameterName',ParameterValue,...)
accepts one or more comma-separated parameter name/value pairs. Specify ParameterName
inside single quotes.
| Name of the solver. For a |
| Matrix for linear equality constraints. The constraints have the form:
|
| Matrix for linear inequality constraints. The constraints have the form:
|
| Vector for linear equality constraints. The constraints have the form:
|
| Vector for linear inequality constraints. The constraints have the form:
|
| Vector of lower bounds.
|
| Function handle to the nonlinear constraint function. The constraint function must accept a vector If the For more information, see Write Constraints. |
| Function handle to the objective function. For all solvers except For more information, see Compute Objective Functions. |
| Optimization options. Create options with |
| Vector of upper bounds.
|
| A vector, a potential starting point for the optimization. Gives the dimensionality of the problem.
|
| Vector of data points for |
| Vector of data points for |
| Optimization problem structure. |
Create a problem structure using Rosenbrock's function as objective (see Hybrid Scheme in the Genetic Algorithm), the interior-point
algorithm for fmincon
, and bounds with absolute value 2
:
anonrosen = @(x)(100*(x(2) - x(1)^2)^2 + (1-x(1))^2); opts = optimoptions(@fmincon,'Algorithm','interior-point'); problem = createOptimProblem('fmincon','x0',randn(2,1),... 'objective',anonrosen,'lb',[-2;-2],'ub',[2;2],... 'options',opts);