<div dir="ltr"><div>Hi Gregor,</div><div><br></div><div>My original constraint is flagged with true for the initial, separate and check parameters. <br></div><div>Indeed, my constraint handler has a higher priority (greater than zero, since I want to separate fractional solutions) than the knapsack constraint handler. So what you are saying is that I'm calling my callback routine before adding the knapsack constraints (even though SCIP printed the knapsack constraint for the transformed model)? Then I guess this would only happen only once? Because after SCIP adds the knapsack constraints, all the solutions that enters my callback will respect the knapsack constraints (**).</div><div><br></div><div>Can I change the separation priority of the knapsack constraint in the transformed model? This way I guarantee that the solution that enters my callback already satisfies (**).</div><div><br></div><div>Thanks,</div><div>Matheus<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 9 de dez. de 2019 às 13:22, Gregor Hendel <<a href="mailto:hendel@zib.de">hendel@zib.de</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi Matheus,<br>
<br>
your reasoning about negation is correct, so I would expect that the
LP solution satisfies ** at CONSENFOLP. A special case occurs if the
knapsack constraint is flagged by (not initial/not separate/not
check), in which case the constraint is not immediately part of the
root LP and might not be separated at violation. <br>
<br>
Note that the knapsack constraint handler has a very low enforcement
priority, -600000. Probably, the enforcement priority of your
constraint handler is higher, and the knapsack constraint handler
would add its constraint to the LP in the same enforcement round,
but later?<br>
<br>
Kind regards,<br>
Gregor<br>
<br>
<div>Am 06.12.19 um 01:01 schrieb Matheus
Ota:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>First I would like to say that I'm very grateful for all
the help I received from this mailing list! I have a question
regarding a MIP model that I'm solving. I have some equalities
of the following type</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>x_i,0 + x_i,1 == 1, for i = 0, ..., 8 (*)<br>
</div>
</blockquote>
<div><br>
</div>
<div> Thus, SCIP presolve routines replace some of my variables
(x_i,0) by the negation of other variables (1 - x_i,1). In the
transformed model I have only this constraint</div>
<div>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(0,0,0)">
</span></p>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(0,0,0)">[knapsack] <R>: +1<~t_x_8,1>[B] +1<~t_x_7,1>[B] +1<~t_x_6,1>[B] +1<~t_x_5,1>[B] +1<~t_x_4,1>[B] +1<~t_x_3,1>[B] +1<~t_x_2,1>[B] +1<~t_x_1,1>[B] +1<~t_x_0,1>[B] <= 4;</span></p>
</blockquote>
<div><br>
</div>
<div> And each variable x is binary. The tilde (~) means
negation here? If so, replacing <~t_x_i,1> by
<t_x_i,0> this would give</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><t_x_8,0> + ... + <t_x_0,0><= 4 (**)<br>
</div>
</blockquote>
<div><br>
</div>
<div>But at the CONSENFOLP method, SCIP is entering with a
"solution" S with x_i,0 = 1 and x_i,1 = 0, for i = 0, ...,
8. Which is infeasible because violates (**). But the SCIP
documentation says that CONSENFOLP is called when an LP
solution is available. But this solution S do not respect
the constraints in my LP. I'm a little confused with this
behavior and would be glad if someone could give me some
light here.</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Matheus<br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Scip mailing list
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a>
<a href="https://listserv.zib.de/mailman/listinfo/scip" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote></div>