Skip to content

Instantly share code, notes, and snippets.

@bor0
Created September 26, 2022 16:18
Show Gist options
  • Save bor0/a6593b0ca5ae16e33da66e5f6fd0f793 to your computer and use it in GitHub Desktop.
Save bor0/a6593b0ca5ae16e33da66e5f6fd0f793 to your computer and use it in GitHub Desktop.
#! /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