|
TOMLAB OPTIMIZATION ENVIRONMENT: miqpAssign |
![]() |
miqpAssign
Purpose
For setting up a mixed-integer quadratic programming problem.
Syntax
Prob = miqpAssign(F, c, A, b_L, b_U, x_L, x_U, x_0, ...
IntVars, VarWeight, fIP, xIP, ...
Name, setupFile, nProblem, ...
x_min, x_max, f_opt, x_opt);
Description
miqpAssign is a direct way of setting up a
Mixed-Integer Quadratic Programming (MIQP) problem
in the TOMLAB Quick (TQ) format.
The information is put into the TOMLAB input problem structure Prob.
Prob = miqpAssign( ... )
It is then possible to solve the MIQP problem using the TOMLAB
/MINLP MIQP solver miqpBB with the call:
Result = tomRun('miqpBB',Prob,...);
Adding the two parameters [] and 2 gives a call to PrintResult
Result = tomRun('miqpBB',Prob),[],2;
miqpAssign may also create an Init File in the TOMLAB Init File format,
see the input argument setupFile
miqpAssign also makes the mideva.m file needed for use with MIDEVA
and nonlinear solvers.
Problem
min 0.5 * x' * F * x + c' * x. x in R^n
x
s/t x_L <= x <= x_U
b_L <= A*x <= b_U
x(i) in Z for i in I
Equality equations: Set b_L==b_U
Fixed variables: Set x_L==x_U
Input Parameters
One parameter F must always be given. Empty gives default
F The matrix F in 0.5 x' F x in the objective function
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)
Name The name of the problem (string)
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 Priorities for each variable in the variable selection phase
A lower value gives higher priority.
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.
setupFile The (unique) name as a TOMLAB Init File. If nonempty miqpAssign
will create a executable m-file with this name and the given
problem defined as the first problem in this file.
See qp_prob.m, the TOMLAB predefined QP Init File.
If empty, no Init File is created. Also see nProblem.
nProblem Number of problems, or problem number, to define in the setupFile
Not used if setupFile is empty.
nProblem = 1 ==> File is created to make it easy to edit new
problems into the file. Text are included on how to add new
problems. The given problem is set as number 1.
If isempty(nProblem) same as nProblem=1.
length(nProblem) > 1 ==> A file suitable for large test sets
are setup, where the problem definition is read from mat-files.
Statements for problems nProblem(1) to nProblem(2) are defined.
The given input is assumed to be nProblem(1), and the
corresponding mat-file is created.
If nProblem > 1. Additional problems are assumed, and the only
thing done is to create a mat-file with the problem.
If isempty(setupFile), nProblem is not used
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, 2 indicates max.
x_opt and f_opt is used in printouts and plots.
![]() |
mipAssign | qpAssign | ![]() |