x∈{1,2,3,4,5,6,8,10,12,..,100}.
Note that this is {1,2,3,4,5}∪{6,8,10,..,98,100}. Never seen a thing like this, but here is a way to model this in a MIP model:
6−(1−δ)M≤x≤5+δM2y−(1−δ)M≤x≤2y+(1−δ)M1≤x≤100xintegeryintegerδbinary
Note that this essentially means:
δ=0⟹x≤5δ=1⟹x≥6,x=2y
We can use M=100 (or even refine that a little bit).
No comments:
Post a Comment