class BbParaSolverPool (Solver Pool base class) More...
#include <bbParaSolverPool.h>
Public Member Functions | |
BbParaSolverPool (double inMp, double inBgap, double inMBgap, int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer) | |
constructor More... | |
BbParaSolverPool (double inMp, double inBgap, double inMBgap, int inNSolvers, int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer) | |
constructor More... | |
virtual | ~BbParaSolverPool () |
destructor More... | |
virtual void | interruptRequested (int rank) |
set the Solver specified by rank is terminate requested More... | |
virtual void | terminateRequested (int rank) |
set the Solver specified by rank is terminate requested More... | |
virtual bool | isInterruptRequested (int rank) |
check if the Solver specified by rank is interrupt requested or not More... | |
virtual bool | isTerminateRequested (int rank) |
check if the Solver specified by rank is terminate requested or not More... | |
virtual void | terminated (int rank) |
set the Solver specified by rank is terminated More... | |
virtual bool | isTerminated (int rank) |
check if the Solver specified by rank is terminated or not More... | |
virtual void | reinitToRestart () |
reinitialize to restart More... | |
virtual void | activate () |
activate this Solver pool More... | |
virtual bool | isActive () |
check if this Solver pool is active or not More... | |
virtual std::size_t | getNSolvers () |
get number of Solvers in this Solver pool More... | |
virtual unsigned long long | getNnodesSolvedInSolvers () |
get number of nodes solved in current running Solvers More... | |
virtual unsigned long long | getTotalNodesSolved () |
get number of nodes solved in all Solvers: updated at termination of subtree computation More... | |
virtual void | addTotalNodesSolved (unsigned long long num) |
add number of nodes solved in all Solvers More... | |
virtual unsigned long long | getNnodesInSolvers () |
get number of nodes in all Solvers More... | |
virtual std::size_t | getNumActiveSolvers () |
get number of active Solvers More... | |
virtual std::size_t | getNumInactiveSolvers () |
get number of inactive Solvers More... | |
virtual bool | isSolverActive (int rank) |
check if the Solver specified by rank is active or not More... | |
virtual ParaTask * | getCurrentTask (int rank) |
get current solving BbParaNode in the Solver specified by rank */ More... | |
virtual bool | canIncreaseLimitNLimitCollectingModeSolvers () |
check if the number of Solvers in collecting mode can be increased or not More... | |
virtual std::size_t | getNLimitCollectingModeSolvers () |
get limit number of Solvers that can be in collecting mode More... | |
virtual bool | isInCollectingMode () |
check if this system is in collecting mode or not More... | |
virtual bool | isSolverInCollectingMode (int rank) |
get collecting mode of the Solver specified by rank More... | |
virtual BbParaNode * | extractCurrentNodeAndInactivate (int rank, BbParaNodePool *paraNodePool) |
extract current solving BbParaNode in the Solver specified by rank and inactivate the Solver More... | |
virtual bool | currentSolvingNodehaeDescendant (int rank) |
extract current solving BbParaNode in the Solver specified by rank and inactivate the Solver More... | |
virtual void | addNumNodesSolved (long long numOfNodesSolved) |
add number of nodes solved More... | |
virtual long long | getNumOfNodesSolved (int rank) |
get the number of nodes solved by the Solver specified More... | |
virtual int | getNumOfNodesLeft (int rank) |
get the number of nodes left by the Solver specified More... | |
virtual int | getNumOfNodesLeftInBestSolver () |
get the number of nodes left in the Solver which has the best dual bound value More... | |
virtual int | getBestSolver () |
get rank of the Solver which has top priority in selection criteria More... | |
virtual int | getGoodSolverSolvingEssentialNode () |
get rank of the Solver which has top priority in selection criteria More... | |
virtual double | getDualBoundValue (int rank) |
get dual bound value of solving BbParaNode by the Solver specified More... | |
virtual void | setTermState (int rank, ParaSolverTerminationState *inTermState) |
set SolverTerminationState to the Solver specified More... | |
virtual ParaSolverTerminationState * | getTermState (int rank) |
get SolverTermination state of the Solver specified More... | |
virtual void | updateDualBoundsForSavingNodes () |
update dual bound values of saving BbParaNodes by their dual bound values for subtrees More... | |
virtual void | incNLimitCollectingModeSolvers () |
increase the limit number of Solvers getting into collecting mode More... | |
virtual void | setCollectingIsAllowed (int rank) |
set collecting mode is allowed to the Solver specified by rank More... | |
virtual int | getInactiveSolverRank () |
get an inactive Solver rank More... | |
virtual void | activateSolver (int rank, BbParaNode *node, int nGoodNodesInNodePool, double averageDualBoundGain) |
activate the Solver specified by rank with specified node which has been sent More... | |
virtual void | activateSolver (int rank, BbParaNode *node, int nNodesLeft) |
activate the Solver specified by rank with specified node which has been sent and nNodesLeft (This method is for the racing winner) TODO: Need to check how this function is used More... | |
virtual int | activateSolver (BbParaNode *node, BbParaRacingSolverPool *paraRacingSolverPool, bool rampUpPhase, int nGoodNodesInNodePool, double averageDualBoundGain) |
activate a Solver with specified BbParaNode which is sent within this Solver pool More... | |
virtual void | addNewSubtreeRootNode (int rank, BbParaNode *node) |
add new subtree root node to the active solver with the specified rank More... | |
virtual void | makeSubtreeRootNodeCurrent (int rank, BbParaNode *node) |
make subtree root node as current task for the specified rank More... | |
virtual void | removeSubtreeRootNode (int rank, BbParaNode *node) |
remove subtree root node from the active solver with the specified rank More... | |
virtual BbParaNode * | extractSelfSplitSubtreeRootNode (int rank, BbParaNode *node) |
extract self-split subtree root node from the active solver with the specified rank More... | |
virtual BbParaNode * | getSelfSplitSubtreeRootNodes (int rank) |
get self-split subtree root node from the active solver with the specified rank More... | |
virtual BbParaNode * | extractSelfSplitSubtreeRootNodes (int rank) |
extract self-split subtree root node from the active solver with the specified rank More... | |
virtual void | deleteCurrentSubtreeRootNode (int rank) |
delete current self-split subtree root node from the active solver with the specified rank More... | |
virtual void | inactivateSolver (int rank, long long numOfNodesSolved, BbParaNodePool *paraNodePool) |
inactivate the Solver specified by rank More... | |
virtual void | resetCountersInSolver (int rank, long long numOfNodesSolved, int numOfSelfSplitNodesLeft, BbParaNodePool *paraNodePool) |
reset counters in the Solver specified by rank More... | |
virtual BbParaNode * | solverDied (int rank) |
kill the Solver specified by rank More... | |
virtual void | switchOutCollectingMode () |
switch out collecting mode More... | |
virtual void | enforcedSwitchOutCollectingMode (int rank) |
enforced to switch out collecting mode of the Solver specified by rank if it is necessary More... | |
virtual void | sendSwitchOutCollectingModeIfNecessary (int rank) |
switch out collecting mode of the Solver specified by rank if it is necessary More... | |
virtual double | getGlobalBestDualBoundValue ()=0 |
get global best dual bound value More... | |
virtual void | switchInCollectingMode (BbParaNodePool *paraNodePool)=0 |
switch in collecting mode More... | |
virtual void | updateSolverStatus (int rank, long long numNodesSolved, int numNodesLeft, double solverLocalBestBound, BbParaNodePool *paraNodePool)=0 |
update Solver status More... | |
virtual int | getMCollectingNodes () |
get multiplier of collecting BbParaNodes More... | |
virtual int | getMMaxCollectingNodes () |
get maximum multiplier for the number of collecting BbParaNodes More... | |
virtual double | getSwichOutTime () |
the following functions are to omit rebooting collecting mode process More... | |
virtual void | setSwichOutTime (double time) |
set time of switching out collecting mode More... | |
virtual bool | isDualBounGainTesting (int rank) |
check if dual bound gain testing is proceeding or not in the Solver specified More... | |
Public Member Functions inherited from ParaSolverPool | |
ParaSolverPool (int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer) | |
constructor More... | |
virtual | ~ParaSolverPool () |
destructor More... | |
std::size_t | getNSolvers () |
get number of Solvers in this Solver pool More... | |
Protected Member Functions | |
virtual void | switchInCollectingToSolver (int rank, BbParaNodePool *paraNodePool) |
switch a Solver to be in collecting mode More... | |
Protected Attributes | |
bool | active |
indicate if this pool is active or not More... | |
double | bgap |
threshold value of gap More... | |
double | mp |
multiplier of the threshold value p More... | |
double | mBgap |
multiplier of the bgap value More... | |
double | absoluteGap |
allowable absolute dual bound gap to the best Solver More... | |
std::size_t | nGenerator |
number of generators More... | |
std::size_t | nCollectingModeSolvers |
number of collecting mode Solvers More... | |
std::size_t | nMaxCollectingModeSolvers |
maximum number of Solvers that can be in collecting mode More... | |
std::size_t | nLimitCollectingModeSolvers |
limit number of Solvers that can be in collecting mode More... | |
unsigned long long | nNodesSolvedInSolvers |
number of nodes solved in current running Solvers More... | |
unsigned long long | nTotalNodesSolved |
number of nodes solved : updated at termination of subtree computation More... | |
unsigned long long | nNodesInSolvers |
number of nodes in all Solvers More... | |
bool | collectingMode |
indicate that this system is in collecting mode or not More... | |
bool | breakingFirstSubtree |
breaking the first subtree More... | |
bool | beforeInitialCollect |
before initial collecting mode More... | |
bool | beforeFinishingFirstCollect |
before finishing first collecting mode More... | |
std::map< int, BbParaSolverPoolElementPtr > | inactiveSolvers |
pointers to inactive Solvers More... | |
std::map< int, BbParaSolverPoolElementPtr > | activeSolvers |
pointers to active Solvers More... | |
std::map< int, BbParaSolverPoolElementPtr > | deadSolvers |
pointers to dead Solvers More... | |
std::multimap< double, BbParaSolverPoolElementPtr > | candidatesOfCollectingModeSolvers |
pointers to candidates of collecting mode Solvers More... | |
BbParaSolverPoolElementPtr * | pool |
Solver pool indexed by Solver's rank. More... | |
SelectionHeap * | selectionHeap |
pointers to active Solvers in ascending or descending order More... | |
CollectingModeSolverHeap * | collectingModeSolverHeap |
pointers to collecting mode Solvers in ascending or descending order More... | |
double | switchOutTime |
switch out time More... | |
int | mCollectingNodes |
multiplier for the number of collecting BbParaNodes More... | |
int | mMaxCollectingNodes |
maximum multiplier for the number of collecting BbParaNodes More... | |
int | nDualBoundGainTesting |
the number of dual bound gain testing Solvers More... | |
Protected Attributes inherited from ParaSolverPool | |
int | originRank |
origin rank of Solvers managed by this Solver pool More... | |
std::size_t | nSolvers |
number of Solvers More... | |
ParaComm * | paraComm |
communicator More... | |
ParaParamSet * | paraParams |
runtime parameters for parallelization More... | |
ParaTimer * | paraTimer |
timer More... | |
class BbParaSolverPool (Solver Pool base class)
Definition at line 1347 of file bbParaSolverPool.h.
BbParaSolverPool | ( | double | inMp, |
double | inBgap, | ||
double | inMBgap, | ||
int | inOriginRank, | ||
ParaComm * | inParaComm, | ||
ParaParamSet * | inParaParams, | ||
ParaTimer * | inParaTimer | ||
) |
constructor
inMp | multiplier of the threshold value p |
inBgap | threshold value of gap |
inMBgap | multiplier of the bgap value |
inOriginRank | origin rank of Solvers managed by this Solver pool |
inParaComm | communicator used |
inParaParams | paraParamSet used |
inParaTimer | timer used |
Definition at line 1394 of file bbParaSolverPool.h.
References UG::ABgapForSwitchingToBestSolver, BbParaSolverPoolElement::BbParaSolverPoolElement(), UG::BreakFirstSubtree, UG::MaxNumberOfCollectingModeSolvers, UG::MinNumberOfCollectingModeSolvers, nSolvers, and BbParaSolverPoolElement::setNoGenerator().
BbParaSolverPool | ( | double | inMp, |
double | inBgap, | ||
double | inMBgap, | ||
int | inNSolvers, | ||
int | inOriginRank, | ||
ParaComm * | inParaComm, | ||
ParaParamSet * | inParaParams, | ||
ParaTimer * | inParaTimer | ||
) |
constructor
inMp | multiplier of the threshold value p |
inBgap | threshold value of gap |
inMBgap | multiplier of the bgap value |
inNSolvers | number of solvers |
inOriginRank | origin rank of Solvers managed by this Solver pool |
inParaComm | communicator used |
inParaParams | paraParamSet used |
inParaTimer | timer used |
Definition at line 1457 of file bbParaSolverPool.h.
References UG::ABgapForSwitchingToBestSolver, BbParaSolverPoolElement::BbParaSolverPoolElement(), UG::BreakFirstSubtree, UG::MaxNumberOfCollectingModeSolvers, UG::MinNumberOfCollectingModeSolvers, nSolvers, and BbParaSolverPoolElement::setNoGenerator().
|
virtual |
|
virtual |
activate this Solver pool
Definition at line 1630 of file bbParaSolverPool.h.
|
virtual |
activate the Solver specified by rank with specified node which has been sent
activate Solver specified by its rank
rank | rank of the Solver to be activated |
paraNode | pointer to BbParaNode object to be sent to the Solver |
nGoodNodesInNodePool | number of good nodes in BbParaNodePool object |
averageDualBoundGain | current average dual bound gain |
Definition at line 662 of file bbParaSolverPool.cpp.
References UG::ControlCollectingModeOnSolverSide, UG::DualBoundGainTest, UG::Inactive, UG::MultiplierForCollectingMode, UG::NChangeIntoCollectingMode, nSolvers, PARA_COMM_CALL, UG::ParaBYTE, UG::ParaDOUBLE, BbParaNode::send(), SOLVER_POOL_INDEX, UG::TagNoTestDualBoundGain, UG::TagTestDualBoundGain, and THROW_LOGICAL_ERROR2.
Referenced by BbParaLoadCoordinator::run(), and BbParaLoadCoordinator::sendParaTasksToIdleSolvers().
|
virtual |
activate the Solver specified by rank with specified node which has been sent and nNodesLeft (This method is for the racing winner) TODO: Need to check how this function is used
activate Solver specified by its rank and number of nodes left. This is for the racing winner.
DO NOT PROHIBIT COLLECTING MODE. THIS IS ACTIVATION ROUTIN FOR RACING WIINGER
rank | rank of the Solver to be activated |
paraNode | pointer to BbParaNode object to be sent to the Solver |
nNodesLeft | the number of nodes left in the Solver |
Definition at line 735 of file bbParaSolverPool.cpp.
References UG::Inactive, nSolvers, SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
|
virtual |
activate a Solver with specified BbParaNode which is sent within this Solver pool
activate any Solver which is idle
paraNode | pointer to BbParaNode object to be sent to a Solver |
paraRacingSolverPool | pointer to paraRacingSolverPool object to check if the Solver is not solving root node |
rampUpPhase | indicate if ramp-up phase or not |
nGoodNodesInNodePool | number of good BbParaNodes in BbParaNodePool |
averageDualBoundGain | current average bound gain |
Definition at line 781 of file bbParaSolverPool.cpp.
References UG::ControlCollectingModeOnSolverSide, UG::DualBoundGainTest, BbParaNode::getMergeNodeInfo(), BbParaNode::getMergingStatus(), BbParaRacingSolverPool::isSolverActive(), UG::LightWeightRootNodeProcess, UG::MultiplierForCollectingMode, UG::NChangeIntoCollectingMode, nSolvers, PARA_COMM_CALL, UG::ParaBYTE, UG::ParaDOUBLE, UG::RatioToApplyLightWeightRootProcess, BbParaNode::send(), SOLVER_POOL_INDEX, UG::TagLightWeightRootNodeProcess, UG::TagNoTestDualBoundGain, UG::TagTestDualBoundGain, and THROW_LOGICAL_ERROR1.
|
virtual |
add new subtree root node to the active solver with the specified rank
rank | the active solver rank |
node | new subtree root node |
Definition at line 870 of file bbParaSolverPool.cpp.
References UG::Active, UG::InterruptRequested, nSolvers, SOLVER_POOL_INDEX, UG::Terminated, UG::TerminateRequested, THROW_LOGICAL_ERROR2, and THROW_LOGICAL_ERROR3.
|
virtual |
add number of nodes solved
numOfNodesSolved | number of nodes solved |
Definition at line 1832 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::numOfNodesSolved.
|
virtual |
add number of nodes solved in all Solvers
num | number of nodes solved |
Definition at line 1677 of file bbParaSolverPool.h.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
check if the number of Solvers in collecting mode can be increased or not
Definition at line 1739 of file bbParaSolverPool.h.
|
virtual |
extract current solving BbParaNode in the Solver specified by rank and inactivate the Solver
rank | solver rank to be checked |
Definition at line 1822 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getCurrentNode(), ParaTask::hasDescendant(), and SOLVER_POOL_INDEX.
|
virtual |
delete current self-split subtree root node from the active solver with the specified rank
rank | the active solver rank |
Definition at line 1142 of file bbParaSolverPool.cpp.
References UG::Active, UG::InterruptRequested, nSolvers, SOLVER_POOL_INDEX, UG::Terminated, UG::TerminateRequested, and THROW_LOGICAL_ERROR2.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
enforced to switch out collecting mode of the Solver specified by rank if it is necessary
switch out collecting mode to the specified rank if it is necessary
sending TagOutCollectingMode is harmless
pool[SOLVER_POOL_INDEX(rank)]->isOutCollectingMode() should be true
rank | rank of the Solver |
Definition at line 1470 of file bbParaSolverPool.cpp.
References PARA_COMM_CALL, UG::ParaBYTE, SOLVER_POOL_INDEX, and UG::TagOutCollectingMode.
|
virtual |
extract current solving BbParaNode in the Solver specified by rank and inactivate the Solver
rank | rank of the Solver to be inactivated |
paraNodePool | pointer to BbParaNodePool to pass it to inactivateSolver routine |
Definition at line 1785 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::extractCurrentNode(), and SOLVER_POOL_INDEX.
|
virtual |
extract self-split subtree root node from the active solver with the specified rank
rank | the active solver rank |
node | subtree root node to be removed |
Definition at line 1049 of file bbParaSolverPool.cpp.
References UG::Active, BbParaNode::next, nSolvers, SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
|
virtual |
extract self-split subtree root node from the active solver with the specified rank
rank | the active solver rank |
Definition at line 1130 of file bbParaSolverPool.cpp.
References nSolvers, SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
|
virtual |
get rank of the Solver which has top priority in selection criteria
Definition at line 1884 of file bbParaSolverPool.h.
References SelectionHeap::getHeapSize(), BbParaSolverPoolElement::getRank(), and SelectionHeap::top().
|
virtual |
get current solving BbParaNode in the Solver specified by rank */
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1728 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getCurrentNode(), and SOLVER_POOL_INDEX.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
get dual bound value of solving BbParaNode by the Solver specified
rank | rank of the Solver |
Definition at line 1927 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getBestDualBoundValue(), and SOLVER_POOL_INDEX.
|
pure virtual |
get global best dual bound value
Implemented in BbParaSolverPoolForMinimization.
|
virtual |
get rank of the Solver which has top priority in selection criteria
Definition at line 1901 of file bbParaSolverPool.h.
References SelectionHeap::get(), SelectionHeap::getHeapSize(), BbParaSolverPoolElement::getRank(), and BbParaSolverPoolElement::rank.
|
virtual |
get an inactive Solver rank
Definition at line 2050 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::numOfNodesSolved, and BbParaSolverPoolElement::rank.
|
virtual |
get multiplier of collecting BbParaNodes
Definition at line 2235 of file bbParaSolverPool.h.
|
virtual |
get maximum multiplier for the number of collecting BbParaNodes
Definition at line 2245 of file bbParaSolverPool.h.
|
virtual |
get limit number of Solvers that can be in collecting mode
Definition at line 1749 of file bbParaSolverPool.h.
|
virtual |
get number of nodes in all Solvers
Definition at line 1687 of file bbParaSolverPool.h.
|
virtual |
get number of nodes solved in current running Solvers
Definition at line 1659 of file bbParaSolverPool.h.
|
virtual |
get number of Solvers in this Solver pool
Definition at line 1650 of file bbParaSolverPool.h.
References nSolvers.
|
virtual |
get number of active Solvers
Implements ParaSolverPool.
Definition at line 1697 of file bbParaSolverPool.h.
|
virtual |
get number of inactive Solvers
Implements ParaSolverPool.
Definition at line 1707 of file bbParaSolverPool.h.
|
virtual |
get the number of nodes left by the Solver specified
rank | rank of the Solver |
Definition at line 1855 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getNumOfNodesLeft(), and SOLVER_POOL_INDEX.
|
virtual |
get the number of nodes left in the Solver which has the best dual bound value
Definition at line 1867 of file bbParaSolverPool.h.
References SelectionHeap::getHeapSize(), BbParaSolverPoolElement::getNumOfNodesLeft(), and SelectionHeap::top().
|
virtual |
get the number of nodes solved by the Solver specified
rank | rank of the Solver |
Definition at line 1843 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getNumOfNodesSolved(), and SOLVER_POOL_INDEX.
|
virtual |
get self-split subtree root node from the active solver with the specified rank
rank | the active solver rank |
Definition at line 1092 of file bbParaSolverPool.cpp.
References UG::Active, nSolvers, SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
the following functions are to omit rebooting collecting mode process
get time of switching out collecting mode
Definition at line 2259 of file bbParaSolverPool.h.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
get SolverTermination state of the Solver specified
rank | rank of the Solver |
Definition at line 1950 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getTermState(), and SOLVER_POOL_INDEX.
|
virtual |
get number of nodes solved in all Solvers: updated at termination of subtree computation
Definition at line 1668 of file bbParaSolverPool.h.
Referenced by BbParaLoadCoordinator::~BbParaLoadCoordinator().
|
virtual |
inactivate the Solver specified by rank
inactivate the Solver specified by rank
need to have dual bound, so should be before inactivate()
rank | rank of the Solver to be inactivated |
numOfNodesSolved | number of nodes solved |
paraNodePool | pointer to BbParaNodePool to change into collecting mode |
Definition at line 1187 of file bbParaSolverPool.cpp.
References UG::Active, UG::ControlCollectingModeOnSolverSide, UG::InterruptRequested, nSolvers, SOLVER_POOL_INDEX, UG::TerminateRequested, and THROW_LOGICAL_ERROR2.
|
virtual |
increase the limit number of Solvers getting into collecting mode
Definition at line 2029 of file bbParaSolverPool.h.
References nSolvers.
|
virtual |
set the Solver specified by rank is terminate requested
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1534 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getRank(), BbParaSolverPoolElement::interruptRequested(), and SOLVER_POOL_INDEX.
|
virtual |
check if this Solver pool is active or not
Definition at line 1640 of file bbParaSolverPool.h.
|
virtual |
check if dual bound gain testing is proceeding or not in the Solver specified
rank | rank of the Solver |
Definition at line 2279 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::isDualBoundGainTesting(), and SOLVER_POOL_INDEX.
|
virtual |
check if this system is in collecting mode or not
Definition at line 1761 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::collectingMode.
|
virtual |
check if the Solver specified by rank is interrupt requested or not
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1557 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getStatus(), UG::InterruptRequested, and SOLVER_POOL_INDEX.
|
virtual |
check if the Solver specified by rank is active or not
rank | rank of the Solver to be checked |
Implements ParaSolverPool.
Definition at line 1717 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::isActive(), and SOLVER_POOL_INDEX.
|
virtual |
get collecting mode of the Solver specified by rank
rank | rank of the Solver to be checked |
Definition at line 1771 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::isInCollectingMode(), and SOLVER_POOL_INDEX.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
check if the Solver specified by rank is terminated or not
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1607 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getStatus(), SOLVER_POOL_INDEX, and UG::Terminated.
|
virtual |
check if the Solver specified by rank is terminate requested or not
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1568 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getStatus(), SOLVER_POOL_INDEX, and UG::TerminateRequested.
|
virtual |
make subtree root node as current task for the specified rank
rank | the active solver rank |
node | subtree root node to make it current |
Definition at line 915 of file bbParaSolverPool.cpp.
References UG::Active, UG::InterruptRequested, nSolvers, SOLVER_POOL_INDEX, UG::Terminated, UG::TerminateRequested, and THROW_LOGICAL_ERROR2.
|
virtual |
reinitialize to restart
Definition at line 1617 of file bbParaSolverPool.h.
References UG::MinNumberOfCollectingModeSolvers.
|
virtual |
remove subtree root node from the active solver with the specified rank
rank | the active solver rank |
node | subtree root node to be removed |
Definition at line 961 of file bbParaSolverPool.cpp.
References UG::Active, UG::InterruptRequested, nSolvers, SOLVER_POOL_INDEX, UG::Terminated, UG::TerminateRequested, and THROW_LOGICAL_ERROR2.
|
virtual |
reset counters in the Solver specified by rank
reset counters in the Solver specified by rank
need to have dual bound, so should be before inactivate()
rank | rank of the Solver to reset counters |
numOfNodesSolved | number of nodes solved |
numOfSelfSplitNodesLeft | number of self-split nodes left |
paraNodePool | pointer to BbParaNodePool to change into collecting mode |
Definition at line 1284 of file bbParaSolverPool.cpp.
References UG::Active, UG::ControlCollectingModeOnSolverSide, nSolvers, SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
switch out collecting mode of the Solver specified by rank if it is necessary
switch out collecting mode to the specified rank
rank | rank of the Solver |
Definition at line 1492 of file bbParaSolverPool.cpp.
References PARA_COMM_CALL, UG::ParaBYTE, SOLVER_POOL_INDEX, and UG::TagOutCollectingMode.
|
virtual |
set collecting mode is allowed to the Solver specified by rank
Definition at line 2039 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::setCollectingIsAllowed(), and SOLVER_POOL_INDEX.
|
virtual |
set time of switching out collecting mode
time | time of switching out collecting mode |
Definition at line 2268 of file bbParaSolverPool.h.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
set SolverTerminationState to the Solver specified
rank | rank of the Solver |
inTermState | pointer to ParaSolverTerminationState object |
Definition at line 1938 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::setTermState(), and SOLVER_POOL_INDEX.
|
virtual |
kill the Solver specified by rank
solver specified by rank died
need to have dual bound, so should be before died()
rank | rank of the Solver |
Definition at line 1388 of file bbParaSolverPool.cpp.
References UG::Active, nSolvers, SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
|
pure virtual |
switch in collecting mode
paraNodePool | pointer to BbParaNodePool object |
Implemented in BbParaSolverPoolForMinimization.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
protectedvirtual |
switch a Solver to be in collecting mode
send switch in-collecting mode to a specific solver
rank | Solver rank to be in collecting mode |
paraNodePool | pointer to BbParaNodePool object |
Definition at line 1512 of file bbParaSolverPool.cpp.
References BbParaNodePool::getNumOfGoodNodes(), BbParaNodePool::isEmpty(), UG::MultiplierForCollectingMode, UG::NChangeIntoCollectingMode, PARA_COMM_CALL, UG::ParaBYTE, UG::ParaINT, SOLVER_POOL_INDEX, UG::TagInCollectingMode, and UG::TagNoWaitModeSend.
|
virtual |
switch out collecting mode
switch out collecting mode
clear candidatesOfCollectingModeSolvers in below
Definition at line 1431 of file bbParaSolverPool.cpp.
References UG::DualBoundGainTest, PARA_COMM_CALL, UG::ParaBYTE, SOLVER_POOL_INDEX, and UG::TagNoTestDualBoundGain.
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState().
|
virtual |
set the Solver specified by rank is terminated
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1578 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getRank(), BbParaSolverPoolElement::getStatus(), UG::Inactive, UG::InterruptRequested, SOLVER_POOL_INDEX, BbParaSolverPoolElement::terminated(), and UG::TerminateRequested.
|
virtual |
set the Solver specified by rank is terminate requested
rank | rank of the Solver |
Implements ParaSolverPool.
Definition at line 1545 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getRank(), SOLVER_POOL_INDEX, and BbParaSolverPoolElement::terminateRequested().
|
virtual |
update dual bound values of saving BbParaNodes by their dual bound values for subtrees
Definition at line 1960 of file bbParaSolverPool.h.
References BbParaNode::getAncestor(), BbParaSolverPoolElement::getTermState(), BbParaNode::next, and SOLVER_POOL_INDEX.
|
pure virtual |
update Solver status
rank | rank of the Solver |
numNodesSolved | number of nodes solved |
numNodesLeft | number of nodes left |
solverLocalBestBound | best bound value in the Solver |
paraNodePool | pointer to BbParaNodePool object |
Implemented in BbParaSolverPoolForMinimization.
|
protected |
allowable absolute dual bound gap to the best Solver
Definition at line 1356 of file bbParaSolverPool.h.
|
protected |
indicate if this pool is active or not
Definition at line 1352 of file bbParaSolverPool.h.
|
protected |
pointers to active Solvers
Definition at line 1369 of file bbParaSolverPool.h.
|
protected |
before finishing first collecting mode
Definition at line 1367 of file bbParaSolverPool.h.
|
protected |
before initial collecting mode
Definition at line 1366 of file bbParaSolverPool.h.
|
protected |
threshold value of gap
Definition at line 1353 of file bbParaSolverPool.h.
|
protected |
breaking the first subtree
Definition at line 1365 of file bbParaSolverPool.h.
|
protected |
pointers to candidates of collecting mode Solvers
Definition at line 1371 of file bbParaSolverPool.h.
|
protected |
indicate that this system is in collecting mode or not
Definition at line 1364 of file bbParaSolverPool.h.
|
protected |
pointers to collecting mode Solvers in ascending or descending order
Definition at line 1375 of file bbParaSolverPool.h.
|
protected |
pointers to dead Solvers
Definition at line 1370 of file bbParaSolverPool.h.
|
protected |
pointers to inactive Solvers
Definition at line 1368 of file bbParaSolverPool.h.
|
protected |
multiplier of the bgap value
Definition at line 1355 of file bbParaSolverPool.h.
|
protected |
multiplier for the number of collecting BbParaNodes
Definition at line 1377 of file bbParaSolverPool.h.
|
protected |
maximum multiplier for the number of collecting BbParaNodes
Definition at line 1378 of file bbParaSolverPool.h.
|
protected |
multiplier of the threshold value p
Definition at line 1354 of file bbParaSolverPool.h.
|
protected |
number of collecting mode Solvers
Definition at line 1358 of file bbParaSolverPool.h.
|
protected |
the number of dual bound gain testing Solvers
Definition at line 1379 of file bbParaSolverPool.h.
|
protected |
number of generators
Definition at line 1357 of file bbParaSolverPool.h.
|
protected |
limit number of Solvers that can be in collecting mode
Definition at line 1360 of file bbParaSolverPool.h.
|
protected |
maximum number of Solvers that can be in collecting mode
Definition at line 1359 of file bbParaSolverPool.h.
|
protected |
number of nodes in all Solvers
Definition at line 1363 of file bbParaSolverPool.h.
|
protected |
number of nodes solved in current running Solvers
Definition at line 1361 of file bbParaSolverPool.h.
|
protected |
number of nodes solved : updated at termination of subtree computation
Definition at line 1362 of file bbParaSolverPool.h.
|
protected |
Solver pool indexed by Solver's rank.
Definition at line 1373 of file bbParaSolverPool.h.
|
protected |
pointers to active Solvers in ascending or descending order
Definition at line 1374 of file bbParaSolverPool.h.
|
protected |
switch out time
Definition at line 1376 of file bbParaSolverPool.h.