LINDO: Linear, Quadratic, and Integer Programming SoftwareLINDO 5.3 (Linear, Interactive, Discrete Optimizer) is an interactive linear, quadratic, and integer programming system useful to a wide range of users. LINDO can be used
The LINDO User's Manual contains complete descriptions of all LINDO commands and many examples. The User Services Reference Library (in the RDMS Lab, 002C Smith Hall) has a noncirculating copy of the LINDO User's Manual.
How to Run LINDOTo start an interactive session, type
lindoWhen the program is ready for you to type a LINDO command, it displays its prompt character ":". Commands may be typed in upper or lower case. The only exception is when you type a file name since UNIX filenames are casesensitive. To obtain interactive help, type
helpTo terminate LINDO, type
quitLINDO displays all of its output without stopping. If you want LINDO to pause after every 24 lines of output, type
page 24 Accessing UNIX Disk FilesMany LINDO commands, such as take, save, retr, dvrt, and rvrt, read from or write information to UNIX disk files. The general form of these commands is
LINDOcommandname filenameWhen you omit the filename, LINDO prompts you with the message
FILE NAME=The filename you type must match the name of the file exactly. Case is important, therefore you may not refer to a file named transport.model as TRANSPORT.MODEL. The filename cannot use nameexpansion such as ~smith/LPmodels/prob1, since "~smith" will be rejected. However, if user "smith" were in his home directory, he could refer to that file as LPmodels/prob1.
Typical commands:
Sample Interactive SessionsThe following three examples illustrate how to
Example 1: Solve an LP problem.% lindo LINDO 5.3 (June 1993) LINDO Systems, Chicago, IL University of Delaware Single Site License Licence LDW12  531000 : max 2x + 3y ?st ? 4x + 3y < 10 ? 3x + 5y < 12 ?end : go LP OPTIMUM FOUND AT STEP 2 OBJECTIVE FUNCTION VALUE 1) 7.454545 VARIABLE VALUE REDUCED COST X 1.272727 0.000000 Y 1.636364 0.000000 ROW SLACK OR SURPLUS DUAL PRICES 2) 0.000000 0.090909 3) 0.000000 0.545455 NO. ITERATIONS= 2 DO RANGE(SENSITIVITY) ANALYSIS? ?yes RANGES IN WHICH THE BASIS IS UNCHANGED: OBJ COEFFICIENT RANGES VARIABLE CURRENT ALLOWABLE ALLOWABLE COEF INCREASE DECREASE X 2.000000 2.000000 0.200000 Y 3.000000 0.333333 1.500000 RIGHTHAND SIDE RANGES ROW CURRENT ALLOWABLE ALLOWABLE RHS INCREASE DECREASE 2 10.000000 6.000000 2.800000 3 12.000000 4.666667 4.500000 : save linearprob < Save the formulation in "linearprob" : quit Example 2: Retrieve the previous formulation, modify it, and resolve the problem.% lindo LINDO 5.3 (June 1993) LINDO Systems, Chicago, IL University of Delaware Single Site License Licence LDW12  531000 : retr linearprob <Retrieve the earlier problem statement : look ROW: all <Look at the entire problem ("all" rows) MAX 2 X + 3 Y SUBJECT TO 2) 4 X + 3 Y <= 10 3) 3 X + 5 Y <= 12 END : alter <Modify the current formulation ROW: 2 VAR: rhs <by changing the first constraint's RHS NEW COEFFICIENT: ?20 : alter ROW: 3 VAR: y <and the second constraint's ycoeff. NEW COEFFICIENT: ?10 : look all MAX 2 X + 3 Y SUBJECT TO 2) 4 X + 3 Y <= 20 3) 3 X + 10 Y <= 12 END : go LP OPTIMUM FOUND AT STEP 1 OBJECTIVE FUNCTION VALUE 1) 8.000000 VARIABLE VALUE REDUCED COST X 4.000000 0.000000 Y 0.000000 3.666667 ROW SLACK OR SURPLUS DUAL PRICES 2) 4.000000 0.000000 3) 0.000000 0.666667 NO. ITERATIONS= 1 DO RANGE(SENSITIVITY) ANALYSIS? ?no : quit Example 3: State and solve an integer programming problem where each of the three variables may only have the values 0 or 1.% lindo LINDO 5.3 (June 1993) LINDO Systems, Chicago, IL University of Delaware Single Site License Licence LDW12  531000 : max 4x + 3y + 2z ?st ?2.5x + 3.1y < 5 ? .2x + .7y + .4z < 1 ?end : integer x < Define x, y, z to be 0/1 variables : integer y : integer z : go LP OPTIMUM FOUND AT STEP 3 OBJECTIVE VALUE = 7.71428585 FIX ALL VARS.( 1) WITH RC > 3.00000 NEW INTEGER SOLUTION OF 6.00000000 AT BRANCH 0 PIVOT 10 BOUND ON OPTIMUM: 6.000000 ENUMERATION COMPLETE. BRANCHES= 0 PIVOTS= 10 LAST INTEGER SOLUTION IS THE BEST FOUND REINSTALLING BEST SOLUTION... : solu < Inspect the final solution OBJECTIVE FUNCTION VALUE 1) 6.000000 VARIABLE VALUE REDUCED COST X 1.000000 4.000000 Y 0.000000 3.000000 Z 1.000000 2.000000 ROW SLACK OR SURPLUS DUAL PRICES 2) 2.500000 0.000000 3) 0.400000 0.000000 NO. ITERATIONS= 10 BRANCHES= 0 DETERM.= 1.000E 0 : quit %
Last modified: February 3, 2002
