[Scip] Segmentation fault while adding a new branching rule

Gerald Gamrath gamrath at zib.de
Thu Apr 19 19:22:15 MEST 2012


Dear Sheetal,

reading your code snippets, I'm not sure whether you added your 
branching rule to SCIP by calling SCIPincludeBranchrule(), which by the 
way gets the priority of the branchrule as its fourth parameter? Do you 
need to change it afterwards?
The branching rules are first just added at the end of the array, but 
will later be ordered w.r.t. their priority, so you should not rely on 
your branching rule being the last one. Besides, this also depends on 
whether you added your branching rule before or after the SCIP default 
plugins.
For getting your branchrule, you should use SCIPfindBranchrule(). After 
that, please check that the returned pointer is != NULL. If it is NULL, 
probably you forgot to include your branching rule.
Maybe you should also compile in debug mode and add more asserts to your 
code in order to find problems faster.

Best,
Gerald

Am 19.04.2012 18:20, schrieb sheetal murkute:
>
> Hi,
>
> I want to include a new branching rule in SCIP. I am selecting a 
> fractional variable for branching.
> For this I have written c-file and h-file similar to most infeasible 
> branching.
>
> I have implemented the 
> methods SCIP_DECL_BRANCHCOPY(branchCopymybranchingrule)
> and static SCIP_DECL_BRANCHEXECLP(branchExeclpmybranchingrule).
>
> My code works for testing the existing branching rules. For adding new 
> branching rule, I assumed that this rule will be
> added as a 9th rule, and set the priority for rules[8].
>         SCIP_BRANCHRULE** rules;
> rules = SCIPgetBranchrules(scip);
> SCIP_CALL_EXC(SCIPsetBranchrulePriority(scip, rules[8] , 10000000));
>
> However, when I run my code with this, I get a segmentation fault.
> Do I have to implement/call any additional method for including new 
> branching rule?
>
>
>
> -- 
> Thanks with Best Regards,
> Sheetal
>
> :)
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20120419/73013aa2/attachment.html


More information about the Scip mailing list