Skip to content

Instantly share code, notes, and snippets.

@mkeeter
Created Dec 14, 2019
Embed
What would you like to do?
Maximize out: fuel_out
Subject to
KHKGT: - 5 eqn2 + 8 eqn8 >= 0
NZVS: + 5 eqn0 - 29 eqn2 - 7 eqn8 >= 0
ORE: - 157 eqn0 - 165 eqn1 - 179 eqn4 - 177 eqn5 - 165 eqn7 + ore_in >= 0
DCFZ: + 6 eqn1 - 7 eqn6 - 3 eqn8 >= 0
HKGWZ: - 48 eqn2 - 12 eqn3 + 5 eqn5 - 5 eqn8 >= 0
GPVTF: - 9 eqn2 - 1 eqn3 + 2 eqn7 >= 0
QDVJ: - 1 eqn2 + 9 eqn3 >= 0
PSHF: - 8 eqn3 + 7 eqn4 - 7 eqn6 - 10 eqn8 >= 0
XJWVT: - 44 eqn2 + 2 eqn6 >= 0
FUEL: + 1 eqn2 - fuel_out >= 0
ore_in = 1000000000000
Integer
ore_in
fuel_out
eqn0
eqn1
eqn2
eqn3
eqn4
eqn5
eqn6
eqn7
eqn8
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment