# TOMVIEW  
# REGISTER (TOMVIEW)
# LOGIN  
# myTOMVIEW
TOMLAB LOGO

« Previous « Start » Next »

3  The LabVIEW Routines - Main Routines

3.1  cplex

Purpose
The TOMVIEW /CPLEX MILP, MIQP, LP and QP solver. It solves linear programming (LP), quadratic programming (QP), mixed integer linear programming (MILP) and mixed integer quadratic programming problems (MIQP). The solver also handles problems with quadratic constraints (MIQQ). cplex solves problems of the form
 
min
x
f(x) =
1
2
xT F x + cT x
s/t xL x xU
  bL Ax bU
      xT Q(i) x + a(i)T x rU(i), i=1,…,nqc
      xi integer   i ∈ I
where c, x, xL, xU, a(i) ∈ Rn, F, Q(i)∈ Rn× n, A∈ Rm× n and bL,bU∈ Rm. rU(i) is a scalar. The variables x ∈ I, the index subset of 1,...,n, are restricted to be integers.
Calling Syntax
assign_miqp.vi
tomRun.vi

Description of Inputs
Problem description structure. The following fields are used:
 
QP.c Linear objective function cost coefficients, vector n × 1.
 
QP.F Square n × n dense or sparse matrix. Empty if non-quadratic problem.
 
A Linear constraint matrix for linear constraints, dense or sparse m × n matrix.
b_L Lower bounds on the linear constraints.
b_U Upper bounds on the linear constraints.
 
x_L Lower bounds on design parameters x. If empty assumed to be −Inf.
x_U Upper bounds on design parameters x. If empty assumed to be Inf.
 
MIP Structure holding information about mixed integer optimization.
 
IntVars Defines which variables are integers, of the general type I or binary B. Variable indices should be in the range [1,...,n]. If IntVars is a single integer then variable 1,...,IntVars are defined as integers. If IntVars is a logical vector then all variables i where IntVars(i) > 0 are defined to be integers. If IntVars is determined to be a vector of indices then x(IntVars) are defined as integers. If the input is empty ([ ]), then no integers of type I or B are defined. The interface routine cplex.m checks which of the integer variables have lower bound xL=0 and upper bound xU=1, i.e. are binary 0/1 variables.
 
PI Integer variables of type Partially Integer (PI), i.e. takes an integer value up to a specified limit, and any real value above that limit. PI must be a structure array where:
  PI.var is a vector of variable indices in the range [1,...,n].
  PI.lim is a vector of limit values for each of the variables specified in PI.var, i.e. for variable i, that is the PI variable with index j in PI.var, then x(i) takes integer values in [xL(i),PI.lim(j)] and continuous values in [PI.lim(j),xU(i)].
 
SC A vector with indices for the integer variables of type Semi-continuous (SC), i.e. that takes either the value 0 or a real value in the range [xL(i),xU(i)], assuming for some j, that i = SC(j), where i is an variable number in the range [1,...,n].
 
SI A vector with indices for the integer variables of type Semi-integer (SI), i.e. that takes either the value 0 or an integer value in the range [xL(i),xU(i)], assuming for some j, that i = SI(j), where i is an variable number in the range [1,...,n].
 
sos1 A structure defining the Special Ordered Sets of Type One (sos1). Assume there are k sets of type sos1, then sos1(k).var is a vector of indices for variables of type sos1 in set k. sos1(k).row is the row number for the reference row identifying the ordering information for the sos1 set, i.e. A(sos1(k).row,sos1(k).var) identifies this information. As ordering information, also the objective function coefficients c could be used. Then as row number, 0 is instead given in sos1(k).row.
 
sos2 A structure defining the Special Ordered Sets of Type Two (sos2). Specified exactly as sos1 sets, see MIP.sos1 input variable description.
 
basis Basis for warm start of solution process. See Section ?? and ?? for more information.
 
