60ParaSolver::ParaSolver(
69 : nHandlers(inNHandlers),
71 notificationIdGenerator(0),
73 paraParams(inParaParamSet),
75 winnerRacingParams(0),
76 paraDetTimer(inParaDetTimer),
77 globalBestIncumbentValue(DBL_MAX),
78 globalBestIncumbentSolution(0),
79 localIncumbentSolution(0),
81 pendingIncumbentValue(DBL_MAX),
82 paraInstance(inParaInstance),
88 racingInterruptIsRequested(false),
89 racingIsInterrupted(false),
91 waitingSpecificMessage(false),
92 memoryLimitIsReached(false),
93 previousNotificationTime(0.0),
94 paraTaskStartTime(0.0),
95 previousStopTime(-DBL_MAX),
96 idleTimeToFirstParaTask(0.0),
97 idleTimeBetweenParaTasks(0.0),
98 idleTimeAfterLastParaTask(0.0),
99 idleTimeToWaitNotificationId(0.0),
100 idleTimeToWaitAckCompletion(0.0), idleTimeToWaitToken(0.0), previousIdleTimeToWaitToken(0.0), offsetTimeToWaitToken(0.0),
101 nImprovedIncumbent(0),
102 nParaTasksReceived(0),
104 updatePendingSolutionIsProceeding(false),
105 globalIncumbnetValueUpdateFlag(false),
106 notificationProcessed(false),
108 previousCommTime(0.0),
109 subproblemFreed(false),
110 stayAliveAfterInterrupt(false)
143 for(
int i = 0; i < argc; i++ )
145 if( strcmp(argv[i],
"-w") == 0 )
Base class of communicator object.
virtual ParaTimer * createParaTimer()=0
create ParaTimer object
virtual int getSize()=0
get number of UG processes or UG threads depending on run-time environment
virtual int getRank()=0
get rank of this process or this thread depending on run-time environment
class for deterministic timer
bool getBoolParamValue(int param)
get bool parameter value
double getRealParamValue(int param)
get real parameter value
virtual int processTagNotificationId(int source, int tag)=0
process TagNotificationId
ParaParamSet * paraParams
ParaParamSet object.
ParaComm * paraComm
ParaCommunicator object.
ParaTask * currentTask
solving task
double offsetTimeToWaitToken
offset time to wait token
virtual int processTagWinner(int source, int tag)
process TagWinner
virtual int processTagTerminateRequest(int source, int tag)=0
process TagTerminateRequest
ParaSolution * globalBestIncumbentSolution
global best solution. However, this is not always feasible for the current sub-MIP
virtual int processTagRampUp(int source, int tag)
process TagRampUp
ParaRacingRampUpParamSet * winnerRacingParams
Winner ParaRacingRampUpParamSet object.
bool warmStarted
indicate whether if system is warm started or not
virtual int processTagSolution(int source, int tag)=0
process TagSolution
ParaSolution * localIncumbentSolution
incumbent solution generated in local solver
int(ParaSolver::* MessageHandlerFunctionPointer)(int, int)
ParaTimer * paraTimer
timer for this ParaSolver
virtual int processTagIncumbentValue(int source, int tag)
process TagIncumbentValue
virtual int processTagTaskReceived(int source, int tag)=0
process TagTaskReceived
ParaRacingRampUpParamSet * racingParams
ParaRacingRampUpParamSet object. This is also a flag to indicate running with racing ramp-up.
virtual int processTagWinnerRacingRampUpParamSet(int source, int tag)
process TagWinnerRacingRampUpParamSet
virtual int processTagToken(int source, int tag)
process TagToken
ParaTask * newTask
new task to solve
virtual ~ParaSolver()
destructor
ParaDeterministicTimer * paraDetTimer
deterministic timer for this ParaSolver
int nHandlers
number of valid message handlers
MessageHandlerFunctionPointer * messageHandler
table for message handlers
ParaInstance * paraInstance
root problem instance
virtual void init(ParaComm *paraComm)=0
initialize timer
static ScipParaCommTh * comm
static const int TagWinner
static const int TagSolution
static const int TagToken
static const int TagTaskReceived
static const int NotificationInterval
static const int TagNotificationId
static const int NoTerminationMode
termination mode
static const int TagIncumbentValue
static const int TagTerminateRequest
static const int TagRampUp
static const int Deterministic
static const int TagRacingRampUpParamSet
Base class for calculation state.
ParaComm extension for C++11 thread communication.
ParaComm extension for Pthreads communication.
Base class of communicator for UG Framework.
Base class for instance data.
This class has solver state to be transferred.
This class contains solver termination state which is transferred form Solver to LC.
Base class for solver: Generic parallelized solver.