Scippy

UG

Ubiquity Generator framework

BbParaSolver Class Referenceabstract

class BbParaSolver More...

#include <bbParaSolver.h>

+ Inheritance diagram for BbParaSolver:

Public Member Functions

 BbParaSolver ()
 constructor More...
 
 BbParaSolver (int argc, char **argv, int nHandlers, ParaComm *comm, ParaParamSet *inParaParamSet, ParaInstance *paraInstance, ParaDeterministicTimer *detTimer)
 constructor More...
 
virtual ~BbParaSolver ()
 destructor More...
 
ParaCommgetParaComm ()
 get paraParaComm More...
 
virtual void run ()
 
virtual void run (ParaRacingRampUpParamSet *inRacingRampUpParamSet)
 run this Solver with ParaNode object More...
 
double getElapsedTimeOfNodeSolving ()
 the following functions may be called from callback routines of the target Solver More...
 
double getGlobalBestDualBoundValueAtWarmStart ()
 get global best dual bound value at warm start (restart) More...
 
double getLcBestDualBoundValue ()
 get LoadCorrdinator best dual bound value More...
 
int getNStopSolvingMode ()
 get number of nodes to stop solving. This number is not used to decide stop solving. It is used a part of conditions. More...
 
double getTimeStopSolvingMode ()
 get time to stop solving. This value is not used to decide stop solving. It is used a part of conditions. More...
 
double getRootNodeTime ()
 get root node computing time More...
 
double getBoundGapForStopSolving ()
 get bound gap for stop solving. This value is not used to decide stop solving. It is used a part of conditions. More...
 
double getBoundGapForCollectingMode ()
 get bound gap for collecting mode More...
 
virtual void iReceiveMessages ()
 non-blocking receive messages More...
 
bool isGlobalIncumbentUpdated ()
 check if global incumbent value is updated or not More...
 
void globalIncumbnetValueIsReflected ()
 set global incumbent value is reflected More...
 
bool isRacingInterruptRequested ()
 check if racing interrupt was requested or not More...
 
bool isCollecingInterrupt ()
 check if collecting interrupt (interrupt with collecting all nodes) is requested or not More...
 
virtual void setRootNodeTime ()
 set root node computing time More...
 
virtual void sendLocalSolution ()
 send solution found in this Solver More...
 
virtual bool notificationIsNecessary ()
 check if a notification message needs to send or not More...
 
virtual void sendSolverState (long long nNodesSolved, int nNodesLeft, double bestDualBoundValue, double detTime)
 send Solver state to LoadCoordinator More...
 
bool newParaNodeExists ()
 check if a new ParaNode was received or not More...
 
bool isInCollectingMode ()
 check if Solver is in collecting mode or not More...
 
bool isAggressiveCollecting ()
 check if Solver is in aggressive collecting mode or not More...
 
bool isManyNodesCollectionRequested ()
 check if many nodes collection was requested or not More...
 
virtual int getThresholdValue (int nNodes)
 get threshold value to send ParaNodes to LoadCoordinator More...
 
virtual void sendParaNode (long long n, int depth, double dualBound, double estimateValue, ParaDiffSubproblem *diffSubproblem)
 send a branch-and-bound node as ParaNode to LoadCoordinator More...
 
virtual void keepParaNode (long long n, int depth, double dualBound, double estimateValue, ParaDiffSubproblem *diffSubproblem)
 keep a branch-and-bound node as ParaNode to LoadCoordinator More...
 
virtual void sendAnotherNodeRequest (double bestDualBoundValue)
 send another node request More...
 
bool getNotificaionProcessed ()
 check if Solver is in notification process or not TODO: function name should be changed More...
 
double getGlobalBestIncumbentValue ()
 get global best incumbent value More...
 
ParaTaskgetCurrentNode ()
 get current ParaNode object More...
 
ParaInstancegetParaInstance ()
 get ParaInstance object More...
 
ParaParamSetgetParaParamSet ()
 get ParaParamSet object More...
 
virtual int getRank ()
 get rank of this Solver More...
 
void countInPrecheckSolvedParaNodes ()
 count ParaNode solved at root node in pre-check More...
 
virtual void waitMessageIfNecessary ()
 wait a notification id message if it is needed to synchronize with LoadCoordinaor More...
 
int getNSendInCollectingMode ()
 get number of ParaNodes already sent in a collecting mode More...
 
bool isBreaking ()
 check if Solver is in racing stage or not More...
 
double getTargetBound ()
 get target bound for breaking More...
 
bool isTransferLimitReached ()
 check if the number of ParaNodes sent is reached to transfer limit specified More...
 
void resetBreakingInfo ()
 reset breaking information More...
 
bool isOnceBreak ()
 check if once breaking procedure worked or not More...
 
void setOnceBreak ()
 set once braking procedure worked More...
 
bool isAggressivePresolvingSpecified ()
 check if aggressive presolving is specified More...
 
int getAggresivePresolvingDepth ()
 get depth to apply aggressive presolving More...
 
int getAggresivePresolvingStopDepth ()
 get depth to stop aggressive presolving More...
 
int getSubMipDepth ()
 get depth of sub-MIP root node in global search tree More...
 
void setSendBackAllNodes ()
 set counter and flag to indicate that all nodes are sent to LoadCooordinator More...
 
bool isCollectingAllNodes ()
 check if Solver is sending all nodes to LoadCoordinaor or not More...
 
int getBigDualGapSubtreeHandlingStrategy ()
 get big dual gap subtree handling strategy More...
 
bool isGivenGapReached ()
 check if given gap is reached or not More...
 
bool isIterativeBreakDownApplied ()
 check if iterative break down is applied or not More...
 
void setII (double sum, int count)
 set sum and number of integer infeasibility More...
 
void setRootNodeSimplexIter (int iter)
 set number of simplex iteration at root node More...
 
bool waitToken (int rank)
 wait token for deterministic mode More...
 
void passToken (int rank)
 pass token to the next process More...
 
int getCurrentSolivingNodeMergingStatus ()
 get current solving node merging status More...
 
double getCurrentSolvingNodeInitialDualBound ()
 get initial dual bound of current solving node More...
 
double getAverageDualBoundGain ()
 get average dual bound gain More...
 
void setNotEnoughGain ()
 set dual bound gain is not enough More...
 
bool isEnoughGainObtained ()
 check if dual bound gains enough or not More...
 
bool isDualBoundGainTestNeeded ()
 check if dual bound gain needs to be tested or not More...
 
bool isRacingRampUp ()
 check if this solver is in racing ramp-up or not More...
 
bool isRacingStage ()
 check if Solver is in racing stage or not More...
 
virtual bool wasTerminatedNormally ()=0
 check if Solver was terminated normally or not More...
 
virtual void writeCurrentTaskProblem (const std::string &filename)=0
 write current node 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 setLightWeightRootNodeProcess ()
 set light weight root node process More...
 
virtual void setOriginalRootNodeProcess ()
 set original root node process More...
 
virtual void writeSubproblem ()=0
 write subproblem More...
 
virtual long long getSimplexIter ()=0
 get number of simplex iterations More...
 
virtual int getNRestarts ()
 get number of restarts (Derived class for SCIP should override this function) More...
 
virtual bool canGenerateSpecialCutOffValue ()
 check if base solver can generate special cut off value or not More...
 
double getCutOffValue ()
 get cut off value More...
 
void updateNTransferredLocalCuts (int n)
 update number of transferred local cuts More...
 
void updateNTransferredBendersCuts (int n)
 update number of transferred benders cuts More...
 
bool isAnotherNodeIsRequested ()
 check if another node is requested or not More...
 
double getPendingIncumbentValue ()
 get pending incumbent value More...
 
void setKeepRacing (bool value)
 set keep racing value More...
 
int getSelfSplitNodesLeft ()
 get the number of nodes in slef-split node pool 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 waitNotificationIdMessage ()
 wait notification id message to synchronized with LoadCoordinator More...
 
virtual void waitAckCompletion ()
 wait ack completion to synchronized with LoadCoordinator More...
 
virtual void issueInterruptSolve ()
 issue interrupt to solve More...
 
- Public Member Functions inherited from ParaSolver
 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 (ParaTask *paraTask)
 run this Solver with ParaTask object More...
 
double getElapsedTimeOfTaskSolving ()
 the following functions may be called from callback routines of the target Solver 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...
 
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...
 
void terminateRacing ()
 check if Solver is in racing stage or not More...
 
ParaSolutiongetGlobalBestIncumbentSolution ()
 get global best incumbent solution More...
 
bool isWaitingForSpecificMessage ()
 check if Solver is waiting for a specific message or not More...
 
ParaDeterministicTimergetDeterministicTimer ()
 get deterministic timer object More...
 
double getOffsetTimeToWaitToken ()
 get offset time to wait token More...
 
virtual void updatePendingSolution ()
 update pending solution 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(BbParaSolver::* BbMessageHandlerFunctionPointer) (int, int)
 
- Protected Types inherited from ParaSolver
typedef int(ParaSolver::* MessageHandlerFunctionPointer) (int, int)
 

Protected Member Functions

virtual int processTagTask (int source, int tag)
 

Message handlers

More...
 
virtual int processTagTaskReceived (int source, int tag)
 process TagTaskReceived More...
 
virtual int processTagRampUp (int source, int tag)
 process TagRampUp More...
 
virtual int processTagSolution (int source, int tag)
 process TagSolution More...
 
virtual int processTagIncumbentValue (int source, int tag)
 process TagIncumbentValue More...
 
virtual int processTagNotificationId (int source, int tag)
 process TagNotificationId More...
 
virtual int processTagTerminateRequest (int source, int tag)
 process TagTerminateRequest More...
 
virtual int processTagInterruptRequest (int source, int tag)
 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 int processTagRetryRampUp (int source, int tag)
 process TagRetryRampUp More...
 
virtual int processTagGlobalBestDualBoundValueAtWarmStart (int source, int tag)
 process TagGlobalBestDualBoundValueAtWarmStart More...
 
