|
TOMLAB OPTIMIZATION ENVIRONMENT: glcAssign |
![]() |
glcAssign
Purpose
For setting up a global mixed-integer programming problem.
Syntax
Prob = glcAssign(f, x_L, x_U, Name, A, b_L, b_U, ...
c, c_L, c_U, x_0, setupFile, nProblem, ...
IntVars, VarWeight, KNAPSACK, fIP, xIP, ...
fLowBnd, x_min, x_max, f_opt, x_opt);
Description
glcAssign is a direct way of setting up a global mixed-integer
programming (glc) problem in the
TOMLAB Quick (TQ) format.
The information is put into the TOMLAB input problem structure
Prob.
Prob = glcAssign( ....)
It is then possible to solve the glc problem using the
TOMLAB glc solver glcSolve with the call:
Result = glcSolve(Prob);
glcAssign also makes the mideva.m file needed for
use with MIDEVA and nonlinear solvers.
Problem
min f(x), x in R^n
x
s/t x_L <= x <= x_U
b_L <= A x <= b_U
c_L <= c(x) <= c_U
Linear equality equations: Set b_L==b_U
Nonlinear equality equations: Set c_L==c_U
Fixed variables: Set x_L==x_U. Both x_L and x_U must be finite.
x(IntVars) are integer values, IntVars is an index set, a subset of [1:n].
Input Parameters
f Name of objective function f(x) x_L Lower bounds on x, finite bounds must be given!!! x_U Upper bounds on x, finite bounds must be given!!! Name The name of the problem (string)
The rest of the input parameters are optional
A The linear constraint matrix
b_L The lower bounds for the linear constraints, b_L <= A*x <= b_U.
b_U The upper bounds for the linear constraints, b_L <= A*x <= b_U.
c Name of constraint function c(x), computing nonlinear constraints
c(x) must be defined in a function, see e.g. glc_c.m
c_L Lower bound vector in nonlinear constraints, c_L<=c(x)<=c_U.
c_U Upper bound vector in nonlinear constraints, c_L<=c(x)<=c_U.
x_0 Starting point x (may be empty, not used by glcSolve)
b_L, b_U, c_L, c_U must either be empty or of full length
setupFile The (unique) name as a TOMLAB setup file. If nonempty glcAssign
will create a executable m-file with this name and the given
problem defined as the first problem in this file.
See glc_prob.m, the TOMLAB predefined glc test file.
If empty, no setupFile is created.
nProblem Number of problems to predefine in the setupFile
Not used if setupFile is empty.
If empty assumed to be one. Then text are included in the
setupFile on how to create additional problems.
If nProblem > 1,
If empty, no setupFile is created.
--------------------------------------------------------------------------
The following 5 variables are special for MIP problems, and are
assigned to the field Prob.MIP.IntVars, etc.
IntVars If IntVars is a scalar, then variables 1,...,IntVars are
assumed to be integers.
If empty, all variables are assumed non-integer
If length(IntVars) > 1 ==> length(IntVars) == length(c) must hold,
Then IntVars(i) ==1 ==> x(i) integer. IntVars(i) ==0 ==> x(i) real.
The following four variables are included (similar to MIP
problems), but are not used now by glcSolve:
VarWeight Weight for each variable in the variable selection phase.
A lower value gives higher priority. Setting
Prob.MIP.VarWeight = c; for knapsack problems improve convergence.
KNAPSACK True if a knapsack problem is to be solved,
then a knapsack heuristic is used.
fIP An upper bound on the IP value wanted. Makes it possible to
cut branches and avoid node computations.
xIP The x-values giving the fIP value.
--------------------------------------------------------------------------
fLowBnd A lower bound on the function value at optimum. Only used if
running the nonlinear TOMLAB solvers with line search
A good estimate is not critical. Use [] if not known at all.
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 indicates min, 1 saddle, 2 indicates max.
x_opt and f_opt is used in printouts and plots.
![]() |
conAssign | lcpAssign | ![]() |