[Scip] Question about the SCIP_DECL_CONSDEACTIVE method for the constraint handler of a branching rule

Gerald Gamrath gamrath at zib.de
Mon Aug 10 11:21:55 CEST 2015


Dear Jose,

you are right, this check is incorrect since the local bound changes 
have already been undone when the CONSDEACTIVE callback is called. I 
will remove the two asserts (you are right, the second one is 
essentially useless since nothing changed in between) from the code and 
would recommend you to do the same in your code. There is no easy way to 
check consistency in the CONSDEACTIVE callback, but checking it after 
propagation should be enough.

If you want to be really safe, you could also add a check at the 
beginning of pricing, or even in CONSACTIVE, but there, you should only 
check the first consdata->npropagatedvars there (This will actually 
check what the current asserts in CONSDEACTIVE are supposed to check).

Best,
Gerald

On 06.08.2015 09:52, Jose Walteros wrote:
> Hi all,
>
> I am currently working on a Branch Price and Cut algorithm that 
> requires a simple variation of the classic Ryan-Foster branching rule. 
> For my code, I used as a guide the file cons_samediff.c from the bin 
> packing example. So far, I have been able to adapt the code without 
> any mayor problems. However, I am having some issues with the 
> assertion of line 492. This is an assertion that is called from the 
> method that deactivates the branching constraints of a given node. 
> (SCIP_DECL_CONSDEACTIVE). The actually code of these line is assert( 
> consdataCheck(scip, probdata, consdata) );
>
> It seems SCIP is updating the bounds of the variables unfixing the 
> variables that where fixed in that node, right before 
> SCIP_DECL_CONSDEACTIVE is executed (it perhaps should doubt after). In 
> other words, the local bounds of the variables no longer include the 
> printing decisions given by the constraint that is being deactivated. 
> I am wondering if you guys know how to fix this issue.
>
> Also, I am would like to know if there is a special reason for having 
> two almost consecutive assertions that do the same in that function, 
> lines 492 and 502?
>
> Thanks for the help
>
> PD: I am using the 3.2.0 version.
>
> —Jose
>
>
>
>
> _______________________________________________
> 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/pipermail/scip/attachments/20150810/3333fe80/attachment.html>


More information about the Scip mailing list