virtual int processTagNoNodes (int source, int tag)
 process TagNoNodes More...
 
virtual int processTagInCollectingMode (int source, int tag)
 process TagInCollectingMode More...
 
virtual int processTagCollectAllNodes (int source, int tag)
 process TagCollectAllNodes More...
 
virtual int processTagOutCollectingMode (int source, int tag)
 process TagOutCollectingMode More...
 
virtual int processTagLCBestBoundValue (int source, int tag)
 process TagLCBestBoundValue More...
 
virtual int processTagLightWeightRootNodeProcess (int source, int tag)
 process TagLightWeightRootNodeProcess More...
 
virtual int processTagBreaking (int source, int tag)
 process TagBreaking More...
 
virtual int processTagGivenGapIsReached (int source, int tag)
 process TagGivenGapIsReached More...
 
virtual int processTagTestDualBoundGain (int source, int tag)
 process TagTestDualBoundGain More...
 
virtual int processTagNoTestDualBoundGain (int source, int tag)
 process TagNoTestDualBoundGain More...
 
virtual int processTagNoWaitModeSend (int source, int tag)
 process TagNoWaitModeSend More...
 
virtual int processTagRestart (int source, int tag)
 process TagRestart More...
 
virtual int processTagLbBoundTightened (int source, int tag)
 process TagLbBoundTightened More...
 
virtual int processTagUbBoundTightened (int source, int tag)
 process TagUbBoundTightened More...
 
virtual int processTagCutOffValue (int source, int tag)
 process TagCutOffValue More...
 
virtual int processTagKeepRacing (int source, int tag)
 process TagKeepRacing More...
 
virtual int processTagTerminateSolvingToRestart (int source, int tag)
 process TagTerminateSolvingToRestart More...
 
virtual bool receiveNewTaskAndReactivate ()
 wait for receiving a new node and reactivate solver More...
 
virtual void sendCompletionOfCalculation (double stopTime)
 send completion of calculation More...
 
virtual void sendCompletionOfCalculation (double stopTime, int tag, int nSelfSplitNodesLeft)
 send completion of calculation with arguments More...
 
virtual void sendCompletionOfCalculationWithoutSolving (double stopTime, int tag, int nSelfSplitNodesLeft)
 send completion of calculation with arguments More...
 
virtual bool updateGlobalBestCutOffValue (double newValue)
 update global best cutoff value More...
 
virtual void setRacingParams (ParaRacingRampUpParamSet *racingParms, bool winnerParam)=0
 set racing parameters More...
 
virtual void setWinnerRacingParams (ParaRacingRampUpParamSet *racingParms)=0
 set winner racing parameters More...
 
virtual void createSubproblem ()=0
 create subproblem More...
 
virtual void freeSubproblem ()=0
 free subproblem More...
 
virtual void solve ()=0
 solve (sub)problem More...
 
virtual long long getNNodesSolved ()=0
 get number of nodes solved More...
 
virtual int getNNodesLeft ()=0
 get number of nodes left More...
 
virtual double getDualBoundValue ()=0
 get dual bound value More...
 
virtual void setOriginalNodeSelectionStrategy ()=0
 set original node selection strategy More...
 
virtual void solveToCheckEffectOfRootNodePreprocesses ()
 solve to check effect of root node preprocesses More...
 
virtual int lbBoundTightened (int source, int tag)
 lower bound of variable tightened More...
 
virtual int ubBoundTightened (int source, int tag)
 upper bound of variable tightened More...
 
virtual int getNTightened ()
 get number of tightened variables during racing More...
 
virtual int getNTightenedInt ()
 get number of tightened integral variables during racing More...
 
virtual void changeSearchStrategy (int searchStrategy)
 change search strategy More...
 
virtual void sendSolverTerminationState ()
 send Solver termination state More...
 
virtual void notifySelfSplitFinished ()
 notify Self-Split finished More...
 
virtual void restartRacing ()
 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...
 
- Protected Member Functions inherited from ParaSolver
virtual void reinitialize ()
 re-initialized instance More...
 

Protected Attributes

double globalBestDualBoundValueAtWarmStart
 global best dual bound value which is set when system warm starts More...
 
double globalBestCutOffValue
 global best cut off value More...
 
double lcBestDualBoundValue
 LoadCoordinator best dual bound value. More...
 
bool collectingMode
 indicate whether if this solver is in collecting mode or not More...
 
bool aggressiveCollecting
 indicate that if this solver has two nodes, this solver sends one to LC More...
 
int nSendInCollectingMode
 number of nodes need to send in collecting mode More...
 
int nCollectOnce
 number of nodes need to collect once More...
 
bool collectingManyNodes
 indicate that many nodes collecting is requested by LC More...
 
bool collectingInterrupt
 when the solver is interrupted, all nodes are collected to LC More...
 
bool anotherNodeIsRequested
 indicate that another node is requested or not More...
 
bool lightWeightRootNodeComputation
 indicate that fast root node computation is required More...
 
bool onceBreak
 indicate that the sub-MIP is broken down once More...
 
double rootNodeTime
 Times. More...
 
double totalRootNodeTime
 accumulated root node process time solved by this solver so far More...
 
double minRootNodeTime
 minimum time consumed by root node process More...
 
double maxRootNodeTime
 maximum time consumed by root node process More...
 
int nSolved
 Counters related to the current ParaNode. More...
 
int nSent
 number of ParaNodes sent from this subtree rooted from the current ParaNode More...
 
int nSolvedWithNoPreprocesses
 number of nodes solved when it is solved with no preprocesses More...
 
int totalNSolved
 Counters related to this BbParaSolver. More...
 
int minNSolved
 minimum number of subtree nodes rooted from ParaNode More...
 
int maxNSolved
 maximum number of subtree nodes rooted from ParaNode More...
 
int nTransferredLocalCutsFromSolver
 number of local cuts transferred from this Solver More...
 
int minTransferredLocalCutsFromSolver
 minimum number of local cuts transferred from this Solver More...
 
int maxTransferredLocalCutsFromSolver
 maximum number of local cuts transferred from this Solver More...
 
int nTransferredBendersCutsFromSolver
 number of benders cuts transferred from this Solver More...
 
int minTransferredBendersCutsFromSolver
 minimum number of benders cuts transferred from this Solver More...
 
int maxTransferredBendersCutsFromSolver
 maximum number of benders cuts transferred from this Solver More...
 
int nTotalRestarts
 number of total restarts More...
 
int minRestarts
 minimum number of restarts More...
 
int maxRestarts
 maximum number of restarts More...
 
int totalNSent
 accumulated number of nodes sent from this BbParaSolver More...
 
int totalNImprovedIncumbent
 accumulated number of improvements of incumbent value in this BbParaSolver More...
 
int nParaNodesSolvedAtRoot
 number of ParaNodes solved at root node More...
 
int nParaNodesSolvedAtPreCheck
 number of ParaNodes solved at pre-checking of root node solvability More...
 
int nSimplexIterRoot
 number of simplex iteration at root node More...
 
int nTransferredLocalCuts
 number of local cuts (including conflict cuts) transferred from a ParaNode More...
 
int minTransferredLocalCuts
 minimum number of local cuts (including conflict cuts) transferred from a ParaNode More...
 
int maxTransferredLocalCuts
 maximum number of local cuts (including conflict cuts) transferred from a ParaNode More...
 
int nTransferredBendersCuts
 number of benders cuts transferred from a ParaNode More...
 
int minTransferredBendersCuts
 minimum number of benders cuts transferred from a ParaNode More...
 
int maxTransferredBendersCuts
 maximum number of benders cuts transferred from a ParaNode More...
 
int nTightened
 the number of tightened variable bounds in racing More...
 
int nTightenedInt
 the number of tightened integral variable bounds in racing More...
 
double minIisum
 minimum sum of integer infeasibility More...
 
double maxIisum
 maximum sum of integer infeasibility More...
 
int minNii
 minimum number of integer infeasibility More...
 
int maxNii
 maximum number of integer infeasibility More...
 
double targetBound
 target bound value for breaking More...
 
int nTransferLimit
 limit number of transferring nodes for breaking More...
 
int nTransferredNodes
 keep track number of transferred nodes for breaking More...
 
double solverDualBound
 dual bound value achieved for a subproblem More...
 
double averageDualBoundGain
 average dual bound gain More...
 
bool enoughGainObtained
 indicate that the root node process improved dual bound enough or not More...
 
bool givenGapIsReached
 indicate that the given gap is reached or not More...
 
bool testDualBoundGain
 indicate that the dual bound gain needs to test or not More...
 
bool noWaitModeSend
 indicate that no wait mode sending is applied More...
 
bool keepRacing
 indicate if Solver needs to do racing ramp-up repeatedly in case of warm start More...
 
bool restartingRacing
 indicate that this solver is restarting racing More...
 
bool localIncumbentIsChecked
 indicate if a local incumbent solution is checked or not More...
 
BbParaNodePoolselfSplitNodePool
 Pool in Solver. More...
 
- Protected Attributes inherited from ParaSolver
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 BbParaSolver

Definition at line 63 of file bbParaSolver.h.

Member Typedef Documentation

◆ BbMessageHandlerFunctionPointer

typedef int(BbParaSolver::* BbMessageHandlerFunctionPointer) (int, int)
protected

Definition at line 68 of file bbParaSolver.h.

Constructor & Destructor Documentation

◆ BbParaSolver() [1/2]

constructor

Definition at line 631 of file bbParaSolver.h.

References comm, ParaSolver::nHandlers, ParaSolver::paraInstance, and THROW_LOGICAL_ERROR1.

◆ BbParaSolver() [2/2]

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

constructor

create timer for this BbParaSolver

Parameters
argcnumber of arguments
argvarray of arguments
nHandlersnumber of valid message handlers
commcommunicator used
inParaParamSetpointer to ParaParamSet object
paraInstancepointer to ParaInstance object
detTimerpointer to deterministic timer object

Definition at line 55 of file bbParaSolver.cpp.

