Difference between revisions of "ApCoCoA-1:GLPK.LPSolve"
|Line 49:||Line 49:|
Revision as of 14:11, 12 November 2008
solve linear programms
GLPK.LPSolv(Polynome:LIST, TrennInt:LIST, Bounds:LIST, Methode:STRING, MinMax:STRING)
The basic idea behind this package is to make the linear optimization program GLPK usable in/with ApCoCoA.
The package GLPK contains various functions that let you make use of the GLPK library, rather the stand-alone LP/MIP Solver glpsol.
<em>Linear programming example 1996 MBA exam</em> A cargo plane has three compartments for storing cargo: front, centre and rear. These compartments have the following limits on both weight and space: Compartment Weight capacity (tonnes) Space capacity (cubic metres) Front 10 6800 Centre 16 8700 Rear 8 5300 Furthermore, the weight of the cargo in the respective compartments must be the same proportion of that compartment's weight capacity to maintain the balance of the plane. The following four cargoes are available for shipment on the next flight: Cargo Weight (tonnes) Volume (cubic metres/tonne) Profit (£/tonne) C1 18 480 310 C2 15 650 380 C3 23 580 350 C4 12 390 285 Any proportion of these cargoes can be accepted. The objective is to determine how much (if any) of each cargo C1, C2, C3 and C4 should be accepted and how to distribute each among the compartments so that the total profit for the flight is maximised.
To solve this problem we had to compose a linear program.