|
TOMLAB OPTIMIZATION ENVIRONMENT: probAssign |
![]() |
probAssign
Purpose
For setting up a most types of problems.
Syntax
Prob = probAssign(optType, x_L, x_U, Name, x_0, fLowBnd, ...
A, b_L, b_U, c_L, c_U, x_min, x_max, f_opt, x_opt);
Description
probAssign implements the TOMLAB Quick (TQ) format for most types of optimization.
However, there are a number of specialized routines for different types:
When the type is lp or qp, lpAssign
and qpAssign are recommended
For mip mipAssign must be used.
For glc glcAssign should be used if there any integer constraints
For glb either probAssign or glcAssign could be used.
For ls/cls clsAssign is strongly recommended
For uc/con conAssign is recommended. The pattern of the Hessian (or
the constraint gradient matrix) could then be given, and the routine names
are directly given, without the extra call to mFiles.
probAssign is setting the variables normally needed for an optimization in
the TOMLAB structure Prob.
An additional call to mFiles.m is needed to set names of functions used:
Prob = mFiles(Prob, .....)
optType is one of the optimization problem types defined in TOMLAB
Input Parameters
Call with at least four parameters
optType Any of lp,uc,qp,con,ls,cls,glb,glc
For lp, better to use lpAssign instead
For qp, better to use qpAssign instead
For mip, you must use mipAssign instead
For glc, you should use glcAssign if there are integer constraints
For glb, you could use glcAssign instead
For ls/cls, better to use clsAssign instead
For uc/con, conAssign has expanded functionality
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 -realmax.
A good estimate is not critical. Use [] if not known at all.
A Matrix A in linear constraints b_L<=A*x<=b_U. Stored 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.
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.
c(x) must be defined in a function, see e.g. con_c.m
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
![]() |
simAssign | mFiles | ![]() |