Xpress Appendix C: Difference between revisions

From TomWiki
Jump to navigationJump to search
(Created page with "==Appendix C - The Matlab Interface Routines - Test Routines== ==xpaircrew== ===Purpose=== Test of an air-crew schedule generation problem. ===Calling Syntax=== <pre> xpair...")
 
No edit summary
 
Line 1: Line 1:
==Appendix C - The Matlab Interface Routines - Test Routines==
{{Part Of Manual|title=the Xpress Manual|link=[[Xpress|Xpress Manual]]}}
==The Matlab Interface Routines - Test Routines==


==xpaircrew==
===xpaircrew===


===Purpose===
====Purpose====


Test of an air-crew schedule generation problem.
Test of an air-crew schedule generation problem.


===Calling  Syntax===
====Calling  Syntax====


<pre>
<pre>
Line 13: Line 14:
</pre>
</pre>


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
!Parameter||Description
!Parameter||Description
|-valign="top"
|-valign="top"
|''xpControlVariables''||Structure with all Xpress''M P ''control variables. Set before the callback. ''xpProblemAttrib ''Structure with all Xpress''M P ''problem attributes.  Set before the callback. ''MAX  x ''Maximal number of ''x ''elements printed in output statements. Default 20.
|''xpControlVariables''||Structure with all Xpress<sup>''M P''</sup> control variables. Set before the callback.  
|-valign="top"
|''xpProblemAttrib''||Structure with all Xpress<sup>''M P''</sup> problem attributes.  Set before the callback.  
|-valign="top"
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|-valign="top"
|-valign="top"
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|}
|}


===Description===
====Description====


Test of an air-crew schedule generation problem. Based on D.M.Ryan, Airline Industry, Encyclopedia of Operations Research and Management Science.  Two subfunctions are used (defined at the end of the xpaircrew.m file): The function ''generateT oDs ''create ToDs, i.e. Tours of Duty.  The function ''sectordata ''generates some test data.
Test of an air-crew schedule generation problem. Based on D.M.Ryan, Airline Industry, Encyclopedia of Operations Research and Management Science.  Two subfunctions are used (defined at the end of the xpaircrew.m file): The function ''generateT oDs ''create ToDs, i.e. Tours of Duty.  The function ''sectordata ''generates some test data.


===M-files  Used===
====M-files  Used====


''abc2gap'', ''xpress''
''abc2gap'', ''xpress''


==xpbiptest==
===xpbiptest===


===Purpose===
====Purpose====


Test of TOMLAB /Xpress level 1 interface solving three larger binary integer linear optimization problems calling the Xpress''M P ''solver.
Test of TOMLAB /Xpress level 1 interface solving three larger binary integer linear optimization problems calling the Xpress<sup>''M P''</sup> solver.


===Calling  Syntax===
====Calling  Syntax====


<pre>
<pre>
Line 43: Line 48:
</pre>
</pre>


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
|''Cut''||Value of the CUTSTRATEGY control parameter, default ''C ut ''= ''-''1. ''C ut ''= ''-''1, auto select of ''C ut ''= 1 or ''C ut ''= 2. ''C ut ''= 0, no cuts. ''C ut ''= 1, conservative cut strategy. ''C ut ''= 2, aggressive cut strategy
|''Cut''||Value of the CUTSTRATEGY control parameter, default ''Cut ''= ''-''1. ''Cut ''= ''-''1, auto select of ''Cut ''= 1 or ''Cut ''= 2. ''Cut ''= 0, no cuts. ''Cut ''= 1, conservative cut strategy. ''Cut ''= 2, aggressive cut strategy
|-valign="top"
|-valign="top"
|''PreSolve''||Value of the  PRESOLVE control  parameter, default  ''P reSolve ''= 1.  ''P reSolve ''= 0, no presolve. ''P reSolve ''= 1, do presolve.
|''PreSolve''||Value of the  PRESOLVE control  parameter, default  ''PreSolve ''= 1.  ''PreSolve ''= 0, no presolve. ''PreSolve ''= 1, do presolve.
|-valign="top"
|-valign="top"
|''MipPre''||Value of the MIPPRESOLVE  control parameter, where the default value is dependent on the matrix characteristics. It determines the type of integer processing to be performed in the Branch and Bound. ''M ipP re ''= 0, no processing will be performed. If bit 0 is set, do reduced cost fixing at each node. If bit 1 is set, do logical preprocessing on binary variables at each node. If bit 2 is set, do probing of binary variables is performed at the top node. A value ''M ipP re ''= 7 will set all three bits as 1.
|''MipPre''||Value of the MIPPRESOLVE  control parameter, where the default value is dependent on the matrix characteristics. It determines the type of integer processing to be performed in the Branch and Bound. ''M ipPre ''= 0, no processing will be performed. If bit 0 is set, do reduced cost fixing at each node. If bit 1 is set, do logical preprocessing on binary variables at each node. If bit 2 is set, do probing of binary variables is performed at the top node. A value ''M ipP re ''= 7 will set all three bits as 1.
|-valign="top"
|-valign="top"
|''NodeSel''||Value of the  NODESELECT  control parameter.  The default  value  is dependent  on the matrix characteristics. It determines which nodes will be considered for solution once the current node has been solved.  ''N odeSel ''= 1, choose among the two descendant nodes, if none among all active nodes. ''N odeSel ''= 2, all nodes are always considered.  ''N odeSel ''= 3, depth-first search exploring both descendants first.  ''N odeSel ''= 4, all nodes are considered for the  first BREADTHFIRST  nodes, after which the  usual default  behavior is resumed. Setting xpcontrol.BREADTHFIRST influences the last choice.
|''NodeSel''||Value of the  NODESELECT  control parameter.  The default  value  is dependent  on the matrix characteristics. It determines which nodes will be considered for solution once the current node has been solved.  ''N odeSel ''= 1, choose among the two descendant nodes, if none among all active nodes. ''N odeSel ''= 2, all nodes are always considered.  ''N odeSel ''= 3, depth-first search exploring both descendants first.  ''N odeSel ''= 4, all nodes are considered for the  first BREADTHFIRST  nodes, after which the  usual default  behavior is resumed. Setting xpcontrol.BREADTHFIRST influences the last choice.
|}
===Description of Input===
{|class="wikitable"
|-valign="top"
|-valign="top"
|''BackTrack''||Value of the BACKTRACK control parameter, default value is 3. Determines how the next node in the tree search is selected for processing.  ''BackT rack ''= 1, if MIPTARGET is not set,  choose the node with  the  best  estimate.  Otherwise  the node choice is based on the Forrest-Hirst-Tomlin Criterion, which takes into account the best current integer solution and seeks a new node which represents  a large potential improvement.  ''BackT rack ''= 2, always choose the node with the best estimated solution.  ''BackT rack ''= 3, always choose the node with the best bound on the solution.
|''BackTrack''||Value of the BACKTRACK control parameter, default value is 3. Determines how the next node in the tree search is selected for processing.  ''BackTrack ''= 1, if MIPTARGET is not set,  choose the node with  the  best  estimate.  Otherwise  the node choice is based on the Forrest-Hirst-Tomlin Criterion, which takes into account the best current integer solution and seeks a new node which represents  a large potential improvement.  ''BackTrack ''= 2, always choose the node with the best estimated solution.  ''BackT rack ''= 3, always choose the node with the best bound on the solution.
|-valign="top"
|-valign="top"
|''xpcontrol''||The initial  xpcontrol structure.  Here the user may set additional control parameters, e.g. xpcontrol.BREADTHFIRST. Default empty.
|''xpcontrol''||The initial  xpcontrol structure.  Here the user may set additional control parameters, e.g. xpcontrol.BREADTHFIRST. Default empty.
|}
|}


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
Line 73: Line 73:
|}
|}


