Loading...
Searching...
No Matches
event_relaxsol.c
Go to the documentation of this file.
30 * @brief eventhandler to update the relaxation solution in the original problem when the master LP has been solved
34/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
44#define EVENTHDLR_DESC "eventhandler to update the relaxation solution in the original problem when the master LP has been solved"
91 /* notify SCIP that your event handler wants to react on the event type lp solved and solution found */
92 SCIP_CALL( SCIPcatchEvent(scip, SCIP_EVENTTYPE_LPSOLVED | SCIP_EVENTTYPE_SOLFOUND, eventhdlr, NULL, NULL) );
103 /* notify SCIP that your event handler wants to drop the event type lp solved and solution found */
104 SCIP_CALL( SCIPdropEvent(scip, SCIP_EVENTTYPE_LPSOLVED | SCIP_EVENTTYPE_SOLFOUND, eventhdlr, NULL, -1) );
124 /* Only transfer the master solution if it is an LP solution or if it is a feasible solution that
125 * comes from a master heuristic; otherwise it is assumed to already come from the original problem
127 if( (SCIPeventGetType(event) & SCIP_EVENTTYPE_SOLFOUND) && SCIPsolGetHeur(SCIPeventGetSol(event)) == NULL
145 SCIPdebugMessage("Master feasible solution found by <%s> -- transferring to original problem\n",
149 SCIP_CALL( GCGtransformMastersolToOrigsol(eventhdlrdata->gcg, sol, &origsol, foundbyheur, &violatesvarbnds) );
199 /* the relaxation solution event handler is not included if BENDERS or ORIGINAL mode is used. As such, it will
202 if( GCGgetDecompositionMode(gcg) == GCG_DECMODE_BENDERS || GCGgetDecompositionMode(gcg) == GCG_DECMODE_ORIGINAL )
SCIP_DECL_EVENTEXEC(EventhdlrNewSol::scip_exec)
SCIP_DECL_EVENTINIT(EventhdlrNewSol::scip_init)
SCIP_DECL_EVENTEXIT(EventhdlrNewSol::scip_exit)
SCIP_DECL_EVENTFREE(EventhdlrNewSol::scip_free)
#define SCIP_Bool
#define TRUE
#define FALSE
SCIP_Bool GCGeventhdlrMastersolIsTriggered(GCG *gcg)
Definition event_mastersol.c:192
eventhdlr to transfer solutions found in the original problem to the master problem
SCIP_RETCODE GCGincludeEventHdlrRelaxsol(GCG *gcg)
Definition event_relaxsol.c:162
SCIP_Bool GCGeventhdlrRelaxsolIsTriggered(GCG *gcg)
Definition event_relaxsol.c:190
eventhandler to update the relaxation solution in the original problem when the master LP has been so...
GCG interface methods.
SCIP_Bool GCGmasterIsSolValid(GCG *gcg, SCIP_SOL *mastersol)
Definition pricer_gcg.cpp:6681
SCIP_RETCODE GCGtransformMastersolToOrigsol(GCG *gcg, SCIP_SOL *mastersol, SCIP_SOL **origsol, SCIP_Bool ignorelocalvarbnds, SCIP_Bool *violatesvarbnds)
Definition misc.c:135
GCG_EXPORT GCG_DECMODE GCGgetDecompositionMode(GCG *gcg)
Definition relax_gcg.c:5294
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTFREE((*eventfree)))
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTEXIT((*eventexit)))
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_DECL_EVENTINIT((*eventinit)))
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_SOL * SCIPeventGetSol(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)
const char * SCIPheurGetName(SCIP_HEUR *heur)
#define SCIPallocMemory(scip, ptr)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIPfreeMemory(GCGgetOrigprob(gcg), &divingdata)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
#define NULL
Definition class_conspartition.cpp:44
GCG variable pricer.
GCG relaxator.
Definition branch_generic.c:112
struct SCIP_Eventhdlr SCIP_EVENTHDLR
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
#define SCIP_EVENTTYPE_SOLFOUND
#define SCIP_EVENTTYPE_LPSOLVED
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Sol SCIP_SOL