class BbParaRacingSolverPool (Racing Solver Pool) More...
#include <bbParaSolverPool.h>
Public Member Functions | |
BbParaRacingSolverPool (int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer, ParaDeterministicTimer *inParaDetTimer) | |
constructor More... | |
BbParaRacingSolverPool (int inNSolvers, int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer, ParaDeterministicTimer *inParaDetTimer) | |
constructor More... | |
~BbParaRacingSolverPool () | |
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 | reset () |
reset racing solver pool More... | |
virtual BbParaNode * | extractNode () |
extract racing root BbParaNode More... | |
virtual ParaTask * | getCurrentTask (int rank) |
get root BbParaNode object of the Solver specified More... | |
virtual double | getDualBoundValue (int rank) |
get dual bound value of solving BbParaNode in the Solver specified by rank More... | |
virtual long long | getNumOfNodesSolved (int rank) |
get number of nodes solved in the Solver specified by rank More... | |
virtual int | getNumNodesLeft (int rank) |
get number of nodes left in the Solver specified by rank More... | |
virtual double | getGlobalBestDualBoundValue () |
get global best dual bound value More... | |
virtual long long | getNnodesSolvedInBestSolver () |
get winner Solver rank More... | |
virtual long long | getNnodesLeftInBestSolver () |
get number of nodes left in the best Solver More... | |
virtual double | getBestDualBoundInInactivatedSolvers () |
get best dual bound value in inactivated Solvers More... | |
virtual void | activate (BbParaNode *node) |
activate racing ramp-up Solver pool with root BbParaNode object More... | |
virtual bool | isSolverActive (int rank) |
check if the specified Solver is active or not More... | |
virtual void | updateSolverStatus (int rank, long long numNodesSolved, int numNodesLeft, double solverLocalBestBound) |
update Solver status More... | |
virtual bool | isWinnerDecided (bool feasibleSol) |
check racing termination criteria More... | |
virtual void | inactivateSolver (int rank) |
inactivate the Solver specified by rank 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 | isEvaluationStage (int rank) |
check if the Solver specified in an argument is evaluation stage or not More... | |
virtual std::string | getStrActiveSolerNumbers () |
get active Solver number string More... | |
Public Member Functions inherited from ParaRacingSolverPool | |
ParaRacingSolverPool (int inOriginRank, ParaComm *inParaComm, ParaParamSet *inParaParams, ParaTimer *inParaTimer, ParaDeterministicTimer *inParaDetTimer) | |
constructor More... | |
virtual | ~ParaRacingSolverPool () |
destructor More... | |
int | getWinner () |
get winner Solver rank More... | |
std::size_t | getNSolvers () |
get number of Solvers in this Solver pool More... | |
Protected Attributes | |
int | nEvaluationStage |
number of Solvers that are in evaluation stage More... | |
long long | nNodesSolvedInBestSolver |
number of nodes solved in the best Solver More... | |
long long | nNodesInBestSolver |
number of nodes in the best Solver More... | |
size_t | nActiveSolvers |
number of active Solvers More... | |
size_t | nInactiveSolvers |
number of inactive Solvers More... | |
double | bestDualBound |
current best dual bound value More... | |
double | bestDualBoundInSolvers |
best dual bound value in Solvers More... | |
BbParaSolverPoolElementPtr * | pool |
Solver pool indexed by Solver's rank. More... | |
SelectionHeap * | selectionHeap |
pointers to active Solvers in ascending or descending order More... | |
BbParaNode * | rootNode |
root BbParaNode More... | |
Protected Attributes inherited from ParaRacingSolverPool | |
int | winnerRank |
winner rank of racing ramp-up, -1: not decided yet More... | |
int | originRank |
origin rank of Solvers managed by this Solver pool More... | |
int | nSolvers |
number of Solvers More... | |
ParaComm * | paraComm |
communicator More... | |
ParaParamSet * | paraParams |
runtime parameters for parallelization More... | |
ParaTimer * | paraTimer |
timer used More... | |
ParaDeterministicTimer * | paraDetTimer |
deterministic timer used More... | |
class BbParaRacingSolverPool (Racing Solver Pool)
Definition at line 2414 of file bbParaSolverPool.h.
BbParaRacingSolverPool | ( | int | inOriginRank, |
ParaComm * | inParaComm, | ||
ParaParamSet * | inParaParams, | ||
ParaTimer * | inParaTimer, | ||
ParaDeterministicTimer * | inParaDetTimer | ||
) |
constructor
inOriginRank | origin rank of Solvers managed by this Solver pool |
inParaComm | communicator used |
inParaParams | paraParamSet used |
inParaTimer | timer used |
inParaDetTimer | deterministic timer used |
Definition at line 2435 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::BbParaSolverPoolElement(), and nSolvers.
BbParaRacingSolverPool | ( | int | inNSolvers, |
int | inOriginRank, | ||
ParaComm * | inParaComm, | ||
ParaParamSet * | inParaParams, | ||
ParaTimer * | inParaTimer, | ||
ParaDeterministicTimer * | inParaDetTimer | ||
) |
constructor
inNSolvers | the number of racing solvers |
inOriginRank | origin rank of Solvers managed by this Solver pool |
inParaComm | communicator used |
inParaParams | paraParamSet used |
inParaTimer | timer used |
inParaDetTimer | deterministic timer used |
Definition at line 2464 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::BbParaSolverPoolElement(), and nSolvers.
|
virtual |
activate racing ramp-up Solver pool with root BbParaNode object
node | pointer to root BbParaNode object |
Definition at line 2721 of file bbParaSolverPool.h.
References SelectionHeap::insert(), nSolvers, BbParaSolverPoolElement::racingActivate(), BbParaSolverPoolElement::rank, and SOLVER_POOL_INDEX.
Referenced by BbParaLoadCoordinator::run().
|
virtual |
extract racing root BbParaNode
Definition at line 2609 of file bbParaSolverPool.h.
References BbParaNode::clone(), BbParaNode::setDualBoundValue(), and BbParaNode::setInitialDualBoundValue().
Referenced by BbParaLoadCoordinator::run().
|
virtual |
get best dual bound value in inactivated Solvers
Definition at line 2712 of file bbParaSolverPool.h.
|
virtual |
get root BbParaNode object of the Solver specified
rank | rank of the Solver |
Implements ParaRacingSolverPool.
Definition at line 2620 of file bbParaSolverPool.h.
|
virtual |
get dual bound value of solving BbParaNode in the Solver specified by rank
rank | rank of the Solver |
Definition at line 2631 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getBestDualBoundValue(), and SOLVER_POOL_INDEX.
|
virtual |
get global best dual bound value
Definition at line 2664 of file bbParaSolverPool.h.
References SelectionHeap::getHeapSize().
|
virtual |
get number of nodes left in the best Solver
Definition at line 2702 of file bbParaSolverPool.h.
|
virtual |
get winner Solver rank
Definition at line 2692 of file bbParaSolverPool.h.
|
virtual |
get number of active Solvers
Implements ParaRacingSolverPool.
Definition at line 2805 of file bbParaSolverPool.h.
|
virtual |
get number of inactive Solvers
Implements ParaRacingSolverPool.
Definition at line 2815 of file bbParaSolverPool.h.
|
virtual |
get number of nodes left in the Solver specified by rank
rank | rank of the Solver |
Definition at line 2653 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getNumOfNodesLeft(), and SOLVER_POOL_INDEX.
Referenced by BbParaLoadCoordinator::run().
|
virtual |
get number of nodes solved in the Solver specified by rank
rank | rank of the Solver |
Definition at line 2642 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getNumOfNodesSolved(), and SOLVER_POOL_INDEX.
|
virtual |
get active Solver number string
Definition at line 2836 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::isRacingStage(), nSolvers, and SOLVER_POOL_INDEX.
|
virtual |
inactivate the Solver specified by rank
rank | rank of the Solver |
Definition at line 2780 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getBestDualBoundValue(), BbParaSolverPoolElement::inactivate(), BbParaSolverPoolElement::isEvaluationStage(), BbParaSolverPoolElement::isRacingStage(), SOLVER_POOL_INDEX, and THROW_LOGICAL_ERROR2.
Referenced by BbParaLoadCoordinator::run().
|
virtual |
set the Solver specified by rank is terminate requested
rank | rank of the Solver |
Definition at line 2510 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getRank(), BbParaSolverPoolElement::interruptRequested(), and SOLVER_POOL_INDEX.
|
virtual |
check if the Solver specified in an argument is evaluation stage or not
Definition at line 2825 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::isEvaluationStage(), and SOLVER_POOL_INDEX.
|
virtual |
check if the Solver specified by rank is interrupt requested or not
rank | rank of the Solver |
Definition at line 2533 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getStatus(), UG::InterruptRequested, and SOLVER_POOL_INDEX.
|
virtual |
check if the specified Solver is active or not
rank | rank of the Solver |
Implements ParaRacingSolverPool.
Definition at line 2745 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::isEvaluationStage(), BbParaSolverPoolElement::isRacingStage(), BbParaSolverPoolElement::rank, and SOLVER_POOL_INDEX.
Referenced by BbParaSolverPool::activateSolver().
|
virtual |
check if the Solver specified by rank is terminated or not
rank | rank of the Solver |
Definition at line 2570 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 |
Definition at line 2544 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getStatus(), SOLVER_POOL_INDEX, and UG::TerminateRequested.
|
virtual |
check racing termination criteria
stop racing at the number of nodes left in a solver reached to the value
stop racing at time limit
stop racing at the Solver with the best bound value has a certain number of nodes left
node left first adaptive
time limit first adaptive
node left first adaptive - adaptive node left (Default settings): this is for FiberSCIP
time limit first adaptive - adaptive node left
time limit first adaptive and node limit also checked - adaptive node left
feasibleSol | indicate if a feasible solution was generagted or not |
Definition at line 2401 of file bbParaSolverPool.cpp.
References UG::CountingSolverRatioInRacing, UG::Deterministic, UG::KeepRacingUntilToFindFirstSolution, UG::NEvaluationSolversToStopRacing, nSolvers, UG::RacingRampUpTerminationCriteria, UG::StopRacingNumberOfNodesLeft, UG::StopRacingNumberOfNodesLeftMultiplier, UG::StopRacingTimeLimit, UG::StopRacingTimeLimitMultiplier, and THROW_LOGICAL_ERROR1.
Referenced by BbParaLoadCoordinator::run().
|
virtual |
reset racing solver pool
Definition at line 2580 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::BbParaSolverPoolElement(), and nSolvers.
Referenced by BbParaLoadCoordinator::newRacing().
|
virtual |
set the Solver specified by rank is terminated
rank | rank of the Solver |
Definition at line 2554 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 |
Definition at line 2521 of file bbParaSolverPool.h.
References BbParaSolverPoolElement::getRank(), SOLVER_POOL_INDEX, and BbParaSolverPoolElement::terminateRequested().
|
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 |
Definition at line 2331 of file bbParaSolverPool.cpp.
References UG::Racing, UG::RacingEvaluation, UG::RacingRampUpTerminationCriteria, SOLVER_POOL_INDEX, and UG::StopRacingNumberOfNodesLeft.
|
protected |
current best dual bound value
Definition at line 2424 of file bbParaSolverPool.h.
|
protected |
best dual bound value in Solvers
Definition at line 2425 of file bbParaSolverPool.h.
|
protected |
number of active Solvers
Definition at line 2422 of file bbParaSolverPool.h.
|
protected |
number of Solvers that are in evaluation stage
Definition at line 2419 of file bbParaSolverPool.h.
|
protected |
number of inactive Solvers
Definition at line 2423 of file bbParaSolverPool.h.
|
protected |
number of nodes in the best Solver
Definition at line 2421 of file bbParaSolverPool.h.
|
protected |
number of nodes solved in the best Solver
Definition at line 2420 of file bbParaSolverPool.h.
|
protected |
Solver pool indexed by Solver's rank.
Definition at line 2426 of file bbParaSolverPool.h.
|
protected |
root BbParaNode
Definition at line 2428 of file bbParaSolverPool.h.
|
protected |
pointers to active Solvers in ascending or descending order
Definition at line 2427 of file bbParaSolverPool.h.