16 #ifndef OR_TOOLS_GSCIP_GSCIP_EVENT_HANDLER_H_ 17 #define OR_TOOLS_GSCIP_GSCIP_EVENT_HANDLER_H_ 23 #include "scip/type_event.h" 53 SCIP_EVENTTYPE
event_type()
const {
return event_type_; }
60 const SCIP_EVENTTYPE event_type_;
93 : description_(description) {}
113 virtual SCIP_RETCODE
Init(
GScip* gscip) {
return SCIP_OKAY; }
132 virtual SCIP_RETCODE
Exit(
GScip* gscip) {
return SCIP_OKAY; }
151 SCIP_RETCODE
CatchEvent(SCIP_EVENTTYPE event_type);
155 CaughtEvent(
const SCIP_EVENTTYPE event_type,
const int filter_pos)
156 : event_type(event_type), filter_pos(filter_pos) {}
159 SCIP_EVENTTYPE event_type;
179 const GScipEventHandlerDescription description_;
182 GScip* gscip_ =
nullptr;
185 SCIP_EVENTHDLR* event_handler_ =
nullptr;
188 std::vector<CaughtEvent> caught_events_;
193 #endif // OR_TOOLS_GSCIP_GSCIP_EVENT_HANDLER_H_ friend SCIP_RETCODE DropAllEvents(GScipEventHandler &handler)
virtual SCIP_RETCODE Exit(GScip *gscip)
virtual SCIP_RETCODE Execute(GScipEventHandlerContext context)
virtual ~GScipEventHandler()=default
SCIP_RETCODE CatchEvent(SCIP_EVENTTYPE event_type)
void Register(GScip *gscip)
Collection of objects used to extend the Constraint Solver library.
GScipEventHandler(const GScipEventHandlerDescription &description)
GurobiMPCallbackContext * context
GScipEventHandlerContext(GScip *gscip, SCIP_EVENTTYPE event_type)
virtual SCIP_RETCODE Init(GScip *gscip)
SCIP_EVENTTYPE event_type() const