title: how to convert an if-else statement to a linear programming constraint in Python
body: <p>I have two variables <code>E[i]</code> and <code>Y[i]</code>, where <code>E</code> is a continuous variable and <code>Y</code> is binary.So the condition is:</p>
  
  <pre><code>if E[i] &lt;= rmin:
          Y[i]==1
      else:
          Y[i]==0
  </code></pre>
  
  <p>How do I convert this <code>if-else</code> loop to linear constraint using Python?</p>