===Description===
====Description====


Test of three larger binary integer linear optimization problems calling the Xpress''M P ''solver. The test problem 1 and 2 have 1956 variables, 23 equalities and four inequalities with both lower and upper bounds set.
Test of three larger binary integer linear optimization problems calling the Xpress<sup>''M P''</sup> solver. The test problem 1 and 2 have 1956 variables, 23 equalities and four inequalities with both lower and upper bounds set.


Test problem 1, in ''bilp''1''.mat'', is randomly generated. It has several minima with optimal zero value. Xpress''M P ''runs faster if avoiding the use of a cut strategy,  and skipping presolve.  Test  problem 2, in ''bilp''2''.mat'',  has a unique minimum. Runs faster if avoiding the use of presolve.
Test problem 1, in ''bilp''1''.mat'', is randomly generated. It has several minima with optimal zero value. Xpress<sup>''M P''</sup> runs faster if avoiding the use of a cut strategy,  and skipping presolve.  Test  problem 2, in ''bilp''2''.mat'',  has a unique minimum. Runs faster if avoiding the use of presolve.


Test  problem  3, in ''bilp''1211''.mat'',  has 1656 variables,  23 equalities  and four inequalities with  lower  and upper bounds set. Runs very slow without the use of cuts. A call ''xpbiptest''(0'', ''0) gives the fastest execution for the first two problems, but will be extremly slow for the third problem.
Test  problem  3, in ''bilp''1211''.mat'',  has 1656 variables,  23 equalities  and four inequalities with  lower  and upper bounds set. Runs very slow without the use of cuts. A call ''xpbiptest''(0'', ''0) gives the fastest execution for the first two problems, but will be extremly slow for the third problem.
Line 89: Line 89:
in the code. Timings are made with the Matlab functions ''tic ''and ''toc''.
in the code. Timings are made with the Matlab functions ''tic ''and ''toc''.


===M-files  Used===
====M-files  Used====


''xpress'', ''xpprint''
''xpress'', ''xpprint''


==xpiptest==
===xpiptest===


===Purpose===
====Purpose====


Test of the TOMLAB  ''/''Xpress level 1 interface solving three larger integer linear optimization problems calling the Xpress''M P  ''solver.
Test of the TOMLAB  ''/''Xpress level 1 interface solving three larger integer linear optimization problems calling the Xpress<sup>''MP''</sup> solver.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 105: Line 105:
</pre>
</pre>


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
!Input||Description
!Input||Description
|-valign="top"
|-valign="top"
|''Cut''||Value of the CUTSTRATEGY control parameter, default ''C ut ''= ''-''1. ''C ut ''= ''-''1, auto select of ''C ut ''= 1 or ''C ut ''= 2. ''C ut ''= 0, no cuts. ''C ut ''= 1, conservative cut strategy. ''C ut ''= 2, aggressive cut strategy
|''Cut''||Value of the CUTSTRATEGY control parameter, default ''Cut ''= ''-''1. ''Cut ''= ''-''1, auto select of ''Cut ''= 1 or ''Cut ''= 2. ''C ut ''= 0, no cuts. ''Cut ''= 1, conservative cut strategy. ''Cut ''= 2, aggressive cut strategy
|-valign="top"
|''PreSolve''||Value of the  PRESOLVE control  parameter, default  ''PreSolve  ''= 1.  ''PreSolve  ''= 0, no presolve. ''PreSolve ''= 1, do presolve.
|-valign="top"
|-valign="top"
|''PreSolve''||Value of the  PRESOLVE control  parameter, default  ''P reSolve  ''= 1.  ''P reSolve  ''= 0, no presolve. ''P reSolve ''= 1, do presolve.
|''MipPre''||Value of the MIPPRESOLVE  control parameter, where the default value is dependent on the matrix characteristics. It determines the type of integer processing to be performed in the Branch and Bound. ''M ipPre ''= 0, no processing will be performed. If bit 0 is set, do reduced cost fixing at each node. If bit 1 is set, do logical preprocessing on binary variables at each node. If bit 2 is set, do probing of binary variables is performed at the top node. A value ''M ipP re ''= 7 will set all three bits as 1.
|}
 
