27 #define EVENTHDLR_NAME "softtimelimit" 28 #define EVENTHDLR_DESC "event handler for soft time limit" 35 struct SCIP_EventhdlrData
51 assert(eventhdlr != NULL);
69 assert(eventhdlr != NULL);
73 assert(eventhdlrdata != NULL);
91 assert(eventhdlr != NULL);
95 assert(eventhdlrdata != NULL);
97 if( eventhdlrdata->filterpos < 0 && !
SCIPisNegative(
scip, eventhdlrdata->softtimelimit) )
112 assert(
scip != NULL);
113 assert(eventhdlr != NULL);
117 assert(eventhdlrdata != NULL);
120 if( eventhdlrdata->filterpos >= 0 )
123 eventhdlrdata->filterpos = -1;
136 assert(eventhdlr != NULL);
138 assert(event != NULL);
139 assert(
scip != NULL);
143 assert(eventhdlrdata != NULL);
149 if( eventhdlrdata->softtimelimit < timelimit )
156 eventhdlrdata->filterpos = -1;
160 eventhdlrdata->softtimelimit);
174 eventhdlrdata->filterpos = -1;
178 assert(eventhdlr != NULL);
186 "soft time limit which should be applied after first solution was found (-1.0: disabled)",
static SCIP_DECL_EVENTEXIT(eventExitSofttimelimit)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
enum SCIP_Retcode SCIP_RETCODE
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
static SCIP_DECL_EVENTEXEC(eventExecSofttimelimit)
SCIP_RETCODE SCIPincludeEventHdlrSofttimelimit(SCIP *scip)
static SCIP_DECL_EVENTINIT(eventInitSofttimelimit)
static SCIP_DECL_EVENTFREE(eventFreeSofttimelimit)
SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
SCIP_RETCODE SCIPsetEventhdlrCopy(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTCOPY((*eventcopy)))
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
static SCIP_DECL_EVENTCOPY(eventCopySofttimelimit)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
eventhdlr for soft time limit
#define SCIP_EVENTTYPE_BESTSOLFOUND
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)