[param_opt,opt_info] = sdo.optimize(opt_fcn,param) uses fmincon (the default optimization method)
to solve a design optimization problem of the form:
where
p — Design variable
C_{leq}, C_{eq} —
Nonlinear inequality and equality constraints
A, B —
Linear inequality constraints
A_{eq}, B_{eq} —
Linear equality constraints
lb, ub —
Upper and lower bounds on p
[param_opt,opt_info] = sdo.optimize(opt_fcn,param,options) specifies
the optimization options. For parameter estimation, you typically
use the Nonlinear Least Squares method:
opts = sdo.OptimizeOptions('Method','lsqnonlin');
[param_opt,opt_info] = sdo.optimize(prob) uses
a structure that contains the function to be minimized, design variables
and optimization options.
Input Arguments
opt_fcn
Function to be minimized. The optimization solver calls this
function during optimization.
The function requires:
One input argument, which is a vector of param.Continuous objects
to be tuned.
To pass additional input arguments, use an anonymous function.
For example, new_fcn = @(p) fcn(p,arg1,arg2, ...).
One output argument, which is a structure with one
or more of the following fields:
F — Value of the cost function
evaluated at p. The solver minimizes F.
F is a 1x1 double.
Cleq — Value of the nonlinear
inequality constraint violations evaluated at p.
The solver satisfies Cleq(p) <= 0.
Cleq is a double mx1 vector,
where m is the number of nonlinear inequality constraints.
Ceq — Value of the nonlinear
equality constraint violations evaluated at p.
The solver satisfies Ceq(p) == 0.
The value is a double rx1 vector, where r is
the number of nonlinear equality constraints.
leq — Value of the linear
inequality constraint violations evaluated at p.
The solver satisfies leq(p) <= 0.
leq is a double nx1 vector,
where n is the number of linear inequality constraints.
eq — Value of the linear
equality constraint violations evaluated at p.
The solver satisfies eq(p) == 0.
eq is a double sx1 vector
or [], where s is the number
of linear equality constraints.
To specify a pure feasibility problem, omit F or
set F = []. To specify a minimization problem,
omit Cleq, Ceq, leq and eq or
set their values to [].
The software computes gradients of the cost and constraint violations
using numeric perturbation. If you want to specify how the gradients
are computed, include a second output argument and set the GradFcn property
of sdo.OptimizeOptions to 'on'.
This argument must be a structure with one or more of the following
fields:
F — Double nx1 vector
that contains dF(p)/dp, where n is
the number of scalar parameters.
Cleq — Double nxm matrix
that contains dCleq(p)/dp, where m is
the number of nonlinear inequality constraints.
Ceq — Double nxr matrix
that contains dCeq(p)/dp, where r is
the number of nonlinear equality constraints.
The field appears if you specify a nonlinear inequality constraint
in opt_fcn.
The value is a mx1 vector, where the order
of the elements correspond to the order specified in opt_fcn.
Positive values indicate that the constraint has not been satisfied.
Check exitflag to confirm that the optimization
succeeded.
The field appears if you specify a nonlinear equality constraint
in opt_fcn.
The value is a double rx1 vector, where the
order of the elements correspond to the order specified in opt_fcn.
Any nonzero values indicate that the constraint has not been satisfied.
Check exitflag to confirm that the optimization
succeeded.
leq — Optimized linear equality
constraint violations.
The field appears if you specify a linear equality constraint
in opt_fcn.
The value is a double nx1 vector, where the
order of the elements correspond to the order specified in opt_fcn.
Nonzero values indicate that the constraint has not been satisfied.
Check exitflag to confirm that the optimization
succeeded.
eq — Optimized linear equality
constraint violations.
The field appears if you specify linear equality constraints
in opt_fcn.
The value is a double sx1 vector, where the
order of the elements correspond to the order specified in opt_fcn.
Nonzero values indicate that the constraint has not been satisfied.
Check exitflag to confirm that the optimization
succeeded.
This field appears if the solver specified in the Method property
of sdo.OptimizeOptions computes
gradients.
The value is a structure whose fields are dependent on opt_fcn.
exitflag — Integer identifying
the reason the algorithm terminated. See fmincon, patternsearch and fminsearch for
a list of the values and the corresponding termination reasons.
iterations — Number of optimization
iterations
SolverOutput — A structure
with solver-specific output information. The fields of this structure
depends on the optimization solver specified in the Method property
of sdo.OptimizeOptions.
See fmincon, patternsearch and fminsearch for a list of solver outputs
and their description.
Stats — A structure that
contains statistics collected during optimization, such as start and
end times, number of function evaluations and restarts.
By default, the software displays the optimization
information for each iteration in the MATLAB^{®} command window.
To learn more about the information displayed, see:
Iterative Display when the optimization method is
specified as 'fmincon' (default), 'fminsearch',
or 'lsqnonlin'