Answers to: Inequality Constraint in a Linear Program (with a constant RHS)http://www.or-exchange.com/questions/15604/inequality-constraint-in-a-linear-program-with-a-constant-rhs<p>Is it possible to forbid a LP variable from being a specific constant?</p>
<p>ex X <> 0.5</p>enThu, 26 Apr 2018 15:49:21 -0400Answer by AndyThttp://www.or-exchange.com/questions/15604/inequality-constraint-in-a-linear-program-with-a-constant-rhs/15614<p>Instead of solving one LP, you can solve two:</p>
<ol>
<li>original LP & x <= 0.5 - \epsilon</li>
<li>original LP & x >= 0.5 + \epsilon</li>
</ol>
<p>For a suitable \epsilon value, as per Sune's suggestion. You can then process the solutions accordingly (e.g. compare the two solutions, to see which one is actually optimal based on the two objective function values). As long as you have one or a few such variables, this approach should work.</p>AndyTThu, 26 Apr 2018 15:49:21 -0400http://www.or-exchange.com/questions/15604/inequality-constraint-in-a-linear-program-with-a-constant-rhs/15614Answer by Sunehttp://www.or-exchange.com/questions/15604/inequality-constraint-in-a-linear-program-with-a-constant-rhs/15605<p>No. But you can (at the cost of adding a binary variable) enforce that x is either below \(0.5-\varepsilon\) or above \(0.5+\varepsilon\) where \(\varepsilon>0\) is a small <em>tolerance</em>.</p>SuneWed, 25 Apr 2018 13:28:32 -0400http://www.or-exchange.com/questions/15604/inequality-constraint-in-a-linear-program-with-a-constant-rhs/15605