Scippy

UG

Ubiquity Generator framework

ParaSolver Class Referenceabstract

class ParaSolver More...

#include <paraSolver.h>

Inheritance diagram for ParaSolver:
BbParaSolver ScipParaSolver

Public Member Functions

 ParaSolver ()
 constructor More...
 
 ParaSolver (int argc, char **argv, int nHandlers, ParaComm *comm, ParaParamSet *inParaParamSet, ParaInstance *paraInstance, ParaDeterministicTimer *detTimer)
 constructor More...
 
virtual ~ParaSolver ()
 destructor More...
 
ParaCommgetParaComm ()
 get paraParaComm More...
 
bool isWarmStarted ()
 check if current execution is warm start (restart) or not More...
 
virtual void run ()=0
 run this Solver More...
 
virtual void run (ParaTask *paraTask)
 run this Solver with ParaTask object More...
 
virtual void run (ParaRacingRampUpParamSet *inRacingRampUpParamSet)
 run this solver with racing parameters More...
 
double getElapsedTimeOfTaskSolving ()
 the following functions may be called from callback routines of the target Solver More...
 
virtual void iReceiveMessages ()=0
 non-blocking receive messages More...
 
bool isRampUp ()
 check if this solver is ramp-up or not More...
 
bool isRacingWinner ()
 check if this solver is in racing ramp-up or not More...
 
virtual bool sendIfImprovedSolutionWasFound (ParaSolution *sol)
 send improved solution if it was found in this Solver More...
 
virtual bool saveIfImprovedSolutionWasFound (ParaSolution *sol)
 save improved solution if it was found in this Solver More...
 
virtual void sendLocalSolution ()
 send solution found in this Solver More...
 
virtual bool notificationIsNecessary ()=0
 check if a notification message needs to send or not TODO: function name should be isNotificationNecessary More...
 
bool isInterrupting ()
 check if Solver is in interrupting phase or not More...
 
bool isTerminationRequested ()
 check if termination was requested or not More...
 
bool newParaTaskExists ()
 check if a new ParaTask was received or not More...
 
bool getNotificaionProcessed ()
 check if Solver is in notification process or not TODO: function name should be changed More...
 
ParaTaskgetCurrentTask ()
 get current ParaTask object More...
 
ParaInstancegetParaInstance ()
 get ParaInstance object More...
 
ParaParamSetgetParaParamSet ()
 get ParaParamSet object More...
 
virtual int getRank ()
 get rank of this Solver More...
 
virtual void waitMessageIfNecessary ()=0
 wait a notification id message if it is needed to synchronize with LoadCoordinaor More...
 
void terminateRacing ()
 terminate racing stage More...
 
ParaSolutiongetGlobalBestIncumbentSolution ()
 get global best incumbent solution More...
 
bool isWaitingForSpecificMessage ()
 check if Solver is waiting for a specific message or not More...
 
virtual bool waitToken (int rank)
 wait token for deterministic mode More...
 
virtual void passToken (int rank)
 pass token to the next process More...
 
ParaDeterministicTimergetDeterministicTimer ()
 get deterministic timer object More...
 
double getOffsetTimeToWaitToken ()
 get offset time to wait token More...
 
virtual void updatePendingSolution ()
 update pending solution More...
 
virtual bool wasTerminatedNormally ()=0
 check if Solver was terminated normally or not More...
 
virtual void writeCurrentTaskProblem (const std::string &filename)=0
 write current task problem (this method is always useful for debugging, so we should implement this method) More...
 
virtual void tryNewSolution (ParaSolution *sol)=0
 try to enter solution to base solver environment More...
 
virtual void writeSubproblem ()=0
 write subproblem More...
 
void setPreviousCommTime (double detTime)
 set previous communication time for deterministic execution More...
 
double getPreviousCommTime ()
 get previous communication time for deterministic execution More...
 
void setTerminationMode (int tm)
 set termination mode More...
 
int getTerminationMode ()
 get termination mode More...
 

Protected Types

typedef int(ParaSolver::* MessageHandlerFunctionPointer) (int, int)
 

Protected Member Functions

virtual int processTagTask (int source, int tag)=0
 process TagTask More...
 
virtual int processTagTaskReceived (int source, int tag)=0
 process TagTaskReceived More...
 
virtual int processTagRampUp (int source, int tag)
 process TagRampUp More...
 
virtual int processTagSolution (int source, int tag)=0
 process TagSolution More...
 
virtual int processTagIncumbentValue (int source, int tag)
 process TagIncumbentValue More...
 
virtual int processTagNotificationId (int source, int tag)=0
 process TagNotificationId More...
 
virtual int processTagTerminateRequest (int source, int tag)=0
 process TagTerminateRequest More...
 
virtual int processTagInterruptRequest (int source, int tag)=0
 process TagInterruptRequest More...
 
