eventhandler for storing all global bound changes
the bound changes are stored so that they can be shared with other threads in a concurrent solve.
Definition in file event_globalbnd.c.
#include "scip/event_globalbnd.h"
#include "scip/pub_misc.h"
#include "scip/concurrent.h"
#include "scip/boundstore.h"
#include "scip/syncstore.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | EVENTHDLR_NAME "globalbnd" |
#define | EVENTHDLR_DESC "event handler for globalbnd event" |
Functions | |
static | SCIP_DECL_EVENTFREE (eventFreeGlobalbnd) |
static | SCIP_DECL_EVENTINIT (eventInitGlobalbnd) |
static | SCIP_DECL_EVENTEXIT (eventExitGlobalbnd) |
static | SCIP_DECL_EVENTEXEC (eventExecGlobalbnd) |
SCIP_RETCODE | SCIPincludeEventHdlrGlobalbnd (SCIP *scip) |
SCIP_BOUNDSTORE * | SCIPeventGlobalbndGetBoundChanges (SCIP_EVENTHDLR *eventhdlr) |
void | SCIPeventGlobalbndEnableBoundStorage (SCIP_EVENTHDLR *eventhdlr) |
void | SCIPeventGlobalbndDisableBoundStorage (SCIP_EVENTHDLR *eventhdlr) |
void | SCIPeventGlobalbndClearBoundChanges (SCIP_EVENTHDLR *eventhdlr) |
#define EVENTHDLR_NAME "globalbnd" |
Definition at line 33 of file event_globalbnd.c.
Referenced by SCIP_DECL_EVENTEXEC(), SCIP_DECL_EVENTEXIT(), SCIP_DECL_EVENTFREE(), SCIP_DECL_EVENTINIT(), SCIPeventGlobalbndClearBoundChanges(), SCIPeventGlobalbndDisableBoundStorage(), SCIPeventGlobalbndEnableBoundStorage(), SCIPeventGlobalbndGetBoundChanges(), and SCIPincludeEventHdlrGlobalbnd().
#define EVENTHDLR_DESC "event handler for globalbnd event" |
Definition at line 34 of file event_globalbnd.c.
Referenced by SCIPincludeEventHdlrGlobalbnd().
|
static |
destructor of event handler to free user data (called when SCIP is exiting)
Definition at line 61 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIP_OKAY, SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPeventhdlrSetData(), and SCIPfreeMemory.
|
static |
initialization method of event handler (called after problem was transformed)
Definition at line 80 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIP_CALL, SCIP_EVENTTYPE_GBDCHANGED, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, SCIPboundstoreCreate(), SCIPcatchEvent(), SCIPcatchVarEvent(), SCIPdebugMsg, SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPgetNOrigVars(), SCIPgetNVars(), SCIPgetSubscipDepth(), SCIPgetSyncstore(), SCIPgetVars(), SCIPsyncstoreIsInitialized(), and TRUE.
|
static |
deinitialization method of event handler (called before transformed problem is freed)
Definition at line 115 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, SCIPboundstoreFree(), SCIPdropEvent(), SCIPeventhdlrGetData(), and SCIPeventhdlrGetName().
|
static |
execution method of event handler
Definition at line 139 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_GBDCHANGED, SCIP_EVENTTYPE_GLBCHANGED, SCIP_EVENTTYPE_GUBCHANGED, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPboundstoreAdd(), SCIPboundtypeOpposite(), SCIPcatchVarEvent(), SCIPdebugMsg, SCIPeventGetNewbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPgetConcurrentVaridx(), and SCIPvarGetOrigvarSum().
SCIP_RETCODE SCIPincludeEventHdlrGlobalbnd | ( | SCIP * | scip | ) |
creates event handler for globalbnd event
scip | SCIP data structure |
Definition at line 195 of file event_globalbnd.c.
References EVENTHDLR_DESC, EVENTHDLR_NAME, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, SCIPincludeEventhdlrBasic(), SCIPsetEventhdlrExit(), SCIPsetEventhdlrFree(), and SCIPsetEventhdlrInit().
Referenced by SCIPcreateConcurrent().
SCIP_BOUNDSTORE* SCIPeventGlobalbndGetBoundChanges | ( | SCIP_EVENTHDLR * | eventhdlr | ) |
gets the global bound changes stored in the eventhandler
eventhdlr | the globalbound eventhandler |
Definition at line 227 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIPeventhdlrGetData(), and SCIPeventhdlrGetName().
Referenced by SCIPgetConcurrentGlobalBoundChanges().
void SCIPeventGlobalbndEnableBoundStorage | ( | SCIP_EVENTHDLR * | eventhdlr | ) |
enables storing of bound changes
eventhdlr | the globalbound eventhandler |
Definition at line 242 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), and TRUE.
Referenced by SCIPenableConcurrentBoundStorage().
void SCIPeventGlobalbndDisableBoundStorage | ( | SCIP_EVENTHDLR * | eventhdlr | ) |
disables storing of bound changes
eventhdlr | the globalbound eventhandler |
Definition at line 258 of file event_globalbnd.c.
References EVENTHDLR_NAME, FALSE, SCIPeventhdlrGetData(), and SCIPeventhdlrGetName().
Referenced by SCIPdisableConcurrentBoundStorage().
void SCIPeventGlobalbndClearBoundChanges | ( | SCIP_EVENTHDLR * | eventhdlr | ) |
clears all bound changes stored in the eventhandler
eventhdlr | the globalbound eventhandler |
Definition at line 274 of file event_globalbnd.c.
References EVENTHDLR_NAME, SCIPboundstoreClear(), SCIPeventhdlrGetData(), and SCIPeventhdlrGetName().
Referenced by SCIPsynchronize().