References UG::BgapCollectingMode, UG::CommunicateTighterBoundsInRacing, UG::FinalCheckpointGeneratingTime, ParaParamSet::getBoolParamValue(), ParaParamSet::getIntParamValue(), ParaParamSet::getRealParamValue(), ParaSolver::isWarmStarted(), ParaSolver::messageHandler, ParaSolver::paraParams, BbParaSolver::processTagBreaking(), BbParaSolver::processTagCollectAllNodes(), BbParaSolver::processTagCutOffValue(), BbParaSolver::processTagGivenGapIsReached(), BbParaSolver::processTagGlobalBestDualBoundValueAtWarmStart(), BbParaSolver::processTagInCollectingMode(), BbParaSolver::processTagInterruptRequest(), BbParaSolver::processTagKeepRacing(), BbParaSolver::processTagLbBoundTightened(), BbParaSolver::processTagLCBestBoundValue(), BbParaSolver::processTagLightWeightRootNodeProcess(), BbParaSolver::processTagNoNodes(), BbParaSolver::processTagNoTestDualBoundGain(), BbParaSolver::processTagNoWaitModeSend(), BbParaSolver::processTagOutCollectingMode(), BbParaSolver::processTagRestart(), BbParaSolver::processTagRetryRampUp(), BbParaSolver::processTagTask(), BbParaSolver::processTagTerminateSolvingToRestart(), BbParaSolver::processTagTestDualBoundGain(), BbParaSolver::processTagUbBoundTightened(), UG::RampUpPhaseProcess, BbParaSolver::selfSplitNodePool, ParaParamSet::setIntParamValue(), ParaParamSet::setRealParamValue(), UG::TagBreaking, UG::TagCollectAllNodes, UG::TagCutOffValue, UG::TagGivenGapIsReached, UG::TagGlobalBestDualBoundValueAtWarmStart, UG::TagInCollectingMode, UG::TagInterruptRequest, UG::TagKeepRacing, UG::TagLbBoundTightenedIndex, UG::TagLCBestBoundValue, UG::TagLightWeightRootNodeProcess, UG::TagNoNodes, UG::TagNoTestDualBoundGain, UG::TagNoWaitModeSend, UG::TagOutCollectingMode, UG::TagRestart, UG::TagRetryRampUp, UG::TagTask, UG::TagTerminateSolvingToRestart, UG::TagTestDualBoundGain, UG::TagUbBoundTightenedIndex, and UG::TimeLimit.

◆ ~BbParaSolver()

virtual ~BbParaSolver ( )
virtual

destructor

Definition at line 653 of file bbParaSolver.h.

Member Function Documentation

◆ canGenerateSpecialCutOffValue()

virtual bool canGenerateSpecialCutOffValue ( )
virtual

check if base solver can generate special cut off value or not

Returns
true if base solver can generate special cut off value, false otherwise

Definition at line 1438 of file bbParaSolver.h.

◆ changeSearchStrategy()

virtual void changeSearchStrategy ( int  searchStrategy)
protectedvirtual

change search strategy

Parameters
searchStrategysearchStrategy == 0: original search, 1: best bound search

Definition at line 586 of file bbParaSolver.h.

References BbParaSolver::notifySelfSplitFinished(), BbParaSolver::restartRacing(), BbParaSolver::sendSolverTerminationState(), BbParaSolver::updateGlobalBestIncumbentSolution(), and BbParaSolver::updateGlobalBestIncumbentValue().

◆ countInPrecheckSolvedParaNodes()

void countInPrecheckSolvedParaNodes ( )

count ParaNode solved at root node in pre-check

Definition at line 1020 of file bbParaSolver.h.

References BbParaSolver::waitMessageIfNecessary().

Referenced by ScipParaObjCommPointHdlr::checkRootNodeSolvabilityAndSendParaNode().

◆ createSubproblem()

virtual void createSubproblem ( )
protectedpure virtual

create subproblem

Reimplemented from ParaSolver.

Implemented in ScipParaSolver.

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

◆ freeSubproblem()

virtual void freeSubproblem ( )
protectedpure virtual

free subproblem

Reimplemented from ParaSolver.

Implemented in ScipParaSolver.

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

◆ getAggresivePresolvingDepth()

int getAggresivePresolvingDepth ( )

get depth to apply aggressive presolving

Returns
depth to apply aggressive presolving

Definition at line 1164 of file bbParaSolver.h.

References UG::AggressivePresolveDepth, ParaParamSet::getIntParamValue(), and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getAggresivePresolvingStopDepth()

int getAggresivePresolvingStopDepth ( )

get depth to stop aggressive presolving

Returns
depth to stop aggressive presolving

Definition at line 1174 of file bbParaSolver.h.

References UG::AggressivePresolveStopDepth, ParaParamSet::getIntParamValue(), and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getAverageDualBoundGain()

double getAverageDualBoundGain ( )

get average dual bound gain

Returns
average dual bound gaine

Definition at line 1313 of file bbParaSolver.h.

References BbParaSolver::averageDualBoundGain.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getBigDualGapSubtreeHandlingStrategy()

int getBigDualGapSubtreeHandlingStrategy ( )

get big dual gap subtree handling strategy

Returns
big dual gap subtree handling strategy

Definition at line 1214 of file bbParaSolver.h.

References UG::BigDualGapSubtreeHandling, ParaParamSet::getIntParamValue(), and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getBoundGapForCollectingMode()

double getBoundGapForCollectingMode ( )

get bound gap for collecting mode

Returns
gap value

Definition at line 799 of file bbParaSolver.h.

References UG::BgapCollectingMode, ParaParamSet::getRealParamValue(), BbParaSolver::iReceiveMessages(), and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getBoundGapForStopSolving()

double getBoundGapForStopSolving ( )

get bound gap for stop solving. This value is not used to decide stop solving. It is used a part of conditions.

Returns
gap value

Definition at line 789 of file bbParaSolver.h.

References UG::BgapStopSolvingMode, ParaParamSet::getRealParamValue(), and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getCurrentNode()

ParaTask* getCurrentNode ( )

get current ParaNode object

Returns
pointer to ParaNode object

Definition at line 981 of file bbParaSolver.h.

References ParaSolver::currentTask.

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

◆ getCurrentSolivingNodeMergingStatus()

int getCurrentSolivingNodeMergingStatus ( )

get current solving node merging status

Returns
merging status

Definition at line 1293 of file bbParaSolver.h.

References ParaSolver::currentTask.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getCurrentSolvingNodeInitialDualBound()

double getCurrentSolvingNodeInitialDualBound ( )

get initial dual bound of current solving node

Returns
initial dual bound value

Definition at line 1303 of file bbParaSolver.h.

References ParaSolver::currentTask.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getCutOffValue()

double getCutOffValue ( )

get cut off value

Returns
cut off value

Definition at line 1448 of file bbParaSolver.h.

References BbParaSolver::globalBestCutOffValue.

◆ getDualBoundValue()

virtual double getDualBoundValue ( )
protectedpure virtual

◆ getElapsedTimeOfNodeSolving()

double getElapsedTimeOfNodeSolving ( )

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

get elapsed time of node solving

Returns
elapsed time

Definition at line 726 of file bbParaSolver.h.

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

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getGlobalBestDualBoundValueAtWarmStart()

double getGlobalBestDualBoundValueAtWarmStart ( )

get global best dual bound value at warm start (restart)

Returns
global best dual bound value

Definition at line 736 of file bbParaSolver.h.

References BbParaSolver::globalBestDualBoundValueAtWarmStart.

◆ getGlobalBestIncumbentValue()

double getGlobalBestIncumbentValue ( )

get global best incumbent value

Returns
global best incumbent value

Definition at line 971 of file bbParaSolver.h.

References ParaSolver::globalBestIncumbentValue.

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

◆ getLcBestDualBoundValue()

double getLcBestDualBoundValue ( )

get LoadCorrdinator best dual bound value

Returns
LoadCoordinator best dual bound value

Definition at line 746 of file bbParaSolver.h.

References BbParaSolver::lcBestDualBoundValue.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getNNodesLeft()

virtual int getNNodesLeft ( )
protectedpure virtual

get number of nodes left

Returns
the number of nodes left

Implemented in ScipParaSolver.

Referenced by BbParaSolver::processTagInCollectingMode(), and BbParaSolver::sendCompletionOfCalculation().

◆ getNNodesSolved()

virtual long long getNNodesSolved ( )
protectedpure virtual

get number of nodes solved

Returns
the number of nodes solved

Implemented in ScipParaSolver.

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

◆ 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 961 of file bbParaSolver.h.

References ParaSolver::notificationProcessed.

◆ getNRestarts()

virtual int getNRestarts ( )
virtual

get number of restarts (Derived class for SCIP should override this function)

Returns
number of restarts

Reimplemented in ScipParaSolver.

Definition at line 1428 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ getNSendInCollectingMode()

int getNSendInCollectingMode ( )

get number of ParaNodes already sent in a collecting mode

Returns
the number of ParaNodes sent

Definition at line 1036 of file bbParaSolver.h.

References BbParaSolver::nSendInCollectingMode.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getNStopSolvingMode()

int getNStopSolvingMode ( )

get number of nodes to stop solving. This number is not used to decide stop solving. It is used a part of conditions.

Returns
number of nodes to stop solving

Definition at line 757 of file bbParaSolver.h.

References UG::NStopSolvingMode, and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getNTightened()

virtual int getNTightened ( )
protectedvirtual

get number of tightened variables during racing

Reimplemented in ScipParaSolver.

Definition at line 568 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::sendCompletionOfCalculationWithoutSolving().

◆ getNTightenedInt()

virtual int getNTightenedInt ( )
protectedvirtual

get number of tightened integral variables during racing

Reimplemented in ScipParaSolver.

Definition at line 577 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::sendCompletionOfCalculationWithoutSolving().

◆ getParaComm()

ParaComm* getParaComm ( )

get paraParaComm

Returns
communicator used

Definition at line 665 of file bbParaSolver.h.

References ParaSolver::paraComm, ParaSolver::run(), and BbParaSolver::run().

