I have a conditional statement I want to implement in a MILP. A is a nonbinary variable that has known upper and lower bounds. B is a known parameter. And C is a binary variable. How do I formulate the condition?
If A < B then C is 1 otherwise C is 0 or 1.
Is this possible? I am new to optimization using GAMS and i'm still figuring out how this works
How to use nonbinary variable in a conditional statement MILP Topic is solved

 User
 Posts: 3
 Joined: 8 months ago
Re: How to use nonbinary variable in a conditional statement MILP
Similar questions have been asked before. Search for "logic constraints" or "williams" (that's a name of an author for a book that teaches that). So here only a short answer: A<B => C=1 is equivalent to C=0 => A>B. This we can do with a linear constraint (and binary variable C): A > B  (BA.lo)*C. If C=0 then A>B, if C=1 then A>A.lo which is a redundant constraint.
Michael
Michael