Answers to: conditional constraint linearizationhttp://www.or-exchange.com/questions/14883/conditional-constraint-linearization<p>how to put the following constraints in a linear form.</p>
<pre><code>if(T(i)<Tmax(i)) then x=0 else x=1
</code></pre>
<p>where T and Tmax are continuous in [0.0008-10] and x is a binary variable</p>
<p>thank u</p>enTue, 01 Aug 2017 11:12:40 -0400Answer by Paul Rubinhttp://www.or-exchange.com/questions/14883/conditional-constraint-linearization/14884<p>You cannot do exactly what you asked, at least not in the context of a mathematical program. The problem is that strict inequalities are incompatible with mathematical programs. (They lead to feasible regions that are not closed.)</p>
<p>One way to come close is the following:\[T(i) \le T_{max}(i)+10x\] \[T(i) \ge T_{max}(i)-10(1-x) \]</p>
<p>The only issue here is that if \(T(i)=T_{max}(i)\), \(x\) can be either 0 or 1.</p>
<p>An alternative that makes the value of \(x\) unambiguous involves specifying some small \(\epsilon > 0\) and partitioning the cases into \(T(i) \le T_{max}(i) - \epsilon\) and \(T(i) \ge T_{max}(i)\), making \(T_{max}(i) - \epsilon < T(i) < T_{max}(i)\) infeasible.</p>Paul RubinTue, 01 Aug 2017 11:12:40 -0400http://www.or-exchange.com/questions/14883/conditional-constraint-linearization/14884