===Description of Input===
 
{|class="wikitable"
|''MipPre''||Value of the MIPPRESOLVE  control parameter, where the default value is dependent on the matrix characteristics. It determines the type of integer processing to be performed in the Branch and Bound. ''M ipP re ''= 0, no processing will be performed. If bit 0 is set, do reduced cost fixing at each node. If bit 1 is set, do logical preprocessing on binary variables at each node. If bit 2 is set, do probing of binary variables is performed at the top node. A value ''M ipP re ''= 7 will set all three bits as 1.
|-valign="top"
|-valign="top"
|''NodeSel''||Value of the  NODESELECT  control parameter.  The default  value  is dependent  on the matrix characteristics. It determines which nodes will be considered for solution once the current node has been solved. ''N odeSel ''= 1, choose among the two descendant nodes, if none among all active nodes. ''N odeSel ''= 2, all nodes are always considered.  ''N odeSel ''= 3, depth-first search exploring both descendants first. ''N odeSel ''= 4, all nodes are considered for the  first BREADTHFIRST  nodes, after which the  usual default  behavior is resumed. Setting xpcontrol.BREADTHFIRST influences the last choice.
|''NodeSel''||Value of the  NODESELECT  control parameter.  The default  value  is dependent  on the matrix characteristics. It determines which nodes will be considered for solution once the current node has been solved. ''NodeSel ''= 1, choose among the two descendant nodes, if none among all active nodes. ''N odeSel ''= 2, all nodes are always considered.  ''N odeSel ''= 3, depth-first search exploring both descendants first. ''NodeSel ''= 4, all nodes are considered for the  first BREADTHFIRST  nodes, after which the  usual default  behavior is resumed. Setting xpcontrol.BREADTHFIRST influences the last choice.
|}
|}


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
|''BackTrack''||Value of the BACKTRACK control parameter, default value is 3. Determines how the next node in the tree search is selected for processing.  ''BackT rack ''= 1, if MIPTARGET is not set,  choose the node with  the  best  estimate.  Otherwise  the node choice is based on the Forrest-Hirst-Tomlin Criterion, which takes into account the best current integer solution and seeks a new node which represents  a large potential improvement.  ''BackT rack  ''= 2, always choose the node with the best estimated solution.  ''BackT rack ''= 3, always choose the node with the best bound on the solution.
|''BackTrack''||Value of the BACKTRACK control parameter, default value is 3. Determines how the next node in the tree search is selected for processing.  ''BackTrack ''= 1, if MIPTARGET is not set,  choose the node with  the  best  estimate.  Otherwise  the node choice is based on the Forrest-Hirst-Tomlin Criterion, which takes into account the best current integer solution and seeks a new node which represents  a large potential improvement.  ''BackT rack  ''= 2, always choose the node with the best estimated solution.  ''BackT rack ''= 3, always choose the node with the best bound on the solution.
|-valign="top"
|-valign="top"
|''xpcontrol''||The initial  xpcontrol structure.  Here the user may set additional control parameters, e.g. xpcontrol.BREADTHFIRST. Default empty.
|''xpcontrol''||The initial  xpcontrol structure.  Here the user may set additional control parameters, e.g. xpcontrol.BREADTHFIRST. Default empty.
|}
|}


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
Line 139: Line 135:
|}
|}


===Description===
====Description====


Test of three larger integer linear optimization problems calling the Xpress''M P   ''solver.  The  test  problems  have
Test of three larger integer linear optimization problems calling the Xpress<sup>''M P''</sup> solver.  The  test  problems  have


61 variables and 138 linear inequalities.  32 of the 138 inequalities are just zero rows in the matrix A. The three problems are stored in ''ilp''061''.mat'', ''ilp''062''.mat ''and ''ilp''063''.mat''.
61 variables and 138 linear inequalities.  32 of the 138 inequalities are just zero rows in the matrix A. The three problems are stored in ''ilp''061''.mat'', ''ilp''062''.mat ''and ''ilp''063''.mat''.


Code is included to remove the 32 zero rows, and compute better upper bounds using the positivity of the matrix elements, right hand side and the variables.  But this does not influence the timing much, the Xpress''M P ''presolve will do all these problem changes.
Code is included to remove the 32 zero rows, and compute better upper bounds using the positivity of the matrix elements, right hand side and the variables.  But this does not influence the timing much, the Xpress<sup>''M P''</sup> presolve will do all these problem changes.


It might be interesting the follow the progress towards the solution by setting the global log callback. This could be done by removing the comment from the line
It might be interesting the follow the progress towards the solution by setting the global log callback. This could be done by removing the comment from the line
Line 157: Line 153:
A call ''xpiptest''(2'', ''1'', ''3'', ''3'', ''3) probably gives the fastest execution.  Timings are made with the Matlab functions ''tic'' and ''toc''.
A call ''xpiptest''(2'', ''1'', ''3'', ''3'', ''3) probably gives the fastest execution.  Timings are made with the Matlab functions ''tic'' and ''toc''.


===M-files Used===
====M-files Used====


''xpress'', ''xpprint''
''xpress'', ''xpprint''


==xptomtest1==
===xptomtest1===


===Purpose===
====Purpose====


Test of using TOMLAB to call Xpress''M P ''for problems defined in the TOMLAB IF format.
Test of using TOMLAB to call Xpress<sup>''M P''</sup> for problems defined in the TOMLAB IF format.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 173: Line 169:
</pre>
</pre>


===Description===
====Description====


Test of using TOMLAB to call Xpress''M P ''for problems defined in the TOMLAB IF format.  The examples show the solution of LP, QP and MILP  problems.
Test of using TOMLAB to call Xpress<sup>''M P''</sup> for problems defined in the TOMLAB IF format.  The examples show the solution of LP, QP and MILP  problems.


===M-files Used===
====M-files Used====


''tomRun''.
''tomRun''.


===See Also===
====See Also====


''xpressTL''.
''xpressTL''.