◆ getParaInstance()

ParaInstance* getParaInstance ( )

get ParaInstance object

Returns
pointer to ParaInstance object

Definition at line 991 of file bbParaSolver.h.

References ParaSolver::paraInstance.

Referenced by ScipParaObjCommPointHdlr::ScipParaObjCommPointHdlr().

◆ getParaParamSet()

◆ getPendingIncumbentValue()

double getPendingIncumbentValue ( )

get pending incumbent value

Returns
pending incumbent value

Definition at line 1504 of file bbParaSolver.h.

References ParaSolver::pendingIncumbentValue.

Referenced by ScipParaObjProp::SCIP_DECL_PROPEXEC(), and ScipParaObjProp::SCIP_DECL_PROPPRESOL().

◆ getRank()

virtual int getRank ( )
virtual

get rank of this Solver

Returns
rank of this Solver

Reimplemented from ParaSolver.

Definition at line 1011 of file bbParaSolver.h.

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

Referenced by ScipParaObjCommPointHdlr::scip_exec(), and ScipParaObjCommPointHdlr::sendNode().

◆ getRootNodeTime()

double getRootNodeTime ( )

get root node computing time

Returns
root node computing time

Definition at line 778 of file bbParaSolver.h.

References BbParaSolver::rootNodeTime.

◆ getSelfSplitNodesLeft()

int getSelfSplitNodesLeft ( )

get the number of nodes in slef-split node pool

Returns
the number of self-split nodes left

Definition at line 1524 of file bbParaSolver.h.

References BbParaNodePool::getNumOfNodes(), BbParaSolver::saveIfImprovedSolutionWasFound(), BbParaSolver::sendIfImprovedSolutionWasFound(), BbParaSolver::waitAckCompletion(), and BbParaSolver::waitNotificationIdMessage().

◆ getSimplexIter()

virtual long long getSimplexIter ( )
pure virtual

get number of simplex iterations

Implemented in ScipParaSolver.

Referenced by BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::setOriginalRootNodeProcess().

◆ getSubMipDepth()

int getSubMipDepth ( )

get depth of sub-MIP root node in global search tree

Returns
depth fo sub-MIP root

Definition at line 1184 of file bbParaSolver.h.

References ParaSolver::currentTask.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getTargetBound()

double getTargetBound ( )

get target bound for breaking

Returns
target bound value

Definition at line 1101 of file bbParaSolver.h.

References BbParaSolver::targetBound.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ getThresholdValue()

◆ getTimeStopSolvingMode()

double getTimeStopSolvingMode ( )

get time to stop solving. This value is not used to decide stop solving. It is used a part of conditions.

Returns
time to stop solving

Definition at line 768 of file bbParaSolver.h.

References ParaParamSet::getRealParamValue(), ParaSolver::paraParams, and UG::TimeStopSolvingMode.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ globalIncumbnetValueIsReflected()

void globalIncumbnetValueIsReflected ( )

set global incumbent value is reflected

Definition at line 824 of file bbParaSolver.h.

References ParaSolver::globalIncumbnetValueUpdateFlag.

◆ iReceiveMessages()

◆ isAggressiveCollecting()

bool isAggressiveCollecting ( )

check if Solver is in aggressive collecting mode or not

Returns
true if Solver is in aggressive collecting mode, false otherwise

Definition at line 903 of file bbParaSolver.h.

References BbParaSolver::aggressiveCollecting.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isAggressivePresolvingSpecified()

bool isAggressivePresolvingSpecified ( )

check if aggressive presolving is specified

Returns
true if aggressive presolving is specified, false otherwise

Definition at line 1154 of file bbParaSolver.h.

References UG::AggressivePresolveDepth, ParaParamSet::getIntParamValue(), and ParaSolver::paraParams.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isAnotherNodeIsRequested()

bool isAnotherNodeIsRequested ( )

check if another node is requested or not

Returns
true if another node is requested, false otherwise

Definition at line 1494 of file bbParaSolver.h.

References BbParaSolver::anotherNodeIsRequested.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isBreaking()

bool isBreaking ( )

check if Solver is in racing stage or not

Returns
true if Solver is in racing stage, false otherwise terminate racing stage get global best incumbent solution
pointer to ParaSolution object check if Solver is waiting for a specific message or not
true if Solver is waiting for a specific message, false otherwise check if Solver is in breaking mode
true if Solver is in breaking mode, false otherwise

Definition at line 1091 of file bbParaSolver.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec(), and BbParaSolver::sendParaNode().

◆ isCollecingInterrupt()

bool isCollecingInterrupt ( )

check if collecting interrupt (interrupt with collecting all nodes) is requested or not

Returns
true if collecting interrupt was requested, false otherwise

Definition at line 844 of file bbParaSolver.h.

References BbParaSolver::collectingInterrupt, BbParaSolver::notificationIsNecessary(), BbParaSolver::sendLocalSolution(), BbParaSolver::sendSolverState(), and BbParaSolver::setRootNodeTime().

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isCollectingAllNodes()

bool isCollectingAllNodes ( )

check if Solver is sending all nodes to LoadCoordinaor or not

Returns
true if Solver is sending all nodes, false otherwise

Definition at line 1204 of file bbParaSolver.h.

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

◆ isDualBoundGainTestNeeded()

bool isDualBoundGainTestNeeded ( )

check if dual bound gain needs to be tested or not

Returns
true if dual bound gain needs to be tested, false otherwise

Definition at line 1342 of file bbParaSolver.h.

References BbParaSolver::testDualBoundGain.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isEnoughGainObtained()

bool isEnoughGainObtained ( )

check if dual bound gains enough or not

Returns
true if dual bound gains enough, false otherwise

Definition at line 1332 of file bbParaSolver.h.

References BbParaSolver::enoughGainObtained.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isGivenGapReached()

bool isGivenGapReached ( )

check if given gap is reached or not

Returns
true if given gap is reached, false otherwise

Definition at line 1224 of file bbParaSolver.h.

References BbParaSolver::givenGapIsReached.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isGlobalIncumbentUpdated()

bool isGlobalIncumbentUpdated ( )

check if global incumbent value is updated or not

Returns
true if global incumbent value is updated

Definition at line 815 of file bbParaSolver.h.

References ParaSolver::globalIncumbnetValueUpdateFlag.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isInCollectingMode()

bool isInCollectingMode ( )

check if Solver is in collecting mode or not

Returns
true if Solver is in collecting mode, false otherwise

Definition at line 893 of file bbParaSolver.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isIterativeBreakDownApplied()

bool isIterativeBreakDownApplied ( )

check if iterative break down is applied or not

Returns
true if iterative break down is applied, false otherwise

Definition at line 1234 of file bbParaSolver.h.

References ParaParamSet::getBoolParamValue(), UG::IterativeBreakDown, and ParaSolver::paraParams.

◆ isManyNodesCollectionRequested()

bool isManyNodesCollectionRequested ( )

check if many nodes collection was requested or not

Returns
true if many nodes collection was requested, false otherwise

Definition at line 913 of file bbParaSolver.h.

References BbParaSolver::collectingManyNodes, BbParaSolver::getThresholdValue(), BbParaSolver::keepParaNode(), BbParaSolver::sendAnotherNodeRequest(), and BbParaSolver::sendParaNode().

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isOnceBreak()

bool isOnceBreak ( )

check if once breaking procedure worked or not

Returns
true if the breaking procedure worked, false otherwise

Definition at line 1133 of file bbParaSolver.h.

References BbParaSolver::onceBreak.

◆ isRacingInterruptRequested()

bool isRacingInterruptRequested ( )

check if racing interrupt was requested or not

Returns
true if racing interrupt was requested, false otherwise

Definition at line 834 of file bbParaSolver.h.

References ParaSolver::racingInterruptIsRequested.

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

◆ isRacingRampUp()

bool isRacingRampUp ( )

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

Returns
true if this solver is in racing ramp-up, false otherwise

Definition at line 1352 of file bbParaSolver.h.

References ParaParamSet::getIntParamValue(), ParaSolver::paraParams, and UG::RampUpPhaseProcess.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ isRacingStage()

◆ issueInterruptSolve()

virtual void issueInterruptSolve ( )
virtual

issue interrupt to solve

Reimplemented in ScipParaSolver.

Definition at line 1559 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagGivenGapIsReached(), and BbParaSolver::processTagInterruptRequest().

◆ isTransferLimitReached()

bool isTransferLimitReached ( )

check if the number of ParaNodes sent is reached to transfer limit specified

Returns
true if the number of ParaNodes sent is reached to the limit, false otherwise

Definition at line 1111 of file bbParaSolver.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ keepParaNode()

void keepParaNode ( long long  n,
int  depth,
double  dualBound,
double  estimateValue,
ParaDiffSubproblem diffSubproblem 
)
virtual

keep a branch-and-bound node as ParaNode to LoadCoordinator

Parameters
nbranch-and-bound node number in this Solver
depthdepth of branch-and-bound node in this Solver
dualBounddual bound value of branch-and-bound node
estimateValueestimate value of branch-and-bound node
diffSubproblemdifference between the root branch-and-bound node and transferred one

Definition at line 2044 of file bbParaSolver.cpp.

References ParaSolver::currentTask, DEF_BB_PARA_COMM, BbParaSolver::getDualBoundValue(), ParaComm::getRank(), SubtaskId::globalSubtaskIdInLc, BbParaNodePool::insert(), SubtaskId::lcId, ParaSolver::paraComm, BbParaSolver::selfSplitNodePool, BbParaNode::sendNewSubtreeRoot(), TaskId::subtaskId, and ParaTask::taskId.

Referenced by BbParaSolver::isManyNodesCollectionRequested().

◆ lbBoundTightened()

virtual int lbBoundTightened ( int  source,
int  tag 
)
protectedvirtual

lower bound of variable tightened

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagLbBoundTightened

Reimplemented in ScipParaSolver.

Definition at line 545 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagLbBoundTightened().

◆ newParaNodeExists()

bool newParaNodeExists ( )

check if a new ParaNode was received or not

