[Scip] Problem with ObjConshdlr

Demetrio Laganà demetrio.lagana at unical.it
Tue Nov 4 14:55:59 CET 2014


Hi Benny,
thank you very much for your suggestions. I think to have solved the
problem using ObjEventhdlr. This allows to capture any variation in the
objective function or variables. I have recalled  the Constrainthdlr inside
ObjEventhdlr with the aim of checking violations for my valid inequalities.
It seems to work as I expect.
Best Regards
Demetrio

2014-11-03 14:27 GMT+01:00 Benjamin Müller <benjamin.mueller at zib.de>:

>  Dear Demetrio,
>
> I thought about your problem again and if you do not want to have a
> specific constraint, then you could do the same as the integral constraint
> handler. There are no specific constraints of the type "integral", but you
> want to handle the integrality in that handler. For doing so, you can set
> the flag CONSHDLR_NEEDSCONS to true. After that, SCIP will go into the the
> callbacks, even though there is no constraint of your specific type.
>
> Best regards,
> Benny
>
>
> Am 31.10.2014 um 15:44 schrieb Benjamin Müller:
>
> Dear Demetrio,
>
> do you have created and added a constraint belonging to you constraint
> handler? If you did not add such a constraint then SCIP (of course) thinks
> that there is nothing to do in the SCIP_DECL_CONSSEPALP callback since
> there is no constraint which can be handled by your constraint handler.
>
> If this is your current problem then have a look at the TSP example of
> SCIP. There is a constraint handler which handles the subtour elimination
> constraints. To really exclude subtours one has to add a constraint via the
> SCIPcreateConsSubtour method in ReaderTSP.cpp. After this call there is a
> constraint belonging to the constraint handler and then it is possible to
> do several things in the SCIP_DECL_CONSSEPALP callback.
>
> Best regards,
> Benny
>
> Am 31.10.2014 um 15:07 schrieb Demetrio Laganà:
>
> Dear SCIP mailing list,
> I have a problem when using ObjConshdlr. More precisely, I have
> implemented the virtual methods from this class and included them in the
> main.cpp of my NetBeans project through SCIPincludeObjConshdlr. It seems to
> me that something does not work, because during the flow execution of the
> code only the constructor of this class is run without printing any message
> included into SCIP_DECL_CONSSEPALP(ConshdlrMaxTime::scip_sepalp) function.
> Can you help me?
> Thanks in advance
> Best regards
> Demetrio Laganà
>
>
> _______________________________________________
> Scip mailing listScip at zib.dehttp://listserv.zib.de/mailman/listinfo/scip
>
>
> --
> ______________________________
> Benjamin Müller
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlinbenjamin.mueller at zib.de+49 30 841 85-195
>
>
> --
> ______________________________
> Benjamin Müller
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlinbenjamin.mueller at zib.de+49 30 841 85-195
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20141104/59ceb235/attachment.html>


More information about the Scip mailing list