==xptomtest2==
===xptomtest2===


===Purpose===
====Purpose====


Test of using TOMLAB to call Xpress ''MP'' for problems defined in the TOMLAB TQ format.
Test of using TOMLAB to call Xpress<sup>''M P''</sup> for problems defined in the TOMLAB TQ format.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 197: Line 193:
</pre>
</pre>


===Description===
====Description====


Test of using TOMLAB to call Xpress ''MP''for problems  defined in  the  TOMLAB  TQ  format.  The  routine ''mipAssign ''is used to define the problem. A simple problem is solved with Xpress''M P ''both as an LP problem and as a MILP  problem. The problem is solved both with and without explicitly defining the slack variables.
Test of using TOMLAB to call Xpress<sup>''M P''</sup> for problems  defined in  the  TOMLAB  TQ  format.  The  routine ''mipAssign ''is used to define the problem. A simple problem is solved with Xpress<sup>''M P''</sup> both as an LP problem and as a MILP  problem. The problem is solved both with and without explicitly defining the slack variables.


===M-files Used===
====M-files Used====


''mipAssign'', ''tomRun ''and ''PrintResult''.
''mipAssign'', ''tomRun ''and ''PrintResult''.


===See Also===
====See Also====


''xpressTL ''and ''xpress''.
''xpressTL ''and ''xpress''.


==xpknaps==
===xpknaps===


===Purpose===
====Purpose====


Xpress ''MP'' Matlab level 1 interface Knapsack test routine
Xpress<sup>''M P''</sup> Matlab level 1 interface Knapsack test routine


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 221: Line 217:
</pre>
</pre>


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
Line 228: Line 224:
|''P''||Problem number 1-3. Default 1.
|''P''||Problem number 1-3. Default 1.
|-valign="top"
|-valign="top"
|''Run''||If empty or Run ''= ''0, run normal Xpress''M P ''global solve.  If Run ''> ''0 run simple knapsack heuristic in callback xpcb GL.m Default 0.
|''Run''||If empty or Run ''= ''0, run normal Xpress<sup>''M P''</sup> global solve.  If Run ''> ''0 run simple knapsack heuristic in callback xpcb GL.m Default 0.
|-valign="top"
|-valign="top"
|''Cut''||Cut strategy. 0 = no cuts, 1 = cuts, 2 = aggressive cuts. Default 0.
|''Cut''||Cut strategy. 0 = no cuts, 1 = cuts, 2 = aggressive cuts. Default 0.
|}
|}


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
!Parameter||Description
!Parameter||Description
|-valign="top"
|-valign="top"
''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|-valign="top"
|-valign="top"
''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|-valign="top"
|-valign="top"
|''xpControlVariables''||Structure with all Xpress''M P ''control variables.
|''xpControlVariables''||Structure with all Xpress<sup>''M P''</sup> control variables.
|-valign="top"
|-valign="top"
|''xpProblemAttrib''||Structure with all Xpress''M P ''problem attributes.
|''xpProblemAttrib''||Structure with all Xpress<sup>''M P''</sup> problem attributes.
|}
|}


===Description===
====Description====


The Xpress''MP'' Matlab level 1 interface knapsack test routine runs three different test problems. It is possible to change cut strategy and use heuristics defined in callbacks.
The Xpress<sup>''M P''</sup> Matlab level 1 interface knapsack test routine runs three different test problems. It is possible to change cut strategy and use heuristics defined in callbacks.


Currently defined knapsack problems:
Currently defined knapsack problems:
Line 261: Line 257:
|}
|}


===M-files Used===
====M-files Used====


''xpress''
''xpress''


==xpknapsTL==
===xpknapsTL===


===Purpose===
====Purpose====


Xpress ''MP'' Matlab level 1 interface Knapsack test routine
Xpress<sup>''MP''</sup> Matlab level 1 interface Knapsack test routine


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 277: Line 273:
</pre>
</pre>


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
!Input||Description
!Input||Description
|-valign="top"
|''P''||Problem number 1-3. Default 1.
|''P''||Problem number 1-3. Default 1.
|-valign="top"
|-valign="top"
|''Run''||If empty or Run ''= ''0, run normal Xpress''M P  ''global solve.  If Run ''> ''0 run simple knapsack heuristic in callback xpcb GL.m Default 0.
|''Run''||If empty or Run ''= ''0, run normal Xpress<sup>''MP''</sup> global solve.  If Run ''> ''0 run simple knapsack heuristic in callback xpcb GL.m Default 0.
|-valign="top"
|-valign="top"
|''Cut''||Cut strategy. 0 = no cuts, 1 = cuts, 2 = aggressive cuts. Default 0.
|''Cut''||Cut strategy. 0 = no cuts, 1 = cuts, 2 = aggressive cuts. Default 0.
|}
|}


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
Line 295: Line 292:
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|-valign="top"
|-valign="top"
|''xpControlVariables''||Structure with all Xpress''M P  ''control variables.
|''xpControlVariables''||Structure with all Xpress<sup>''MP''</sup> control variables.
|-valign="top"
|-valign="top"
|''xpProblemAttrib''||Structure with all Xpress''M P  ''problem attributes.
|''xpProblemAttrib''||Structure with all Xpress<sup>''MP''</sup> problem attributes.
|}
|}


===Description===
====Description====


The Xpress''MP'' Matlab level 2 interface knapsack test routine runs three different test problems. It is possible to change cut strategy and use heuristics defined in callbacks.
The Xpress<sup>''MP''</sup> Matlab level 2 interface knapsack test routine runs three different test problems. It is possible to change cut strategy and use heuristics defined in callbacks.


Currently defined knapsack problems:
Currently defined knapsack problems:
Line 316: Line 313:
|}
|}


===M-files Used===
====M-files Used====


<pre>
<pre>
Line 322: Line 319:
</pre>
</pre>


==xptest1==
===xptest1===


===Purpose===
====Purpose====


