Detailed Description
implementation of concurrent solver interface for SCIP
Definition in file concsolver_scip.c.
#include "blockmemshell/memory.h"
#include "scip/boundstore.h"
#include "scip/concsolver.h"
#include "scip/concsolver_scip.h"
#include "scip/concurrent.h"
#include "scip/pub_event.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_paramset.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/scip_concurrent.h"
#include "scip/scip_copy.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_timing.h"
#include "scip/syncstore.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | EVENTHDLR_NAME "sync" |
#define | EVENTHDLR_DESC "event handler for synchronization of concurrent scip sovlers" |
Macro Definition Documentation
◆ EVENTHDLR_NAME
#define EVENTHDLR_NAME "sync" |
Definition at line 54 of file concsolver_scip.c.
Referenced by includeEventHdlrSync(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_EVENTEXIT(), SCIP_DECL_EVENTFREE(), and SCIP_DECL_EVENTINIT().
◆ EVENTHDLR_DESC
#define EVENTHDLR_DESC "event handler for synchronization of concurrent scip sovlers" |
Definition at line 55 of file concsolver_scip.c.
Referenced by includeEventHdlrSync().
Function Documentation
◆ SCIP_DECL_EVENTFREE()
|
static |
destructor of event handler to free user data (called when SCIP is exiting)
Definition at line 73 of file concsolver_scip.c.
References EVENTHDLR_NAME, NULL, SCIP_OKAY, SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPeventhdlrSetData(), and SCIPfreeBlockMemory.
◆ SCIP_DECL_EVENTINIT()
|
static |
initialization method of event handler (called after problem was transformed)
Definition at line 93 of file concsolver_scip.c.
References EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_SYNC, SCIP_OKAY, SCIPcatchEvent(), SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPgetSyncstore(), and SCIPsyncstoreIsInitialized().
◆ SCIP_DECL_EVENTEXIT()
|
static |
deinitialization method of event handler (called before transformed problem is freed)
Definition at line 119 of file concsolver_scip.c.
References EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_SYNC, SCIP_OKAY, SCIPdropEvent(), SCIPeventhdlrGetData(), and SCIPeventhdlrGetName().
◆ SCIP_DECL_EVENTEXEC()
|
static |
execution method of event handler
Definition at line 142 of file concsolver_scip.c.
References EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPeventhdlrGetName(), and SCIPsynchronize().
◆ includeEventHdlrSync()
|
static |
includes event handler for synchronization found
- Parameters
-
scip SCIP data structure
Definition at line 157 of file concsolver_scip.c.
References EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPincludeEventhdlrBasic(), SCIPsetEventhdlrExit(), SCIPsetEventhdlrFree(), and SCIPsetEventhdlrInit().
Referenced by SCIP_DECL_CONCSOLVERCREATEINST().
◆ disableConflictingDualReductions()
|
static |
Disable dual reductions that might cut off optimal solutions. Although they keep at least one optimal solution intact, communicating these bounds may cut off all optimal solutions, if different optimal solutions were kept in different concurrent solvers.
- Parameters
-
scip SCIP datastructure
Definition at line 197 of file concsolver_scip.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBoolParam(), and SCIPsetBoolParam().
Referenced by SCIP_DECL_CONCSOLVERCREATEINST().
◆ setChildSelRule()
|
static |
sets the child selection rule based on the index of the concurrent solver
- Parameters
-
concsolver the concurrent solver
Definition at line 214 of file concsolver_scip.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconcsolverGetData(), SCIPconcsolverGetIdx(), and SCIPsetCharParam().
Referenced by SCIP_DECL_CONCSOLVERCREATEINST().
◆ initConcsolver()
|
static |
initialize the concurrent SCIP solver, i.e. setup the copy of the problem and the mapping of the variables
- Parameters
-
scip the main SCIP instance concsolver the concurrent solver to set up
Definition at line 234 of file concsolver_scip.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSol(), SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPblkmem(), SCIPconcsolverGetData(), SCIPconcsolverGetName(), SCIPcopy(), SCIPcreate(), SCIPcreateConcurrent(), SCIPcreateSol(), SCIPfreeBufferArray, SCIPgetBestSol(), SCIPgetNSols(), SCIPgetNVars(), SCIPgetSolVals(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPsetSolVals(), SCIPvarGetIndex(), and TRUE.
Referenced by SCIP_DECL_CONCSOLVERCREATEINST().
◆ SCIP_DECL_CONCSOLVERCREATEINST()
|
static |
creates an instance of a concurrent SCIP solver
Definition at line 313 of file concsolver_scip.c.
References BMSallocMemory, disableConflictingDualReductions(), FALSE, includeEventHdlrSync(), initConcsolver(), NULL, paramname, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_CLOCKTYPE_WALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VERBLEVEL_FULL, SCIPallocBufferArray, SCIPconcsolverGetIdx(), SCIPconcsolverGetName(), SCIPconcsolverSetData(), SCIPconcsolverTypeGetData(), SCIPfileExists(), SCIPfixParam(), SCIPfreeBufferArray, SCIPgetBoolParam(), SCIPgetNParams(), SCIPgetParams(), SCIPgetStringParam(), SCIPinfoMessage(), SCIPparamGetName(), SCIPreadParams(), SCIPsetBoolParam(), SCIPsetEmphasis(), SCIPsetIntParam(), SCIPsnprintf(), SCIPunfixParam(), SCIPverbMessage(), setChildSelRule(), and TRUE.
◆ SCIP_DECL_CONCSOLVERDESTROYINST()
|
static |
destroys an instance of a concurrent SCIP solver
Definition at line 420 of file concsolver_scip.c.
References BMSfreeMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPconcsolverGetData(), SCIPconcsolverSetData(), SCIPfree(), and SCIPfreeBlockMemoryArray.
◆ SCIP_DECL_CONCSOLVERTYPEFREEDATA()
|
static |
frees the data of a concurrent solver type
Definition at line 443 of file concsolver_scip.c.
References BMSfreeMemory.
◆ SCIP_DECL_CONCSOLVERINITSEEDS()
|
static |
initializes the random and permutation seeds with the given one and enables permutation of constraints and variables
Definition at line 452 of file concsolver_scip.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconcsolverGetData(), SCIPconcsolverGetName(), SCIPinfoMessage(), SCIPsetBoolParam(), SCIPsetIntParam(), and TRUE.
◆ SCIP_DECL_CONCSOLVERCOPYSOLVINGDATA()
|
static |
installs the solving status of this concurrent solver and the solving statistics into the given SCIP instance
Definition at line 475 of file concsolver_scip.c.
References NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSolFree(), SCIPallocBufferArray, SCIPconcsolverGetData(), SCIPcopyConcurrentSolvingStats(), SCIPcopySolStats(), SCIPcreateSol(), SCIPfindHeur(), SCIPfreeBufferArray, SCIPgetNSols(), SCIPgetNVars(), SCIPgetSols(), SCIPgetSolVals(), SCIPgetVars(), SCIPheurGetName(), SCIPsetSolVals(), and SCIPsolGetHeur().
◆ SCIP_DECL_CONCSOLVEREXEC()
|
static |
start solving the problem until the solving reaches a limit, gets interrupted, or just finished successfully
Definition at line 537 of file concsolver_scip.c.
References nnodes, NULL, SCIP_CALL, SCIP_OKAY, SCIPconcsolverGetData(), SCIPconcsolverGetName(), SCIPgetNLPIterations(), SCIPgetNNodes(), SCIPgetSolvingTime(), SCIPinfoMessage(), SCIPprintStatus(), and SCIPsolve().
◆ SCIP_DECL_CONCSOLVERSTOP()
|
static |
stops the concurrent solver as soon as possible
Definition at line 567 of file concsolver_scip.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconcsolverGetData(), and SCIPinterruptSolve().
◆ SCIP_DECL_CONCSOLVERSYNCWRITE()
|
static |
writes new solutions and global boundchanges to the iven synchronization data
Definition at line 582 of file concsolver_scip.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STATUS_UNKNOWN, SCIPconcsolverGetData(), SCIPconcsolverGetIdx(), SCIPconcsolverGetName(), SCIPdebugMessage, SCIPgetConcurrentGlobalBoundChanges(), SCIPgetDualbound(), SCIPgetMemTotal(), SCIPgetNSols(), SCIPgetPrimalbound(), SCIPgetSolOrigObj(), SCIPgetSols(), SCIPgetSolVals(), SCIPgetStatus(), SCIPIsConcurrentSolNew(), SCIPsyncdataAddBoundChanges(), SCIPsyncdataAddMemTotal(), SCIPsyncdataGetSolutionBuffer(), SCIPsyncdataGetStatus(), SCIPsyncdataSetLowerbound(), SCIPsyncdataSetStatus(), and SCIPsyncdataSetUpperbound().
◆ SCIP_DECL_CONCSOLVERSYNCREAD()
|
static |
reads the solutions and bounds from the given synchronization data
Definition at line 655 of file concsolver_scip.c.
References NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_INTEGER, SCIPaddConcurrentBndchg(), SCIPaddConcurrentSol(), SCIPboundstoreGetChgType(), SCIPboundstoreGetChgVal(), SCIPboundstoreGetChgVaridx(), SCIPboundstoreGetNChgs(), SCIPconcsolverGetData(), SCIPconcsolverGetIdx(), SCIPconcsolverGetName(), SCIPcreateOrigSol(), SCIPdebugMessage, SCIPisGE(), SCIPisLE(), SCIPsetSolVals(), SCIPsyncdataGetBoundChgs(), SCIPsyncdataGetSolutions(), SCIPvarGetLbGlobal(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetType(), and SCIPvarGetUbGlobal().
◆ SCIPincludeConcurrentScipSolvers()
SCIP_RETCODE SCIPincludeConcurrentScipSolvers | ( | SCIP * | scip | ) |
creates the concurrent SCIP solver plugins and includes them in SCIP
- Parameters
-
scip SCIP datastructure
Definition at line 741 of file concsolver_scip.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PARAMEMPHASIS_COUNTER, SCIP_PARAMEMPHASIS_CPSOLVER, SCIP_PARAMEMPHASIS_DEFAULT, SCIP_PARAMEMPHASIS_EASYCIP, SCIP_PARAMEMPHASIS_FEASIBILITY, SCIP_PARAMEMPHASIS_HARDLP, SCIP_PARAMEMPHASIS_OPTIMALITY, SCIPallocMemory, SCIPincludeConcsolverType(), and TRUE.
Referenced by SCIPincludeDefaultPlugins().