title: Mixed integer programming: variable assignment per condition (if then else)
body: <p>I am relatively new to (mixed) integer programming and got stuck with the formulation of a constraint.</p>
  
  <p>In my simplified model I have one Parameter and two Variables that are positive Reals having the value 321 as upper bound. The logic I want to express is here:</p>
  
  <pre><code>if Parameter &gt; Variable1:
      Variable2 = Variable1
  else:
      Variable2 = Parameter
  
  **edit** (while Variable1 is always &gt;= Variable2)
  </code></pre>
  
  <p>Is it actually possible to describe this using linear in(equalities)?</p>
  
  <p>If it helps:  For the implementation I am using Python, Pyomo and the newest gurobi solver.</p>
  
  <p>Thanks for your help!</p>