Test routine 1, calls Xpress ''MP'' Matlab level 1 interface to solve a GAP problem.
Test routine 1, calls Xpress<sup>''MP''</sup> Matlab level 1 interface to solve a GAP problem.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 334: Line 331:
</pre>
</pre>


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
|''xpControlVariables''||Structure with all Xpress ''MP'' control variables.
|''xpControlVariables''||Structure with all Xpress<sup>''MP''</sup> control variables.
|-valign="top"
|-valign="top"
|''xpProblemAttrib''||Structure with all Xpress ''MP'' problem attributes.
|''xpProblemAttrib''||Structure with all Xpress<sup>''MP''</sup> problem attributes.
|-valign="top"
|-valign="top"
|''MAX_x''||Maximal number of ''x '' elements printed in output statements. Default 20.
|''MAX_x''||Maximal number of ''x '' elements printed in output statements. Default 20.
Line 346: Line 343:
|}
|}


===Description===
====Description====


Running a generalized  assignment  problem (GAP)  from Wolsey [2, 9.8.16, pp165]. In this test  the linear sos1 constraints are defined explicitly.
Running a generalized  assignment  problem (GAP)  from Wolsey [2, 9.8.16, pp165]. In this test  the linear sos1 constraints are defined explicitly.


Given the matrices ''A ''(constraints) and ''C ''(costs), ''xptest1 ''is using the utility ''abc2gap ''to reformulate the problem into the standard form suitable for Xpress''M P''
Given the matrices ''A ''(constraints) and ''C ''(costs), ''xptest1 ''is using the utility ''abc2gap ''to reformulate the problem into the standard form suitable for Xpress<sup>''MP''</sup>


The number of iterations are increased, no presolve is used, and an aggressive cut strategy.
The number of iterations are increased, no presolve is used, and an aggressive cut strategy.


===M-files Used===
====M-files Used====


''abc2gap'', ''xpress''
''abc2gap'', ''xpress''


==xptest2==
===xptest2===


===Purpose===
====Purpose====


Test routine 2, calls Xpress ''MP'' Matlab level 1 interface to solve a GAP problem.
Test routine 2, calls Xpress<sup>''MP''</sup> Matlab level 1 interface to solve a GAP problem.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 370: Line 367:
</pre>
</pre>


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
|''xpControlVariables''||Structure with all Xpress''M P  ''control variables.
|''xpControlVariables''||Structure with all Xpress<sup>''MP''</sup> control variables.
|-valign="top"
|-valign="top"
|''xpProblemAttrib''||Structure with all Xpress''M P  ''problem attributes.
|''xpProblemAttrib''||Structure with all Xpress<sup>''MP''</sup> problem attributes.
|-valign="top"
|-valign="top"
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
Line 382: Line 379:
|}
|}


===Description===
====Description====


Running a generalized assignment problem (GAP) from Wolsey [2, 9.8.16, pp165]. In this test sos1 variables are used.
Running a generalized assignment problem (GAP) from Wolsey [2, 9.8.16, pp165]. In this test sos1 variables are used.


Given the matrices ''A ''(constraints) and ''C ''(costs), ''xptest2 ''is using the utility ''abc2gap ''to reformulate the problem into the standard form suitable for Xpress''M P''
Given the matrices ''A ''(constraints) and ''C ''(costs), ''xptest2 ''is using the utility ''abc2gap ''to reformulate the problem into the standard form suitable for Xpress<sup>''MP''</sup>


The number of iterations are increased, no presolve is used, and an aggressive cut strategy is applied.
The number of iterations are increased, no presolve is used, and an aggressive cut strategy is applied.


===M-files Used===
====M-files Used====


''abc2gap'', ''xpress''
''abc2gap'', ''xpress''


===See Also===
====See Also====


''xptest3''
''xptest3''


==xptest3==
===xptest3===


===Purpose===
====Purpose====


Test routine 3, calls Xpress''M P  ''Matlab level 1 interface to solve a GAP problem.
Test routine 3, calls Xpress<sup>''MP''</sup> Matlab level 1 interface to solve a GAP problem.


==Calling Syntax==
====Calling Syntax====


<pre>
<pre>
Line 410: Line 407:
</pre>
</pre>


===Global Parameters Used===
====Global Parameters Used====


{|class="wikitable"
{|class="wikitable"
!Parameter||Description
!Parameter||Description
|-valign="top"
|-valign="top"
|''xpControlVariables''||Structure with all Xpress''M P  ''control variables.
|''xpControlVariables''||Structure with all Xpress<sup>''MP''</sup> control variables.
|-valign="top"
|-valign="top"
''xpProblemAttrib ''Structure with all Xpress''M P  ''problem attributes.
|''xpProblemAttrib''||Structure with all Xpress<sup>''MP''</sup> problem attributes.
|-valign="top"
|-valign="top"
''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|-valign="top"
|-valign="top"
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|''MAX_c''||Maximal number of constraint elements printed in output statements.  Default 20.
|}
|}


===Description===
====Description====


Running a generalized  assignment  problem (GAP)  from Wolsey [2, 9.6, pp159].  In  this test the  linear  sos1 constraints are defined explicitly.
Running a generalized  assignment  problem (GAP)  from Wolsey [2, 9.6, pp159].  In  this test the  linear  sos1 constraints are defined explicitly.


Given the matrices ''A ''(constraints) and ''C ''(costs), ''xptest1 ''is using the utility ''abc2gap ''to reformulate the problem into the standard form suitable for Xpress''M P''
Given the matrices ''A ''(constraints) and ''C ''(costs), ''xptest1 ''is using the utility ''abc2gap ''to reformulate the problem into the standard form suitable for Xpress<sup>''MP''</sup>


The number of iterations are increased, no presolve is used, and no cut strategy is used.
The number of iterations are increased, no presolve is used, and no cut strategy is used.


===M-files Used===
====M-files Used====


''abc2gap'', ''xpress''
''abc2gap'', ''xpress''


===See Also===
====See Also====