virtual int processTagWinnerRacingRampUpParamSet (int source, int tag)
 process TagWinnerRacingRampUpParamSet More...
 
virtual int processTagWinner (int source, int tag)
 process TagWinner More...
 
virtual int processTagToken (int source, int tag)
 process TagToken More...
 
virtual bool receiveNewTaskAndReactivate ()=0
 wait for receiving a new task and reactivate solver More...
 
virtual void waitNotificationIdMessage ()=0
 wait notification id message to synchronized with LoadCoordinator More...
 
virtual void waitAckCompletion ()=0
 wait ack completion to synchronized with LoadCoordinator More...
 
virtual void sendCompletionOfCalculation (double stopTime)=0
 restart racing More...
 
virtual bool updateGlobalBestIncumbentSolution (ParaSolution *sol)
 update global best incumbent solution More...
 
virtual bool updateGlobalBestIncumbentValue (double newValue)
 update global best incumbent value More...
 
virtual void setRacingParams (ParaRacingRampUpParamSet *racingParms, bool winnerParam)
 set racing parameters More...
 
virtual void setWinnerRacingParams (ParaRacingRampUpParamSet *racingParms)
 set winner racing parameters More...
 
virtual void createSubproblem ()
 create subproblem More...
 
virtual void freeSubproblem ()
 free subproblem More...
 
virtual void solve ()=0
 solve (sub)problem More...
 
virtual void reinitialize ()
 re-initialized instance More...
 

Protected Attributes

int nHandlers
 number of valid message handlers More...
 
MessageHandlerFunctionPointermessageHandler
 table for message handlers More...
 
unsigned int notificationIdGenerator
 
ParaCommparaComm
 ParaCommunicator object. More...
 
ParaParamSetparaParams
 ParaParamSet object. More...
 
ParaRacingRampUpParamSetracingParams
 ParaRacingRampUpParamSet object. This is also a flag to indicate running with racing ramp-up. More...
 
ParaRacingRampUpParamSetwinnerRacingParams
 Winner ParaRacingRampUpParamSet object. More...
 
ParaTimerparaTimer
 timer for this ParaSolver More...
 
ParaDeterministicTimerparaDetTimer
 deterministic timer for this ParaSolver More...
 
double globalBestIncumbentValue
 global best incumbent value More...
 
ParaSolutionglobalBestIncumbentSolution
 global best solution. However, this is not always feasible for the current sub-MIP More...
 
ParaSolutionlocalIncumbentSolution
 incumbent solution generated in local solver More...
 
ParaSolutionpendingSolution
 solution which is pending to update in case of deterministic runs More...
 
double pendingIncumbentValue
 incumbent value which is pending to update in case of deterministic runs More...
 
ParaInstanceparaInstance
 root problem instance More...
 
ParaTaskcurrentTask
 solving task More...
 
ParaTasknewTask
 new task to solve More...
 
int terminationMode
 indicate that termination mode 0: no termination mode 1: normal termination mode 2: interrupted termination More...
 
bool warmStarted
 indicate whether if system is warm started or not More...
 
bool rampUp
 indicate whether if ramp-up phase is finished or not: true - finish More...
 
bool racingInterruptIsRequested
 indicate a racing interrupt is requested More...
 
bool racingIsInterrupted
 indicate whether if racing phases is interrupted or not: true - interrupted More...
 
bool racingWinner
 indicate racing ramp-up winner or not: true - winner More...
 
bool waitingSpecificMessage
 indicate that this solver is waiting for a specific message More...
 
bool memoryLimitIsReached
 indicate if memory limit is reached or not, when base solver has memory management feature More...
 
double previousNotificationTime
 previous notification time More...
 
double paraTaskStartTime
 start time of current ParaTask More...
 
double previousStopTime
 Idle Times. More...
 
double idleTimeToFirstParaTask
 idle time to start solving the first ParaTask More...
 
double idleTimeBetweenParaTasks
 idle time between ParaTasks processing More...
 
double idleTimeAfterLastParaTask
 idle time after the last ParaTask was solved More...
 
double idleTimeToWaitNotificationId
 idle time to wait a message within collecting mode More...
 
double idleTimeToWaitAckCompletion
 idle time to wait acknowledgment of completion More...
 
double idleTimeToWaitToken
 idle time to wait token More...
 
double previousIdleTimeToWaitToken
 previous idle time to wait token More...
 
double offsetTimeToWaitToken
 offset time to wait token More...
 
int nImprovedIncumbent
 Counters related to the current ParaTask. More...
 
int nParaTasksReceived
 Counters related to this ParaSolver. More...
 
int nParaTasksSolved
 number of ParaTasks solved ( received ) in this ParaSolver More...
 
