Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods to create, catch, process, and drop events during the solving process of SCIP

Events can only be caught during the operation on the transformed problem. Events on variables can only be caught for transformed variables. If you want to catch an event for an original variable, you have to get the corresponding transformed variable with a call to SCIPgetTransformedVar() and catch the event on the transformed variable.

Functions

SCIP_EVENTTYPE SCIPeventGetType (SCIP_EVENT *event)
 
SCIP_VARSCIPeventGetVar (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetOldobj (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetNewobj (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetOldbound (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetNewbound (SCIP_EVENT *event)
 
SCIP_NODESCIPeventGetNode (SCIP_EVENT *event)
 
SCIP_SOLSCIPeventGetSol (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetHoleLeft (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetHoleRight (SCIP_EVENT *event)
 
SCIP_ROWSCIPeventGetRow (SCIP_EVENT *event)
 
SCIP_COLSCIPeventGetRowCol (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetRowOldCoefVal (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetRowNewCoefVal (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetRowOldConstVal (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetRowNewConstVal (SCIP_EVENT *event)
 
SCIP_SIDETYPE SCIPeventGetRowSide (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetRowOldSideVal (SCIP_EVENT *event)
 
SCIP_Real SCIPeventGetRowNewSideVal (SCIP_EVENT *event)
 
SCIP_RETCODE SCIPcatchEvent (SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
 
SCIP_RETCODE SCIPdropEvent (SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
 
SCIP_RETCODE SCIPcatchVarEvent (SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
 
SCIP_RETCODE SCIPdropVarEvent (SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
 
SCIP_RETCODE SCIPcatchRowEvent (SCIP *scip, SCIP_ROW *row, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
 
SCIP_RETCODE SCIPdropRowEvent (SCIP *scip, SCIP_ROW *row, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
 

Function Documentation

◆ SCIPeventGetType()

SCIP_EVENTTYPE SCIPeventGetType ( SCIP_EVENT event)

gets type of event

Parameters
eventevent

Definition at line 959 of file event.c.

References NULL.

Referenced by SCIP_DECL_EVENTEXEC(), and SCIPclearConflictStore().

◆ SCIPeventGetVar()

◆ SCIPeventGetOldobj()

SCIP_Real SCIPeventGetOldobj ( SCIP_EVENT event)

gets old objective value for an objective value change event

Parameters
eventevent

Definition at line 1104 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_OBJCHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPeventGetNewobj()

SCIP_Real SCIPeventGetNewobj ( SCIP_EVENT event)

gets new objective value for an objective value change event

Parameters
eventevent

Definition at line 1121 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_OBJCHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPeventGetOldbound()

SCIP_Real SCIPeventGetOldbound ( SCIP_EVENT event)

◆ SCIPeventGetNewbound()

SCIP_Real SCIPeventGetNewbound ( SCIP_EVENT event)

◆ SCIPeventGetNode()

SCIP_NODE* SCIPeventGetNode ( SCIP_EVENT event)

gets node for a node or LP event

Parameters
eventevent

Definition at line 1186 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_LPEVENT, SCIP_EVENTTYPE_NODEEVENT, SCIPABORT, and SCIPerrorMessage.

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPeventGetSol()

SCIP_SOL* SCIPeventGetSol ( SCIP_EVENT event)

gets solution for a primal solution event

Parameters
eventevent

Definition at line 1223 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_SOLEVENT, SCIPABORT, and SCIPerrorMessage.

Referenced by SCIP_DECL_EVENTEXEC(), and SCIPclearConflictStore().

◆ SCIPeventGetHoleLeft()

SCIP_Real SCIPeventGetHoleLeft ( SCIP_EVENT event)

gets the left bound of open interval in the hole

Parameters
eventevent

Definition at line 1260 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_HOLECHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetHoleRight()

SCIP_Real SCIPeventGetHoleRight ( SCIP_EVENT event)

gets the right bound of open interval in the hole

Parameters
eventevent

Definition at line 1277 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_HOLECHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRow()

◆ SCIPeventGetRowCol()

SCIP_COL* SCIPeventGetRowCol ( SCIP_EVENT event)

gets column for a row change coefficient event

Parameters
eventevent

Definition at line 1324 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWCOEFCHANGED, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowOldCoefVal()

SCIP_Real SCIPeventGetRowOldCoefVal ( SCIP_EVENT event)

gets old coefficient value for a row change coefficient event

Parameters
eventevent

Definition at line 1341 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWCOEFCHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowNewCoefVal()

SCIP_Real SCIPeventGetRowNewCoefVal ( SCIP_EVENT event)

gets new coefficient value for a row change coefficient event

Parameters
eventevent

Definition at line 1358 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWCOEFCHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowOldConstVal()

SCIP_Real SCIPeventGetRowOldConstVal ( SCIP_EVENT event)

gets old constant value for a row change constant event

Parameters
eventevent

Definition at line 1375 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWCONSTCHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowNewConstVal()

SCIP_Real SCIPeventGetRowNewConstVal ( SCIP_EVENT event)

gets new constant value for a row change constant event

Parameters
eventevent

Definition at line 1392 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWCONSTCHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowSide()

SCIP_SIDETYPE SCIPeventGetRowSide ( SCIP_EVENT event)

gets side for a row change side event

Parameters
eventevent

Definition at line 1409 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWSIDECHANGED, SCIP_SIDETYPE_LEFT, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowOldSideVal()

SCIP_Real SCIPeventGetRowOldSideVal ( SCIP_EVENT event)

gets old side value for a row change side event

Parameters
eventevent

Definition at line 1426 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWSIDECHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPeventGetRowNewSideVal()

SCIP_Real SCIPeventGetRowNewSideVal ( SCIP_EVENT event)

gets new side value for a row change side event

Parameters
eventevent

Definition at line 1443 of file event.c.

References SCIP_Event::eventtype, NULL, SCIP_EVENTTYPE_ROWSIDECHANGED, SCIP_INVALID, SCIPABORT, and SCIPerrorMessage.

◆ SCIPcatchEvent()

SCIP_RETCODE SCIPcatchEvent ( SCIP scip,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int *  filterpos 
)

catches a global (not variable or row dependent) event

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
eventtypeevent type mask to select events to catch
eventhdlrevent handler to process events with
eventdataevent data to pass to the event handler when processing this event
filterpospointer to store position of event filter entry, or NULL

Definition at line 40434 of file scip.c.

References checkStage(), Scip::eventfilter, FALSE, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPeventfilterAdd(), Scip::set, and TRUE.

Referenced by applyCompletesol(), applyOfins(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_EVENTINIT(), SCIP_DECL_EVENTINITSOL(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PROBINITSOL(), SCIP_DECL_PROPINITSOL(), SCIPapplyProximity(), SCIPapplyRens(), and SCIPapplyZeroobj().

◆ SCIPdropEvent()

SCIP_RETCODE SCIPdropEvent ( SCIP scip,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int  filterpos 
)

drops a global event (stops to track event)

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
eventtypeevent type mask of dropped event
eventhdlrevent handler to process events with
eventdataevent data to pass to the event handler when processing this event
filterposposition of event filter entry returned by SCIPcatchEvent(), or -1

Definition at line 40468 of file scip.c.

References checkStage(), Scip::eventfilter, FALSE, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPeventfilterDel(), Scip::set, and TRUE.

Referenced by applyCompletesol(), applyOfins(), SCIP_DECL_CONSEXITSOL(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_EVENTEXIT(), SCIP_DECL_EVENTEXITSOL(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PROBEXITSOL(), SCIP_DECL_PROPEXITSOL(), SCIPapplyProximity(), SCIPapplyRens(), and SCIPapplyZeroobj().

◆ SCIPcatchVarEvent()

SCIP_RETCODE SCIPcatchVarEvent ( SCIP scip,
SCIP_VAR var,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int *  filterpos 
)

catches an objective value or domain change event on the given transformed variable

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
vartransformed variable to catch event for
eventtypeevent type mask to select events to catch
eventhdlrevent handler to process events with
eventdataevent data to pass to the event handler when processing this event
filterpospointer to store position of event filter entry, or NULL

Definition at line 40502 of file scip.c.

References checkStage(), FALSE, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_EVENTTYPE_VARCHANGED, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPvarCatchEvent(), SCIPvarGetName(), SCIPvarIsOriginal(), Scip::set, and TRUE.

Referenced by addCoef(), applyFixings(), branchruledataEnsureArraySize(), catchEvent(), catchEvents(), catchLhsVarEvents(), catchLinearVarEvents(), catchObjEvent(), catchQuadVarEvents(), catchRhsVarEvents(), catchVarEventCardinality(), catchVarEvents(), consdataCatchEvents(), consdataCatchWatchedEvents(), consdataCreate(), consdataSwitchWatchedvars(), createSubSCIP(), handleNewVariableSOS1(), handleNewVariableSOS2(), heurdataEnsureArraySize(), presolRoundConsSOS1(), presolRoundIndicator(), presolRoundSOS2(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_EVENTINIT(), SCIP_DECL_EVENTINITSOL(), SCIP_DECL_EXPRGRAPHVARADDED(), SCIP_DECL_HEUREXEC(), SCIPcreateConsLogicor(), SCIPsetBinaryVarIndicator(), setUpEvents(), and switchWatchedvars().

◆ SCIPdropVarEvent()

SCIP_RETCODE SCIPdropVarEvent ( SCIP scip,
SCIP_VAR var,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int  filterpos 
)

drops an objective value or domain change event (stops to track event) on the given transformed variable

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
vartransformed variable to drop event for
eventtypeevent type mask of dropped event
eventhdlrevent handler to process events with
eventdataevent data to pass to the event handler when processing this event
filterposposition of event filter entry returned by SCIPcatchVarEvent(), or -1

Definition at line 40548 of file scip.c.

References checkStage(), FALSE, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPvarDropEvent(), SCIPvarGetName(), SCIPvarIsOriginal(), Scip::set, and TRUE.

Referenced by applyFixings(), consdataDropEvents(), consdataDropWatchedEvents(), consdataSwitchWatchedvars(), delCoefPos(), deleteVarSOS1(), deleteVarSOS2(), dropAndFreeEvents(), dropEvent(), dropEvents(), dropLhsVarEvents(), dropLinearVarEvents(), dropObjEvent(), dropQuadVarEvents(), dropRhsVarEvents(), dropVarEventCardinality(), dropVarEvents(), freeSubSCIP(), heurdataFreeArrays(), presolRoundConsSOS1(), presolRoundIndicator(), presolRoundSOS2(), SCIP_DECL_BRANCHEXITSOL(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSEXITPRE(), SCIP_DECL_EVENTEXITSOL(), SCIP_DECL_EXPRGRAPHVARREMOVE(), SCIP_DECL_HEUREXEC(), and switchWatchedvars().

◆ SCIPcatchRowEvent()

SCIP_RETCODE SCIPcatchRowEvent ( SCIP scip,
SCIP_ROW row,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int *  filterpos 
)

catches a row coefficient, constant, or side change event on the given row

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
rowlinear row to catch event for
eventtypeevent type mask to select events to catch
eventhdlrevent handler to process events with
eventdataevent data to pass to the event handler when processing this event
filterpospointer to store position of event filter entry, or NULL

Definition at line 40588 of file scip.c.

References checkStage(), FALSE, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_EVENTTYPE_ROWCHANGED, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIProwCatchEvent(), Scip::set, and TRUE.

◆ SCIPdropRowEvent()

SCIP_RETCODE SCIPdropRowEvent ( SCIP scip,
SCIP_ROW row,
SCIP_EVENTTYPE  eventtype,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTDATA eventdata,
int  filterpos 
)

drops a row coefficient, constant, or side change event (stops to track event) on the given row

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
rowlinear row to drop event for
eventtypeevent type mask of dropped event
eventhdlrevent handler to process events with
eventdataevent data to pass to the event handler when processing this event
filterposposition of event filter entry returned by SCIPcatchVarEvent(), or -1

Definition at line 40628 of file scip.c.

References checkStage(), FALSE, Scip::mem, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIProwDropEvent(), Scip::set, and TRUE.