Compilation and program execution
If you have followed the standard installation procedure of Xpress Optimizer, you may compile this file with the following command under Windows:
cl /MD /I%XPRESSDIR%\include %XPRESSDIR%\lib\xprs.lib folioinput.c
For Linux or Solaris use
cc -D_REENTRANT -I${XPRESSDIR}/include -L${XPRESSDIR}/lib folioinput.c -o folioinput -lxprs
For other systems please refer to the example makefile provided with the corresponding distribution.
If we run this program with the matrix Folio.mat produced by BCL for the LP example problem of Chapter 2, then we obtain an output file Folio.prt with the following contents:
Problem Statistics Matrix FolioLP Objective *OBJ* RHS *RHS* Problem has 4 rows and 10 structural columns Solution Statistics Maximization performed Optimal solution found after 5 iterations Objective function value is 14.066659 Rows Section Number Row At Value Slack Value Dual Value RHS N 1 *OBJ* BS 14.066659 -14.066659 .000000 .000000 E 2 Cap EQ 1.000000 .000000 8.000000 1.000000 G 3 NA LL .500000 .000000 -5.000000 .500000 L 4 Risk UL .333333 .000000 23.000000 .333333 Columns Section Number Column At Value Input Cost Reduced Cost C 5 frac UL .300000 5.000000 2.000000 C 6 frac_1 LL .000000 17.000000 -9.000000 C 7 frac_2 BS .200000 26.000000 .000000 C 8 frac_3 LL .000000 12.000000 -14.000000 C 9 frac_4 BS .066667 8.000000 .000000 C 10 frac_5 UL .300000 9.000000 1.000000 C 11 frac_6 LL .000000 7.000000 -1.000000 C 12 frac_7 LL .000000 6.000000 -2.000000 C 13 frac_8 BS .133333 31.000000 .000000 C 14 frac_9 LL .000000 21.000000 -10.000000
The upper half contains some statistics concerning the problem size and the solution algorithm: the optimal LP solution found has a value of 14.066659. The Rows Section gives detailed solution information for the constraints in the problem. The solution values for the decision variables are located in the column labeled Value of the Columns Section.