bool updatePendingSolutionIsProceeding
 update pending solution process is proceeding More...
 
bool globalIncumbnetValueUpdateFlag
 indicate that global incumbent value is updated in iReceiveMessages() routine More...
 
bool notificationProcessed
 if true, notification is issued but not receive the corresponding LCB More...
 
double eps
 absolute values smaller than this are considered zero esp should be set in the constructor of the derived class of ParaSolver More...
 
double previousCommTime
 previous communication time for deterministic execution More...
 
bool subproblemFreed
 indicate that subproblem is already freed or not More...
 
bool stayAliveAfterInterrupt
 indicate that stay alive this solver after interrupt request More...
 

Detailed Description

class ParaSolver

Definition at line 70 of file paraSolver.h.

Member Typedef Documentation

◆ MessageHandlerFunctionPointer

typedef int(ParaSolver::* MessageHandlerFunctionPointer) (int, int)
protected

Definition at line 75 of file paraSolver.h.

Constructor & Destructor Documentation

◆ ParaSolver() [1/2]

constructor

Definition at line 389 of file paraSolver.h.

References THROW_LOGICAL_ERROR1.

◆ ParaSolver() [2/2]

ParaSolver ( int  argc,
char **  argv,
int  nHandlers,
ParaComm comm,
ParaParamSet inParaParamSet,
ParaInstance paraInstance,
ParaDeterministicTimer detTimer 
)

◆ ~ParaSolver()

Member Function Documentation

◆ createSubproblem()

virtual void createSubproblem ( )
protectedvirtual

create subproblem

Reimplemented in ScipParaSolver, and BbParaSolver.

Definition at line 354 of file paraSolver.h.

◆ freeSubproblem()

virtual void freeSubproblem ( )
protectedvirtual

free subproblem

Reimplemented in ScipParaSolver, and BbParaSolver.

Definition at line 363 of file paraSolver.h.

◆ getCurrentTask()

ParaTask * getCurrentTask ( )

get current ParaTask object

Returns
pointer to ParaTask object

Definition at line 620 of file paraSolver.h.

References ParaSolver::currentTask.

◆ getDeterministicTimer()

ParaDeterministicTimer * getDeterministicTimer ( )

get deterministic timer object

Returns
pointer to deterministic timer object

Definition at line 739 of file paraSolver.h.

References ParaSolver::paraDetTimer.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getElapsedTimeOfTaskSolving()

double getElapsedTimeOfTaskSolving ( )

the following functions may be called from callback routines of the target Solver

get elapsed time of task solving

Returns
elapsed time

Definition at line 493 of file paraSolver.h.

References ParaTimer::getElapsedTime(), ParaSolver::paraTaskStartTime, and ParaSolver::paraTimer.

◆ getGlobalBestIncumbentSolution()

ParaSolution * getGlobalBestIncumbentSolution ( )

get global best incumbent solution

Returns
pointer to ParaSolution object

Definition at line 691 of file paraSolver.h.

References ParaSolver::globalBestIncumbentSolution.

◆ getNotificaionProcessed()

bool getNotificaionProcessed ( )

check if Solver is in notification process or not TODO: function name should be changed

Returns
true if Solver is in notification process, false otherwise

Definition at line 610 of file paraSolver.h.

References ParaSolver::notificationProcessed.

◆ getOffsetTimeToWaitToken()

double getOffsetTimeToWaitToken ( )

get offset time to wait token

Returns
offset time

Definition at line 749 of file paraSolver.h.

References ParaSolver::offsetTimeToWaitToken.

◆ getParaComm()

ParaComm * getParaComm ( )

get paraParaComm

Returns
communicator used

Definition at line 418 of file paraSolver.h.

References ParaSolver::paraComm.

◆ getParaInstance()

ParaInstance * getParaInstance ( )

get ParaInstance object

Returns
pointer to ParaInstance object

Definition at line 630 of file paraSolver.h.

References ParaSolver::paraInstance.

◆ getParaParamSet()

ParaParamSet * getParaParamSet ( )

get ParaParamSet object

Returns
pointer to ParaParamSet object

Definition at line 640 of file paraSolver.h.

References ParaSolver::paraParams.

◆ getPreviousCommTime()

double getPreviousCommTime ( )

get previous communication time for deterministic execution

Returns
previous communication time in deterministic time

Definition at line 828 of file paraSolver.h.

References ParaSolver::previousCommTime.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getRank()

virtual int getRank ( )
virtual

get rank of this Solver

Returns
rank of this Solver

Reimplemented in BbParaSolver.

Definition at line 650 of file paraSolver.h.

References ParaComm::getRank(), and ParaSolver::paraComm.

◆ getTerminationMode()

int getTerminationMode ( )

get termination mode

Returns
termination mode

Definition at line 848 of file paraSolver.h.

