Linear Programming constraint equivalent of conditional

2.2k Views Asked by At

I would like to use the following conditional in my linear program:

if(A == 1) then B = C + 1

A = binary, B and C are continuous. In the else case, any relation between B and C is possible.

Can someone help me?

I tried to use the method explained in: http://www.yzuda.org/Useful_Links/optimization/if-then-else-02.html but this doesn't seem to work with equalities, I think.

1

There are 1 best solutions below

0
On BEST ANSWER

I've found the answer myself. As A is a binary, and B could be greater, the conditional becomes:

if(A>=1) then B>=C+1

Applying the method explained in the link I got these constraints:

A<=0+(1-y)
C+1 <= B + M*y

With y binary and M a large value.