Returns
true if a new ParaNode was received, false otherwise

Definition at line 883 of file bbParaSolver.h.

References ParaSolver::newTask.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ notificationIsNecessary()

◆ notifySelfSplitFinished()

void notifySelfSplitFinished ( )
protectedvirtual

◆ passToken()

void passToken ( int  rank)
virtual

pass token to the next process

Parameters
rankrank of this Solver

Reimplemented from ParaSolver.

Definition at line 1282 of file bbParaSolver.h.

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

Referenced by BbParaSolver::receiveNewTaskAndReactivate(), BbParaSolver::run(), and ScipParaObjCommPointHdlr::scip_exec().

◆ processTagBreaking()

int processTagBreaking ( int  source,
int  tag 
)
protectedvirtual

process TagBreaking

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagBreaking

Definition at line 677 of file bbParaSolver.cpp.

References BbParaSolver::collectingManyNodes, BbParaSolver::nTransferLimit, BbParaSolver::nTransferredNodes, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaDOUBLE, UG::ParaINT, ParaComm::receive(), UG::TagBreaking, and BbParaSolver::targetBound.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagCollectAllNodes()

int processTagCollectAllNodes ( int  source,
int  tag 
)
protectedvirtual

process TagCollectAllNodes

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagCollectAllNodes

Definition at line 562 of file bbParaSolver.cpp.

References BbParaSolver::collectingManyNodes, BbParaSolver::nCollectOnce, BbParaSolver::noWaitModeSend, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaINT, ParaComm::receive(), and UG::TagCollectAllNodes.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagCutOffValue()

int processTagCutOffValue ( int  source,
int  tag 
)
protectedvirtual

process TagCutOffValue

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagCutOffValue

Definition at line 783 of file bbParaSolver.cpp.

References PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaDOUBLE, ParaComm::receive(), UG::TagCutOffValue, and BbParaSolver::updateGlobalBestCutOffValue().

Referenced by BbParaSolver::BbParaSolver().

◆ processTagGivenGapIsReached()

int processTagGivenGapIsReached ( int  source,
int  tag 
)
protectedvirtual

process TagGivenGapIsReached

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagGivenGapIsReached

Definition at line 694 of file bbParaSolver.cpp.

References BbParaSolver::givenGapIsReached, BbParaSolver::issueInterruptSolve(), PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), ParaSolver::stayAliveAfterInterrupt, and UG::TagGivenGapIsReached.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagGlobalBestDualBoundValueAtWarmStart()

int processTagGlobalBestDualBoundValueAtWarmStart ( int  source,
int  tag 
)
protectedvirtual

process TagGlobalBestDualBoundValueAtWarmStart

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagGlobalBestDualBoundValueAtWarmStart

Definition at line 500 of file bbParaSolver.cpp.

References BbParaSolver::globalBestDualBoundValueAtWarmStart, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaDOUBLE, ParaComm::receive(), and UG::TagGlobalBestDualBoundValueAtWarmStart.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagInCollectingMode()

◆ processTagIncumbentValue()

int processTagIncumbentValue ( int  source,
int  tag 
)
protectedvirtual

◆ processTagInterruptRequest()

◆ processTagKeepRacing()

int processTagKeepRacing ( int  source,
int  tag 
)
protectedvirtual

process TagKeepRacing

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagChangeSearchStrategy

Definition at line 797 of file bbParaSolver.cpp.

References BbParaSolver::keepRacing, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaINT, ParaComm::receive(), and UG::TagKeepRacing.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagLbBoundTightened()

int processTagLbBoundTightened ( int  source,
int  tag 
)
protectedvirtual

process TagLbBoundTightened

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagLbBoundTightened

Definition at line 765 of file bbParaSolver.cpp.

References BbParaSolver::lbBoundTightened().

Referenced by BbParaSolver::BbParaSolver().

◆ processTagLCBestBoundValue()

int processTagLCBestBoundValue ( int  source,
int  tag 
)
protectedvirtual

process TagLCBestBoundValue

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagLCBestBoundValue

Definition at line 597 of file bbParaSolver.cpp.

References BbParaSolver::lcBestDualBoundValue, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaDOUBLE, ParaComm::receive(), and UG::TagLCBestBoundValue.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagLightWeightRootNodeProcess()

int processTagLightWeightRootNodeProcess ( int  source,
int  tag 
)
protectedvirtual

process TagLightWeightRootNodeProcess

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagLightWeightRootNodeProcess

Definition at line 663 of file bbParaSolver.cpp.

References BbParaSolver::lightWeightRootNodeComputation, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), BbParaSolver::setLightWeightRootNodeProcess(), and UG::TagLightWeightRootNodeProcess.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagNoNodes()

int processTagNoNodes ( int  source,
int  tag 
)
protectedvirtual

process TagNoNodes

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagNoNodes

Definition at line 512 of file bbParaSolver.cpp.

References BbParaSolver::anotherNodeIsRequested, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), and UG::TagNoNodes.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagNoTestDualBoundGain()

int processTagNoTestDualBoundGain ( int  source,
int  tag 
)
protectedvirtual

process TagNoTestDualBoundGain

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagNoTestDualBoundGain

Definition at line 723 of file bbParaSolver.cpp.

References BbParaSolver::enoughGainObtained, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), UG::TagNoTestDualBoundGain, and BbParaSolver::testDualBoundGain.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagNotificationId()

int processTagNotificationId ( int  source,
int  tag 
)
protectedvirtual

process TagNotificationId

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagNotificationId

Implements ParaSolver.

Definition at line 392 of file bbParaSolver.cpp.

References ParaSolver::notificationIdGenerator, ParaSolver::notificationProcessed, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaUNSIGNED, ParaComm::receive(), UG::TagNotificationId, and THROW_LOGICAL_ERROR4.

Referenced by BbParaSolver::waitNotificationIdMessage().

◆ processTagNoWaitModeSend()

int processTagNoWaitModeSend ( int  source,
int  tag 
)
protectedvirtual

process TagNoWaitModeSend

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagNoWaitModeSend

Definition at line 737 of file bbParaSolver.cpp.

References BbParaSolver::noWaitModeSend, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), and UG::TagNoWaitModeSend.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagOutCollectingMode()

int processTagOutCollectingMode ( int  source,
int  tag 
)
protectedvirtual

◆ processTagRampUp()

◆ processTagRestart()

int processTagRestart ( int  source,
int  tag 
)
protectedvirtual

process TagRestart

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagRestart

Definition at line 750 of file bbParaSolver.cpp.

References UG::NoTerminationMode, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaSolver::rampUp, ParaComm::receive(), ParaSolver::stayAliveAfterInterrupt, UG::TagRestart, and ParaSolver::terminationMode.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagRetryRampUp()

int processTagRetryRampUp ( int  source,
int  tag 
)
protectedvirtual

process TagRetryRampUp

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagRetryRampUp

Definition at line 480 of file bbParaSolver.cpp.

References BbParaSolver::aggressiveCollecting, BbParaSolver::collectingMode, BbParaSolver::noWaitModeSend, BbParaSolver::nSendInCollectingMode, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaSolver::rampUp, ParaComm::receive(), and UG::TagRetryRampUp.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagSolution()

int processTagSolution ( int  source,
int  tag 
)
protectedvirtual

◆ processTagTask()

int processTagTask ( int  source,
int  tag 
)
protectedvirtual


Message handlers

process TagNode

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagNode

Implements ParaSolver.

Definition at line 244 of file bbParaSolver.cpp.

References BbParaSolver::anotherNodeIsRequested, ParaSolver::currentTask, DEF_BB_PARA_COMM, BbParaSolver::keepRacing, ParaSolver::newTask, ParaSolver::nParaTasksReceived, ParaSolver::paraComm, ParaTask::receive(), and ParaSolver::winnerRacingParams.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagTaskReceived()

int processTagTaskReceived ( int  source,
int  tag 
)
protectedvirtual

process TagTaskReceived

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTaskReceived

Implements ParaSolver.

Definition at line 280 of file bbParaSolver.cpp.

References PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), and UG::TagTaskReceived.

◆ processTagTerminateRequest()

int processTagTerminateRequest ( int  source,
int  tag 
)
protectedvirtual

process TagTerminateRequest

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTerminateRequest

Implements ParaSolver.

Definition at line 410 of file bbParaSolver.cpp.

References UG::NormalTerminationMode, PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaComm::receive(), ParaSolver::stayAliveAfterInterrupt, UG::TagTerminateRequest, and ParaSolver::terminationMode.

◆ processTagTerminateSolvingToRestart()

int processTagTerminateSolvingToRestart ( int  source,
int  tag 
)
protectedvirtual

process TagTerminateSolvingToRestart

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTerminateSolvingToRestart

Definition at line 820 of file bbParaSolver.cpp.

References BbParaSolver::isRacingStage(), PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaSolver::racingIsInterrupted, ParaComm::receive(), BbParaSolver::restartingRacing, and UG::TagTerminateSolvingToRestart.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagTestDualBoundGain()

int processTagTestDualBoundGain ( int  source,
int  tag 
)
protectedvirtual

process TagTestDualBoundGain

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagTestDualBoundGain

Definition at line 709 of file bbParaSolver.cpp.

References BbParaSolver::averageDualBoundGain, BbParaSolver::enoughGainObtained, PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaDOUBLE, ParaComm::receive(), UG::TagTestDualBoundGain, and BbParaSolver::testDualBoundGain.

Referenced by BbParaSolver::BbParaSolver().

◆ processTagToken()

int processTagToken ( int  source,
int  tag 
)
protectedvirtual

process TagToken

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagToken

Reimplemented from ParaSolver.

Definition at line 465 of file bbParaSolver.cpp.

References UG::Deterministic, ParaParamSet::getBoolParamValue(), ParaComm::getRank(), PARA_COMM_CALL, ParaSolver::paraComm, UG::ParaINT, ParaSolver::paraParams, ParaComm::receive(), ParaComm::setToken(), and UG::TagToken.

◆ processTagUbBoundTightened()

