Skip to content

Instantly share code, notes, and snippets.

@carlosgeos
Last active August 21, 2018 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosgeos/9370b5109a596224ecfbdba615f3f8b1 to your computer and use it in GitHub Desktop.
Save carlosgeos/9370b5109a596224ecfbdba615f3f8b1 to your computer and use it in GitHub Desktop.
linear-problem.mod
\ Simple Linear programming problem
\ run with
\ $ glpsol --lp linear-problem.mod -o solution.sol
\ and check result in the solution file
Maximize
obj: 4x1 + 6x2
Subject To
first: -x1 + x2 <= 11
second: x1 + x2 <= 27
third: 2x1 + 5x2 <= 90
Bounds
0 <= x1 <= + inf
0 <= x2 <= + inf
Integer
x1 x2
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment