Download LINDO API USER MANUAL

Transcript
SOLVING LINEAR PROGRAMS 359
columns. In each iteration or pass, the solver selects the most attractive nNoOfColsSelectedPerSet
columns from each set.
To solve the LP model in the MPS file using Sprint solver, one can use either the command line in
runlindo or the Lindo API routine LSsolveFileLP(). The following demonstrates this using a small
instance of a transportation problem.
Solving Linear Programs using the –fileLP option in Runlindo
The following MPS file, transprt.mps, contains a model of transportation problem with 2 resources and
4 destinations.
NAME
ROWS
N
COST
L
1
L
2
E
3
E
4
E
5
E
6
COLUMNS
X0000001
X0000001
X0000002
X0000002
X0000003
X0000003
X0000004
X0000004
X0000005
X0000005
X0000006
X0000006
X0000007
X0000007
X0000008
X0000008
RHS
RHSN
RHSN
RHSN
RHSN
RHSN
RHSN
ENDATA
TRANSPORT
Sources,Destns=
COST
1
COST
1
COST
1
COST
1
COST
2
COST
2
COST
2
COST
2
595
1
670
1
658
1
519
1
822
1
309
1
897
1
803
1
3
4
5
6
1
2
407
980
823
653
1446.
1446.
To solve this model in runlindo using the Sprint solver, one might type
2
4
3
1
4
1
5
1
6
1
3
1
4
1
5
1
6
1