References ParaSolver::terminationMode.

◆ iReceiveMessages()

virtual void iReceiveMessages ( )
pure virtual

non-blocking receive messages

Implemented in BbParaSolver.

◆ isInterrupting()

bool isInterrupting ( )

check if Solver is in interrupting phase or not

Returns
true if Solver is in interrupting phase, false otherwise

Definition at line 579 of file paraSolver.h.

References UG::InterruptedTerminationMode, and ParaSolver::terminationMode.

◆ isRacingWinner()

bool isRacingWinner ( )

check if this solver is in racing ramp-up or not

Returns
true if this solver is in racing ramp-up, false otherwise check if this solver is the racing winner or not
true if this solver is the racing winner, false otherwise

Definition at line 530 of file paraSolver.h.

References ParaSolver::racingWinner.

Referenced by ScipParaObjCommPointHdlr::scip_exec(), and ScipParaSolver::solve().

◆ isRampUp()

bool isRampUp ( )

check if this solver is ramp-up or not

Returns
true if ramp-upped, false otherwise

Definition at line 509 of file paraSolver.h.

References ParaSolver::rampUp.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isTerminationRequested()

bool isTerminationRequested ( )

check if termination was requested or not

Returns
true if termination was requested, false otherwise

Definition at line 589 of file paraSolver.h.

References UG::NormalTerminationMode, and ParaSolver::terminationMode.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isWaitingForSpecificMessage()

bool isWaitingForSpecificMessage ( )

check if Solver is waiting for a specific message or not

Returns
true if Solver is waiting for a specific message, false otherwise

Definition at line 701 of file paraSolver.h.

References ParaSolver::waitingSpecificMessage.

◆ isWarmStarted()

bool isWarmStarted ( )

check if current execution is warm start (restart) or not

Returns
true if the execution is warm start (restart), false otherwise

Definition at line 428 of file paraSolver.h.

References ParaSolver::warmStarted.

Referenced by BbParaSolver::BbParaSolver().

◆ newParaTaskExists()

bool newParaTaskExists ( )

check if a new ParaTask was received or not

Returns
true if a new ParaTask was received, false otherwise

Definition at line 599 of file paraSolver.h.

References ParaSolver::newTask.

◆ notificationIsNecessary()

virtual bool notificationIsNecessary ( )
pure virtual

check if a notification message needs to send or not TODO: function name should be isNotificationNecessary

Returns
true if the notification message needs to send, false otherwise

Implemented in BbParaSolver.

◆ passToken()

virtual void passToken ( int  rank)
virtual

pass token to the next process

Parameters
rankrank of this Solver

Reimplemented in BbParaSolver.

Definition at line 727 of file paraSolver.h.

◆ processTagIncumbentValue()

virtual int processTagIncumbentValue ( int  source,
int  tag 
)
protectedvirtual

process TagIncumbentValue

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagIncumbentValue

Reimplemented in BbParaSolver.

Definition at line 199 of file paraSolver.h.

Referenced by ParaSolver::ParaSolver().

◆ processTagInterruptRequest()

virtual int processTagInterruptRequest ( int  source,
int  tag 
)
protectedpure virtual

process TagInterruptRequest

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagInterruptRequest

Implemented in BbParaSolver, and ScipParaSolver.

◆ processTagNotificationId()

virtual int processTagNotificationId ( int  source,
int  tag 
)
protectedpure virtual

process TagNotificationId

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagNotificationId

Implemented in BbParaSolver.

Referenced by ParaSolver::ParaSolver().

◆ processTagRampUp()

virtual int processTagRampUp ( int  source,
int  tag 
)
protectedvirtual

process TagRampUp

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagRampUp

Reimplemented in BbParaSolver.

Definition at line 177 of file paraSolver.h.

Referenced by ParaSolver::ParaSolver().

◆ processTagSolution()

virtual int processTagSolution ( int  source,
int  tag 
)
protectedpure virtual

process TagSolution

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagSolution

Implemented in BbParaSolver.

Referenced by ParaSolver::ParaSolver().

◆ processTagTask()

virtual int processTagTask ( int  source,
int  tag 
)
protectedpure virtual

process TagTask


Message handlers

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTask

Implemented in BbParaSolver.

◆ processTagTaskReceived()

virtual int processTagTaskReceived ( int  source,
int  tag 
)
protectedpure virtual

process TagTaskReceived

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTaskReceived

Implemented in BbParaSolver.

Referenced by ParaSolver::ParaSolver().

◆ processTagTerminateRequest()

virtual int processTagTerminateRequest ( int  source,
int  tag 
)
protectedpure virtual

process TagTerminateRequest

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTerminateRequest

Implemented in BbParaSolver.

Referenced by ParaSolver::ParaSolver().

◆ processTagToken()

