[SCIP] Branching on optimal solution
Matheus Ota
matheusota at gmail.com
Tue May 22 02:14:52 CEST 2018
Hi Ambros,
Thank you for replying! Yes, I have read the Constraint Handler and the
Branching Rule tutorials. Let me give more details:
- These are the parameters I chose for the Constraint Handler:
sepapriority: 1000000
enfopriority: 1000000
checkpriority: 1000000
sepafreq: 1
propfreq: -1
eagerfreq: 1
maxprerounds: 0
- And these are the parameters for the Branching Rule:
priority: 200000
maxdepth: -1
maxbounddist: 1
- 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).
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.
- Still, I'm able to solve correctly the problem because other branching is
performed. As shown by the output of SCIPprintStatistics():
Branching Rules : ExecTime SetupTime BranchLP BranchExt
BranchPS Cutoffs DomReds Cuts Conss Children
CVRPBranchingRule: 0.00 0.00 0 0
0 0 0 0 0 0
allfullstrong : 0.00 0.00 0 0
0 0 0 0 0 0
cloud : 0.00 0.00 0 0
0 0 0 0 0 0
distribution : 0.00 0.00 0 0
0 0 0 0 0 0
fullstrong : 0.00 0.00 0 0
0 0 0 0 0 0
inference : 0.00 0.00 0 0
2 0 0 0 0 4
leastinf : 0.00 0.00 0 0
0 0 0 0 0 0
mostinf : 0.00 0.00 0 0
0 0 0 0 0 0
multaggr : 0.00 0.00 0 0
0 0 0 0 0 0
nodereopt : 0.00 0.00 0 0
0 0 0 0 0 0
pscost : 0.00 0.00 0 0
0 0 0 0 0 0
random : 0.00 0.00 0 0
0 0 0 0 0 0
relpscost : 3.06 0.00 71 0
0 0 100 0 0 86
I'm kinda lost here. Could you share your thoughts?
Thanks,
Matheus
2018-05-21 16:44 GMT-03:00 Ambros Gleixner <gleixner at zib.de>:
> Hi Matheus,
>
> Have you read the priority section of the "How to add constraint
> handlers?" at
>
> http://scip.zib.de/doc-5.0.1/html/CONS.php
>
> Chances are your CONSHDLR_ENFOPRIORITY is set to "after integrality". Does
> that help?
>
> Best,
> Ambros
>
>
>
>
>
>
> Am 19.05.2018 um 21:10 schrieb Matheus Ota:
>
>> Hi Again,
>>
>> 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.
>>
>> Thanks,
>> Matheus
>>
>> 2018-05-19 15:17 GMT-03:00 Matheus Ota <matheusota at gmail.com <mailto:
>> matheusota at gmail.com>>:
>>
>> Hello all,
>>
>> I'm with a problem in my Branch-and-Cut for the CVRP. I'm currently
>> having a problem because the Branching Rule that I implemented is
>> calling the SCIP_DECL_BRANCHEXECPS method, even though the currently
>> solution is already the optimal one.
>>
>> I also implemented the SCIP_DECL_CONSENFOLP, SCIP_DECL_CONSENFOPS
>> and SCIP_DECL_CONSCHECK methods of the Constraint Handler, so that
>> they check if the current solution is feasible and set result as
>> SCIP_FEASIBLE or SCIP_INFEASIBLE. Could, someone provide me some
>> help in this matter?
>>
>> Thanks,
>> Matheus
>>
>>
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
>>
>>
> --
> Ambros Gleixner, Research Group Mathematical Optimization Methods at Zuse
> Institute Berlin, http://www.zib.de/gleixner
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180521/89e2daaf/attachment.html>
More information about the Scip
mailing list