<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Navid<br>
<br>
My apologies for the late reply. SCIP features a <a
href="http://scip.zib.de/doc/html/cons__disjunction_8h.php">disjunction</a>
constraint handler<a
href="http://scip.zib.de/doc/html/cons__disjunction_8h.php"></a>.
If you build your model through the SCIP callable library,<br>
you can group constraints together to form a disjunction by
creating a disjunction constraint and adding other constraints.
Each feasible solution satisfies at least one of the disjunction
clauses.<br>
<br>
Kind regards,<br>
Gregor<br>
<br>
<br>
On 05/06/2014 04:13 PM, Navid Mohaghegh wrote:<br>
</div>
<blockquote cite="mid:282808EF-2C88-408F-A864-D918E461EDC3@navid.ca"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
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 moz-do-not-send="true"
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
moz-do-not-send="true" 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 moz-do-not-send="true" href="mailto:Scip@zib.de">Scip@zib.de</a><br>
<a class="moz-txt-link-freetext" href="http://listserv.zib.de/mailman/listinfo/scip">http://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote>
<br>
_______________________________________________<br>
Scip mailing list<br>
<a moz-do-not-send="true" href="mailto:Scip@zib.de">Scip@zib.de</a><br>
<a class="moz-txt-link-freetext" href="http://listserv.zib.de/mailman/listinfo/scip">http://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>