virtual int processTagToken ( int  source,
int  tag 
)
protectedvirtual

process TagToken

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagToken

Reimplemented in BbParaSolver.

Definition at line 265 of file paraSolver.h.

Referenced by ParaSolver::ParaSolver().

◆ processTagWinner()

virtual int processTagWinner ( int  source,
int  tag 
)
protectedvirtual

process TagWinner

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagWinner

Reimplemented in BbParaSolver.

Definition at line 252 of file paraSolver.h.

Referenced by ParaSolver::ParaSolver().

◆ processTagWinnerRacingRampUpParamSet()

virtual int processTagWinnerRacingRampUpParamSet ( int  source,
int  tag 
)
protectedvirtual

process TagWinnerRacingRampUpParamSet

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagWinnerRacingRampUpParamSet

Reimplemented in BbParaSolver.

Definition at line 239 of file paraSolver.h.

Referenced by ParaSolver::ParaSolver().

◆ receiveNewTaskAndReactivate()

virtual bool receiveNewTaskAndReactivate ( )
protectedpure virtual

wait for receiving a new task and reactivate solver

Returns
true if a new task is received, false esle

Implemented in BbParaSolver.

◆ reinitialize()

virtual void reinitialize ( )
protectedvirtual

re-initialized instance

Reimplemented in ScipParaSolver.

Definition at line 378 of file paraSolver.h.

Referenced by BbParaSolver::restartRacing().

◆ run() [1/3]

virtual void run ( )
pure virtual

run this Solver

Implemented in BbParaSolver, and BbParaSolver.

Referenced by main(), BbParaSolver::run(), and ParaSolver::run().

◆ run() [2/3]

virtual void run ( ParaRacingRampUpParamSet inRacingRampUpParamSet)
virtual

run this solver with racing parameters

Parameters
inRacingRampUpParamSetpointer to ParaRacingRampUpParamSet object

Reimplemented in BbParaSolver, and BbParaSolver.

Definition at line 454 of file paraSolver.h.

◆ run() [3/3]

virtual void run ( ParaTask paraTask)
virtual

run this Solver with ParaTask object

Parameters
paraTaskpointer to ParaTask object

Reimplemented in BbParaSolver.

Definition at line 443 of file paraSolver.h.

References ParaSolver::currentTask, and ParaSolver::run().

◆ saveIfImprovedSolutionWasFound()

virtual bool saveIfImprovedSolutionWasFound ( ParaSolution sol)
virtual

save improved solution if it was found in this Solver

Parameters
solsolution found in this Solver

Reimplemented in BbParaSolver.

Definition at line 550 of file paraSolver.h.

◆ sendCompletionOfCalculation()

virtual void sendCompletionOfCalculation ( double  stopTime)
protectedpure virtual

restart racing

send completion of calculation

Parameters
stopTimestopping time

Implemented in BbParaSolver.

◆ sendIfImprovedSolutionWasFound()

virtual bool sendIfImprovedSolutionWasFound ( ParaSolution sol)
virtual

send improved solution if it was found in this Solver

Parameters
solsolution found in this Solver

Reimplemented in BbParaSolver.

Definition at line 539 of file paraSolver.h.

◆ sendLocalSolution()

virtual void sendLocalSolution ( )
virtual

send solution found in this Solver

Reimplemented in BbParaSolver.

Definition at line 561 of file paraSolver.h.

◆ setPreviousCommTime()

void setPreviousCommTime ( double  detTime)

set previous communication time for deterministic execution

Parameters
detTimedeterministic time

Definition at line 817 of file paraSolver.h.

References ParaSolver::previousCommTime.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ setRacingParams()

virtual void setRacingParams ( ParaRacingRampUpParamSet racingParms,
bool  winnerParam 
)
protectedvirtual

set racing parameters

Parameters
racingParmspointer to racing parameter set object
winnerParamindicate if the parameter set is winner one

Reimplemented in BbParaSolver, and ScipParaSolver.

Definition at line 333 of file paraSolver.h.

◆ setTerminationMode()

void setTerminationMode ( int  tm)

set termination mode

Parameters
tmterminiation mode to be set

Definition at line 837 of file paraSolver.h.

References ParaSolver::terminationMode.

Referenced by ScipParaSolver::solve().

◆ setWinnerRacingParams()

virtual void setWinnerRacingParams ( ParaRacingRampUpParamSet racingParms)
protectedvirtual

set winner racing parameters

Parameters
racingParmspointer to winner racing parameter set object

Reimplemented in BbParaSolver, and ScipParaSolver.

Definition at line 344 of file paraSolver.h.

◆ solve()

virtual void solve ( )
protectedpure virtual

solve (sub)problem

Implemented in ScipParaSolver, and BbParaSolver.

◆ terminateRacing()

void terminateRacing ( )

◆ tryNewSolution()