int processTagUbBoundTightened ( int  source,
int  tag 
)
protectedvirtual

process TagUbBoundTightened

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagUbBoundTightened

Definition at line 774 of file bbParaSolver.cpp.

References BbParaSolver::ubBoundTightened().

Referenced by BbParaSolver::BbParaSolver().

◆ processTagWinner()

int processTagWinner ( int  source,
int  tag 
)
protectedvirtual

process TagWinner

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagWinner

Reimplemented from ParaSolver.

Definition at line 449 of file bbParaSolver.cpp.

References PARA_COMM_CALL, UG::ParaBYTE, ParaSolver::paraComm, ParaSolver::racingParams, ParaSolver::racingWinner, ParaComm::receive(), UG::TagWinner, and ParaSolver::winnerRacingParams.

◆ processTagWinnerRacingRampUpParamSet()

int processTagWinnerRacingRampUpParamSet ( int  source,
int  tag 
)
protectedvirtual

◆ receiveNewTaskAndReactivate()

◆ resetBreakingInfo()

void resetBreakingInfo ( )

reset breaking information

Definition at line 1120 of file bbParaSolver.h.

Referenced by BbParaSolver::run(), and ScipParaObjCommPointHdlr::scip_exec().

◆ restartRacing()

◆ run() [1/2]

void run ( )
virtual

set collecting mode

set start time and ilde times

Before sending completion state, receiving message should be checked. When subproblem terminated with no branch, solver lost a timing for receiving new node

Implements ParaSolver.

Definition at line 835 of file bbParaSolver.cpp.

References BbParaSolver::aggressiveCollecting, UG::CheckEffectOfRootNodePreprocesses, BbParaSolver::collectingManyNodes, BbParaSolver::collectingMode, BbParaSolver::createSubproblem(), ParaSolver::currentTask, UG::Deterministic, BbParaNodePool::extractNode(), BbParaSolver::freeSubproblem(), ParaParamSet::getBoolParamValue(), ParaDeterministicTimer::getElapsedTime(), ParaTimer::getElapsedTime(), BbParaSolver::getNNodesSolved(), BbParaNodePool::getNumOfNodes(), ParaComm::getRank(), ParaSolver::globalBestIncumbentSolution, ParaSolver::globalBestIncumbentValue, ParaSolver::globalIncumbnetValueUpdateFlag, ParaSolver::idleTimeBetweenParaTasks, ParaSolver::idleTimeToFirstParaTask, ParaSolver::idleTimeToWaitToken, BbParaSolver::iReceiveMessages(), BbParaNodePool::isEmpty(), BbParaSolver::lightWeightRootNodeComputation, BbParaSolver::nCollectOnce, ParaSolver::newTask, BbParaSolver::notifySelfSplitFinished(), BbParaSolver::noWaitModeSend, ParaSolver::nParaTasksReceived, BbParaSolver::nSendInCollectingMode, BbParaSolver::nSolved, BbParaSolver::onceBreak, ParaSolver::paraComm, ParaSolver::paraDetTimer, ParaSolver::paraParams, ParaSolver::paraTaskStartTime, ParaSolver::paraTimer, BbParaSolver::passToken(), ParaSolver::previousCommTime, ParaSolver::previousIdleTimeToWaitToken, ParaSolver::previousStopTime, ParaSolver::racingInterruptIsRequested, ParaSolver::racingParams, ParaSolver::racingWinner, BbParaSolver::receiveNewTaskAndReactivate(), BbParaSolver::resetBreakingInfo(), BbParaSolver::selfSplitNodePool, BbParaSolver::sendCompletionOfCalculation(), BbParaSolver::sendCompletionOfCalculationWithoutSolving(), BbParaNode::sendSubtreeRootNodeId(), UG::SetAllDefaultsAfterRacing, BbParaSolver::setOriginalRootNodeProcess(), BbParaSolver::setWinnerRacingParams(), BbParaSolver::solve(), BbParaSolver::solveToCheckEffectOfRootNodePreprocesses(), ParaSolver::stayAliveAfterInterrupt, ParaSolver::subproblemFreed, UG::TagCompletionOfCalculation, UG::TagReassignSelfSplitSubtreeRootNode, UG::TagSelfSlpitNodeCalcuationState, UG::TagSubtreeRootNodeStartComputation, ParaSolver::terminationMode, BbParaSolver::tryNewSolution(), ParaDeterministicTimer::update(), ParaSolver::updatePendingSolution(), BbParaSolver::waitAckCompletion(), BbParaSolver::waitToken(), and ParaSolver::winnerRacingParams.

Referenced by BbParaSolver::getParaComm(), and runSolverThread().

◆ run() [2/2]

◆ saveIfImprovedSolutionWasFound()

◆ sendAnotherNodeRequest()

void sendAnotherNodeRequest ( double  bestDualBoundValue)
virtual

◆ sendCompletionOfCalculation() [1/2]

◆ sendCompletionOfCalculation() [2/2]

void sendCompletionOfCalculation ( double  stopTime,
int  tag,
int  nSelfSplitNodesLeft 
)
protectedvirtual

send completion of calculation with arguments

nSolved > 1 is set within callback routine

Transfer SolverTermination state during racing ramp-up

interupted flag == 3 means the information for racing ramp-up

re-initialize all counters, winner counts on current counters

Transfer SolverTermination state to save statistic information for checkpoint

interupted flag == 2 means the information for checkpoint

Parameters
stopTimestopping time
tagmessage Tag
nSelfSplitNodesLeftnumber of self-split nodes left

Definition at line 1261 of file bbParaSolver.cpp.

References BbParaSolver::anotherNodeIsRequested, BbParaSolver::collectingManyNodes, UG::CompInterruptedInMerging, UG::CompInterruptedInRacingStage, UG::CompTerminatedByAnotherTask, UG::CompTerminatedByInterruptRequest, UG::CompTerminatedByMemoryLimit, UG::CompTerminatedByTimeLimit, UG::CompTerminatedInRacingStage, UG::CompTerminatedNormally, ParaSolver::currentTask, DEF_BB_PARA_COMM, UG::Deterministic, BbParaNodePool::getBestDualBoundValue(), ParaParamSet::getBoolParamValue(), ParaDeterministicTimer::getElapsedTime(), ParaTimer::getElapsedTime(), BbParaSolver::getNRestarts(), BbParaSolver::getNTightened(), BbParaSolver::getNTightenedInt(), ParaComm::getRank(), BbParaSolver::getSimplexIter(), BbParaSolver::givenGapIsReached, ParaSolver::idleTimeBetweenParaTasks, ParaSolver::idleTimeToFirstParaTask, ParaSolver::idleTimeToWaitAckCompletion, ParaSolver::idleTimeToWaitNotificationId, ParaSolver::idleTimeToWaitToken, UG::InterruptedTerminationMode, BbParaNodePool::isEmpty(), BbParaSolver::isRacingStage(), BbParaSolver::keepRacing, BbParaSolver::maxIisum, BbParaSolver::maxNii, BbParaSolver::maxNSolved, BbParaSolver::maxRestarts, BbParaSolver::maxRootNodeTime, BbParaSolver::maxTransferredBendersCuts, BbParaSolver::maxTransferredBendersCutsFromSolver, BbParaSolver::maxTransferredLocalCuts, BbParaSolver::maxTransferredLocalCutsFromSolver, ParaSolver::memoryLimitIsReached, ParaSolver::messageHandler, BbParaSolver::minIisum, BbParaSolver::minNii, BbParaSolver::minNSolved, BbParaSolver::minRestarts, BbParaSolver::minRootNodeTime, BbParaSolver::minTransferredBendersCuts, BbParaSolver::minTransferredBendersCutsFromSolver, BbParaSolver::minTransferredLocalCuts, BbParaSolver::minTransferredLocalCutsFromSolver, BbParaSolver::nCollectOnce, ParaSolver::newTask, ParaSolver::nImprovedIncumbent, BbParaSolver::nParaNodesSolvedAtPreCheck, BbParaSolver::nParaNodesSolvedAtRoot, ParaSolver::nParaTasksReceived, ParaSolver::nParaTasksSolved, BbParaSolver::nSendInCollectingMode, BbParaSolver::nSent, BbParaSolver::nSimplexIterRoot, BbParaSolver::nSolved, BbParaSolver::nSolvedWithNoPreprocesses, BbParaSolver::nTotalRestarts, BbParaSolver::nTransferredBendersCuts, BbParaSolver::nTransferredBendersCutsFromSolver, BbParaSolver::nTransferredLocalCuts, BbParaSolver::nTransferredLocalCutsFromSolver, ParaSolver::paraComm, ParaSolver::paraDetTimer, ParaSolver::paraParams, ParaSolver::paraTimer, ParaComm::probe(), ParaSolver::racingInterruptIsRequested, ParaSolver::racingIsInterrupted, ParaSolver::racingWinner, BbParaSolver::restartingRacing, BbParaSolver::restartRacing(), BbParaSolver::rootNodeTime, BbParaSolver::selfSplitNodePool, ParaCalculationState::send(), ParaSolverTerminationState::send(), BbParaSolver::setRootNodeSimplexIter(), BbParaSolver::setRootNodeTime(), BbParaSolver::solverDualBound, UG::TagCompletionOfCalculation, UG::TagSelfSplitTermStateForInterruption, UG::TagTermStateForInterruption, ParaSolver::terminateRacing(), ParaSolver::terminationMode, THROW_LOGICAL_ERROR3, UG::TimeLimitTerminationMode, BbParaSolver::totalNImprovedIncumbent, BbParaSolver::totalNSent, BbParaSolver::totalNSolved, BbParaSolver::totalRootNodeTime, and BbParaSolver::wasTerminatedNormally().

◆ sendCompletionOfCalculationWithoutSolving()

void sendCompletionOfCalculationWithoutSolving ( double  stopTime,
int  tag,
int  nSelfSplitNodesLeft 
)
protectedvirtual

send completion of calculation with arguments

Transfer SolverTermination state to save statistic information for checkpoint

interupted flag == 2 means the information for checkpoint

Parameters
stopTimestopping time
tagmessage Tag
nSelfSplitNodesLeftnumber of self-split nodes left

Definition at line 1632 of file bbParaSolver.cpp.

References UG::CompTerminatedNormally, DEF_BB_PARA_COMM, UG::Deterministic, BbParaNodePool::getBestDualBoundValue(), ParaParamSet::getBoolParamValue(), ParaDeterministicTimer::getElapsedTime(), ParaTimer::getElapsedTime(), BbParaSolver::getNTightened(), BbParaSolver::getNTightenedInt(), ParaComm::getRank(), BbParaSolver::givenGapIsReached, ParaSolver::idleTimeBetweenParaTasks, ParaSolver::idleTimeToFirstParaTask, ParaSolver::idleTimeToWaitAckCompletion, ParaSolver::idleTimeToWaitNotificationId, ParaSolver::idleTimeToWaitToken, BbParaNodePool::isEmpty(), BbParaSolver::maxNSolved, BbParaSolver::maxRestarts, BbParaSolver::maxRootNodeTime, BbParaSolver::maxTransferredBendersCutsFromSolver, BbParaSolver::maxTransferredLocalCutsFromSolver, BbParaSolver::minNSolved, BbParaSolver::minRestarts, BbParaSolver::minRootNodeTime, BbParaSolver::minTransferredBendersCutsFromSolver, BbParaSolver::minTransferredLocalCutsFromSolver, BbParaSolver::nParaNodesSolvedAtPreCheck, BbParaSolver::nParaNodesSolvedAtRoot, ParaSolver::nParaTasksReceived, ParaSolver::nParaTasksSolved, BbParaSolver::nSendInCollectingMode, BbParaSolver::nTotalRestarts, BbParaSolver::nTransferredBendersCutsFromSolver, BbParaSolver::nTransferredLocalCutsFromSolver, ParaSolver::paraComm, ParaSolver::paraDetTimer, ParaSolver::paraParams, ParaSolver::paraTimer, ParaSolver::racingIsInterrupted, BbParaSolver::selfSplitNodePool, ParaCalculationState::send(), ParaSolverTerminationState::send(), BbParaSolver::solverDualBound, UG::TagSelfSplitTermStateForInterruption, BbParaSolver::totalNImprovedIncumbent, BbParaSolver::totalNSent, BbParaSolver::totalNSolved, and BbParaSolver::totalRootNodeTime.

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

◆ sendIfImprovedSolutionWasFound()

bool sendIfImprovedSolutionWasFound ( ParaSolution sol)
virtual

◆ sendLocalSolution()

◆ sendParaNode()

void sendParaNode ( long long  n,
int  depth,
double  dualBound,
double  estimateValue,
ParaDiffSubproblem diffSubproblem 
)
virtual

◆ sendSolverState()

◆ sendSolverTerminationState()

void sendSolverTerminationState ( )
protectedvirtual

send Solver termination state

Definition at line 175 of file bbParaSolver.cpp.

References UG::CompTerminatedByInterruptRequest, UG::CompTerminatedNormally, DEF_BB_PARA_COMM, ParaTimer::getElapsedTime(), ParaComm::getRank(), ParaSolver::idleTimeAfterLastParaTask, ParaSolver::idleTimeBetweenParaTasks, ParaSolver::idleTimeToFirstParaTask, ParaSolver::idleTimeToWaitAckCompletion, ParaSolver::idleTimeToWaitNotificationId, ParaSolver::idleTimeToWaitToken, interrupted, UG::InterruptedTerminationMode, BbParaSolver::maxNSolved, BbParaSolver::maxRestarts, BbParaSolver::maxRootNodeTime, BbParaSolver::maxTransferredBendersCutsFromSolver, BbParaSolver::maxTransferredLocalCutsFromSolver, BbParaSolver::minNSolved, BbParaSolver::minRestarts, BbParaSolver::minRootNodeTime, BbParaSolver::minTransferredBendersCutsFromSolver, BbParaSolver::minTransferredLocalCutsFromSolver, BbParaSolver::nParaNodesSolvedAtPreCheck, BbParaSolver::nParaNodesSolvedAtRoot, ParaSolver::nParaTasksReceived, ParaSolver::nParaTasksSolved, BbParaSolver::nTightened, BbParaSolver::nTightenedInt, BbParaSolver::nTotalRestarts, BbParaSolver::nTransferredBendersCutsFromSolver, BbParaSolver::nTransferredLocalCutsFromSolver, ParaSolver::paraComm, ParaSolver::paraTimer, ParaSolver::previousIdleTimeToWaitToken, ParaSolver::previousStopTime, ParaSolverTerminationState::send(), UG::TagTerminated, ParaSolver::terminationMode, BbParaSolver::totalNImprovedIncumbent, BbParaSolver::totalNSent, BbParaSolver::totalNSolved, and BbParaSolver::totalRootNodeTime.

Referenced by BbParaSolver::changeSearchStrategy().

◆ setII()

void setII ( double  sum,
int  count 
)

set sum and number of integer infeasibility

Parameters
sumsum of integer infeasibility
countnumber of integer infeasibility

Definition at line 1243 of file bbParaSolver.h.

Referenced by ScipParaObjBranchRule::scip_execlp().

◆ setKeepRacing()

void setKeepRacing ( bool  value)

set keep racing value

Definition at line 1513 of file bbParaSolver.h.

◆ setLightWeightRootNodeProcess()

virtual void setLightWeightRootNodeProcess ( )
virtual

set light weight root node process

Reimplemented in ScipParaSolver.

Definition at line 1396 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagLightWeightRootNodeProcess().

◆ setNotEnoughGain()

void setNotEnoughGain ( )

set dual bound gain is not enough

Definition at line 1322 of file bbParaSolver.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec().

◆ setOnceBreak()

void setOnceBreak ( )

set once braking procedure worked

Definition at line 1142 of file bbParaSolver.h.

◆ setOriginalNodeSelectionStrategy()

virtual void setOriginalNodeSelectionStrategy ( )
protectedpure virtual

◆ setOriginalRootNodeProcess()

virtual void setOriginalRootNodeProcess ( )
virtual

set original root node process

Reimplemented in ScipParaSolver.

Definition at line 1405 of file bbParaSolver.h.

References BbParaSolver::getSimplexIter(), and BbParaSolver::writeSubproblem().

Referenced by BbParaSolver::run().

◆ setRacingParams()

virtual void setRacingParams ( ParaRacingRampUpParamSet racingParms,
bool  winnerParam 
)
protectedpure virtual

set racing parameters

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

Reimplemented from ParaSolver.

Implemented in ScipParaSolver.

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

◆ setRootNodeSimplexIter()

void setRootNodeSimplexIter ( int  iter)

set number of simplex iteration at root node

Definition at line 1257 of file bbParaSolver.h.

Referenced by ScipParaObjCommPointHdlr::scip_exec(), and BbParaSolver::sendCompletionOfCalculation().

◆ setRootNodeTime()

◆ setSendBackAllNodes()

void setSendBackAllNodes ( )

set counter and flag to indicate that all nodes are sent to LoadCooordinator

Definition at line 1193 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagInterruptRequest(), and ScipParaObjCommPointHdlr::scip_exec().

◆ setWinnerRacingParams()

virtual void setWinnerRacingParams ( ParaRacingRampUpParamSet racingParms)
protectedpure virtual

set winner racing parameters

Parameters
racingParmspointer to winner racing parameter set object

Reimplemented from ParaSolver.

Implemented in ScipParaSolver.

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

◆ solve()

virtual void solve ( )
protectedpure virtual

solve (sub)problem

Implements ParaSolver.

Implemented in ScipParaSolver.

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

◆ solveToCheckEffectOfRootNodePreprocesses()

virtual void solveToCheckEffectOfRootNodePreprocesses ( )
protectedvirtual

solve to check effect of root node preprocesses

set nSolvedWithNoPreprocesses

Reimplemented in ScipParaSolver.

Definition at line 535 of file bbParaSolver.h.

Referenced by BbParaSolver::run().

◆ tryNewSolution()

virtual void tryNewSolution ( ParaSolution sol)
pure virtual

try to enter solution to base solver environment

Parameters
solsolution to be enterred

Implements ParaSolver.

Implemented in ScipParaSolver.

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

◆ ubBoundTightened()

virtual int ubBoundTightened ( int  source,
int  tag 
)
protectedvirtual

upper bound of variable tightened

Returns
always 0 (for extension)
Parameters
sourcesource rank
tagTagUbBoundTightened

Reimplemented in ScipParaSolver.

Definition at line 557 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagUbBoundTightened().

◆ updateGlobalBestCutOffValue()

bool updateGlobalBestCutOffValue ( double  newValue)
protectedvirtual

update global best cutoff value

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

Definition at line 2087 of file bbParaSolver.cpp.

References BbParaSolver::globalBestCutOffValue.

Referenced by BbParaSolver::processTagCutOffValue(), and BbParaSolver::sendCompletionOfCalculation().

◆ updateGlobalBestIncumbentSolution()

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 from ParaSolver.

Definition at line 2238 of file bbParaSolver.cpp.

References DEFAULT_NUM_EPSILON, EPSLE, ParaSolution::getObjectiveFunctionValue(), ParaSolver::globalBestIncumbentSolution, ParaSolver::globalBestIncumbentValue, and ParaSolver::globalIncumbnetValueUpdateFlag.

Referenced by BbParaSolver::changeSearchStrategy().

◆ updateGlobalBestIncumbentValue()

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 from ParaSolver.

Definition at line 2224 of file bbParaSolver.cpp.

References ParaSolver::globalBestIncumbentValue, and ParaSolver::globalIncumbnetValueUpdateFlag.

Referenced by BbParaSolver::changeSearchStrategy(), and BbParaSolver::processTagIncumbentValue().

◆ updateNTransferredBendersCuts()

void updateNTransferredBendersCuts ( int  n)

update number of transferred benders cuts

Parameters
nnumber of transferred benders cuts to be added

Definition at line 1475 of file bbParaSolver.h.

Referenced by ScipParaDiffSubproblem::addLocalNodeInfo().

◆ updateNTransferredLocalCuts()

void updateNTransferredLocalCuts ( int  n)

update number of transferred local cuts

Parameters
nnumber of transferred local cuts to be added

Definition at line 1457 of file bbParaSolver.h.

Referenced by ScipParaDiffSubproblem::addLocalNodeInfo().

◆ waitAckCompletion()

◆ waitMessageIfNecessary()

void waitMessageIfNecessary ( )
virtual

◆ waitNotificationIdMessage()

◆ waitToken()

bool waitToken ( int  rank)
virtual

wait token for deterministic mode

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

Reimplemented from ParaSolver.

Definition at line 1268 of file bbParaSolver.h.

References ParaTimer::getElapsedTime(), ParaSolver::idleTimeToWaitToken, ParaSolver::paraComm, ParaSolver::paraTimer, and ParaComm::waitToken().

Referenced by BbParaSolver::receiveNewTaskAndReactivate(), BbParaSolver::run(), ScipParaObjCommPointHdlr::scip_exec(), and ScipParaSolver::~ScipParaSolver().

◆ wasTerminatedNormally()

virtual bool wasTerminatedNormally ( )
pure virtual

check if Solver was terminated normally or not

Returns
true if Solver was terminated normally, false otherwise

Implements ParaSolver.

Implemented in ScipParaSolver.

Referenced by BbParaSolver::isRacingStage(), and BbParaSolver::sendCompletionOfCalculation().

◆ writeCurrentTaskProblem()

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

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

Parameters
filenamefile name to write

Implements ParaSolver.

Implemented in ScipParaSolver.

Referenced by BbParaSolver::isRacingStage().

◆ writeSubproblem()

virtual void writeSubproblem ( )
pure virtual

write subproblem

Implements ParaSolver.

Implemented in ScipParaSolver.

Referenced by BbParaSolver::iReceiveMessages(), and BbParaSolver::setOriginalRootNodeProcess().

Member Data Documentation

◆ aggressiveCollecting

bool aggressiveCollecting
protected

◆ anotherNodeIsRequested

bool anotherNodeIsRequested
protected

◆ averageDualBoundGain

double averageDualBoundGain
protected

◆ collectingInterrupt

bool collectingInterrupt
protected

when the solver is interrupted, all nodes are collected to LC

Definition at line 78 of file bbParaSolver.h.

Referenced by BbParaSolver::isCollecingInterrupt(), and BbParaSolver::processTagInterruptRequest().

◆ collectingManyNodes

◆ collectingMode

◆ enoughGainObtained

bool enoughGainObtained
protected

indicate that the root node process improved dual bound enough or not

Definition at line 140 of file bbParaSolver.h.

Referenced by BbParaSolver::isEnoughGainObtained(), BbParaSolver::processTagNoTestDualBoundGain(), BbParaSolver::processTagRampUp(), and BbParaSolver::processTagTestDualBoundGain().

◆ givenGapIsReached

◆ globalBestCutOffValue

double globalBestCutOffValue
protected

global best cut off value

Definition at line 71 of file bbParaSolver.h.

Referenced by BbParaSolver::getCutOffValue(), and BbParaSolver::updateGlobalBestCutOffValue().

◆ globalBestDualBoundValueAtWarmStart

double globalBestDualBoundValueAtWarmStart
protected

global best dual bound value which is set when system warm starts

Definition at line 70 of file bbParaSolver.h.

Referenced by BbParaSolver::getGlobalBestDualBoundValueAtWarmStart(), and BbParaSolver::processTagGlobalBestDualBoundValueAtWarmStart().

◆ keepRacing

bool keepRacing
protected

indicate if Solver needs to do racing ramp-up repeatedly in case of warm start

Definition at line 145 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagInterruptRequest(), BbParaSolver::processTagKeepRacing(), BbParaSolver::processTagTask(), BbParaSolver::restartRacing(), and BbParaSolver::sendCompletionOfCalculation().

◆ lcBestDualBoundValue

double lcBestDualBoundValue
protected

LoadCoordinator best dual bound value.

Definition at line 72 of file bbParaSolver.h.

Referenced by BbParaSolver::getLcBestDualBoundValue(), BbParaSolver::notificationIsNecessary(), and BbParaSolver::processTagLCBestBoundValue().

◆ lightWeightRootNodeComputation

bool lightWeightRootNodeComputation
protected

◆ localIncumbentIsChecked

bool localIncumbentIsChecked
protected

indicate if a local incumbent solution is checked or not

Definition at line 147 of file bbParaSolver.h.

Referenced by BbParaSolver::saveIfImprovedSolutionWasFound().

◆ maxIisum

double maxIisum
protected

maximum sum of integer infeasibility

Definition at line 129 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ maxNii

int maxNii
protected

maximum number of integer infeasibility

Definition at line 131 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ maxNSolved

int maxNSolved
protected

◆ maxRestarts

◆ maxRootNodeTime

◆ maxTransferredBendersCuts

int maxTransferredBendersCuts
protected

maximum number of benders cuts transferred from a ParaNode

Definition at line 125 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ maxTransferredBendersCutsFromSolver

int maxTransferredBendersCutsFromSolver
protected

◆ maxTransferredLocalCuts

int maxTransferredLocalCuts
protected

maximum number of local cuts (including conflict cuts) transferred from a ParaNode

Definition at line 122 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ maxTransferredLocalCutsFromSolver

int maxTransferredLocalCutsFromSolver
protected

◆ minIisum

double minIisum
protected

minimum sum of integer infeasibility

Definition at line 128 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ minNii

int minNii
protected

minimum number of integer infeasibility

Definition at line 130 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ minNSolved

int minNSolved
protected

◆ minRestarts

◆ minRootNodeTime

◆ minTransferredBendersCuts

int minTransferredBendersCuts
protected

minimum number of benders cuts transferred from a ParaNode

Definition at line 124 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ minTransferredBendersCutsFromSolver

int minTransferredBendersCutsFromSolver
protected

◆ minTransferredLocalCuts

int minTransferredLocalCuts
protected

minimum number of local cuts (including conflict cuts) transferred from a ParaNode

Definition at line 121 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ minTransferredLocalCutsFromSolver

int minTransferredLocalCutsFromSolver
protected

◆ nCollectOnce

int nCollectOnce
protected

◆ noWaitModeSend

◆ nParaNodesSolvedAtPreCheck

int nParaNodesSolvedAtPreCheck
protected

◆ nParaNodesSolvedAtRoot

int nParaNodesSolvedAtRoot
protected

◆ nSendInCollectingMode

◆ nSent

int nSent
protected

number of ParaNodes sent from this subtree rooted from the current ParaNode

Definition at line 96 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::sendParaNode().

◆ nSimplexIterRoot

int nSimplexIterRoot
protected

number of simplex iteration at root node

Definition at line 119 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ nSolved

int nSolved
protected

Counters related to the current ParaNode.

number of nodes solved, that is, number of subtree nodes rooted from ParaNode

Definition at line 95 of file bbParaSolver.h.

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

◆ nSolvedWithNoPreprocesses

int nSolvedWithNoPreprocesses
protected

number of nodes solved when it is solved with no preprocesses

Definition at line 97 of file bbParaSolver.h.

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

◆ nTightened

int nTightened
protected

◆ nTightenedInt

int nTightenedInt
protected

the number of tightened integral variable bounds in racing

Definition at line 127 of file bbParaSolver.h.

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

◆ nTotalRestarts

◆ nTransferLimit

int nTransferLimit
protected

limit number of transferring nodes for breaking

Definition at line 134 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagBreaking().

◆ nTransferredBendersCuts

int nTransferredBendersCuts
protected

number of benders cuts transferred from a ParaNode

Definition at line 123 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ nTransferredBendersCutsFromSolver

int nTransferredBendersCutsFromSolver
protected

◆ nTransferredLocalCuts

int nTransferredLocalCuts
protected

number of local cuts (including conflict cuts) transferred from a ParaNode

Definition at line 120 of file bbParaSolver.h.

Referenced by BbParaSolver::sendCompletionOfCalculation().

◆ nTransferredLocalCutsFromSolver

int nTransferredLocalCutsFromSolver
protected

◆ nTransferredNodes

int nTransferredNodes
protected

keep track number of transferred nodes for breaking

Definition at line 135 of file bbParaSolver.h.

Referenced by BbParaSolver::processTagBreaking(), and BbParaSolver::sendParaNode().

◆ onceBreak

bool onceBreak
protected

indicate that the sub-MIP is broken down once

Definition at line 82 of file bbParaSolver.h.

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

◆ restartingRacing

bool restartingRacing
protected

◆ rootNodeTime

double rootNodeTime
protected

Times.

root node process time of current ParaNode

Definition at line 87 of file bbParaSolver.h.

Referenced by BbParaSolver::getRootNodeTime(), BbParaSolver::getThresholdValue(), BbParaSolver::sendCompletionOfCalculation(), and BbParaSolver::setRootNodeTime().

◆ selfSplitNodePool

◆ solverDualBound

double solverDualBound
protected

dual bound value achieved for a subproblem

Definition at line 137 of file bbParaSolver.h.

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

◆ targetBound

double targetBound
protected

target bound value for breaking

Definition at line 133 of file bbParaSolver.h.

Referenced by BbParaSolver::getTargetBound(), and BbParaSolver::processTagBreaking().

◆ testDualBoundGain

bool testDualBoundGain
protected

indicate that the dual bound gain needs to test or not

Definition at line 143 of file bbParaSolver.h.

Referenced by BbParaSolver::isDualBoundGainTestNeeded(), BbParaSolver::processTagNoTestDualBoundGain(), and BbParaSolver::processTagTestDualBoundGain().

◆ totalNImprovedIncumbent

int totalNImprovedIncumbent
protected

◆ totalNSent

◆ totalNSolved

◆ totalRootNodeTime

double totalRootNodeTime
protected