37#ifndef __SCIP_PARA_SOLVER_H__
38#define __SCIP_PARA_SOLVER_H__
49#define ENFORCED_THRESHOLD 5
54class ScipParaObjCommPointHdlr;
55class ScipParaObjNodesel;
56class ScipParaObjSelfSplitNodesel;
91#if SCIP_APIVERSION >= 101
92 ScipParaObjSelfSplitNodesel *selfSplitNodesel;
151 virtual void solve();
198 else return "ScipParaObjNodesel";
205 int numnodesels = SCIPgetNNodesels(
scip );
206 SCIP_NODESEL** nodesels = SCIPgetNodesels(
scip );
209 for( i = 0; i < numnodesels; ++i )
211 std::string nodeselname(SCIPnodeselGetName(nodesels[i]));
212 if( std::string(nodeselname) == std::string(changeNodeSelName) )
218 assert( i != numnodesels );
222 int numnodesels = SCIPgetNNodesels(
scip );
223 SCIP_NODESEL** nodesels = SCIPgetNodesels(
scip );
226 for( i = 0; i < numnodesels; ++i )
228 std::string nodeselname(SCIPnodeselGetName(nodesels[i]));
229 if( std::string(nodeselname) == std::string(changeNodeSelName) )
235 assert( i != numnodesels );
239 SCIP_CALL_ABORT( SCIPgetIntParam(
scip,
"presolving/maxrestarts", &
orgMaxRestart) );
278 SCIP_STAGE stage = SCIPgetStage(
scip);
279 if( stage == SCIP_STAGE_PRESOLVED || stage == SCIP_STAGE_SOLVING || stage == SCIP_STAGE_SOLVED )
281 return SCIPgetNLPIterations(
scip);
291 SCIP_STAGE stage = SCIPgetStage(
scip);
292 if( stage != SCIP_STAGE_INIT )
294 return SCIPgetNRuns(
scip);
310 (*userPlugins)(inScip);
379 SCIP_CALL_ABORT( SCIPgetOrigVarsData(inScip, &vars, &nVars, NULL, NULL, NULL, NULL) );
380 for(
int i = 0; i < nVars; i++ )
382 std::cout <<
"R" <<
paraComm->
getRank() <<
": idx = " << i <<
": " << SCIPvarGetName(vars[i]) << std::endl;
Base class for solver: Generic parallelized solver.
void tryNewSolution(UG::ParaSolution *sol)
int getOriginalPriority()
int lbBoundTightened(int source, int tag)
bool isCopyIncreasedVariables()
virtual void freeSubproblem()
virtual void createSubproblem()
void setLightWeightRootNodeProcess()
int getOriginalIndex(int index)
SCIP_Real * tightenedVarUbs
long long getSimplexIter()
bool wasTerminatedNormally()
void setOriginalPriority()
void solveToCheckEffectOfRootNodePreprocesses()
void allowCollectingMode()
long long nPreviousNodesLeft
ScipParaSolver(int argc, char **argv, UG::ParaComm *comm, UG::ParaParamSet *paraParamSet, UG::ParaInstance *inParaInstance, UG::ParaDeterministicTimer *detTimer)
void setOriginalRootNodeProcess()
void setNPreviousNodesLeft(long long n)
int processTagInterruptRequest(int source, int tag)
ScipDiffParamSet * originalParamSet
const char * problemFileName
void saveOriginalSettings()
double getOrgVarLb(int i)
int(ScipParaSolver::* ScipMessageHandlerFunctionPointer)(int, int)
ScipParaSolver(int argc, char **argv, UG::ParaComm *comm, UG::ParaParamSet *paraParamSet, UG::ParaInstance *inParaInstance, UG::ParaDeterministicTimer *detTimer, double timeOffset, bool thread)
void setProblemFileName(const char *fileName)
SCIP_MESSAGEHDLR * messagehdlr
void saveOrgProblemBounds()
std::list< LocalNodeInfoPtr > * conflictConsList
void setOriginalNodeSelectionStrategy()
void setRacingParams(UG::ParaRacingRampUpParamSet *inRacingParams, bool winnerParam)
void saveOriginalPriority()
void checkVarsAndIndex(const char *string, SCIP *inScip)
double getTightenedVarUb(int i)
virtual ~ScipParaSolver()
void copyIncrasedVariables()
void saveImprovedSolution()
ScipDiffParamSet * scipDiffParamSet
void setTightenedVarUb(int i, double v)
ScipParaObjNodesel * nodesel
ScipParaInterruptMsgMonitor * interruptMsgMonitor
interrupt message monitor
void setOriginalMaxRestart()
ScipUserPlugins * userPlugins
ScipParaObjCommPointHdlr * commPointHdlr
void setWinnerRacingParams(UG::ParaRacingRampUpParamSet *inRacingParams)
void recoverOriginalSettings()
bool copyIncreasedVariables
bool isCollectingModeProhibited()
void dropSettingsForVariableBoundsExchnage()
long long getNPreviousNodesLeft()
int * mapToOriginalIndecies
void setUserPlugins(ScipUserPlugins *inUi)
int getOriginalMaxRestart()
unsigned int miscAllowdualreds
ScipParaObjProp * scipPropagator
bool collectingModeIsProhibited
void writeCurrentTaskProblem(const std::string &filename)
void setTightenedVarLb(int i, double v)
int ubBoundTightened(int source, int tag)
void prohibitCollectingMode()
static void runInterruptMsgMonitorThread(void *threadData)
double getTightenedVarLb(int i)
int * mapToSolverLocalIndecies
SCIP_CONS * addedDualCons
std::list< LocalNodeInfoPtr > * getConflictConsList()
int getProbIndex(int index)
double getOrgVarUb(int i)
long long getNNodesSolved()
void setOrgVarUb(int i, double v)
SCIP * scipToCheckEffectOfRootNodeProcesses
ScipDiffParamSet * scipDiffParamSetRoot
bool isOriginalIndeciesMap()
void issueInterruptSolve()
const char * getChangeNodeSelName()
SCIP_Real * tightenedVarLbs
double getDualBoundValue()
ScipParaDiffSubproblem * getParentDiffSubproblem()
void includeUserPlugins(SCIP *inScip)
void setOrgVarLb(int i, double v)
virtual int processTagInterruptRequest(int source, int tag)
process TagInterruptRequest
Base class of communicator object.
virtual int getRank()=0
get rank of this process or this thread depending on run-time environment
class for deterministic timer
int getIntParamValue(int param)
get int parameter value
class ParaRacingRampUpParamSet (parameter set for racing ramp-up)
ParaParamSet * paraParams
ParaParamSet object.
ParaComm * paraComm
ParaCommunicator object.
ParaTask * currentTask
solving task
ParaInstance * paraInstance
root problem instance
ParaDiffSubproblem * getDiffSubproblem()
getter of diffSubproblem
static ScipParaCommTh * comm
static ScipParaParamSet * paraParamSet
LocalNodeInfo * LocalNodeInfoPtr
struct ParaSCIP::LocalNodeInfo_t LocalNodeInfo
static const int N_SCIP_TAGS
static const int NodeTransferMode
SCIP parameter set to be transferred ( Only keep difference between default settings ).
ParaInitialStat extension for SCIP solver.
Interrupt message monitor thread class.