Scippy

UG

Ubiquity Generator framework

BbParaNodePool Class Referenceabstract

class BbParaNodePool More...

#include <bbParaNodePool.h>

+ Inheritance diagram for BbParaNodePool:

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 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 BbParaNodePoolForCleanUp, and BbParaNodePoolForMinimization.

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 BbParaNodePoolForCleanUp, and BbParaNodePoolForMinimization.

◆ 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.

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

◆ getNumOfGoodNodes()

virtual unsigned int getNumOfGoodNodes ( double  globalBestBound)
pure virtual

◆ 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 BbParaNodePoolForCleanUp, and BbParaNodePoolForMinimization.

Referenced by BbParaLoadCoordinator::changeSearchStrategyOfAllSolversToOriginalSearch(), 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 BbParaNodePoolForCleanUp, and BbParaNodePoolForMinimization.

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 BbParaNodePoolForCleanUp, and BbParaNodePoolForMinimization.

◆ updateDualBoundsForSavingNodes()

virtual void updateDualBoundsForSavingNodes ( )
pure virtual

update dual bound values for saving BbParaNodes to checkpoint file

Implemented in BbParaNodePoolForCleanUp, and BbParaNodePoolForMinimization.

Referenced by BbParaLoadCoordinator::sendParaTasksToIdleSolvers().

Member Data Documentation

◆ bgap

double bgap
protected

gap which can be considered as good

Definition at line 113 of file bbParaNodePool.h.

◆ maxUsageOfPool

size_t maxUsageOfPool
protected

maximum usage of this pool

Definition at line 114 of file bbParaNodePool.h.