virtual void tryNewSolution ( ParaSolution sol)
pure virtual

try to enter solution to base solver environment

Parameters
solsolution to be enterred

Implemented in BbParaSolver, and ScipParaSolver.

Referenced by ParaSolver::updatePendingSolution().

◆ updateGlobalBestIncumbentSolution()

virtual bool updateGlobalBestIncumbentSolution ( ParaSolution sol)
protectedvirtual

update global best incumbent solution

Returns
true if the best incumbent solution was updated, false otherwise
Parameters
solpointer to new solution object

Reimplemented in BbParaSolver.

Definition at line 310 of file paraSolver.h.

Referenced by ParaSolver::updatePendingSolution().

◆ updateGlobalBestIncumbentValue()

virtual bool updateGlobalBestIncumbentValue ( double  newValue)
protectedvirtual

update global best incumbent value

Returns
true if the best incumbent value was updated, false otherwise
Parameters
newValuenew incumbent value

Reimplemented in BbParaSolver.

Definition at line 322 of file paraSolver.h.

Referenced by ParaSolver::updatePendingSolution().

◆ updatePendingSolution()

virtual void updatePendingSolution ( )
virtual

◆ waitAckCompletion()

virtual void waitAckCompletion ( )
protectedpure virtual

wait ack completion to synchronized with LoadCoordinator

Implemented in BbParaSolver.

◆ waitMessageIfNecessary()

virtual void waitMessageIfNecessary ( )
pure virtual

wait a notification id message if it is needed to synchronize with LoadCoordinaor

Implemented in BbParaSolver.

◆ waitNotificationIdMessage()

virtual void waitNotificationIdMessage ( )
protectedpure virtual

wait notification id message to synchronized with LoadCoordinator

Implemented in BbParaSolver.

◆ waitToken()

virtual bool waitToken ( int  rank)
virtual

wait token for deterministic mode

Returns
true when token is received, false otherwise
Parameters
rankrank of this Solver

Reimplemented in BbParaSolver.

Definition at line 711 of file paraSolver.h.

◆ wasTerminatedNormally()

virtual bool wasTerminatedNormally ( )
pure virtual

check if Solver was terminated normally or not

Returns
true if Solver was terminated normally, false otherwise

Implemented in ScipParaSolver, and BbParaSolver.

◆ writeCurrentTaskProblem()

virtual void writeCurrentTaskProblem ( const std::string &  filename)
pure virtual

write current task problem (this method is always useful for debugging, so we should implement this method)

Parameters
filenamefile name to write

Implemented in ScipParaSolver, and BbParaSolver.

◆ writeSubproblem()

virtual void writeSubproblem ( )
pure virtual

write subproblem

Implemented in ScipParaSolver, and BbParaSolver.

Member Data Documentation

◆ currentTask

◆ eps

double eps
protected

absolute values smaller than this are considered zero esp should be set in the constructor of the derived class of ParaSolver

Definition at line 142 of file paraSolver.h.

Referenced by BbParaSolver::saveIfImprovedSolutionWasFound(), ScipParaSolver::ScipParaSolver(), BbParaSolver::sendIfImprovedSolutionWasFound(), BbParaSolver::sendLocalSolution(), and ScipParaSolver::solve().

◆ globalBestIncumbentSolution

◆ globalBestIncumbentValue

◆ globalIncumbnetValueUpdateFlag

◆ idleTimeAfterLastParaTask

double idleTimeAfterLastParaTask
protected

idle time after the last ParaTask was solved

Definition at line 120 of file paraSolver.h.

Referenced by BbParaSolver::sendSolverTerminationState(), and ScipParaSolver::~ScipParaSolver().

◆ idleTimeBetweenParaTasks

◆ idleTimeToFirstParaTask

◆ idleTimeToWaitAckCompletion

double idleTimeToWaitAckCompletion
protected

◆ idleTimeToWaitNotificationId

◆ idleTimeToWaitToken

◆ localIncumbentSolution

ParaSolution* localIncumbentSolution
protected

◆ memoryLimitIsReached

bool memoryLimitIsReached
protected

indicate if memory limit is reached or not, when base solver has memory management feature

Definition at line 109 of file paraSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation(), and ScipParaSolver::solve().

◆ messageHandler

◆ newTask

◆ nHandlers

int nHandlers
protected

number of valid message handlers

Definition at line 77 of file paraSolver.h.

Referenced by ParaSolver::ParaSolver().

◆ nImprovedIncumbent

int nImprovedIncumbent
protected

Counters related to the current ParaTask.

number of improvements of incumbent value

Definition at line 130 of file paraSolver.h.

Referenced by BbParaSolver::saveIfImprovedSolutionWasFound(), BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::sendIfImprovedSolutionWasFound().

◆ notificationIdGenerator