''xptest2''
''xptest2''


==xptestqp1==
===xptestqp1===


===Purpose===
====Purpose====


Simple test of calling Xpress ''MP'' Matlab level 1 interface to solve a QP problem.
Simple test of calling Xpress<sup>''MP''</sup> Matlab level 1 interface to solve a QP problem.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 452: Line 449:
</pre>
</pre>


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
!Input||Description
!Input||Description
|-valign="top"
|-valign="top"
|''MIP''||If ''M I P ''= 1, run as a MIQP  problem, trying  to make the  first  variable  integer  valued, otherwise run as a pure QP problem. Default ''M I P ''= 0.
|''MIP''||If ''MIP ''= 1, run as a MIQP  problem, trying  to make the  first  variable  integer  valued, otherwise run as a pure QP problem. Default ''MIP ''= 0.
|}
|}


===Global Parameters  Used===
====Global Parameters  Used====


{|class="wikitable"
{|class="wikitable"


|''xpControlVariables''||Structure with all Xpress''M P  ''control variables.
|''xpControlVariables''||Structure with all Xpress<sup>''MP''</sup> control variables.
|-valign="top"
|-valign="top"
|''xpProblemAttrib''||Structure with all Xpress''M P  ''problem attributes.
|''xpProblemAttrib''||Structure with all Xpress<sup>''MP''</sup> problem attributes.
|-valign="top"
|-valign="top"
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
|''MAX_x''||Maximal number of ''x ''elements printed in output statements. Default 20.
Line 473: Line 470:
|}
|}


===Description===
====Description====


Simple test of calling Xpress ''MP'' Matlab level 1 interface to solve a QP or MIQP problem. The problem is the first test problem in the TOMLAB  ''qpp rob.m ''file.
Simple test of calling Xpress<sup>''MP''</sup> Matlab level 1 interface to solve a QP or MIQP problem. The problem is the first test problem in the TOMLAB  ''qpp rob.m ''file.


===M-files Used===
====M-files Used====


''xpress''
''xpress''


==xptestqp2==
===xptestqp2===


'''Purpose'''
'''Purpose'''


Simple test of MIQP  problem running Xpress''MP''. Simple test of calling Xpress ''M P'' Matlab level 1 interface to solve a QP problem.
Simple test of MIQP  problem running Xpress<sup>''MP''</sup>. Simple test of calling Xpress<sup>''MP''</sup> Matlab level 1 interface to solve a QP problem.


===Calling Syntax===
====Calling Syntax====


<pre>
<pre>
Line 493: Line 490:
</pre>
</pre>


===Description of Input===
====Description of Input====


{|class="wikitable"
{|class="wikitable"
Line 501: Line 498:
|}
|}


'''Global Parameters  Used'''
====Global Parameters  Used====


{|class="wikitable"
{|class="wikitable"
!Parameter||Description
!Parameter||Description
|-valign="top"
|-valign="top"
|''xpControlVariables ''||Structure with all Xpress''M P ''control variables.
|''xpControlVariables ''||Structure with all Xpress<sup>''M P''</sup> control variables.
|-valign="top"
|-valign="top"
|''xpProblemAttrib ''||Structure with all Xpress''M P ''problem attributes.
|''xpProblemAttrib ''||Structure with all Xpress<sup>''M P''</sup> problem attributes.
|-valign="top"
|-valign="top"
|''MAX  x ''||Maximal number of ''x ''elements printed in output statements. Default 20.
|''MAX_x ''||Maximal number of ''x ''elements printed in output statements. Default 20.
|-valign="top"
|-valign="top"
|''MAX  c ''||Maximal number of constraint elements printed in output statements.  Default 20.
|''MAX_c ''||Maximal number of constraint elements printed in output statements.  Default 20.
|}
|}


===escription===
====Description====


Simple test of MIQP problem running Xpress''M P ''.  The MIQP problem is from the Xpress-Optimizer Reference
Simple test of MIQP problem running Xpress<sup>''M P''</sup>.  The MIQP problem is from the Xpress-Optimizer Reference


Manual [1], page 166. The problem is defined as
Manual [1], page 166. The problem is defined as
Line 530: Line 527:
</math>
</math>


===M-files Used===
====M-files Used====


''xpress''
''xpress''

Latest revision as of 09:45, 3 October 2011

Notice.png

This page is part of the Xpress Manual. See Xpress Manual.

The Matlab Interface Routines - Test Routines

xpaircrew

Purpose

Test of an air-crew schedule generation problem.

Calling Syntax

xpaircrew

Global Parameters Used

Parameter Description
xpControlVariables Structure with all XpressM P control variables. Set before the callback.
xpProblemAttrib Structure with all XpressM P problem attributes. Set before the callback.
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Test of an air-crew schedule generation problem. Based on D.M.Ryan, Airline Industry, Encyclopedia of Operations Research and Management Science. Two subfunctions are used (defined at the end of the xpaircrew.m file): The function generateT oDs create ToDs, i.e. Tours of Duty. The function sectordata generates some test data.

M-files Used

abc2gap, xpress

xpbiptest

Purpose

Test of TOMLAB /Xpress level 1 interface solving three larger binary integer linear optimization problems calling the XpressM P solver.

Calling Syntax

function xpbiptest(Cut, PreSolve, MipPre, NodeSel, BackTrack, xpcontrol)

Description of Input

