Solving Linear Optimization Problems 311
x3 0
x4 0
x5 0
21.5.2 Implementation with GLPK glpsol
The GNU Linear Programming Kit (GLPK) is a powerful, proven tool for solv-
ing linear optimization problems with multiple constraints. GNU MathProg (GMPL
GNU Mathematical Programming Language) is a high-level language for formulat-
ing and solving mathematical programming models. MathProg is specific to GLPK,
but resembles a subset of AMPL and the glpsol program is the command line
solver.
The following simple linear optimization problem, which was discussed previ-
ously as Example 1, is formulated as follows:
Minimize: 4x
1
+ 8x
2
+ 3x
3
Subject to the following constraints:
2x
1
+ 5x
2
+ 3x
3
≥ 185
3x
1
+ 2.5x
2
+ 8x
3
≥ 155
8x
1
+ 10x
2
+ 4x
3
≥ 600
x
1
≥ 0
x
2
≥ 0
x
3
≥ 0
To solve this problem ...