xIP Vector with MIP starting solution, if known. NaN can be used to indicate missing values. Length should be equal to number of columns in problem. Values of continuous variables are ignored.
QP.qc Structure array defining quadratic constraints ("qc").
 
  Please note that CPLEX 9.1 only handles single-sided bounds on qc's. An arbitrary number of qc's is set using the Prob.QP.qc structure array:
 
  qc(1).Q = sparse( <quadratic coefficient nxn matrix> );
  qc(1).a = full ( <linear coefficient nx1 vector > );
  qc(1).r_U = <scalar upper bound>;
 
  And similarly for qc(2), ... , qc(n_qc).
 
  The standard interpretation is x'*Q*x + c'*x <= rU, but it is possible to define an alternative sense x'*Q*x + c'*x >= rL by setting qc(i).sense to a nonzero value and specifying a lower bound in qc(i).rL.
 
  Observe that the Q matrix must be sparse, non-empty and positive semi-definite for all qc's. The linear coefficient vector qc(i).a may be omitted or set empty, in which case all zeros are assumed.
 
  Likewise, if a bound r_U or r_L is empty or not present, it is assumed to be 0.0. Note that this is contrary to the usual TOMVIEW standard, where an empty or omitted bound is assumed to be +/- Inf. The reason is that a single-sided constraint with an infinite bound would have no meaning.
 

Description of Outputs
Result structure. The following fields are used:
 
 
PRILEV Printing level in cplex.m file.
  = 0 Silent
  = 1 Warnings and Errors
  = 2 Summary information
  = 3 More detailed information
  > 10 Pause statements, and maximal printing (debug mode)
LOGFILE Name of file to write the CPLEX log information to. If empty, no log is written.
 
SAVEFILE Name of a file to save the CPLEX problem object. This is useful for sending problems to ILOG for analysis. The format of the file is controlled by the SAVEMODE. If empty, no file is written.
 
SAVEMODE The format of the file given in SAVEFILE is possible to choose by setting SAVEMODE to one of the following values:
 
 
1 SAV Binary SAV format
2 MPS MPS format (ASCII)
3 LP CPLEX LP format (ASCII)
4 RMP MPS file with generic names
5 REW MPS file with generic names
6 RLP LP file with generic names
 
  Modes 4-6 are of limited interest, since the TOMVIEW interface does not provide a way to change the default row names.
 
CONFLICTFILE Name of a file to write the conflict refinement to. No file is written if this input parameter is empty or if no conflict refinement is done.
 

Description of Options
Options available for cplex
 
 
Iter Number of iterations, or nodes visited.
 
ExitFlag 0: OK.
  1: Maximal number of iterations reached.
  2: Unbounded feasible region.
  4: No feasible point found.
  5: Error of some kind.
 
ExitText Number of iterations, or nodes visited.
 
Inform Result of CPLEX run. See section ?? for details on the ExitText and possible Inform values.
x_0 Initial starting point not known, set as empty.
 
QP.B Optimal active set, basis vector, in TOMVIEW QP standard.
  B(i)=1: Include variable x(i) is in basic set.
  B(i)=0: Variable x(i) is set on its lower bound.
  B(i)=−1: Variable x(i) is set on its upper bound.
 
f_k Function value at optimum, f(xk).
g_k Gradient value at optimum, c or c + F * x.
x_k Optimal solution vector xk.
v_k Lagrangian multipliers (for bounds and dual solution vector). Set as vk = [rc;v], where rc is the n-vector of reduced costs and v holds the m dual variables.
 
xState State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;
 
bState State of linear constraints. Free == 0; Lower == 1; Upper == 2; Equality == 3;
 
Solver Solver used - CPLEX .
SolverAlgorithm Solver algorithm used.
FuncEv Number of function evaluations. Set to Iter.
GradEv Number of gradient evaluations. Set to Iter.
ConstrEv Number of constraint evaluations. Set to Iter.
Prob Problem structure used.
 
 

Description
The TOMVIEW CPLEX MILP, MIQP, QP and LP interface calls the interface routine cplex.m.
Examples
See mipProb


« Previous « Start » Next »