|
TOMLAB OPTIMIZATION ENVIRONMENT: simAssign |
![]() |
simAssign
Purpose
For setting up constrained nonlinear programming problems, where both the function and the constraints need to be computed at the same time. This is often the case for simulation problems.
Syntax
Prob = simAssign(fc, gdc, Hd2c, HessPattern, x_L, x_U, Name, x_0, ...
fLowBnd, A, b_L, b_U, ConsPattern, c_L, c_U, ...
x_min, x_max, f_opt, x_opt);
Description
simAssign implements the TOMLAB Quick (TQ) format for
(unconstrained and) constrained nonlinear programming problems,
where both the function and the constraints need to be computed at
the same time. This is often the case for simulation problems
simAssign is setting the variables normally needed for an optimization in the TOMLAB structure Prob.
Input Parameters
fc Name of the function that computes the function value f(x)
and the mN-vector of constraints c(x)
gdc Name of the function that computes the n x 1 gradient vector
and the mN by n matrix dc with the constraint gradients
Hd2c Name of the function that computes the n x n Hessian matrix and
the second part of the Lagrangian function (normally not used)
HessPattern n x n zero-one sparse or dense matrix, where 0 values indicate
zeros in the Hessian and ones indicate values that might
be non-zero. If empty indicates estimation of all elements
HessPattern is used when estimating the Hessian numerically.
x_L Lower bounds on parameters x. If [] set as a nx1 -Inf vector.
x_U Upper bounds on parameters x. If [] set as a nx1 Inf vector.
Name The name of the problem (string)
x_0 Starting values, default nx1 zero vector
Note: The number n of the unknown variables x are taken as
max(length(x_L),length(x_U),length(x_0))
You must specifiy at least one of these with correct length,
then the others are given default values
The following parameters are optional, and problem type dependent
Set empty to get default value
fLowBnd A lower bound on the function value at optimum. Default 0
A good estimate is not critical. Use [] if not known at all.
Linear Constraints
A mA x n matrix A, linear constraints b_L<=A*x<=b_U. Dense or sparse b_L Lower bound vector in linear constraints b_L <= A*x <= b_U. b_U Upper bound vector in linear constraints b_L <= A*x <= b_U.
Nonlinear Constraints
c_L Lower bound vector in nonlinear constraints b_L <= c(x) <= b_U.
c_U Upper bound vector in nonlinear constraints b_L <= c(x) <= b_U.
ConsPattern mN x n zero-one sparse or dense matrix, where 0 values indicate
zeros in the constraint Jacobian and ones indicate values that
might be non-zero. Used when estimating the Jacobian numerically.
Additional Parameters
x_min Lower bounds on each x-variable, used for plotting
x_max Upper bounds on each x-variable, used for plotting
f_opt Optimal function value(s), if known (Stationary points)
x_opt The x-values corresponding to the given f_opt, if known.
If only one f_opt, give x_opt as a 1 by n vector
If several f_opt values, give x_opt as a length(f_opt) by n matrix
If adding one extra column n+1 in x_opt, 0 is min, 1 saddle, 2 is max.
x_opt and f_opt is used in printouts and plots.
Set the variable as empty if this variable is not needed for the particular kind of problem you are solving.
![]() |
sdpAssign | probAssign | ![]() |