MipSolve: Difference between revisions

From TomWiki
Jump to navigationJump to search
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Solvers]]
==Purpose==
==Purpose==


Solve mixed integer linear programming problems (MIP).
Solve mixed-integer linear programming problems (MIP).


''mipSolve ''solves problems of the form
''mipSolve ''solves problems of the form
Line 8: Line 9:
<math>
<math>
\begin{array}{cccccc}
\begin{array}{cccccc}
\min\limits_{x} & f(x) & = & c^{T}x &  \\s/t & x_{L} & \leq  & x  & \leq & x_{U} \\& b_{L} & \leq  & Ax & \leq & b_{U} \\ &      &      & \multicolumn{3}{l}{x_{j} \in \MATHSET{N} \ \ \forall j \in $I$}  \\
\min\limits_{x} & f(x) & = & c^{T}x &  \\s/t & x_{L} & \leq  & x  & \leq & x_{U} \\& b_{L} & \leq  & Ax & \leq & b_{U} \\ &      &      & {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\
\end{array}
\end{array}
</math>
</math>




where <math>c, x, x_L, x_U \in \MATHSET{R}^{n}</math> , <math>A\in \MATHSET{R}^{m\times n}</math> and <math>b_L, b_U \in\MATHSET{R}^{m}</math>.The variables <math>x \in I</math> , the index subset of <math>1,...,n</math> are restricted to beintegers.
where <math>c, x, x_L, x_U \in \mathbb{R}^{n}</math> , <math>A\in \mathbb{R}^{m\times n}</math> and <math>b_L, b_U \in\mathbb{R}^{m}</math>.The variables <math>x \in I</math> , the index subset of <math>1,...,n</math> are restricted to beintegers.


Starting with TOMLAB  version 4.0, ''mipSolve ''accepts upper and lower bounds on the linear constraints like most other TOMLAB  solvers. Thus it is no longer necessary to use slack variables to handle inequality constraints.
Starting with TOMLAB  version 4.0, ''mipSolve ''accepts upper and lower bounds on the linear constraints like most other TOMLAB  solvers. Thus it is no longer necessary to use slack variables to handle inequality constraints.
Line 19: Line 20:
==Calling  Syntax==
==Calling  Syntax==


Result = tomRun('mipSolve',Prob,...)
Recommended is to first set IterPrint, to get information each iteration
<source lang="matlab">
Prob.optParam.IterPrint = 1;
</source>


===Description  of Inputs===
Driver call, including printing with level 2:
<source lang="matlab">
Result = tomRun('mipSolve',Prob,2)
</source>


{|
Direct solver call:
|''Prob''||colspan="2"|Problem description structure. The following fields are used:
<source lang="matlab">
Result = mipSolve(Prob);
PrintResult(Result);
</source>
 
===Warm Start===
 
To make a restart (warm start), just set the warm start flag, and call mipSolve once again:
<source lang="matlab">
Prob.WarmStart = 1;
Result = tomRun('mipSolve', Prob, ...);
</source>
mipSolve will read warm start information from the mipSolveSave.mat file.
 
Another warm start (with same MaxFunc) is made by just calling tomRun again.
<source lang="matlab">
Result = tomRun('mipSolve', Prob, ...);
</source>
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling mipSolve. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, Prob.WarmStart = 1;
<source lang="matlab">
Prob = WarmDefGLOBAL('mipSolve', Prob, Result);
</source>
where Result is the result structure returned by the previous run. A warm start (with same MaxIter) is done by just calling tomRun again
<source lang="matlab">
Result = tomRun('mipSolve', Prob, ...);
</source>
To make another warm start with new MaxIter 100, say, redefine MaxIter as:
<source lang="matlab">
Prob.optParam.MaxIter = 100;
</source>
Then repeat the two lines:
<source lang="matlab">
Prob = WarmDefGLOBAL('mipSolve', Prob, Result);
Result = tomRun('mipSolve', Prob, ...);
</source>
 
==Inputs==
 
{| class="wikitable"
!''Prob''||colspan="2"|Problem description structure. The following fields are used:
|-
|-
|||''c''||The vector ''c ''in <math>c^{T}x</math>.
|||''c''||The vector ''c ''in ''c<sup>T</sup>x''.
|-
|-
|||''A ''||Constraint matrix for linear constraints.
|||''A ''||Constraint matrix for linear constraints.
|-
|-
|||''b_L''||Lower bounds on the linear constraints. If empty, ''Prob.b U ''is used.
|||''b_L''||Lower bounds on the linear constraints. If empty, ''Prob.b_U ''is used.
|-
|-
|||''b_U''||Upper bounds on the linear constraints.
|||''b_U''||Upper bounds on the linear constraints.
Line 41: Line 87:
|-valign="top"
|-valign="top"
|||''MaxCPU''||Maximal CPU Time (in seconds) to be used by mipSolve, stops with best point found.
|||''MaxCPU''||Maximal CPU Time (in seconds) to be used by mipSolve, stops with best point found.
|-valign="top"
|||''PriLevOpt''||Print level in sub-solver, see the documentation for the solver.
|-valign="top"
|||''PriLev''||Print level in ''mipSolve'' (default 1). Also see optParam.IterPrint.
|-valign="top"
|||''WarmStart''||If true, >0, mipSolve reads the output from the last run from Prob.mipSolve, if it exists.  If it doesn't exist, mipSolve attempts to open and read warm start data from mat-file mipSolveSave.mat. <br>mipSolve uses the warm start information to continue from the last run. The mat-file mipSolveSave.mat is saved every Prob.MIP.SaveFreq iteration
|-valign="top"
|||''QP.B''||Active set ''B_0 ''at start: <br>''B''(''i'') = 1: Include variable ''x''(''i'') is in basic set. <br>''B''(''i'') = 0: Variable ''x''(''i'') is set on its lower bound. <br>''B''(''i'') = ''-''1: Variable ''x''(''i'') is set on its upper bound.
|-valign="top"
|||''SolverLP''||Name of the solver used for the initial LP subproblem. If empty, the best available solver with a license is picked from a list. <br>Note - If using MINOS, use the special LP interface LP-MINOS
|-valign="top"
|||''SolverDLP''||Name of the solver used for dual LP subproblems. <br>If empty, SolverLP is used. <br>If SolverLP/SolverDLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.
|-valign="top"
|||''MIP''||Structure in ''Prob'', ''Prob.MIP''. Defines integer optimization parameters:
|-valign="top"
|||''MIP.IntVars''||If empty, all variables are assumed non-integer. <br>If islogical(IntVars) (i.e. all elements are 0/1), then 1 = integer variable, 0 = continuous variable. <br>If any element >1, IntVars is the indices for integer variables
|-valign="top"
|||''MIP.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.
|-valign="top"
|||''MIP.DualGap''||mipSolve stops if the duality gap is less than DualGap. <br>E.g. DualGap = 1, implies a stop at the first integer solution. <br>E.g. DualGap = 0.01, stop if the solution less than one percent from the optimal solution.
|-valign="top"
|||''MIP.fIP''||An upper bound on the IP value wanted.  Makes it possible to cut branches and avoid node computations. Used even if xIP not given.
|-valign="top"
|||''MIP.xIP''||The ''x''-value giving the ''fIP ''value, if a solution (xIP, fIP) is known.
|-valign="top"
|||''MIP.NodeSel''||Node selection method: <br>0: Depth first. Priority on nodes with more integer components. <br>1: Breadth first. Priority on nodes with more integer components. <br>2: Depth first. When integer solution found, use NodeSel = 1 (Default). <br>3: Pure LIFO (Last in, first out) Depth First <br>4: Pure FIFO (First in, first out) Breadth First <br>5: Pure LIFO Depth First. When integer solution found, use NodeSel = 4.
|-valign="top"
|||''MIP.VarSel''||Variable selection method in branch and bound.<br> 1: Use variable with most fractional value <br>2: Use gradient and distance to nearest integer value
|-valign="top"
|||''MIP.KNAPSACK''||If solving a knapsack problem, set to true (1) to use a knapsack heuristic.
|-
|-
|||''QP.B''||Active set ''B 0 ''at start:
|||''MIP.ROUNDH''||If = 1, use a rounding heuristic. Default 1.
|-valign="top"
|||''MIP.SaveFreq''||Warm start info saved on mipSolveSave.mat every SaveFreq iteration. (default -1, i.e. no warm start info is saved)
|-
|-
|||||''B''(''i'') = 1: Include variable ''x''(''i'') is in basic set.
|||''Solver''||Options for the LP subproblem:
|-valign="top"
|||''Solver.method''||Rule to select new variables in DualSolve/lpSimplex:<br>0: Minimum reduced cost, sort variables increasing (default). <br> 1: Bland's Anti-Cycling Rule <br>2: Minimum reduced cost. Dantzig's rule.
|-valign="top"
|||''optParam''||Structure in Prob. <br>Fields used in Prob.optParam, also in sub-solvers:
|-
|-
|||||''B''(''i'') = 0: Variable ''x''(''i'') is set on its lower bound.
|||''optParam.MaxIter|| Maximal number of iterations. max(10*dim(x),100) is default.
|-
|||||''B''(''i'') = ''-''1: Variable ''x''(''i'') is set on its upper bound.
|-valign="top"
|-valign="top"
|||''SolverLP''||Name of solver used for initial  LP subproblem. Default solver is used if empty, see ''GetSolver.m ''and ''tomSolve.m''.
|||''optParam.IterPrint||Print short information each iteration (PriLev > 0 ==> IterPrint = 1). <br>One line each iteration with:<br>
Iteration number <br>Depth in tree (symbol L[] - empty list, <br>symbol Gap - Dual Gap convergence; <br>date/time stamp, <br>fLP (Optimal f(x) current node), <br>fIPMin (Best integer feasible f(x) found) <br>LowBnd (Lower bound on optimal integer feasible f(x)), <br>Dual Gap in absolut value and percent. <br>The length of the node list L, |L| <br>The Inform and ExitFlag the solver returned at the current node
|-valign="top"
|-valign="top"
|||''SolverDLP''||Name of solver used for the dual LP subproblems. Default  solver is used if empty, see ''GetSolver.m ''and ''tomSolve.m''.
|||''optParam.bTol||Linear constraint violation convergence tolerance
|-
|-
|||''PriLevOpt ''||Print level in ''lpSimplex ''and ''DualSolve'':
|||'' ''||''Fields in Prob.optParam that are used by lpSimplex and DualSolve (assuming they are set as sub-solvers)'':
|-
|-valign="top"
|||||0: No output; ''> ''0: Convergence result;
|||''optParam.eps_f''||Tolerance used for function value tests
|-
|||||''> ''1: Output every iteration; ''> ''2: Output each step in simplex algorithm.
|-
|||''PriLev''||Print level in ''mipSolve''.
|-
|||''SOL.optPar''||Parameters for the SOL solvers, if they are used as subsolvers.
|-
|||''SOL.PrintFile''||Name of print file for SOL solvers, if they are used as subsolvers.
|-
|||''MIP''||Structure with fields for integer optimization The following fields are used:
|-
|||''IntVars''||The set of integer variables.
|-
|||||If empty, all variables are assumed non-integer (LP problem)
|-
|||''VarWeight''||Weight for each variable in the variable selection phase.
|-
|||||A lower value gives higher priority. Setting ''Prob.MIP.VarWeight  ''= ''Prob.c'' improves convergence for knapsack problems.
|-
|||''DualGap''||''mipSolve ''stops if the duality  gap is less than ''DualGap''. To stop at the first found integer solution, set ''DualGap ''=1. For example, ''DualGap ''= 0.01 makes the algorithm stop if the solution is ''< ''1% from the optimal solution.
|-
|-
|||''fIP''||An upper bound on the IP value wanted.  Makes it possible to cut branches and avoid node computations.
|||''optParam.eps_Rank''||Rank tolerance
|-
|||''xIP''||The ''x''-value giving the ''fIP ''value.
|-
|||''KNAPSACK''||If solving a knapsack problem, set to true (1) to use a knapsack heuristic.
|-
|||''optParam''||Structure with special fields for optimization parameters, see Table 141.Fields used are: ''IterPrint'', ''MaxIter'', ''PriLev'', ''wait'', ''eps f ''and ''eps Rank''.
|-
|||''Solver''||Structure with fields for algorithm choices:
|-
|||''Alg''||Node selection method:
|-
|||||0: Depth first
|-
|||||1: Breadth first
|-
|||||2: Depth first. When integer solution found, switch to Breadth.
|-
|||''method''||Rule to select new variables in DualSolve/lpSimplex:
|-
|||||0: Minimum reduced cost, sort variables increasing. (Default)
|-
|||||1: Bland's rule (default).
|-
|||||2: Minimum reduced cost. Dantzig's rule.
|}
|}


===Description  of Outputs===
==Outputs==


{|
{| class="wikitable"
|-valign"top"
|-valign"top"
|''Result''||colspan="2"|Structure with result from optimization. The following fields are changed:
!''Result''||colspan="2"|Structure with result from optimization. The following fields are changed:
|-valign="top"
|||''Iter''||Number of iterations.
|-valign="top"
|||''ExitFlag''||ExitFlag.<br>0: Global optimal solution found, or integer solution with duality gap less than user tolerance.<br>1: Maximal number of iterations reached.<br>2: Empty feasible set, no integer solution found.<br>3: Rank problems (not used).<br>4: No feasible point found running LP relaxation.<br>5: Illegal ''x_0'' found in LP relaxation.<br>99: Maximal CPU Time used (cputime > Prob.MaxCPU).
|-valign="top"
|||''ExitText''||Text string giving ''ExitFlag'' and ''Inform'' information.
|-valign="top"
|||''Inform''||If ''ExitFlag'' > 0, ''Inform'' = ''ExitFlag'', except if duality gap less than given tolerance (''Inform'' = 6)
|-valign="top"
|||''DualGap''||Relative duality gap, max(0, fIPMin-fLB)/<nowiki>|fIPMin|</nowiki>, if fIPMin ~=0; max(0,fIPMin-fLB) if fIPMin == 0. <br>If fIPMin ~=0: Scale with 100, 100*''DualGap'', to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * ''DualGap''
|-
|-
|||''x_k''||Optimal point.
|||''x_k''||Solution.
|-valign="top"
|||''v_k''||Lagrange parameters (n+m) vector, [Bounds(n); Linear constraints (m)].
|-valign="top"
|||''QP.B''||B  Optimal set. B(i)==0 implies inclusion of variable x(i) in basic set. sum(B==1)==length(b) holds. See ''QP.B'' as input.
|-valign="top"
|||''QP.y''||Dual parameters ''y ''(also part of ''Result.v_k'').
|-valign="top"
|||''f_k''||Function value c<sup>T</sup>x_k, fIPMin (Best integer feasible solution).
|-
|-
|||''f_k''||Function value at optimum.
|||''g_k''||Gradient value at optimum, ''c''.
|-
|-
|||''g_k''||Gradient value at optimum, ''c''.
|||''Solver''||Solver used (mipSolve).
|-
|-
|||''v_k''||Lagrange multipliers, \[Constraints + lower + upper bounds\].
|||''SolverAlgorithm''||Description of method used.
|-
|-
|||''x_0''||Starting point.
|||''x_0''||Starting point.
|-
|-valign="top"
|||''f_0''||Function value at start.
|||''xState''||State of each variable, described in [[TOMLAB Appendix B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].
|-
|-valign="top"
|||''xState''||State of each variable, described in Table 150, page 239.
|||''mipSolve''||A structure with warm start information. Use with WarmDefGLOBAL, see [[MipSolve#Warm_Start|example]].
|-
|||''Inform''||If ''ExitF lag > ''0, ''I nf orm ''= ''ExitF lag''.
|-
|||''QP.B''||Optimal active set. See input variable ''QP.B''.
|-
|||''QP.y''||Dual parameters ''y ''(also part of ''Result.v_k''.
|-
|||''p_dx''||Search steps in ''x''.
|-
|||''alphaV''||Step lengths for each search step.
|-
|||''ExitFlag''||0: OK.
|-
|||||1: Maximal number of iterations reached.
|-
|||||2: Empty feasible set, no integer solution found.
|-
|||||3: Rank problems. Can not find any solution point.
|-
|||||4: No feasible point found running LP relaxation.
|-
|||||5: Illegal''x_0 ''found in LP relaxation.
|-
|||||99: Maximal CPU Time used (cputime ''> ''Prob.MaxCPU).
|-
|||''Iter''||Number of iterations.
|-
|||''Solver''||Solver used ('mipSolve').
|-
|||''SolverAlgorithm''||Text description of solver algorithm used.
|-
|-
|||''Prob''||Problem structure used.
|||''Prob''||Problem structure used.
Line 160: Line 186:
==Description==
==Description==


The routine ''mipSolve ''is an implementation of a branch and bound algorithm from Nemhauser and Wolsey \[58, chap. 8.2\].  ''mipSolve ''normally uses the linear programming routines ''lpSimplex ''and ''DualSolve ''to solve relaxed subproblems. ''mipSolve ''calls the general interface routines ''SolveLP ''and ''SolveDLP''. By changing the setting of the structure fields ''Prob.Solver.SolverLP ''and ''Prob.Solver.SolverDLP'', different sub-solvers are possible to use, see the help for the interface routines.
The routine ''mipSolve ''is an implementation of a branch and bound algorithm. ''mipSolve'' normally uses the linear programming routines ''lpSimplex ''and ''DualSolve ''to solve relaxed subproblems. ''mipSolve ''calls the general interface routines ''SolveLP ''and ''SolveDLP''. By changing the setting of the structure fields ''Prob.Solver.SolverLP ''and ''Prob.Solver.SolverDLP'', different sub-solvers are possible to use, see the help for the interface routines.


==Algorithm==
==Algorithm==


See \[58, chap. 8.2\] and the code in ''mipSolve.m''.
See ''mipSolve.m''.


==Examples==
==Examples==
Line 176: Line 202:
==See Also==
==See Also==


*[[cutPlane]]
*cutPlane
*[[balas]]
*balas
*[[solveLP]]
*solveLP
*[[solveDLP]]
*solveDLP

Latest revision as of 03:54, 20 August 2013

Purpose

Solve mixed-integer linear programming problems (MIP).

mipSolve solves problems of the form



where , and .The variables , the index subset of are restricted to beintegers.

Starting with TOMLAB version 4.0, mipSolve accepts upper and lower bounds on the linear constraints like most other TOMLAB solvers. Thus it is no longer necessary to use slack variables to handle inequality constraints.

Calling Syntax

Recommended is to first set IterPrint, to get information each iteration

Prob.optParam.IterPrint = 1;

Driver call, including printing with level 2:

Result = tomRun('mipSolve',Prob,2)

Direct solver call:

Result = mipSolve(Prob);
PrintResult(Result);

Warm Start

To make a restart (warm start), just set the warm start flag, and call mipSolve once again:

Prob.WarmStart = 1;
Result = tomRun('mipSolve', Prob, ...);

mipSolve will read warm start information from the mipSolveSave.mat file.

Another warm start (with same MaxFunc) is made by just calling tomRun again.

Result = tomRun('mipSolve', Prob, ...);

To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling mipSolve. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, Prob.WarmStart = 1;

Prob = WarmDefGLOBAL('mipSolve', Prob, Result);

where Result is the result structure returned by the previous run. A warm start (with same MaxIter) is done by just calling tomRun again

Result = tomRun('mipSolve', Prob, ...);

To make another warm start with new MaxIter 100, say, redefine MaxIter as:

Prob.optParam.MaxIter = 100;

Then repeat the two lines:

Prob = WarmDefGLOBAL('mipSolve', Prob, Result);
Result = tomRun('mipSolve', Prob, ...);

Inputs

Prob Problem description structure. The following fields are used:
c The vector c in cTx.
A Constraint matrix for linear constraints.
b_L Lower bounds on the linear constraints. If empty, Prob.b_U is used.
b_U Upper bounds on the linear constraints.
x_L Lower bounds on the variables.
x_U Upper bounds on the variables.
x_0 Starting point.
MaxCPU Maximal CPU Time (in seconds) to be used by mipSolve, stops with best point found.
PriLevOpt Print level in sub-solver, see the documentation for the solver.
PriLev Print level in mipSolve (default 1). Also see optParam.IterPrint.
WarmStart If true, >0, mipSolve reads the output from the last run from Prob.mipSolve, if it exists. If it doesn't exist, mipSolve attempts to open and read warm start data from mat-file mipSolveSave.mat.
mipSolve uses the warm start information to continue from the last run. The mat-file mipSolveSave.mat is saved every Prob.MIP.SaveFreq iteration
QP.B Active set B_0 at start:
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.
SolverLP Name of the solver used for the initial LP subproblem. If empty, the best available solver with a license is picked from a list.
Note - If using MINOS, use the special LP interface LP-MINOS
SolverDLP Name of the solver used for dual LP subproblems.
If empty, SolverLP is used.
If SolverLP/SolverDLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.
MIP Structure in Prob, Prob.MIP. Defines integer optimization parameters:
MIP.IntVars If empty, all variables are assumed non-integer.
If islogical(IntVars) (i.e. all elements are 0/1), then 1 = integer variable, 0 = continuous variable.
If any element >1, IntVars is the indices for integer variables
MIP.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.
MIP.DualGap mipSolve stops if the duality gap is less than DualGap.
E.g. DualGap = 1, implies a stop at the first integer solution.
E.g. DualGap = 0.01, stop if the solution less than one percent from the optimal solution.
MIP.fIP An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.
MIP.xIP The x-value giving the fIP value, if a solution (xIP, fIP) is known.
MIP.NodeSel Node selection method:
0: Depth first. Priority on nodes with more integer components.
1: Breadth first. Priority on nodes with more integer components.
2: Depth first. When integer solution found, use NodeSel = 1 (Default).
3: Pure LIFO (Last in, first out) Depth First
4: Pure FIFO (First in, first out) Breadth First
5: Pure LIFO Depth First. When integer solution found, use NodeSel = 4.
MIP.VarSel Variable selection method in branch and bound.
1: Use variable with most fractional value
2: Use gradient and distance to nearest integer value
MIP.KNAPSACK If solving a knapsack problem, set to true (1) to use a knapsack heuristic.
MIP.ROUNDH If = 1, use a rounding heuristic. Default 1.
MIP.SaveFreq Warm start info saved on mipSolveSave.mat every SaveFreq iteration. (default -1, i.e. no warm start info is saved)
Solver Options for the LP subproblem:
Solver.method Rule to select new variables in DualSolve/lpSimplex:
0: Minimum reduced cost, sort variables increasing (default).
1: Bland's Anti-Cycling Rule
2: Minimum reduced cost. Dantzig's rule.
optParam Structure in Prob.
Fields used in Prob.optParam, also in sub-solvers:
optParam.MaxIter Maximal number of iterations. max(10*dim(x),100) is default.
optParam.IterPrint Print short information each iteration (PriLev > 0 ==> IterPrint = 1).
One line each iteration with:

Iteration number
Depth in tree (symbol L[] - empty list,
symbol Gap - Dual Gap convergence;
date/time stamp,
fLP (Optimal f(x) current node),
fIPMin (Best integer feasible f(x) found)
LowBnd (Lower bound on optimal integer feasible f(x)),
Dual Gap in absolut value and percent.
The length of the node list L, |L|
The Inform and ExitFlag the solver returned at the current node

optParam.bTol Linear constraint violation convergence tolerance
Fields in Prob.optParam that are used by lpSimplex and DualSolve (assuming they are set as sub-solvers):
optParam.eps_f Tolerance used for function value tests
optParam.eps_Rank Rank tolerance

Outputs

Result Structure with result from optimization. The following fields are changed:
Iter Number of iterations.
ExitFlag ExitFlag.
0: Global optimal solution found, or integer solution with duality gap less than user tolerance.
1: Maximal number of iterations reached.
2: Empty feasible set, no integer solution found.
3: Rank problems (not used).
4: No feasible point found running LP relaxation.
5: Illegal x_0 found in LP relaxation.
99: Maximal CPU Time used (cputime > Prob.MaxCPU).
ExitText Text string giving ExitFlag and Inform information.
Inform If ExitFlag > 0, Inform = ExitFlag, except if duality gap less than given tolerance (Inform = 6)
DualGap Relative duality gap, max(0, fIPMin-fLB)/|fIPMin|, if fIPMin ~=0; max(0,fIPMin-fLB) if fIPMin == 0.
If fIPMin ~=0: Scale with 100, 100*DualGap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap
x_k Solution.
v_k Lagrange parameters (n+m) vector, [Bounds(n); Linear constraints (m)].
QP.B B Optimal set. B(i)==0 implies inclusion of variable x(i) in basic set. sum(B==1)==length(b) holds. See QP.B as input.
QP.y Dual parameters y (also part of Result.v_k).
f_k Function value cTx_k, fIPMin (Best integer feasible solution).
g_k Gradient value at optimum, c.
Solver Solver used (mipSolve).
SolverAlgorithm Description of method used.
x_0 Starting point.
xState State of each variable, described in TOMLAB Appendix B.
mipSolve A structure with warm start information. Use with WarmDefGLOBAL, see example.
Prob Problem structure used.

Description

The routine mipSolve is an implementation of a branch and bound algorithm. mipSolve normally uses the linear programming routines lpSimplex and DualSolve to solve relaxed subproblems. mipSolve calls the general interface routines SolveLP and SolveDLP. By changing the setting of the structure fields Prob.Solver.SolverLP and Prob.Solver.SolverDLP, different sub-solvers are possible to use, see the help for the interface routines.

Algorithm

See mipSolve.m.

Examples

See exip39, exknap, expkorv.

M-files Used

lpSimplex.m, DualSolve.m, GetSolver.m, tomSolve.m

See Also

  • cutPlane
  • balas
  • solveLP
  • solveDLP