Cut Value of the CUTSTRATEGY control parameter, default Cut = -1. Cut = -1, auto select of Cut = 1 or Cut = 2. Cut = 0, no cuts. Cut = 1, conservative cut strategy. Cut = 2, aggressive cut strategy
PreSolve Value of the PRESOLVE control parameter, default PreSolve = 1. PreSolve = 0, no presolve. PreSolve = 1, do presolve.
MipPre Value of the MIPPRESOLVE control parameter, where the default value is dependent on the matrix characteristics. It determines the type of integer processing to be performed in the Branch and Bound. M ipPre = 0, no processing will be performed. If bit 0 is set, do reduced cost fixing at each node. If bit 1 is set, do logical preprocessing on binary variables at each node. If bit 2 is set, do probing of binary variables is performed at the top node. A value M ipP re = 7 will set all three bits as 1.
NodeSel Value of the NODESELECT control parameter. The default value is dependent on the matrix characteristics. It determines which nodes will be considered for solution once the current node has been solved. N odeSel = 1, choose among the two descendant nodes, if none among all active nodes. N odeSel = 2, all nodes are always considered. N odeSel = 3, depth-first search exploring both descendants first. N odeSel = 4, all nodes are considered for the first BREADTHFIRST nodes, after which the usual default behavior is resumed. Setting xpcontrol.BREADTHFIRST influences the last choice.
BackTrack Value of the BACKTRACK control parameter, default value is 3. Determines how the next node in the tree search is selected for processing. BackTrack = 1, if MIPTARGET is not set, choose the node with the best estimate. Otherwise the node choice is based on the Forrest-Hirst-Tomlin Criterion, which takes into account the best current integer solution and seeks a new node which represents a large potential improvement. BackTrack = 2, always choose the node with the best estimated solution. BackT rack = 3, always choose the node with the best bound on the solution.
xpcontrol The initial xpcontrol structure. Here the user may set additional control parameters, e.g. xpcontrol.BREADTHFIRST. Default empty.

Global Parameters Used

MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Test of three larger binary integer linear optimization problems calling the XpressM P solver. The test problem 1 and 2 have 1956 variables, 23 equalities and four inequalities with both lower and upper bounds set.

Test problem 1, in bilp1.mat, is randomly generated. It has several minima with optimal zero value. XpressM P runs faster if avoiding the use of a cut strategy, and skipping presolve. Test problem 2, in bilp2.mat, has a unique minimum. Runs faster if avoiding the use of presolve.

Test problem 3, in bilp1211.mat, has 1656 variables, 23 equalities and four inequalities with lower and upper bounds set. Runs very slow without the use of cuts. A call xpbiptest(0, 0) gives the fastest execution for the first two problems, but will be extremly slow for the third problem.

It might be interesting the follow the progress towards the solution by setting the global log callback. This could be done by removing the comment from the line

%   callback(9) = 1;

in the code. Timings are made with the Matlab functions tic and toc.

M-files Used

xpress, xpprint

xpiptest

Purpose

Test of the TOMLAB /Xpress level 1 interface solving three larger integer linear optimization problems calling the XpressMP solver.

Calling Syntax

function xpiptest(Cut, PreSolve, MipPre, NodeSel, BackTrack, xpcontrol)

Description of Input

Input Description
Cut Value of the CUTSTRATEGY control parameter, default Cut = -1. Cut = -1, auto select of Cut = 1 or Cut = 2. C ut = 0, no cuts. Cut = 1, conservative cut strategy. Cut = 2, aggressive cut strategy
PreSolve Value of the PRESOLVE control parameter, default PreSolve = 1. PreSolve = 0, no presolve. PreSolve = 1, do presolve.
MipPre Value of the MIPPRESOLVE control parameter, where the default value is dependent on the matrix characteristics. It determines the type of integer processing to be performed in the Branch and Bound. M ipPre = 0, no processing will be performed. If bit 0 is set, do reduced cost fixing at each node. If bit 1 is set, do logical preprocessing on binary variables at each node. If bit 2 is set, do probing of binary variables is performed at the top node. A value M ipP re = 7 will set all three bits as 1.
NodeSel Value of the NODESELECT control parameter. The default value is dependent on the matrix characteristics. It determines which nodes will be considered for solution once the current node has been solved. NodeSel = 1, choose among the two descendant nodes, if none among all active nodes. N odeSel = 2, all nodes are always considered. N odeSel = 3, depth-first search exploring both descendants first. NodeSel = 4, all nodes are considered for the first BREADTHFIRST nodes, after which the usual default behavior is resumed. Setting xpcontrol.BREADTHFIRST influences the last choice.

Description of Input

BackTrack Value of the BACKTRACK control parameter, default value is 3. Determines how the next node in the tree search is selected for processing. BackTrack = 1, if MIPTARGET is not set, choose the node with the best estimate. Otherwise the node choice is based on the Forrest-Hirst-Tomlin Criterion, which takes into account the best current integer solution and seeks a new node which represents a large potential improvement. BackT rack = 2, always choose the node with the best estimated solution. BackT rack = 3, always choose the node with the best bound on the solution.
xpcontrol The initial xpcontrol structure. Here the user may set additional control parameters, e.g. xpcontrol.BREADTHFIRST. Default empty.

Global Parameters Used

MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Test of three larger integer linear optimization problems calling the XpressM P solver. The test problems have

61 variables and 138 linear inequalities. 32 of the 138 inequalities are just zero rows in the matrix A. The three problems are stored in ilp061.mat, ilp062.mat and ilp063.mat.

Code is included to remove the 32 zero rows, and compute better upper bounds using the positivity of the matrix elements, right hand side and the variables. But this does not influence the timing much, the XpressM P presolve will do all these problem changes.

It might be interesting the follow the progress towards the solution by setting the global log callback. This could be done by removing the comment from the line

%   callback(9) = 1;

in the code.

A call xpiptest(2, 1, 3, 3, 3) probably gives the fastest execution. Timings are made with the Matlab functions tic and toc.

M-files Used

xpress, xpprint

xptomtest1

Purpose

Test of using TOMLAB to call XpressM P for problems defined in the TOMLAB IF format.

Calling Syntax

xptomtest1

Description

Test of using TOMLAB to call XpressM P for problems defined in the TOMLAB IF format. The examples show the solution of LP, QP and MILP problems.

M-files Used

tomRun.

See Also

xpressTL.

xptomtest2

Purpose

Test of using TOMLAB to call XpressM P for problems defined in the TOMLAB TQ format.

Calling Syntax

xptomtest2

Description

