[SCIP] "adding constraints during pricing" revisited
Benjamin Müller
benjamin.mueller at zib.de
Wed Sep 5 13:50:36 CEST 2018
Dear Myroslav,
after looking into SCIPpriceLoop of scip/solve.c, I think that it should
work fine to add your constraints after generating variables in your
pricer plug-in. After the executing method of each pricer is called,
SCIP is calling SCIPinitConssLP, which makes sure that all initial
constraints have been added to the LP. So, probably, you want to mark
your (linear) constraints to be initial and in case you want to add
dynamically other variables to them, you also need to set the modifiable
flag to TRUE.
Another solution might be to add a constraint handler that keeps track
of the generated variables and then adds the required constraints during
enforcement.
Best,
Benny
On 09/04/2018 07:35 PM, myroslav wrote:
>
> Dear SCIP community,
>
>
> I am implementing a branch and price algorithm for a problem. When I
> price my variables I also need to add constraints where they appear. I
> came across this issue
>
> http://listserv.zib.de/pipermail/scip/2012-April/000935.html
>
> but I did not find a solution. Does scip support adding constraints
> in a pricer and what would be the proper way of doing this, which
> flags of SCIPaddConsLinear should I watch for?
>
>
> Thanks,
>
> Myroslav
>
>
>
>
> _______________________________________________
> 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/20180905/e7746e19/attachment.html>
More information about the Scip
mailing list