unsigned int notificationIdGenerator
protected

◆ notificationProcessed

bool notificationProcessed
protected

◆ nParaTasksReceived

◆ nParaTasksSolved

◆ offsetTimeToWaitToken

double offsetTimeToWaitToken
protected

offset time to wait token

Definition at line 125 of file paraSolver.h.

Referenced by ParaSolver::getOffsetTimeToWaitToken(), and ParaSolver::ParaSolver().

◆ paraComm

ParaComm* paraComm
protected

ParaCommunicator object.

Definition at line 82 of file paraSolver.h.

Referenced by ScipParaSolver::checkVarsAndIndex(), ScipParaSolver::createSubproblem(), ScipParaSolver::dropSettingsForVariableBoundsExchnage(), ScipParaSolver::freeSubproblem(), ParaSolver::getParaComm(), BbParaSolver::getParaComm(), ParaSolver::getRank(), BbParaSolver::getRank(), BbParaSolver::iReceiveMessages(), BbParaSolver::keepParaNode(), ScipParaSolver::lbBoundTightened(), BbParaSolver::notifySelfSplitFinished(), ParaSolver::ParaSolver(), BbParaSolver::passToken(), BbParaSolver::processTagBreaking(), BbParaSolver::processTagCollectAllNodes(), BbParaSolver::processTagCutOffValue(), BbParaSolver::processTagGivenGapIsReached(), BbParaSolver::processTagGlobalBestDualBoundValueAtWarmStart(), BbParaSolver::processTagInCollectingMode(), BbParaSolver::processTagIncumbentValue(), BbParaSolver::processTagInterruptRequest(), BbParaSolver::processTagKeepRacing(), BbParaSolver::processTagLCBestBoundValue(), BbParaSolver::processTagLightWeightRootNodeProcess(), BbParaSolver::processTagNoNodes(), BbParaSolver::processTagNoTestDualBoundGain(), BbParaSolver::processTagNotificationId(), BbParaSolver::processTagNoWaitModeSend(), BbParaSolver::processTagOutCollectingMode(), BbParaSolver::processTagRampUp(), BbParaSolver::processTagRestart(), BbParaSolver::processTagRetryRampUp(), BbParaSolver::processTagSolution(), BbParaSolver::processTagTask(), BbParaSolver::processTagTaskReceived(), BbParaSolver::processTagTerminateRequest(), BbParaSolver::processTagTerminateSolvingToRestart(), BbParaSolver::processTagTestDualBoundGain(), BbParaSolver::processTagToken(), BbParaSolver::processTagWinner(), BbParaSolver::processTagWinnerRacingRampUpParamSet(), BbParaSolver::receiveNewTaskAndReactivate(), ScipParaSolver::recoverOriginalSettings(), ScipParaSolver::reinitialize(), BbParaSolver::restartRacing(), BbParaSolver::run(), ScipParaSolver::saveImprovedSolution(), ScipParaSolver::saveOriginalSettings(), ScipParaSolver::ScipParaSolver(), BbParaSolver::sendAnotherNodeRequest(), BbParaSolver::sendCompletionOfCalculation(), BbParaSolver::sendCompletionOfCalculationWithoutSolving(), BbParaSolver::sendIfImprovedSolutionWasFound(), BbParaSolver::sendLocalSolution(), BbParaSolver::sendParaNode(), BbParaSolver::sendSolverState(), BbParaSolver::sendSolverTerminationState(), ScipParaSolver::setBakSettings(), ScipParaSolver::setLightWeightRootNodeProcess(), ScipParaSolver::solve(), ScipParaSolver::ubBoundTightened(), BbParaSolver::waitAckCompletion(), BbParaSolver::waitNotificationIdMessage(), BbParaSolver::waitToken(), ScipParaSolver::writeSubproblem(), and ScipParaSolver::~ScipParaSolver().

◆ paraDetTimer

◆ paraInstance

◆ paraParams

ParaParamSet* paraParams
protected

ParaParamSet object.

Definition at line 83 of file paraSolver.h.

