377
OR Software
where all the words appearing in boldface are reserved words. The $ sign at the end of the obj_fn line shows that this is not a cons...
where all the words appearing in boldface are reserved words. The $ sign at the end of the obj_fn line shows that this is not a constraint; the inequalities can appear as equalities, and you can of course attribute more explicit names than X and Y to the variables ! Several objective functions may be entered. The input possibilities are much more varied than this first example shows. It is possible to use variables which will indicate the numbers of rows, or of constraints. You can also insert in your model definition a data table read from any ASCII file (coming from a database or spreadsheet package). Since it is possible to use variables as arguments and matrix formulas in the problem statement, the user can for example, beginning a model definition in the following manner : model Sample complex model let orig=35 ! j is the number of origins let dest=40 ! i is the number of destinations variables ! Begins the variables section Avail(orig) ! Quantities which are available x(orig,dest) ! Quantities to be transported constraints ! Begins the constraints section Supply(i=l:cons): sum(j=l:dest) x(id) < Avail(i)
Remarks : the comments begin with the exclamation mark; the reserved words are in boldface.
Modelfile
~ Ii LP- DEL~ Binaryfiles x ~ Basisfiles ~ Rangefile
Matrixfile LP-OPTI IP-OPT~
The constraint defined above represents, in the input format of LP-MODEL, the following availability constraint : dest
xij < Availi for i=l..orig j=l
File management with LP-MODEL During a work session, LP-MODEL automatically updates a listing file, which echoes everything that appears on the screen; the resulting file is an ASCII file and may therefore be later edited at will. When a model is completely defined, it may be saved as two binary files or as an RMPS (restricted MPS format) matrix file. Although I did not represent it in the following graph, which is complex enough, the user may of course use a text editor or a spreadsheet program to read/write or edit the RMPS file.
Conclusion LP-MODEL is very powerful : in these two pages, it was impossible to describe all of its possibilities. It is so efficient that any user of an MPS-compatible package may well want to use it for managing the input of his problems. My only regret is that its userfriendliness still leaves somewhat to be desired.