Skip to content

Instantly share code, notes, and snippets.

@RHavar

RHavar/small.lp Secret

Last active January 1, 2018 16:49
Show Gist options
  • Save RHavar/47b912d7250a17075ba8e7aeefa77a34 to your computer and use it in GitHub Desktop.
Save RHavar/47b912d7250a17075ba8e7aeefa77a34 to your computer and use it in GitHub Desktop.
Minimize
obj: + 26960 i1 + 963240 i6 + 26960 i15 + 1586240 i11 + 655240 i16 - 2760 no_change - 2 change_amount + 656040 i14 + 3135240 i0 + 997240 i2 + 656440 i3 + 656040 i4 + 3137240 i9 + 660040 i12 + 656040 i13 + 660040 i5 + 655240 i7 + 656040 i8 + 1877240 i10
Subject To
c0: + 301800 i4 + 455400 i6 + 912400 i10 + 472400 i2 + 302000 i3 + 1542400 i9 + 301800 i13 + 301800 i14 - 12740 i15 + 10200 no_change + 1541400 i0 + 303800 i5 + 303800 i12 + 301400 i16 - change_amount + 301800 i8 + 766900 i11 - 12740 i1 + 301400 i7 <= 345579
c1: + 303800 i5 + 301800 i14 - 12740 i15 + 912400 i10 + 1541400 i0 - 12740 i1 + 472400 i2 + 302000 i3 + 301800 i4 + 301400 i7 + 301800 i8 + 303800 i12 + 301800 i13 + 301400 i16 + 766900 i11 + 10200 no_change - change_amount + 455400 i6 + 1542400 i9 >= 334000
c2: + i0 + i8 + i13 + i16 + i1 + i7 + i9 + i4 + i5 + i6 + i11 + i12 + i14 + i2 + i3 + i10 + i15 <= 3
c3: + 100000 no_change + change_amount >= 100000
General
change_amount
Binary
i3 no_change i14 i12 i7 i1 i10 i0 i9 i13 i8 i11 i2 i4 i6 i15 i5 i16
SOS
set1: S1:: change_amount:1 no_change:2
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment