IBM Optimization Solutions and Library QP Solutions User Guide
ã
IBM Corp. 1995, 1998. All rights reserved.
Purpose: To solve Quadratic Programming problems using the simplex method
Usage: oslqslv [?] [-keyword=value] [...] [@keyword_file]
keyword_file: Name of file containing "-keyword=value" strings.
(Each "-keyword=value" string in this file must be on a separate line.)
Valid Keywords and Default Values:
maxmin = min|max - default: min
input = input_mps_file - default: standard input
output = listing_file - default: standard output
dspace = value - default: 400000
isolmask = value - default: 0
iprtinfomask = value - default: 31
scale = yes|no - default: yes
imaxiter = value - default: 9999999
osli_n_ = value - default: a function of n
oslr_n_ = value - default: a function of n
oslc_n_ = value - default: a function of n
See the library User's Guide
for more information on Control variables.
Explanation of Keywords:
maxmin : Solve as a maximization or minimization problem.
input : Name of file containing input data - MPS format.
output : Name of file to receive messages.
dspace : Size in double words of the work area.
isolmask : Matrix bit mask for EKKPRTS print function.
= 1 : selects the rows
= 2 : selects the columns
= 4 : selects the nonzero elements of the model
= 8 : selects the infeasible elements of the model
= 15 or 0 or 16 : selects the entire matrix
Iprtinfomask : Solution information bit mask for EKKPRTS print function.
= 1 : selects the statistics
= 2 : selects iteration count, value of the objective function
and the problem status
= 4 : selects the names of the columns and rows
= 8 : selects the status of each variable
= 16 : selects the row and column solution values
= 32 : selects the dual values and reduced costs
= 64 : selects the lower bounds
= 128 : selects the upper bounds
= 256 : selects the input costs
= 512 : selects the matrix elements
= 0 : selects the first six options (i.e., same as 63).
scale : Use EKKSCAL function to scale the coefficient matrix.
imaxiter : The maximum number of iterations that will be performed.
osli_n_ : Integer Control variable n; 0 < n < 62
oslr_n_ : Real Control variable n; 0 < n < 46
oslc_n_ : Character Control variable n; 0 < n < 11
Example 1
oslqslv ?
This command results in the display of valid keywords, their meanings along with the default values.
Example 2
oslqslv -imaxiter=20000 < test1.mps > test1.out
The oslqslv program is started using test1.mps as input data. Output is directed to the file test1.out. The program will stop after 20000 iterations.
Example 3
If the file key_file.001 contains the following 4 lines:
- maxmin=max
- imaxiter=20000
- isolmask=7
- osli_36_=132
then the command:
oslqslv -dspace=1000000 @key_file.001 < test1.mps > test1.out
will start oslqslv with a work area of 1 million double words. The problem is solved as a maximization problem. The program will stop after 20000 iterations. The ekkprts() print function will select only non-zero columns and rows. The maximum number of characters on each line of output is 132.
Example 4
The command:
oslqslv -dspace=1000000 @key_file.001 -input=test1.mps -output=test1.out
is equivalent to:
oslqslv -dspace=1000000 @key_file.001 < test1.mps > test1.out
Example 5
The quadratic part of the objective function of the following problem:
Minimize
x1 + 2.4*x2 - x3 + 1.1*x4
+ (x1*x1 + 2*x2*x2 + 1.5*x3*x3 + x4*x4 + x1*x2 -2*x2*x3)
Subject to:
3*x1 + x2 - 2*x4 >= 2.5
x2 + x3 + 4*x4 = 4.0
0 <= x1 <= 3; x2 <= 2; x3 >= 0; x4 >= 0;
can be written as (1/2) x Qx where Q is:
.- -.
| 2 1 0 0 |
| 1 4 -2 0 |
| 0 -2 3 0 |
| 0 0 0 2 |
.- -.
The MPS file for this problem is shown below. This example is from the book
"Optimization with IBM OSL" by M.S. Hung, W.O. Rom, and A.D. Waren, Boyd and
Fraser Publishing Co., 1994 (ISBN 0-89426-244-0). Please note, however, that
the optimal solution shown in the output listing on page 310 of this book is
incorrect. The output listing shown on pages 309-310 correspond to a different
problem.
MPS file for QP1
NAME QP1
ROWS
N OBJ
G ROW1
E ROW2
COLUMNS
X1 OBJ 1.0D0 ROW1 3.0D0
X2 OBJ 2.4D0 ROW1 1.0D0
X2 ROW2 1.D0
X3 OBJ -1.D0 ROW2 1.D0
X4 OBJ 1.1 D0 ROW1 -2.D0
X4 ROW2 4.D0
RHS
BVEC ROW1 2.5D0 ROW2 4.D0
BOUNDS
UP BNDU X1 3.D0
UP BNDU X2 2.D0
LO BNDU X2 -1.D31
ENDATA
NAME QP1
QSECTION
X1 X1 2.D0 X2 1.D0
X2 X1 1.D0 X2 4.D0
X2 X3 -2.D0
X3 X2 -2.D0 X3 3.D0
X4 X4 2.D0
ENDATA
oslqslv USAGE NOTES
If oslqslv is having difficulty with a problem, then
you should increase the size of work area, using the "dspace" keyword,
and try solving the problem again.
oslqslv uses the library I/O function ekkmps() to read the linear part
of the problem and ekkqmps() to read the quadratic part. The same input file
is used for both ekkmps() and ekkqmps() so the records for the quadratic
data must follow the ENDATA record for the linear components. The Q matrix
appears after a QSECTION indicator record, which must be preceded by a NAME
indicator record. The format for the Q matrix is similar to that for the
usual MPS COLUMNS section. The Q matrix data records must also be followed
by an ENDATA record.