Referenced by BbParaSolver::BbParaSolver(), ScipParaSolver::createSubproblem(), ScipParaSolver::freeSubproblem(), BbParaSolver::getAggresivePresolvingDepth(), BbParaSolver::getAggresivePresolvingStopDepth(), BbParaSolver::getBigDualGapSubtreeHandlingStrategy(), BbParaSolver::getBoundGapForCollectingMode(), BbParaSolver::getBoundGapForStopSolving(), ScipParaSolver::getChangeNodeSelName(), BbParaSolver::getNStopSolvingMode(), ParaSolver::getParaParamSet(), BbParaSolver::getParaParamSet(), BbParaSolver::getThresholdValue(), BbParaSolver::getTimeStopSolvingMode(), BbParaSolver::isAggressivePresolvingSpecified(), BbParaSolver::isIterativeBreakDownApplied(), BbParaSolver::isRacingRampUp(), BbParaSolver::isRacingStage(), BbParaSolver::notificationIsNecessary(), ParaSolver::ParaSolver(), BbParaSolver::processTagIncumbentValue(), BbParaSolver::processTagRampUp(), BbParaSolver::processTagToken(), BbParaSolver::receiveNewTaskAndReactivate(), ScipParaSolver::recoverOriginalSettings(), ScipParaSolver::reinitialize(), BbParaSolver::run(), ScipParaSolver::saveOrgProblemBounds(), ScipParaSolver::ScipParaSolver(), BbParaSolver::sendCompletionOfCalculation(), BbParaSolver::sendCompletionOfCalculationWithoutSolving(), BbParaSolver::sendSolverState(), ScipParaSolver::setOriginalNodeSelectionStrategy(), ScipParaSolver::setRacingParams(), ScipParaSolver::setWinnerRacingParams(), ScipParaSolver::solve(), BbParaSolver::waitAckCompletion(), BbParaSolver::waitMessageIfNecessary(), and ScipParaSolver::~ScipParaSolver().

◆ paraTaskStartTime

double paraTaskStartTime
protected

◆ paraTimer

◆ pendingIncumbentValue

double pendingIncumbentValue
protected

incumbent value which is pending to update in case of deterministic runs

Definition at line 95 of file paraSolver.h.

Referenced by BbParaSolver::getPendingIncumbentValue(), BbParaSolver::processTagIncumbentValue(), BbParaSolver::processTagSolution(), and ParaSolver::updatePendingSolution().

◆ pendingSolution

ParaSolution* pendingSolution
protected

solution which is pending to update in case of deterministic runs

Definition at line 94 of file paraSolver.h.

Referenced by BbParaSolver::processTagSolution(), and ParaSolver::updatePendingSolution().

◆ previousCommTime

double previousCommTime
protected

previous communication time for deterministic execution

Definition at line 145 of file paraSolver.h.

Referenced by ParaSolver::getPreviousCommTime(), BbParaSolver::receiveNewTaskAndReactivate(), BbParaSolver::run(), and ParaSolver::setPreviousCommTime().

◆ previousIdleTimeToWaitToken

double previousIdleTimeToWaitToken
protected

previous idle time to wait token

Definition at line 124 of file paraSolver.h.

Referenced by BbParaSolver::run(), BbParaSolver::sendSolverTerminationState(), and ScipParaSolver::~ScipParaSolver().

◆ previousNotificationTime

double previousNotificationTime
protected

◆ previousStopTime

double previousStopTime
protected

Idle Times.

previous stop solving time of this Solver: For measurement

Definition at line 117 of file paraSolver.h.

Referenced by BbParaSolver::run(), BbParaSolver::sendSolverTerminationState(), and ScipParaSolver::~ScipParaSolver().

◆ racingInterruptIsRequested

bool racingInterruptIsRequested
protected

◆ racingIsInterrupted

◆ racingParams

ParaRacingRampUpParamSet* racingParams
protected

ParaRacingRampUpParamSet object. This is also a flag to indicate running with racing ramp-up.

Definition at line 84 of file paraSolver.h.

Referenced by BbParaSolver::isRacingStage(), BbParaSolver::processTagWinner(), BbParaSolver::run(), ParaSolver::terminateRacing(), and ParaSolver::~ParaSolver().

◆ racingWinner

◆ rampUp

bool rampUp
protected

◆ stayAliveAfterInterrupt

bool stayAliveAfterInterrupt
protected

◆ subproblemFreed

bool subproblemFreed
protected

indicate that subproblem is already freed or not

Definition at line 147 of file paraSolver.h.

Referenced by BbParaSolver::restartRacing(), and BbParaSolver::run().

◆ terminationMode

◆ updatePendingSolutionIsProceeding

bool updatePendingSolutionIsProceeding
protected

update pending solution process is proceeding

Definition at line 138 of file paraSolver.h.

Referenced by ParaSolver::updatePendingSolution().

◆ waitingSpecificMessage

bool waitingSpecificMessage
protected

indicate that this solver is waiting for a specific message

Definition at line 108 of file paraSolver.h.

Referenced by ParaSolver::isWaitingForSpecificMessage(), BbParaSolver::sendParaNode(), BbParaSolver::waitAckCompletion(), and BbParaSolver::waitNotificationIdMessage().

◆ warmStarted

bool warmStarted
protected

indicate whether if system is warm started or not

Definition at line 103 of file paraSolver.h.

Referenced by ParaSolver::isWarmStarted(), ParaSolver::ParaSolver(), and ScipParaSolver::ScipParaSolver().

◆ winnerRacingParams