Xpress Test Routines in Non-Tomlab Format: Difference between revisions

From TomWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
A set of test routines have been defined illustrating  the use of the ''xpress ''main routine.  The test routines and utilities are shown in Table 3.
{{Part Of Manual|title=the Xpress Manual|link=[[Xpress|Xpress Manual]]}}
A set of test routines have been defined illustrating  the use of the ''xpress ''main routine.  The test routines and utilities are shown in <xr id="tab:testRoutines" />.


It is easy to call the test routines, e.g.
It is easy to call the test routines, e.g.
Line 15: Line 16:
</pre>
</pre>


The knapsack test routine runs three test examples. It is possible to change the cut strategy (third input parameter) and whether to use the knapsack heuristic in the callback routine ''xpcb gl ''(second input parameter). To run the second test example, using the simple knapsack heuristic, and aggressive cuts, the call is
The knapsack test routine runs three test examples. It is possible to change the cut strategy (third input parameter) and whether to use the knapsack heuristic in the callback routine ''xpcb_gl ''(second input parameter). To run the second test example, using the simple knapsack heuristic, and aggressive cuts, the call is


<pre>
<pre>
Line 33: Line 34:
</pre>
</pre>


<figtable id="tab:testRoutines">
{|class="wikitable"
{|class="wikitable"
!Function||Description
!Function||Description
|+<caption>The test routines and utilities.</caption>
|+<caption>The test routines and utilities.</caption>
|-valign="top"
|-valign="top"
|''abc2gap''||Utility to convert a Generalized Assignment Problem (GAP) to stan- dard form for Xpress''M P  ''.
|[[Xpress Appendix B#abc2gap|abc2gap]]||Utility to convert a Generalized Assignment Problem (GAP) to standard form for Xpress<sup>''MP''</sup>.
|-valign="top"
|-valign="top"
|''xpbiptest''||Test of three large binary integer linear problems.
|[[Xpress Appendix C#xpbiptest|xpbiptest]]||Test of three large binary integer linear problems.
|-valign="top"
|-valign="top"
|''xpiptest''||Test of three large integer linear problems.
|[[Xpress Appendix C#xpiptest|xpiptest]]||Test of three large integer linear problems.
|-valign="top"
|-valign="top"
|''xpknaps''||Test of knapsack problems.
|[[Xpress Appendix C#xpknaps|xpknaps]]||Test of knapsack problems.
|-valign="top"
|-valign="top"
|''xptest1''||Test of a Generalized Assignment Problem (GAP).
|[[Xpress Appendix C#xptest1|xptest1]]||Test of a Generalized Assignment Problem (GAP).
|-valign="top"
|-valign="top"
|''xptest2''||Test of the same GAP problem as ''xptest1'', but using sos1 variables.
|[[Xpress Appendix C#xptest2|xptest2]]||Test of the same GAP problem as ''xptest1'', but using sos1 variables.
|-valign="top"
|-valign="top"
|''xptest3''||Test of a Generalized Assignment Problem (GAP).
|[[Xpress Appendix C#xptest3|xptest3]]||Test of a Generalized Assignment Problem (GAP).
|}
|}
</figtable>

Revision as of 03:47, 29 September 2011

Notice.png

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

A set of test routines have been defined illustrating the use of the xpress main routine. The test routines and utilities are shown in <xr id="tab:testRoutines" />.

It is easy to call the test routines, e.g.

x = xptest1; 
x = xptest2; 
x = xptest3;

will call the three routines solving GAP problems. The xpaircrew test problem has no input parameters, just call:

xpaircrew;

The knapsack test routine runs three test examples. It is possible to change the cut strategy (third input parameter) and whether to use the knapsack heuristic in the callback routine xpcb_gl (second input parameter). To run the second test example, using the simple knapsack heuristic, and aggressive cuts, the call is

xpknaps(2,1,2);

The first parameter selects the test problem. Calling without any parameters

xpknaps

is the same as the call

xpknaps(1,0,0);

<figtable id="tab:testRoutines">

Function Description
The test routines and utilities.
abc2gap Utility to convert a Generalized Assignment Problem (GAP) to standard form for XpressMP.
xpbiptest Test of three large binary integer linear problems.
xpiptest Test of three large integer linear problems.
xpknaps Test of knapsack problems.
xptest1 Test of a Generalized Assignment Problem (GAP).
xptest2 Test of the same GAP problem as xptest1, but using sos1 variables.
xptest3 Test of a Generalized Assignment Problem (GAP).

</figtable>