63#define EVENTHDLR_NAME "sync"
64#define EVENTHDLR_DESC "event handler for synchronization of concurrent scip sovlers"
71struct SCIP_EventhdlrData
140 if( eventhdlrdata->filterpos >= 0 )
143 eventhdlrdata->filterpos = -1;
174 eventhdlrdata->filterpos = -1;
188struct SCIP_ConcSolverTypeData
195struct SCIP_ConcSolverData
229 static const char childsel[] = {
'h',
'i',
'p',
'r',
'l',
'd',
'u' };
287 for(
i = 0;
i < data->nvars;
i++ )
323 if( norigvars > data->nvars )
329 for( v = 0; v < norigvars; ++v )
385 if( typedata->loademphasis )
399 for(
i = 0;
i < nparams; ++
i )
405 if( strncmp(
paramname,
"limits/", 7) == 0 ||
406 strncmp(
paramname,
"numerics/", 9) == 0 ||
408 strncmp(
paramname,
"concurrent/sync/", 16) == 0 ||
409 strncmp(
paramname,
"heuristics/sync/", 16) == 0 ||
410 strncmp(
paramname,
"propagating/sync/", 17) == 0 )
412 fixedparams[nfixedparams++] = params[
i];
419 for(
i = 0;
i < nfixedparams; ++
i )
558 for(
i = 0;
i < nsols; ++
i )
665 nsols =
MIN(nsols, maxcandsols);
668 for(
i = 0;
i < nsols; ++
i )
683 if( solvals ==
NULL )
690 if( *nsolsshared == maxsharedsols )
697 if( boundstore !=
NULL )
729 for(
i = 0;
i < nsols; ++
i )
737 if( concsolverids[
i] == concsolverid )
748 if( norigvars > data->nvars )
751 for( v = 0; v < norigvars; ++v )
771 *ntighterintbnds = 0;
775 for(
i = 0;
i < nbndchgs; ++
i )
784 var = data->vars[idx];
807 ++(*ntighterintbnds);
830 data->loademphasis =
FALSE;
832 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
833 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
836 data->loademphasis =
TRUE;
839 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
840 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
843 data->loademphasis =
TRUE;
846 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
847 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
850 data->loademphasis =
TRUE;
853 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
854 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
857 data->loademphasis =
TRUE;
860 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
861 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
864 data->loademphasis =
TRUE;
867 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
868 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
871 data->loademphasis =
TRUE;
874 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
875 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
878 data->loademphasis =
TRUE;
881 concsolverScipExec, concsolverGetSolvingData, concsolverScipStop, concsolverScipSyncWrite,
882 concsolverScipSyncRead, concsolverTypeScipFreeData, data) );
SCIP_Real SCIPboundstoreGetChgVal(SCIP_BOUNDSTORE *boundstore, int i)
SCIP_BOUNDTYPE SCIPboundstoreGetChgType(SCIP_BOUNDSTORE *boundstore, int i)
int SCIPboundstoreGetChgVaridx(SCIP_BOUNDSTORE *boundstore, int i)
int SCIPboundstoreGetNChgs(SCIP_BOUNDSTORE *boundstore)
the interface of the boundstore structure
SCIP_CONCSOLVERDATA * SCIPconcsolverGetData(SCIP_CONCSOLVER *concsolver)
void SCIPconcsolverSetData(SCIP_CONCSOLVER *concsolver, SCIP_CONCSOLVERDATA *data)
int SCIPconcsolverGetIdx(SCIP_CONCSOLVER *concsolver)
char * SCIPconcsolverGetName(SCIP_CONCSOLVER *concsolver)
SCIP_CONCSOLVERTYPEDATA * SCIPconcsolverTypeGetData(SCIP_CONCSOLVERTYPE *concsolvertype)
datastructures for concurrent solvers
static SCIP_RETCODE initConcsolver(SCIP *scip, SCIP_CONCSOLVER *concsolver)
SCIP_RETCODE SCIPincludeConcurrentScipSolvers(SCIP *scip)
static SCIP_RETCODE disableConflictingDualReductions(SCIP *scip)
static SCIP_RETCODE setChildSelRule(SCIP_CONCSOLVER *concsolver)
static SCIP_RETCODE includeEventHdlrSync(SCIP *scip)
implementation of concurrent solver interface for SCIP
SCIP_RETCODE SCIPcreateConcurrent(SCIP *scip, SCIP_CONCSOLVER *concsolver, int *varperm, int nvars)
SCIP_RETCODE SCIPsynchronize(SCIP *scip)
SCIP_RETCODE SCIPaddConcurrentBndchg(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE bndtype)
SCIP_RETCODE SCIPcopySolStats(SCIP_SOL *source, SCIP_SOL *target)
SCIP_BOUNDSTORE * SCIPgetConcurrentGlobalBoundChanges(SCIP *scip)
SCIP_Bool SCIPIsConcurrentSolNew(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPcopyConcurrentSolvingStats(SCIP *source, SCIP *target)
SCIP_RETCODE SCIPaddConcurrentSol(SCIP *scip, SCIP_SOL *sol)
helper functions for concurrent scip solvers
SCIP_RETCODE SCIPcopyConsCompression(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
SCIP_Bool SCIPfileExists(const char *filename)
SCIP_RETCODE SCIPprintStatus(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
int SCIPgetNParams(SCIP *scip)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
SCIP_RETCODE SCIPunfixParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char value)
SCIP_RETCODE SCIPgetStringParam(SCIP *scip, const char *name, char **value)
SCIP_PARAM ** SCIPgetParams(SCIP *scip)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPfixParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeConcsolverType(SCIP *scip, const char *name, SCIP_Real prefpriodefault, SCIP_DECL_CONCSOLVERCREATEINST((*concsolvercreateinst)), SCIP_DECL_CONCSOLVERDESTROYINST((*concsolverdestroyinst)), SCIP_DECL_CONCSOLVERINITSEEDS((*concsolverinitseeds)), SCIP_DECL_CONCSOLVEREXEC((*concsolverexec)), SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA((*concsolvercopysolvdata)), SCIP_DECL_CONCSOLVERSTOP((*concsolverstop)), SCIP_DECL_CONCSOLVERSYNCWRITE((*concsolversyncwrite)), SCIP_DECL_CONCSOLVERSYNCREAD((*concsolversyncread)), SCIP_DECL_CONCSOLVERTYPEFREEDATA((*concsolvertypefreedata)), SCIP_CONCSOLVERTYPEDATA *data)
SCIP_RETCODE SCIPsetEventhdlrFree(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_RETCODE SCIPsetEventhdlrExit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr)
SCIP_RETCODE SCIPsetEventhdlrInit(SCIP *scip, SCIP_EVENTHDLR *eventhdlr,)
void SCIPeventhdlrSetData(SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTHDLRDATA *eventhdlrdata)
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_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
const char * SCIPheurGetName(SCIP_HEUR *heur)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_Longint SCIPgetMemTotal(SCIP *scip)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_SYNCSTORE * SCIPgetSyncstore(SCIP *scip)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
int SCIPgetNSols(SCIP *scip)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_RETCODE SCIPcreateOrigSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
static const char * paramname[]
memory allocation routines
#define BMSfreeMemory(ptr)
#define BMSallocMemory(ptr)
SCIP_Bool SCIPmessagehdlrIsQuiet(SCIP_MESSAGEHDLR *messagehdlr)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
const char * SCIPparamGetName(SCIP_PARAM *param)
public methods for managing events
public methods for primal heuristics
public methods for message output
public data structures and miscellaneous methods
public methods for handling parameter settings
public methods for primal CIP solutions
public methods for problem variables
public methods for concurrent solving mode
public methods for problem copies
public methods for event handler plugins and event handlers
public methods for primal heuristic plugins and divesets
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public methods for querying solving statistics
public methods for timing
SCIP_BOUNDSTORE * SCIPsyncdataGetBoundChgs(SCIP_SYNCDATA *syncdata)
void SCIPsyncdataSetUpperbound(SCIP_SYNCDATA *syncdata, SCIP_Real upperbound)
SCIP_RETCODE SCIPsyncdataAddBoundChanges(SCIP_SYNCSTORE *syncstore, SCIP_SYNCDATA *syncdata, SCIP_BOUNDSTORE *boundstore)
void SCIPsyncdataGetSolutions(SCIP_SYNCDATA *syncdata, SCIP_Real ***solvalues, int **solowner, int *nsols)
void SCIPsyncdataSetStatus(SCIP_SYNCDATA *syncdata, SCIP_STATUS status, int solverid)
void SCIPsyncdataSetLowerbound(SCIP_SYNCDATA *syncdata, SCIP_Real lowerbound)
void SCIPsyncdataGetSolutionBuffer(SCIP_SYNCSTORE *syncstore, SCIP_SYNCDATA *syncdata, SCIP_Real solobj, int ownerid, SCIP_Real **buffer)
SCIP_Bool SCIPsyncstoreIsInitialized(SCIP_SYNCSTORE *syncstore)
void SCIPsyncdataAddMemTotal(SCIP_SYNCDATA *syncdata, SCIP_Longint memtotal)
SCIP_STATUS SCIPsyncdataGetStatus(SCIP_SYNCDATA *syncdata)
the function declarations for the synchronization store
struct SCIP_ConcSolver SCIP_CONCSOLVER
#define SCIP_DECL_CONCSOLVERSTOP(x)
#define SCIP_DECL_CONCSOLVERINITSEEDS(x)
#define SCIP_DECL_CONCSOLVERTYPEFREEDATA(x)
#define SCIP_DECL_CONCSOLVERSYNCWRITE(x)
#define SCIP_DECL_CONCSOLVERDESTROYINST(x)
#define SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA(x)
struct SCIP_ConcSolverTypeData SCIP_CONCSOLVERTYPEDATA
#define SCIP_DECL_CONCSOLVEREXEC(x)
#define SCIP_DECL_CONCSOLVERCREATEINST(x)
#define SCIP_DECL_CONCSOLVERSYNCREAD(x)
struct SCIP_ConcSolverData SCIP_CONCSOLVERDATA
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_EVENTTYPE_SYNC
#define SCIP_DECL_EVENTEXIT(x)
struct SCIP_EventhdlrData SCIP_EVENTHDLRDATA
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_DECL_EVENTINIT(x)
#define SCIP_DECL_EVENTFREE(x)
struct SCIP_Heur SCIP_HEUR
enum SCIP_BoundType SCIP_BOUNDTYPE
struct SCIP_HashMap SCIP_HASHMAP
@ SCIP_PARAMEMPHASIS_DEFAULT
@ SCIP_PARAMEMPHASIS_CPSOLVER
@ SCIP_PARAMEMPHASIS_HARDLP
@ SCIP_PARAMEMPHASIS_FEASIBILITY
@ SCIP_PARAMEMPHASIS_EASYCIP
@ SCIP_PARAMEMPHASIS_COUNTER
@ SCIP_PARAMEMPHASIS_OPTIMALITY
struct SCIP_Param SCIP_PARAM
enum SCIP_ParamEmphasis SCIP_PARAMEMPHASIS
enum SCIP_Retcode SCIP_RETCODE
enum SCIP_Status SCIP_STATUS
struct SCIP_SyncStore SCIP_SYNCSTORE
struct SCIP_BoundStore SCIP_BOUNDSTORE
@ SCIP_VARSTATUS_MULTAGGR