|
TOMLAB OPTIMIZATION ENVIRONMENT: mipAssign |
![]() |
mipAssign
Purpose
For setting up a mixed-integer programming problem.
Syntax
Prob = mipAssign(c, A, b_L, b_U, x_L, x_U, x_0, problemName,...
setupFile, nProblem, ...
IntVars, VarWeight, KNAPSACK, fIP, xIP, ...
fLowBnd, x_min, x_max, f_opt, x_opt);
Description
mipAssign is a direct way of setting up a Mixed-Integer Programming (MIP)
problem in the TOMLAB Quick (TQ) format.
The information is put into the TOMLAB input problem structure Prob.
Prob = mipAssign( ....)
It is then possible to solve the MIP problem using the TOMLAB MIP solver mipSolve with the call:
Result = mipSolve(Prob);
or using the cutting plane solver (not as efficient as mipSolve):
Result = cutplane(Prob);
mipAssign may also create an Init File in the TOMLAB Init File format,
see the input argument setupFile
Problem
min c' * x. x in R^n
x
s/t x_L <= x <= x_U
b_L <= A x <= b_U
Equality equations: Set b_L==b_U
Fixed variables: Set x_L==x_U
x(IntVars) are integer values, IntVars is an index set, a subset of [1:n].
mipAssign also makes the mideva.m file needed for use with MIDEVA
and nonlinear solvers.
mipAssign is setting the maximal number of iterations to:
Prob.optParam.MaxIter=2000;
Increase this number if maximal number of iterations is reached.
Input Parameters
One parameter c must always be given
c The vector c in c'x in the objective function
A: The linear constraint matrix
b_L: The lower bounds for the linear constraints
b_U: The upper bounds for the linear constraints
x_L: Lower bounds on x
x_U: Upper bounds on x
b_L, b_U, x_L, x_U must either be empty or of full length
x_0: Starting point x (may be empty)
problemName The name of the problem (string)
setupFile The (unique) name as a TOMLAB Init File. If nonempty mipAssign
will create a executable m-file with this name and the given
problem defined as the first problem in this file.
See mip_prob.m, the TOMLAB predefined MIP Init File.
If empty, no Init File 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 The set of integer variables. Can be given in one of three ways:
1) a scalar N<=n, in which case variables x(1)-x(N) are
restricted to integer values.
2) a vector of indices, e.g. [1 2 5]
3) a 0-1 vector of length n=length(x) where nonzero elements
indicate integer variables
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
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) x n matrix
If adding one extra column n+1 in x_opt,
0 indicates min, 1 saddle (nonlinear problems), 2 indicates max.
x_opt and f_opt is used in printouts and plots.
![]() |
minlpAssign | miqpAssign | ![]() |