53SelectionHeap::SelectionHeap(
 
  118   std::ostringstream os;
 
  119   os << 
"--- selection heap ---" << std::endl;
 
  121   os << 
"heapSize: " << 
heapSize << std::endl;
 
  122   for( std::size_t i = 1; i <= 
heapSize; i++ )
 
  124      os << 
"heap[" << i << 
"]->rank: " 
  126         << 
"heap[" << i << 
"]->status: " 
  128         << 
"heap[" << i << 
"]->bestBound: " 
  129         << 
heap[i]->getBestDualBoundValue() << std::endl
 
  130         << 
"heap[" << i << 
"]->numOfNodesLeft: " 
  132         << 
"heap[" << i << 
"]->numOfDiff: " 
  134         << 
"heap[" << i << 
"]->collectingMode: " 
  152      double               newDualBoundValue   
 
  210   while ( 
heap[pos/2] != NULL &&
 
  211         ( 
heap[pos/2]->getBestDualBoundValue()
 
  236            ( 
heap[j]->getBestDualBoundValue()
 
  237                  < 
heap[j+1]->getBestDualBoundValue() ) ) j++;
 
  261      double newDualBoundValue                   
 
  318   while ( 
heap[pos/2] != NULL &&
 
  319         ( 
heap[pos/2]->getBestDualBoundValue()
 
  343            ( 
heap[j]->getBestDualBoundValue()
 
  344                  > 
heap[j+1]->getBestDualBoundValue() ) ) j++;
 
  422   std::ostringstream os;
 
  423   os << 
"--- selection heap ---" << std::endl;
 
  425   os << 
"heapSize: " << 
heapSize << std::endl;
 
  426   for( std::size_t i = 1; i <= 
heapSize; i++ )
 
  428      os << 
"heap[" << i << 
"]->rank: " 
  430         << 
"heap[" << i << 
"]->status: " 
  432         << 
"heap[" << i << 
"]->bestBound: " 
  433         << 
heap[i]->getBestDualBoundValue() << std::endl
 
  434         << 
"heap[" << i << 
"]->numOfNodesLeft: " 
  436         << 
"heap[" << i << 
"]->numOfDiff: " 
  438         << 
"heap[" << i << 
"]->collectingMode: " 
  456      double               newDualBoundValue   
 
  514   while ( 
heap[pos/2] != NULL &&
 
  515         ( 
heap[pos/2]->getBestDualBoundValue()
 
  540            ( 
heap[j]->getBestDualBoundValue()
 
  541                  < 
heap[j+1]->getBestDualBoundValue() ) ) j++;
 
  565      double newDualBoundValue                   
 
  622   while ( 
heap[pos/2] != NULL &&
 
  623         ( 
heap[pos/2]->getBestDualBoundValue()
 
  647            ( 
heap[j]->getBestDualBoundValue()
 
  648                  > 
heap[j+1]->getBestDualBoundValue() ) ) j++;
 
  665      int nGoodNodesInNodePool,
 
  666      double averageDualBoundGain
 
  676   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
  682         if( p->second->getRank() != rank ||
 
  748   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
  754         if( p->second->getRank() != rank ||
 
  785      int nGoodNodesInNodePool,
 
  786      double averageDualBoundGain
 
  789   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
  794   if( !paraRacingSolverPool )
 
  801      rank = p->second->getRank();
 
  810            rank =  p->second->getRank();
 
  829         (!rampUpPhase) && (!paraRacingSolverPool ) &&      
 
  879   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
  885         if( p->second->getRank() != rank ||
 
  892            THROW_LOGICAL_ERROR3(
"Rank = ", rank, 
" should not be in colleting mode and shuould not be a candidate of collecting.");
 
  894         p->second->addSubtreeRoot(paraNode);
 
  924   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
  930         if( p->second->getRank() != rank ||
 
  941         p->second->makeSubtreeRootCurrent(paraNode);
 
  970   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
  976         if( p->second->getRank() != rank ||
 
  987         p->second->removeSubtreeRoot(paraNode);
 
 1058   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1064         if( p->second->getRank() != rank ||
 
 1075         BbParaNode *node = p->second->extractSubtreeRoot(paraNode);
 
 1100   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1106         if( p->second->getRank() != rank ||
 
 1116         return p->second->getSelfSplitNodes();
 
 1150   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1156         if( p->second->getRank() != rank ||
 
 1166         return p->second->deleteCurrentNode();
 
 1189      long long numOfNodesSolved,               
 
 1203   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1211         if( p->second->getRank() != rank ||
 
 1216         if( numOfNodesSolved >= 0 )
 
 1245         if( p->second->isCandidateOfCollecting() )
 
 1247            std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 1251               if( pCandidate->second->getRank() == rank )
 
 1255            pCandidate->second->setCandidateOfCollecting(
false);
 
 1286      long long numOfNodesSolved,               
 
 1287      int numOfSelfSplitNodesLeft,              
 
 1301   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1307         if( p->second->getRank() != rank ||
 
 1337         if( p->second->isCandidateOfCollecting() )
 
 1339            std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 1343               if( pCandidate->second->getRank() == rank )
 
 1347            pCandidate->second->setCandidateOfCollecting(
false);
 
 1396   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1402         if( p->second->getRank() != rank ||
 
 1440      map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1443         int rank = p->second->getRank();
 
 1527      nCollect = 0 - (nCollect + 1);    
 
 1542      std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 1546         if( pCandidate->second->getRank() == rank )
 
 1550      pCandidate->second->setCandidateOfCollecting(
false);
 
 1598   int nCollect = 
static_cast<int>(
 
 1603   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1612            if( p->second->getRank() == 1 )
 
 1614               int rank = p->second->getRank();
 
 1647               if( p->second->getNumOfNodesLeft() > 1 &&             
 
 1648                     ( (p->second->getBestDualBoundValue() - globalBestDualBoundValue) /
 
 1649                     max( fabs(globalBestDualBoundValue), 1.0 ) ) < 
bgap )
 
 1651                  int rank = p->second->getRank();
 
 1655                     int nCollectPerSolver = std::min(
 
 1660                        nCollectPerSolver = 0 - (nCollectPerSolver + 1);    
 
 1672                     nCollect -= nCollectPerSolver;
 
 1680                  if( !paraNodePool->
isEmpty() &&
 
 1681                        ( ( (p->second->getBestDualBoundValue() - globalBestDualBoundValue) /
 
 1682                        max( fabs(globalBestDualBoundValue), 1.0 ) ) > ( 
bgap * 
mBgap ) ) )
 
 1684                     int rank = p->second->getRank();
 
 1694            std::multimap< double, int > boundOrderMap;
 
 1697               boundOrderMap.insert(std::make_pair(p->second->getBestDualBoundValue(),p->second->getRank()));
 
 1699            std::multimap< double, int >::iterator pbo;
 
 1700            for( pbo = boundOrderMap.begin();
 
 1704               int rank = pbo->second;
 
 1710                     int nCollectPerSolver = std::min(
 
 1715                        nCollectPerSolver = 0 - (nCollectPerSolver + 1);    
 
 1727                     nCollect -= nCollectPerSolver;
 
 1730                        std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 1734                           if( pCandidate->second->getRank() == rank )
 
 1738                        pCandidate->second->setCandidateOfCollecting(
false);
 
 1753                        if( !paraNodePool->
isEmpty() &&
 
 1755                              max( fabs(globalBestDualBoundValue), 1.0 ) ) > ( 
bgap * 
mBgap ) ) )
 
 1762                           int nCollectPerSolver = std::min(
 
 1767                              nCollectPerSolver = 0 - (nCollectPerSolver + 1);    
 
 1779                           nCollect -= nCollectPerSolver;
 
 1789            for(; pbo != boundOrderMap.end() &&
 
 1795               int rank = pbo->second;
 
 1810            std::multimap< int, int > nNodesOrderMap;
 
 1813               nNodesOrderMap.insert(std::make_pair(p->second->getNumOfNodesLeft(),p->second->getRank()));
 
 1815            std::multimap< int, int >::iterator pno;
 
 1816            for( pno = nNodesOrderMap.begin();
 
 1820               int rank = pno->second;
 
 1824                     max( fabs(globalBestDualBoundValue), 1.0 ) ) < 
bgap )
 
 1828                     int nCollectPerSolver = std::min(
 
 1833                        nCollectPerSolver = 0 - (nCollectPerSolver + 1);    
 
 1845                     nCollect -= nCollectPerSolver;
 
 1853                  if( !paraNodePool->
isEmpty() &&
 
 1855                        max( fabs(globalBestDualBoundValue), 1.0 ) ) > ( 
bgap * 
mBgap ) ) )
 
 1865            std::multimap< double, int > boundOrderMap;
 
 1868               boundOrderMap.insert(std::make_pair(p->second->getBestDualBoundValue(),p->second->getRank()));
 
 1870            std::multimap< int, int > nNodesOrderMap;
 
 1873               nNodesOrderMap.insert(std::make_pair(p->second->getNumOfNodesLeft(),p->second->getRank()));
 
 1875            std::multimap< double, int >::iterator pbo;
 
 1876            std::multimap< int, int >::iterator pno;
 
 1877            pbo = boundOrderMap.begin();
 
 1878            pno = nNodesOrderMap.begin();
 
 1879            bool boundOrderSection = 
true;
 
 1880            while( pbo != boundOrderMap.end()
 
 1881                  && pno != nNodesOrderMap.end()
 
 1885               if( boundOrderSection )
 
 1887                  if( pbo !=  boundOrderMap.end() )
 
 1891                     boundOrderSection = 
false;
 
 1895                     boundOrderSection = 
false;
 
 1901                  if( pno != nNodesOrderMap.end() )
 
 1905                     boundOrderSection = 
true;
 
 1907                     boundOrderSection = 
true;
 
 1914                     max( fabs(globalBestDualBoundValue), 1.0 ) ) < 
bgap )
 
 1918                     int nCollectPerSolver = std::min(
 
 1923                        nCollectPerSolver = 0 - (nCollectPerSolver + 1);    
 
 1935                     nCollect -= nCollectPerSolver;
 
 1943                  if( !paraNodePool->
isEmpty() &&
 
 1945                        max( fabs(globalBestDualBoundValue), 1.0 ) ) > ( 
bgap * 
mBgap ) ) )
 
 1966      long long numOfNodesSolved,
 
 1968      double solverLocalBestDualBound,
 
 1972   map<int, BbParaSolverPoolElementPtr>::iterator p;
 
 1976      if( (numOfNodesSolved - p->second->getNumOfNodesSolved() ) < 0 )
 
 1978         std::cout << 
"numOfNodesSolved = " << numOfNodesSolved << 
", p->second->getNumOfNodesSolved() = " << p->second->getNumOfNodesSolved() << std::endl;
 
 1985      p->second->setNumOfDiffNodesSolved( numOfNodesSolved - p->second->getNumOfNodesSolved() );
 
 1986      p->second->setNumOfNodesSolved(numOfNodesSolved);
 
 1987      p->second->setNumOfDiffNodesLeft( numOfNodesLeft - p->second->getNumOfNodesLeft() );
 
 1988      p->second->setNumOfNodesLeft(numOfNodesLeft);
 
 1989      if( p->second->getBestDualBoundValue() < solverLocalBestDualBound ) 
 
 1991         p->second->setDualBoundValue(solverLocalBestDualBound);
 
 1993         if( p->second->isInCollectingMode() )
 
 2007   if( globalBestDualBoundValue > p->second->getBestDualBoundValue() )
 
 2011      std::cout << 
"This bound = " << p->second->getBestDualBoundValue() << std::endl;
 
 2012      std::cout << 
"myRank = " << rank << std::endl;
 
 2013      std::cout << 
"solverLocalBestDualBound = " << p->second->getBestDualBoundValue() << std::endl;
 
 2023         && numOfNodesSolved > 1 )
 
 2050                     if( !paraNodePool->
isEmpty() )
 
 2066                       < p->second->getBestDualBoundValue() )  
 
 2069               assert( p->second->getRank() == rank );
 
 2071               if( !paraNodePool->
isEmpty() )
 
 2076               std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 2078               assert( pCandidate->second->isOutCollectingMode() );
 
 2080               nCollect = std::min(pCandidate->second->getNumOfNodesLeft()/4,
 
 2089                  nCollect = 0 - (nCollect + 1);    
 
 2101               pCandidate->second->setCollectingMode(
true);
 
 2104               pCandidate->second->setCandidateOfCollecting(
false);
 
 2109               if( !paraNodePool->
isEmpty() &&
 
 2110                     ( ( ( ( p->second->getBestDualBoundValue() - globalBestDualBoundValue ) /
 
 2111                       max( fabs(globalBestDualBoundValue), 1.0 ) )  > ( 
bgap * 
mBgap ) ) ) )
 
 2132            if( !paraNodePool->
isEmpty() &&
 
 2144      bool manyIdleSolversExist = 
false;
 
 2148         if( manyIdleSolversExist )
 
 2168                  std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 2170                  assert( pCandidate->second->isOutCollectingMode() );
 
 2171                  nCollect = std::min(pCandidate->second->getNumOfNodesLeft()/4,
 
 2180                     nCollect = 0 - (nCollect + 1);    
 
 2192                  pCandidate->second->setCollectingMode(
true);
 
 2198                  pCandidate->second->setCandidateOfCollecting(
false);
 
 2203                  assert( rank == p->second->getRank() );
 
 2204                  if( p->second->getNumOfNodesLeft() > 1 &&                
 
 2205                        p->second->isGenerator() &&
 
 2206                        ( !p->second->isCollectingProhibited() ) &&
 
 2207                        p->second->isOutCollectingMode() &&
 
 2209                                 ( ( ( p->second->getBestDualBoundValue() - globalBestDualBoundValue ) /
 
 2210                                       max( fabs(globalBestDualBoundValue), 1.0 ) )  < 
bgap ) ) ) 
 
 2224               std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 2225               if( p->second->isCandidateOfCollecting() )
 
 2230                     if( pCandidate->second->getRank() == rank )
 
 2238                  pCandidate->second->setCandidateOfCollecting(
false);
 
 2245                  std::multimap< double, BbParaSolverPoolElementPtr >::reverse_iterator prCandidate;
 
 2247                  if( p->second->getNumOfNodesLeft() > 1 &&
 
 2248                        p->second->isGenerator() &&
 
 2249                        prCandidate->second->getBestDualBoundValue() > p->second->getBestDualBoundValue() )
 
 2254                     assert(prCandidate.base()->second == tCandidate);
 
 2255                     if( prCandidate.base()->second != tCandidate )
 
 2257                        THROW_LOGICAL_ERROR4(
"prCandidate.base()->second != tCandidate, prCandidate.base()->second = ", prCandidate.base()->second, 
", tCandidate = ", tCandidate );
 
 2259                     prCandidate.base()->second->setCandidateOfCollecting(
false);
 
 2262                           make_pair(p->second->getBestDualBoundValue(),p->second)
 
 2264                     p->second->setCandidateOfCollecting(
true);
 
 2273                        p->second->getNumOfNodesLeft() > 1 &&
 
 2274                        p->second->isGenerator() &&
 
 2278                           make_pair(p->second->getBestDualBoundValue(),p->second)
 
 2280                     p->second->setCandidateOfCollecting(
true);
 
 2289                     p->second->getNumOfNodesLeft() > 1 &&
 
 2290                     p->second->isGenerator() &&
 
 2294                        make_pair(p->second->getBestDualBoundValue(),p->second)
 
 2296                  p->second->setCandidateOfCollecting(
true);
 
 2310         std::cout << 
", CCSBD = ";
 
 2311         std::multimap< double, BbParaSolverPoolElementPtr >::iterator pCandidate;
 
 2315            std::cout << 
", " << pCandidate->second->getBestDualBoundValue() << 
"(" <<  pCandidate->second->getRank() << 
")";
 
 2318      std::cout << std::endl;
 
 2333      long long numOfNodesSolved,
 
 2335      double solverLocalBestDualBound
 
 2341      std::cout << 
"Tried to update no racing status solver's info." << std::endl;
 
 2342      std::cout << 
"Update solver rank = " << rank << std::endl;
 
Base class of communicator for UG Framework.
 
Parameter set for UG framework.
 
virtual void updateDualBoundValue(BbParaSolverPoolElementPtr solver, double value)
update CollectingModeSolver heap by a new dual bound value of this Solver
 
AscendingCollectingModeSolverHeap(std::size_t size)
constructor
 
virtual void deleteElement(BbParaSolverPoolElementPtr solver)
delete BbParaSolverPoolElementPtr from CollectingModeSolver Heap
 
virtual void downHeap(std::size_t pos)
down heap
 
virtual void upHeap(std::size_t pos)
up heap
 
virtual void updateDualBoundValue(BbParaSolverPoolElementPtr solver, double value)
update selection heap by a new dual bound value of this Solver
 
AscendingSelectionHeap(std::size_t size)
constructor
 
virtual void deleteElement(BbParaSolverPoolElementPtr solver)
delete BbParaSolverPoolElementPtr from Selection Heap
 
virtual void downHeap(std::size_t pos)
down heap
 
virtual void upHeap(std::size_t pos)
up heap
 
virtual bool isEmpty()=0
check if this pool is empty or not
 
virtual unsigned int getNumOfGoodNodes(double globalBestBound)=0
get number of good (heavy) BbParaNodes in this pool
 
int getMergingStatus()
get merging status
 
BbParaMergeNodeInfo * getMergeNodeInfo()
get merge node information struct
 
virtual int send(ParaComm *comm, int destination)=0
send this object
 
BbParaNode * next
this pointer is used in case of self-split ramp-up in LC this field is not transferred
 
class BbParaRacingSolverPool (Racing Solver Pool)
 
double bestDualBoundInSolvers
best dual bound value in Solvers
 
long long nNodesSolvedInBestSolver
number of nodes solved in the best Solver
 
BbParaSolverPoolElementPtr * pool
Solver pool indexed by Solver's rank.
 
long long nNodesInBestSolver
number of nodes in the best Solver
 
virtual bool isSolverActive(int rank)
check if the specified Solver is active or not
 
int nEvaluationStage
number of Solvers that are in evaluation stage
 
double bestDualBound
current best dual bound value
 
virtual void updateSolverStatus(int rank, long long numNodesSolved, int numNodesLeft, double solverLocalBestBound)
update Solver status
 
virtual long long getNumOfNodesSolved(int rank)
get number of nodes solved in the Solver specified by rank
 
SelectionHeap * selectionHeap
pointers to active Solvers in ascending or descending order
 
virtual bool isWinnerDecided(bool feasibleSol)
check racing termination criteria
 
virtual bool isEvaluationStage(int rank)
check if the Solver specified in an argument is evaluation stage or not
 
class BbParaSolverPoolElement (This class includes information about a Solver status)
 
long long getNumOfNodesSolved()
get number of nodes solved
 
void setDualBoundGainTesting(bool value)
set dual bound gain is testing value
 
void activate(BbParaNode *inNode)
activate this Solver
 
void setCollectingModeSolverHeapElement(BbParaSolverPoolElementPtr *inCollectingModeSolverHeapElement)
set collecting mode Solver heap element
 
int getNumOfNodesLeft()
get number of nodes left
 
bool isOutCollectingMode()
check if this Solver is out of collecting mode or not
 
void setCollectingMode(bool b)
set collecting mode
 
void setSelectionHeapElement(BbParaSolverPoolElementPtr *inSelectionHeapElement)
set selection heap element
 
BbParaSolverPoolElementPtr * getSelectionHeapElement()
extract current solving BbParaNode
 
void setCollectingIsAllowed()
allows to be in collecting mode
 
void setNumOfDiffNodesSolved(int inNumOfDiff)
set number of nodes left difference between current number and that in the previous notification time
 
void switchIntoEvaluation()
switch into evaluation stage
 
void setBestDualBoundValue(double inBestDualBoundValue)
set best dual bound value
 
void setNumOfNodesSolved(long long inNumOfNodesSolved)
set number of nodes solved
 
void setNumOfNodesLeft(int inNumOfNodesLeft)
set number of nodes left
 
void switchOutEvaluation()
switch out of evaluation stage
 
BbParaNode * extractCurrentNode()
extract current solving BbParaNode
 
bool isGenerator()
check if this Solver is generator or not */
 
BbParaNode * died()
kill this Solver
 
int getRank()
get rank of the Solver
 
void setCandidateOfCollecting(bool b)
set candidate of collecting mode Solver
 
SolverStatus getStatus()
get Solver status
 
bool isCollectingProhibited()
check if this Solver cannot be allowed in collecting mode
 
void setNumOfDiffNodesLeft(int inNumOfDiff)
set number of nodes left difference between current number and that in the previous notification time
 
bool isInCollectingMode()
check if this Solver is in collecting mode or not
 
double getBestDualBoundValue()
get best dual bound value
 
void prohibitCollectingMode()
prohibits to be in collecting mode
 
BbParaNode * extractSelfSplitNodes()
extract a list of nodes which are generated by self-split ramp-up
 
void inactivate()
inactivate this Solver
 
BbParaSolverPoolElementPtr * getCollectingModeSolverHeapElement()
get collecting mode Solver heap element
 
int getNumOfDiffNodesLeft()
get number of nodes left difference between current number and that in the previous notification time
 
virtual void activateSolver(int rank, BbParaNode *node, int nGoodNodesInNodePool, double averageDualBoundGain)
activate the Solver specified by rank with specified node which has been sent
 
bool active
indicate if this pool is active or not
 
int mCollectingNodes
multiplier for the number of collecting BbParaNodes
 
virtual std::size_t getNumInactiveSolvers()
get number of inactive Solvers
 
virtual void deleteCurrentSubtreeRootNode(int rank)
delete current self-split subtree root node from the active solver with the specified rank
 
virtual void switchInCollectingToSolver(int rank, BbParaNodePool *paraNodePool)
switch a Solver to be in collecting mode
 
virtual BbParaNode * extractSelfSplitSubtreeRootNode(int rank, BbParaNode *node)
extract self-split subtree root node from the active solver with the specified rank
 
std::size_t nLimitCollectingModeSolvers
limit number of Solvers that can be in collecting mode
 
double bgap
threshold value of gap
 
int mMaxCollectingNodes
maximum multiplier for the number of collecting BbParaNodes
 
virtual void switchOutCollectingMode()
switch out collecting mode
 
BbParaSolverPoolElementPtr * pool
Solver pool indexed by Solver's rank.
 
unsigned long long nNodesSolvedInSolvers
number of nodes solved in current running Solvers
 
bool breakingFirstSubtree
breaking the first subtree
 
double switchOutTime
switch out time
 
virtual bool isInCollectingMode()
check if this system is in collecting mode or not
 
virtual void sendSwitchOutCollectingModeIfNecessary(int rank)
switch out collecting mode of the Solver specified by rank if it is necessary
 
std::map< int, BbParaSolverPoolElementPtr > deadSolvers
pointers to dead Solvers
 
bool beforeFinishingFirstCollect
before finishing first collecting mode
 
virtual double getGlobalBestDualBoundValue()=0
get global best dual bound value
 
double absoluteGap
allowable absolute dual bound gap to the best Solver
 
virtual void makeSubtreeRootNodeCurrent(int rank, BbParaNode *node)
make subtree root node as current task for the specified rank
 
virtual BbParaNode * extractSelfSplitSubtreeRootNodes(int rank)
extract self-split subtree root node from the active solver with the specified rank
 
virtual void resetCountersInSolver(int rank, long long numOfNodesSolved, int numOfSelfSplitNodesLeft, BbParaNodePool *paraNodePool)
reset counters in the Solver specified by rank
 
bool collectingMode
indicate that this system is in collecting mode or not
 
virtual BbParaNode * getSelfSplitSubtreeRootNodes(int rank)
get self-split subtree root node from the active solver with the specified rank
 
virtual void enforcedSwitchOutCollectingMode(int rank)
enforced to switch out collecting mode of the Solver specified by rank if it is necessary
 
virtual void inactivateSolver(int rank, long long numOfNodesSolved, BbParaNodePool *paraNodePool)
inactivate the Solver specified by rank
 
unsigned long long nNodesInSolvers
number of nodes in all Solvers
 
bool beforeInitialCollect
before initial collecting mode
 
double mBgap
multiplier of the bgap value
 
std::map< int, BbParaSolverPoolElementPtr > inactiveSolvers
pointers to inactive Solvers
 
virtual int getNumOfNodesLeft(int rank)
get the number of nodes left by the Solver specified
 
virtual BbParaNode * solverDied(int rank)
kill the Solver specified by rank
 
SelectionHeap * selectionHeap
pointers to active Solvers in ascending or descending order
 
std::map< int, BbParaSolverPoolElementPtr > activeSolvers
pointers to active Solvers
 
std::multimap< double, BbParaSolverPoolElementPtr > candidatesOfCollectingModeSolvers
pointers to candidates of collecting mode Solvers
 
virtual void addNewSubtreeRootNode(int rank, BbParaNode *node)
add new subtree root node to the active solver with the specified rank
 
int nDualBoundGainTesting
the number of dual bound gain testing Solvers
 
virtual void removeSubtreeRootNode(int rank, BbParaNode *node)
remove subtree root node from the active solver with the specified rank
 
CollectingModeSolverHeap * collectingModeSolverHeap
pointers to collecting mode Solvers in ascending or descending order
 
std::size_t nCollectingModeSolvers
number of collecting mode Solvers
 
class CollectingModeSolverHeap
 
virtual void upHeap(std::size_t pos)=0
up heap
 
const std::string toString()
stringfy of this object for debugging
 
virtual ~CollectingModeSolverHeap()
destructor
 
CollectingModeSolverHeap(std::size_t size)
constructor
 
BbParaSolverPoolElementPtr remove()
remove top priority BbParaSolverPoolElementPtr from CollectingModeSolver Heap */
 
ResultOfInsert
results of insert
 
@ FAILED_BY_FULL
FAILED_BY_FULL.
 
virtual void deleteElement(BbParaSolverPoolElementPtr solver)=0
delete BbParaSolverPoolElementPtr from CollectingModeSolver Heap
 
std::size_t maxHeapSize
maximum size of this heap
 
virtual void updateDualBoundValue(BbParaSolverPoolElementPtr solver, double value)=0
update CollectingModeSolver heap by a new dual bound value of this Solver
 
std::size_t heapSize
current used heap size
 
ResultOfInsert insert(BbParaSolverPoolElementPtr solver)
insert BbParaSolverPoolElementPtr to CollectingModeSolver Heap
 
void resize(std::size_t size)
resize CollectingModeSolver Heap
 
std::size_t getHeapSize() const
get current used heap size
 
virtual void downHeap(std::size_t pos)=0
down heap
 
BbParaSolverPoolElementPtr * heap
heap : contents are BbParaSolverPoolElementPtr
 
BbParaSolverPoolElementPtr top() const
obtain top priority BbParaSolverPoolElementPtr
 
virtual void updateDualBoundValue(BbParaSolverPoolElementPtr solver, double value)
update CollectingModeSolver heap by a new dual bound value of this Solver
 
virtual void deleteElement(BbParaSolverPoolElementPtr solver)
delete BbParaSolverPoolElementPtr from CollectingModeSolver Heap
 
virtual void downHeap(std::size_t pos)
down heap
 
DescendingCollectingModeSolverHeap(std::size_t size)
constructor
 
virtual void upHeap(std::size_t pos)
up heap
 
virtual void updateDualBoundValue(BbParaSolverPoolElementPtr solver, double value)
update selection heap by a new dual bound value of this Solver
 
DescendingSelectionHeap(std::size_t size)
constructor
 
virtual void deleteElement(BbParaSolverPoolElementPtr solver)
delete BbParaSolverPoolElementPtr from Selection Heap
 
virtual void downHeap(std::size_t pos)
down heap
 
virtual void upHeap(std::size_t pos)
up heap
 
virtual int send(void *bufer, int count, const int datatypeId, int dest, const int tag)=0
send function for standard ParaData types
 
virtual double getElapsedTime()=0
getter of the deterministic time
 
bool getBoolParamValue(int param)
get bool parameter value
 
int getIntParamDefaultValue(int param)
get default value of int parameter
 
double getRealParamValue(int param)
get real parameter value
 
int getIntParamValue(int param)
get int parameter value
 
ParaParamSet * paraParams
runtime parameters for parallelization
 
int nSolvers
number of Solvers
 
ParaTimer * paraTimer
timer used
 
int winnerRank
winner rank of racing ramp-up, -1: not decided yet
 
ParaDeterministicTimer * paraDetTimer
deterministic timer used
 
int originRank
origin rank of Solvers managed by this Solver pool
 
ParaParamSet * paraParams
runtime parameters for parallelization
 
ParaComm * paraComm
communicator
 
std::size_t nSolvers
number of Solvers
 
ParaTimer * paraTimer
timer
 
virtual double getElapsedTime()=0
get elapsed time
 
virtual void upHeap(std::size_t pos)=0
up heap
 
const std::string toString()
stringfy of this object for debugging
 
BbParaSolverPoolElementPtr remove()
remove top priority BbParaSolverPoolElementPtr from Selection Heap
 
ResultOfInsert
results of insert
 
@ FAILED_BY_FULL
FAILED_BY_FULL.
 
virtual void deleteElement(BbParaSolverPoolElementPtr solver)=0
delete BbParaSolverPoolElementPtr from Selection Heap
 
std::size_t maxHeapSize
maximum size of this heap
 
virtual void updateDualBoundValue(BbParaSolverPoolElementPtr solver, double value)=0
update selection heap by a new dual bound value of this Solver
 
std::size_t heapSize
current used heap size
 
void resize(std::size_t size)
resize Selection Heap
 
ResultOfInsert insert(BbParaSolverPoolElementPtr solver)
insert BbParaSolverPoolElementPtr to Selection Heap
 
std::size_t getHeapSize() const
get current used heap size
 
virtual void downHeap(std::size_t pos)=0
down heap
 
BbParaSolverPoolElementPtr * heap
heap : contents are BbParaSolverPoolElementPtr
 
BbParaSolverPoolElementPtr top() const
obtain top priority BbParaSolverPoolElementPtr
 
virtual ~SelectionHeap()
destructor
 
static const int KeepRacingUntilToFindFirstSolution
 
static const int StopRacingTimeLimitMultiplier
 
static const int DualBoundGainTest
 
static const int LightWeightRootNodeProcess
 
static const int CollectingModeInterval
 
static const int TagLightWeightRootNodeProcess
 
static const int SolverOrderInCollectingMode
 
static const int NMaxCanditatesForCollecting
 
static const int RacingRampUpTerminationCriteria
 
static const int StopRacingTimeLimit
 
static const int TagNoWaitModeSend
 
static const int RatioToApplyLightWeightRootProcess
 
static const int ParaBYTE
 
static const int ControlCollectingModeOnSolverSide
 
static const int Deterministic
 
static const int TagNoTestDualBoundGain
 
static const int StopRacingNumberOfNodesLeftMultiplier
 
static const int NChangeIntoCollectingMode
 
static const int TagOutCollectingMode
 
static const int NEvaluationSolversToStopRacing
 
static const int TagInCollectingMode
 
static const int StopRacingNumberOfNodesLeft
 
static const int CountingSolverRatioInRacing
 
static const int TagTestDualBoundGain
 
static const int ParaDOUBLE
 
static const int MultiplierForCollectingMode
 
#define PARA_COMM_CALL(paracommcall)
 
Defines for UG Framework.
 
#define THROW_LOGICAL_ERROR1(msg1)
 
#define THROW_LOGICAL_ERROR2(msg1, msg2)
 
#define THROW_LOGICAL_ERROR4(msg1, msg2, msg3, msg4)
 
#define THROW_LOGICAL_ERROR3(msg1, msg2, msg3)
 
#define SOLVER_POOL_INDEX(rank)