<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Gregor,<div><br></div><div>Thank you very much for your reply.</div><div><br></div><div>Could you kindly let me know if SCIP can directly have an operator for OR? </div><div><br></div><div>Below was just an example of many OR constraints that I have. So I like to know if SCIP can directly handle OR for me.</div><div><br></div><div>I like to avoid CNF approach (<a href="http://en.wikipedia.org/wiki/Conjunctive_normal_form">http://en.wikipedia.org/wiki/Conjunctive_normal_form</a>) as much as possible.</div><div><br></div><div>Thank you,</div><div>Navid</div><div><br></div><div><br><div><div>On May 6, 2014, at 6:19 AM, Gregor Hendel <<a href="mailto:hendel@zib.de">hendel@zib.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear Navid,<br><br>On 05/05/2014 05:22 PM, Navid Mohaghegh wrote:<br><blockquote type="cite">Hi All,<br><br>I am new to SCIP and trying to implement a very simple example:<br><br>Imagine we have Q,R,S and T integer variables ranging from 0 to 10.<br><br>Our objective is to maximize Q + R + S + T<br>And our constraint is: (q <= 4r + 20 && q >=  2r) || ( (q > 4r + 20 && (t < r || s < r))  <br></blockquote>The partial constraints are either redundant or never satisfied:<br><br>   q <= 4r +20, q <= 10, r >= 0 => always satisfied, hence redundant<br>   q  > 4r +20, q <= 10, r >= 0 => never feasible<br><br>So, the only remaining constraint states q >= 2r, and the optimum is 35 ;)<br><br>I would use binary variables to indicate the satisfaction of a<br>constraint: Consider your portion t < r || s < r.<br>Since we never use strict inequalities, we formulate this as<br>t <= r-1 || s < = r-1.<br>Let d_t, d_s be binary variables indicating if t or s violate their<br>constraint.<br>With the help of the binary variables, you can reformulate:<br>t <= r - 1 + M d_t,<br>s <= r - 1 + M d_s,<br>d_s + d_t <= 1,<br><br>which grants you the satisfaction of at least one of the two constraints.<br><br>In your example, M = 10 is a good choice. In order to prevent numerical<br>troubles, you want to be as modest as possible choosing the M.<br><br>Best regards,<br>Gregor<br><br><blockquote type="cite"><br>I am trying to use ZIMPL, but can't find how can I use OR in my constraints.<br><br>Could you help me with this either directly in SCIP or ZIMPL?<br><br>Thank you,<br>Navid<br><br><br>_______________________________________________<br>Scip mailing list<br><a href="mailto:Scip@zib.de">Scip@zib.de</a><br>http://listserv.zib.de/mailman/listinfo/scip<br></blockquote><br>_______________________________________________<br>Scip mailing list<br><a href="mailto:Scip@zib.de">Scip@zib.de</a><br>http://listserv.zib.de/mailman/listinfo/scip<br></blockquote></div><br></div></body></html>