To practise with real-life LP-models some software has been made available in many different ways, some of it has been installed on the LBS-aio computer network. In genral the re are many software packages available that can handle optimization problems in genral, and linear and integr programming problems in particular. Software is available for mainframes, PC's and workstation. Examples are OSL, CPLEX, LINDO, MPSX, PC-Prog, SIMPLEX. Furthermore there are packages that not only solve LP-problems, but have additonal possibilities for a structured and user-friendly way of setting up models and dealing with (several) instances. Such packages are called 'modelling languages'. Examples are AIMMS, AMPL, GAMS. Because of the diversity in LP-packages it is impossible to give a completely general description of how to work with these poackages and we have to refer to the respective manuals. In particular the way to handle the important sensitivity analysis differs from system to system. There are more or less two rather general ways to INPUT a linear programming model. These are the so-called LP-format and the MPS-format. They will be described below.
Student version of SIMPLEX and of PC-PROG have been installed on the LBS-aio computer network. However they lack good documentation, and are not so easy to use. Moreover they cannot handle real-life size LP-problems. Another PC-product available on campus is LINDO. The student version is downloadable from the EUT application server. This LINDO Solver Suite contains the LINDO LP/ILP-solver, as well as a modelling language LINGO, and a spreadsheet interface What's Best. It is well documented with a lot of examples and help-files.
Finally one may use the package CPLEX. This is state-of-the-art LP-software for which the size of problems to work with is merely limited by the computer capacity. A drawback is that the avaiblable version is licensed only on workstations in the Department of Mathematics and Computing Science. There exist PC-versions of CPLEX of course. In order to work with the CPLEX software in the Mathematics Department one may send email to 2s720@win.tue.nl. This is a program that interprets the body of the email message as input to CPLEX. The LP-model is processed and the solution is sent back to the sender. A disadvantage is that the sender has no real control over the solution process. An LP-problem that is not perfectly stated may yield a meaningless email reply by our program. This construction is only intended for on-campus use, and for educational purposes only.
The email message for 2s720@win.tue.nl should only contain an LP-model, written in the LP-format required by CPLEX, in its BODY. NO attachments are to be used. It is wise to add a comment in the email's subject-line so as to recognize the response by 2s720@win.tue.nl. Some email programmes - like the one under GroupWise - can not handle message with large texts in the body (up to 32 KiloBytes). Select a more flexible mail program if this problem occurs.
Below the MPS-format is described with comment between brackets. The MPS file consists of several SECTIONS, which, if present, appears in the following order.
Format: column 1-4 NAME
15-22 problemname
Format:
first line: column 1 - 4 ROWS
other lines: column 1 space
2 of 3 N (neutral, no restriction)
G (restriction >=, greater than or equal to)
L (restriction <=, smaller than or equal to)
E (restriction =, equal to)
4 space
5 - 12 name of row
Format:
first line: column 1 - 7 COLUMNS
other lines: column 1 - 4 spaces
5 - 12 column name
15 - 22 row name
25 - 36 value matrix coefficient
40 - 47 row name (refers to same variable)
50 - 61 value matrix coefficient (refers to same variable)
Format:
first line: column 1 - 3 RHS
other lines: column 1 - 4 spaces
5 - 12 name right hand side
15 - 22 row name
25 - 36 value right hand side
40 - 47 row name
50 - 61 value right hand side
Format:
first line: column 1 - 6 RANGES
other lines: column 1 - 4 spaces
5 - 12 name range
15 - 22 row name (not objective!)
25 - 36 value range
40 - 47 row name (not objective!)
50 - 61 value range
Format:
first line: column 1 - 6 BOUNDS
other lines: column 1 space
2 - 3 LO (lower bound)
UP (upper bound)
FX (fixed value)
4 space
5 - 12 name of bound
15 - 22 column name
25 - 36 value of bound
Format: column 1 - 6 ENDATAOften it is a problem to type in a problem in MPS format without errors. To this purpose one often uses matrixgenerators. Some speadsheets and modelling languages contain such matrix generators. INTEGRALITY of certain variables is indicated by the use of so-called MARKERS (see example below), or by the use of alternative bound-types like UI for Upper bound on Integer.
!"#$^&*()/,.;?@_`'{}|~
Longer names will be truncated after 16 characters. The name of a variables
cannot start with a decimal point . or a digit (0-9). Nor should the variable
name start with e or E, followed by + or - sign or a digit as such combination
is considered a numerical value in scientific notation (1e-6 = 0.000001). Do not use names as E8,
E-23, e4cats.<,<=,=<for 'smaller than or equal to';
>,>= =>for 'greater than or equal to'; en
=for 'equal to'.
L_i <= X_i <= U_iwith the follwoing exceptions.
L_i <= X_i or X_i <= U_iwhere a default lower bound is 0, and a default upper bound is + infinity.
\Problem name: example.lp Minimize obj: 400 x1 + 500 x2 + 300 x3 + 150 x4 + 20 y11 + 48 y21 + 26 y31 + 24 y41 + 40 y12 + 15 y22 + 35 y32 + 50 y42 + 50 y13 + 26 y23 + 18 y33 + 35 y43 Subject To c1: y11 + y21 + y31 + y41 = 80 c2: y12 + y22 + y32 + y42 = 70 c3: y13 + y23 + y33 + y43 = 40 c4: - 100 x1 + y11 + y12 + y13 <= 0 c5: - 100 x2 + y21 + y22 + y23 <= 0 c6: - 100 x3 + y31 + y32 + y33 <= 0 c7: - 100 x4 + y41 + y42 + y43 <= 0 Bounds 0 <= y11 0 <= y21 0 <= y31 0 <= y41 0 <= y12 0 <= y22 0 <= y32 0 <= y42 0 <= y13 0 <= y23 0 <= y33 0 <= y43 0 <= x1 <= 1 0 <= x2 <= 1 0 <= x3 <= 1 0 <= x4 <= 1 Integer x1 x2 x3 x4 EndExample of a file in MPS-format, same problem
NAME example
MINIMIZE
ROWS
N obj
E c1
E c2
E c3
L c4
L c5
L c6
L c7
COLUMNS
MARK0000 'MARKER' 'INTORG'
x1 obj 400 c4 -100
x2 obj 500 c5 -100
x3 obj 300 c6 -100
x4 obj 150 c7 -100
MARK0001 'MARKER' 'INTEND'
y11 obj 20 c1 1
y11 c4 1
y21 obj 48 c1 1
y21 c5 1
y31 obj 26 c1 1
y31 c6 1
y41 obj 24 c1 1
y41 c7 1
y12 obj 40 c2 1
y12 c4 1
y22 obj 15 c2 1
y22 c5 1
y32 obj 35 c2 1
y32 c6 1
y42 obj 50 c2 1
y42 c7 1
y13 obj 50 c3 1
y13 c4 1
y23 obj 26 c3 1
y23 c5 1
y33 obj 18 c3 1
y33 c6 1
y43 obj 35 c3 1
y43 c7 1
RHS
rhs c1 80 c2 70
rhs c3 40
BOUNDS
UP bnd x1 1
UP bnd x2 1
UP bnd x3 1
UP bnd x4 1
ENDATA