[Scip] New Solution Callback
Stefan Vigerske
stefan at math.hu-berlin.de
Fri Jul 16 22:43:28 MEST 2010
Hi,
Jakob Breier wrote:
> SolFoundEventHandler::SolFoundEventHandler() :
> ObjEventhdlr("SOLFOUND","desc")
> // As far as I understand the interface the above line should tell
> // scip that I want to catch the SOLFOUND event.
> {
>
> }
No, "SOLFOUND" is just the name of your eventhandler.
I think you need to catch and drop the solfound event by call something like
SCIP_CALL( SCIPcatchEvent(scip, SCIP_EVENTTYPE_SOLFOUND, eventhdlr,
eventdata, NULL) );
in scip_initsol and
SCIP_CALL( SCIPdropEvent(scip, SCIP_EVENTTYPE_SOLFOUND, eventhdlr,
eventdata, -1) );
in scip_exitsol.
Stefan
>
>
> SCIP_RETCODE SolFoundEventHandler::scip_exec(
> SCIP* scip,
> SCIP_EVENTHDLR* eventhdlr,
> SCIP_EVENT* event,
> SCIP_EVENTDATA* eventdata
> )
> {
>
> SCIPerrorMessage("This message will never be printed.");
> SCIPABORT();
>
> return SCIP_OKAY;
>
>
> }
>
> Also "SCIP_CALL_ABORT(SCIPincludeObjEventhdlr(scip_,
> &solFoundEventHandler, false));" is called before the solving begins
> (solFoundEventHandler is of course an object of type
> SolFoundEventHandler). Yet SCIP_RETCODE SolFoundEventHandler::scip_exec
> is never called.
> Do you know what I do wrong?
>
> Regards,
> Jakob Breier
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>
--
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan
More information about the Scip
mailing list