Created
September 26, 2022 16:18
-
-
Save bor0/a6593b0ca5ae16e33da66e5f6fd0f793 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/glpsol -m | |
# https://www.youtube.com/watch?v=VHPnuWGprKc | |
var x1 >= 0; | |
var x2 >= 0; | |
maximize obj: x1 + 2 * x2; | |
c1 : -3 * x1 + x2 <= 2; | |
c2 : x2 <= 11; | |
c3 : x1 - x2 <= 3; | |
c4 : x1 <= 6; | |
solve; | |
display x1; | |
display x2; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment