Initializing help system before first use

Compilation and program execution

If you have followed the standard installation procedure of Xpress Optimizer and Java, you can compile this file with the following command under Windows:

javac -cp C:\xpressmp\lib\xprs.jar Folio.java 

On other platforms use:

javac -cp /xpressmp/lib/xprs.jar Folio.java

After you create the class files for the application, you can run it. You must tell the Java runtime environment where to find the Xpress Solver classes and the Solver libraries.This is done by the -cp and -Djava.library.path options, respectively. On Windows:

java -cp C:\xpressmp\lib\xprs.jar;. -Djava.library.path=C:\xpressmp\bin Folio.java

On other platforms use:

java -cp /xpressmp/lib/xprs.jar:. -Djava.library.path=/xpressmp/lib Folio.java

Running the resulting program generates the following output:

Heap usage: 131KB (peak 131KB, 87KB system)
Maximizing LP  using up to 20 threads and up to 31GB memory, with default controls
Original problem has:
         3 rows           10 cols           19 elements
Presolved problem has:
         3 rows           10 cols           19 elements
Presolve finished in 0 seconds
Heap usage: 132KB (peak 149KB, 87KB system)

Coefficient range                    original                 solved
  Coefficients   [min,max] : [ 1.00e+00,  1.00e+00] / [ 1.00e+00,  1.00e+00]
  RHS and bounds [min,max] : [ 3.00e-01,  1.00e+00] / [ 3.00e-01,  1.00e+00]
  Objective      [min,max] : [ 5.00e+00,  3.10e+01] / [ 5.00e+00,  3.10e+01]
Autoscaling applied standard scaling


   Its         Obj Value      S   Ninf  Nneg   Sum Dual Inf  Time
     0         42.600000      D      2     0        .000000     0
     5         14.066667      D      0     0        .000000     0
Uncrunching matrix
Optimal solution found
Dual solved problem
  5 simplex iterations in 0.00 seconds at time 0

Final objective                       : 1.406666666666666e+01
  Max primal violation      (abs/rel) :       0.0 /       0.0
  Max dual violation        (abs/rel) :       0.0 /       0.0
  Max complementarity viol. (abs/rel) :       0.0 /       0.0
Problem status:
        Solve status: Completed
        Sol status: Optimal
Total return: 14.066666666666665
frac_0 : 30.00%
frac_1 : 0.00%
frac_2 : 20.00%
frac_3 : 0.00%
frac_4 : 6.67%
frac_5 : 30.00%
frac_6 : 0.00%
frac_7 : 0.00%
frac_8 : 13.33%
frac_9 : 0.00%

The upper half of this display is the log of Xpress Optimizer: the size of the matrix, 3 rows (i.e. constraints) and 10 columns (i.e. decision variables), and the log of the LP solution algorithm (in this case, `D' for dual Simplex). The lower half is the output produced by our program: the maximum return of 14.067 is obtained with a portfolio consisting of shares 0, 2, 4, 5, and 8. 30% of the total amount are spent in shares 0 and 5 each, 20% in 2, 13.33% in 8 and 6.67% in 4. It is easily verified that all constraints are indeed satisfied: we have 50% of North American shares (0 and 2) and 33.33% of high-risk shares (2 and 8).

It is possible to modify the amount of output that is printed by adding the following line before the start of the optimization:

prob.controls().setOutputLog(0);

This setting disables all output (including warnings) from Xpress Optimizer, with the exception of error messages. The possible values for the printing level range from 0 to 4.


© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.