Test of using TOMLAB to call XpressM P for problems defined in the TOMLAB TQ format. The routine mipAssign is used to define the problem. A simple problem is solved with XpressM P both as an LP problem and as a MILP problem. The problem is solved both with and without explicitly defining the slack variables.

M-files Used

mipAssign, tomRun and PrintResult.

See Also

xpressTL and xpress.

xpknaps

Purpose

XpressM P Matlab level 1 interface Knapsack test routine

Calling Syntax

xpknaps(P, Run, Cut)

Description of Input

Input Description
P Problem number 1-3. Default 1.
Run If empty or Run = 0, run normal XpressM P global solve. If Run > 0 run simple knapsack heuristic in callback xpcb GL.m Default 0.
Cut Cut strategy. 0 = no cuts, 1 = cuts, 2 = aggressive cuts. Default 0.

Global Parameters Used

Parameter Description
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.
xpControlVariables Structure with all XpressM P control variables.
xpProblemAttrib Structure with all XpressM P problem attributes.

Description

The XpressM P Matlab level 1 interface knapsack test routine runs three different test problems. It is possible to change cut strategy and use heuristics defined in callbacks.

Currently defined knapsack problems:

Problem Name Knapsacks Variables
1 Weingartner 1 2 28 2 Hansen, Plateau 1 4 28 3 PB 4 2 29

M-files Used

xpress

xpknapsTL

Purpose

XpressMP Matlab level 1 interface Knapsack test routine

Calling Syntax

xpknapsTL(P, Run, Cut)

Description of Input

Input Description
P Problem number 1-3. Default 1.
Run If empty or Run = 0, run normal XpressMP global solve. If Run > 0 run simple knapsack heuristic in callback xpcb GL.m Default 0.
Cut Cut strategy. 0 = no cuts, 1 = cuts, 2 = aggressive cuts. Default 0.

Global Parameters Used

MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.
xpControlVariables Structure with all XpressMP control variables.
xpProblemAttrib Structure with all XpressMP problem attributes.

Description

The XpressMP Matlab level 2 interface knapsack test routine runs three different test problems. It is possible to change cut strategy and use heuristics defined in callbacks.

Currently defined knapsack problems:

Problem Name Knapsacks Variables
1 Weingartner 1 2 28
2 Hansen, Plateau 1 4 28
3 PB 4 2 29

M-files Used

''xpress''

xptest1

Purpose

Test routine 1, calls XpressMP Matlab level 1 interface to solve a GAP problem.

Calling Syntax

x = xptest1

Global Parameters Used

xpControlVariables Structure with all XpressMP control variables.
xpProblemAttrib Structure with all XpressMP problem attributes.
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Running a generalized assignment problem (GAP) from Wolsey [2, 9.8.16, pp165]. In this test the linear sos1 constraints are defined explicitly.

Given the matrices A (constraints) and C (costs), xptest1 is using the utility abc2gap to reformulate the problem into the standard form suitable for XpressMP

The number of iterations are increased, no presolve is used, and an aggressive cut strategy.

M-files Used

abc2gap, xpress

xptest2

Purpose

Test routine 2, calls XpressMP Matlab level 1 interface to solve a GAP problem.

Calling Syntax

x = xptest2

Global Parameters Used

xpControlVariables Structure with all XpressMP control variables.
xpProblemAttrib Structure with all XpressMP problem attributes.
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Running a generalized assignment problem (GAP) from Wolsey [2, 9.8.16, pp165]. In this test sos1 variables are used.

Given the matrices A (constraints) and C (costs), xptest2 is using the utility abc2gap to reformulate the problem into the standard form suitable for XpressMP

The number of iterations are increased, no presolve is used, and an aggressive cut strategy is applied.

M-files Used

abc2gap, xpress

See Also

xptest3

xptest3

Purpose

Test routine 3, calls XpressMP Matlab level 1 interface to solve a GAP problem.

Calling Syntax

x = xptest3

Global Parameters Used

Parameter Description
xpControlVariables Structure with all XpressMP control variables.
xpProblemAttrib Structure with all XpressMP problem attributes.
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Running a generalized assignment problem (GAP) from Wolsey [2, 9.6, pp159]. In this test the linear sos1 constraints are defined explicitly.

Given the matrices A (constraints) and C (costs), xptest1 is using the utility abc2gap to reformulate the problem into the standard form suitable for XpressMP

The number of iterations are increased, no presolve is used, and no cut strategy is used.

M-files Used

abc2gap, xpress

See Also

xptest2

xptestqp1

Purpose

Simple test of calling XpressMP Matlab level 1 interface to solve a QP problem.

Calling Syntax

x = xptestqp1(MIP)

Description of Input

Input Description
MIP If MIP = 1, run as a MIQP problem, trying to make the first variable integer valued, otherwise run as a pure QP problem. Default MIP = 0.

Global Parameters Used

xpControlVariables Structure with all XpressMP control variables.
xpProblemAttrib Structure with all XpressMP problem attributes.
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Simple test of calling XpressMP Matlab level 1 interface to solve a QP or MIQP problem. The problem is the first test problem in the TOMLAB qpp rob.m file.

M-files Used

xpress

xptestqp2

Purpose

Simple test of MIQP problem running XpressMP. Simple test of calling XpressMP Matlab level 1 interface to solve a QP problem.

Calling Syntax

x = xptestqp2(MIP)

Description of Input

Input Description
MIP If M I P = 1 (default), run as a MIQP problem, trying to make the first variable integer valued, otherwise run as a pure QP problem.

Global Parameters Used

Parameter Description
xpControlVariables Structure with all XpressM P control variables.
xpProblemAttrib Structure with all XpressM P problem attributes.
MAX_x Maximal number of x elements printed in output statements. Default 20.
MAX_c Maximal number of constraint elements printed in output statements. Default 20.

Description

Simple test of MIQP problem running XpressM P. The MIQP problem is from the Xpress-Optimizer Reference

Manual [1], page 166. The problem is defined as

M-files Used

xpress