<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi Ambros,<br><br></div>Thank you for replying! Yes, I have read the Constraint Handler and the Branching Rule tutorials. Let me give more details:<br><br></div>- These are the parameters I chose for the Constraint Handler:<br></div>sepapriority: 1000000<br></div>enfopriority: 1000000<br></div>checkpriority: 1000000<br></div>sepafreq: 1<br></div>propfreq: -1<br></div>eagerfreq: 1<br></div>maxprerounds: 0<br><br></div>- And these are the parameters for the Branching Rule:<br></div>priority: 200000<br></div>maxdepth: -1<br></div>maxbounddist: 1<br><br>- the SCIP_DECL_CONSENFOLP, SCIP_DECL_CONSENFOPS and SCIP_DECL_CONSCHECK check if the current solution is a feasible solution (obeys the constraints and is integer).<br></div><div>I tried to check here only if the solution obeys the constraints, ignoring the integrality constraint. But my problem remained: in the SCIP_DECL_BRANCHEXECPS method of the branching rule, the solution that gets there is made only of integers. So no branching is performed.<br><br></div><div>- Still, I'm able to solve correctly the problem because other branching is performed. As shown by the output of SCIPprintStatistics():<br>Branching Rules    :   ExecTime  SetupTime   BranchLP  BranchExt   BranchPS    Cutoffs    DomReds       Cuts      Conss   Children<br>  CVRPBranchingRule:       0.00       0.00          0          0          0          0          0          0          0          0<br>  allfullstrong    :       0.00       0.00          0          0          0          0          0          0          0          0<br>  cloud            :       0.00       0.00          0          0          0          0          0          0          0          0<br>  distribution     :       0.00       0.00          0          0          0          0          0          0          0          0<br>  fullstrong       :       0.00       0.00          0          0          0          0          0          0          0          0<br>  inference        :       0.00       0.00          0          0          2          0          0          0          0          4<br>  leastinf         :       0.00       0.00          0          0          0          0          0          0          0          0<br>  mostinf          :       0.00       0.00          0          0          0          0          0          0          0          0<br>  multaggr         :       0.00       0.00          0          0          0          0          0          0          0          0<br>  nodereopt        :       0.00       0.00          0          0          0          0          0          0          0          0<br>  pscost           :       0.00       0.00          0          0          0          0          0          0          0          0<br>  random           :       0.00       0.00          0          0          0          0          0          0          0          0<br>  relpscost        :       3.06       0.00         71          0          0          0        100          0          0         86<br><br></div><div>I'm kinda lost here. Could you share your thoughts?<br><br></div><div>Thanks,<br></div><div>Matheus<br></div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><br><div><br><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-21 16:44 GMT-03:00 Ambros Gleixner <span dir="ltr"><<a href="mailto:gleixner@zib.de" target="_blank">gleixner@zib.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Matheus,<br>
<br>
Have you read the priority section of the "How to add constraint handlers?" at<br>
<br>
<a href="http://scip.zib.de/doc-5.0.1/html/CONS.php" rel="noreferrer" target="_blank">http://scip.zib.de/doc-5.0.1/h<wbr>tml/CONS.php</a><br>
<br>
Chances are your CONSHDLR_ENFOPRIORITY is set to "after integrality". Does that help?<br>
<br>
Best,<br>
Ambros<span class=""><br>
<br>
<br>
<br>
<br>
<br>
<br>
Am 19.05.2018 um 21:10 schrieb Matheus Ota:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi Again,<br>
<br>
My bad, I made a mistake in my calculations. Actually it is being called in a integer but infeasible solution (that breaks the capacity constraint). But still, from my understanding, branching should be done to fix the integrality constraints, the other restrictions should be fixed by the constraint handler.<br>
<br>
Thanks,<br>
Matheus<br>
<br></span>
2018-05-19 15:17 GMT-03:00 Matheus Ota <<a href="mailto:matheusota@gmail.com" target="_blank">matheusota@gmail.com</a> <mailto:<a href="mailto:matheusota@gmail.com" target="_blank">matheusota@gmail.com</a>>><wbr>:<span class=""><br>
<br>
    Hello all,<br>
<br>
    I'm with a problem in my Branch-and-Cut for the CVRP. I'm currently<br>
    having a problem because the Branching Rule that I implemented is<br>
    calling the SCIP_DECL_BRANCHEXECPS method, even though the currently<br>
    solution is already the optimal one.<br>
<br>
    I also implemented the SCIP_DECL_CONSENFOLP, SCIP_DECL_CONSENFOPS<br>
    and SCIP_DECL_CONSCHECK methods of the Constraint Handler, so that<br>
    they check if the current solution is feasible and set result as<br>
    SCIP_FEASIBLE or SCIP_INFEASIBLE. Could, someone provide me some<br>
    help in this matter?<br>
<br>
    Thanks,<br>
    Matheus<br>
<br>
<br>
<br>
<br></span>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/scip</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Ambros Gleixner, Research Group Mathematical Optimization Methods at Zuse Institute Berlin, <a href="http://www.zib.de/gleixner" rel="noreferrer" target="_blank">http://www.zib.de/gleixner</a><br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/scip</a><br>
</font></span></blockquote></div><br></div>