Skip to Main Content
Introduction to Computational Modeling Using C and Open-Source Tools
book

Introduction to Computational Modeling Using C and Open-Source Tools

by Jose M. Garrido
November 2013
Intermediate to advanced content levelIntermediate to advanced
461 pages
12h 1m
English
CRC Press
Content preview from Introduction to Computational Modeling Using C and Open-Source Tools
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Fundamentals and Programming in C (RMK)

Computer Fundamentals and Programming in C (RMK)

Anita Goel, Ajay Mittal

Publisher Resources

ISBN: 9781482216783