Scippy

UG

Ubiquity Generator framework

BbParaNodePool Class Referenceabstract

class BbParaNodePool More...

#include <bbParaNodePool.h>

Inheritance diagram for BbParaNodePool:
BbParaNodePoolForCleanUp BbParaNodePoolForMinimization

Public Member Functions

 BbParaNodePool (double inBgap)
 constructor More...
 
virtual ~BbParaNodePool ()
 destructor More...
 
virtual void insert (BbParaNodePtr node)=0
 insert BbParaNode to this pool More...
 
virtual bool isEmpty ()=0
 check if this pool is empty or not More...
 
virtual BbParaNodePtr extractNode ()=0
 extract a BbParaNode object from this pool More...
 
virtual BbParaNodePtr extractWorstNode ()=0
 extract a BbParaNode object with the lowest priority from this pool More...
 
virtual BbParaNodePtr extractNodeRandomly ()=0
 extract a BbParaNode object randomly from this pool More...
 
virtual double getBestDualBoundValue ()=0
 get best dual bound value of BbParaNode object in this pool More...
 
virtual unsigned int getNumOfGoodNodes (double globalBestBound)=0
 get number of good (heavy) BbParaNodes in this pool More...
 
virtual size_t getNumOfNodes ()=0
 get number of BbParaNodes in this pool More...
 
virtual int removeBoundedNodes (double incumbentValue)=0
 remove bounded BbParaNodes by given incumbnet value More...
 
virtual void updateDualBoundsForSavingNodes ()=0
 update dual bound values for saving BbParaNodes to checkpoint file More...
 
virtual int writeBbParaNodesToCheckpointFile (gzstream::ogzstream &out)=0
 write BbParaNodes to checkpoint file More...
 
virtual int removeMergedNodes (BbParaMergedNodeListElement *head)=0
 remove merged BbParaNodes from this pool More...
 
virtual const std::string toString ()=0
 stringfy this object More...
 
size_t getMaxUsageOfPool ()
 get maximum usage of this pool More...
 

Protected Attributes

double bgap
 gap which can be considered as good More...
 
size_t maxUsageOfPool
 maximum usage of this pool More...
 

Detailed Description

class BbParaNodePool

Definition at line 108 of file bbParaNodePool.h.

Constructor & Destructor Documentation

◆ BbParaNodePool()

BbParaNodePool ( double  inBgap)

constructor

Parameters
inBgapgap which can be considered as good

Definition at line 121 of file bbParaNodePool.h.

◆ ~BbParaNodePool()

virtual ~BbParaNodePool ( )
virtual

destructor

Definition at line 132 of file bbParaNodePool.h.

Member Function Documentation

◆ extractNode()

◆ extractNodeRandomly()

virtual BbParaNodePtr extractNodeRandomly ( )
pure virtual

extract a BbParaNode object randomly from this pool

Returns
pointer to BbParaNode object extracted

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

Referenced by BbParaLoadCoordinator::sendParaTasksToIdleSolvers().

◆ extractWorstNode()

virtual BbParaNodePtr extractWorstNode ( )
pure virtual

extract a BbParaNode object with the lowest priority from this pool

Returns
pointer to BbParaNode object extracted

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

◆ getBestDualBoundValue()

◆ getMaxUsageOfPool()

size_t getMaxUsageOfPool ( )

get maximum usage of this pool

Returns
the maximum number of BbParaNodes that were in this pool

Definition at line 239 of file bbParaNodePool.h.

References BbParaNodePool::maxUsageOfPool.

Referenced by BbParaLoadCoordinator::writeLoadCoordinatorStatisticsToCheckpointFile(), and BbParaLoadCoordinator::~BbParaLoadCoordinator().

◆ getNumOfGoodNodes()

◆ getNumOfNodes()

◆ insert()

◆ isEmpty()

◆ removeBoundedNodes()

virtual int removeBoundedNodes ( double  incumbentValue)
pure virtual

remove bounded BbParaNodes by given incumbnet value

Returns
the number of bounded BbParaNodes
Parameters
incumbentValueincumbent value

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

Referenced by BbParaLoadCoordinator::sendCutOffValue(), and BbParaLoadCoordinator::sendIncumbentValue().

◆ removeMergedNodes()

virtual int removeMergedNodes ( BbParaMergedNodeListElement head)
pure virtual

remove merged BbParaNodes from this pool

Returns
Parameters
headhead of Merged BbParaNodes list

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

Referenced by BbParaNodesMerger::mergeNodes().

◆ toString()

virtual const std::string toString ( )
pure virtual

stringfy this object

Returns
string which shows inside of this object as string

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

◆ updateDualBoundsForSavingNodes()

virtual void updateDualBoundsForSavingNodes ( )
pure virtual

update dual bound values for saving BbParaNodes to checkpoint file

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

Referenced by BbParaLoadCoordinator::updateCheckpointFiles().

◆ writeBbParaNodesToCheckpointFile()

virtual int writeBbParaNodesToCheckpointFile ( gzstream::ogzstream &  out)
pure virtual

write BbParaNodes to checkpoint file

Returns
number of BbParaNodes written
Parameters
outgzstream for output

Implemented in BbParaNodePoolForMinimization, and BbParaNodePoolForCleanUp.

Referenced by BbParaLoadCoordinator::updateCheckpointFiles().

Member Data Documentation

◆ bgap

double bgap
protected

gap which can be considered as good

Definition at line 113 of file bbParaNodePool.h.

Referenced by BbParaNodePoolForMinimization::getNumOfGoodNodes(), and BbParaNodePoolForCleanUp::getNumOfGoodNodes().

◆ maxUsageOfPool

size_t maxUsageOfPool
protected