> How to formulate c=min(a,b) where a,b are binary in a MIP.
This is like c = a×b. See: http://yetanothermathprogrammingconsultant.blogspot.com/2008/05/multiplication-of-binary-variables.html.
I.e.
c ≤ aSimilarly c = max(a,b) can be modeled via the constraints:
c ≤ b
c ≥ a + b − 1
c in [0,1] (continuous)
a,b in {0,1} (binary)
c ≥ a
c ≥ b
c ≤ a + b
c in [0,1] (continuous)
a,b in {0,1} (binary)
No comments:
Post a Comment