[Scip] Update of SCIP_Cons.active for a local constraint

Gerald Gamrath gamrath at zib.de
Wed Dec 18 13:16:03 CET 2013


Dear Hélène,

the scip_active method gets as a parameter the constraint that should be 
activated. It is called once for each constraint to be activated, so it 
might happen, that the activation method of your constraint handler is 
called multiple times at the same node in case you added more than one 
constraint to that node. This could be the reason for a constraint not 
being active already (but being activated later at the same node).

During scip_prop() all constraints should have been activated, so here, 
SCIPconsIsActive() should work. By the way, you should not directly 
access the SCIP_CONS structure. SCIPconsIsActive() gives you exactly 
what you need and also takes into account whether the (de-)activation 
was currently buffered and not yet performed due to other operations on 
the constraints array. So this might also fix your problem.

Best,
Gerald


Am 17.12.2013 15:52, schrieb Hélène Toussaint:
>
> Dear SCIP team,
>
> I have a branch and price algorithm in which I use my own branch rule 
> (associated to a constraint handler). Thus I create and add some local 
> constraints at each node.
>
> When I process the current node I need to know the active local 
> constraints. I check the flag "active" of the Scip_Cons structure but 
> there is a problem when a node is deactivated and then reactivated: 
> sometimes the active flag of the associated local constraints was 
> updated (to 1) when I enter scip_active() method but sometimes it 
> wasn't (in the latter case it seems it's updated in the children).
>
> How can I know the active constraints when I am in scip_active() or in 
> scip_prop () ?
>
> Best regards,
>
> Hélène
>
>
>
> _______________________________________________
> 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/20131218/672a79ba/attachment.html>


More information about the Scip mailing list