Scippy

UG

Ubiquity Generator framework

BbParaNodePoolForMinimization Class Reference

class BbParaNodePoolForMinimization More...

#include <bbParaNodePool.h>

+ Inheritance diagram for BbParaNodePoolForMinimization:

Public Member Functions

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

Private Attributes

std::multimap< BbParaNodePtr, BbParaNodePtr, BbParaNodeSortCriterionascendingPool
 asnding pool More...
 

Additional Inherited Members

- Protected Attributes inherited from BbParaNodePool
double bgap
 gap which can be considered as good More...
 
size_t maxUsageOfPool
 maximum usage of this pool More...
 

Detailed Description

class BbParaNodePoolForMinimization

Note
only minimization pool was written, since all problem is converted to minimization problem inside of UG solvers

Definition at line 251 of file bbParaNodePool.h.

Constructor & Destructor Documentation

◆ BbParaNodePoolForMinimization()

BbParaNodePoolForMinimization ( double  inBgap)

constructor

Parameters
inBgapgap to evaluate a BbParaNode is good or not

Definition at line 261 of file bbParaNodePool.h.

◆ ~BbParaNodePoolForMinimization()

destructor

Definition at line 271 of file bbParaNodePool.h.

Member Function Documentation

◆ extractNode()

BbParaNodePtr extractNode ( )
virtual

extract a BbParaNode from this pool

Returns
pointer to BbParaNode object extracted

Implements BbParaNodePool.

Definition at line 313 of file bbParaNodePool.h.

References BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE, BbParaMergeNodeInfo_::PARA_MERGED_RPRESENTATIVE, and BbParaMergeNodeInfo_::PARA_MERGING.

◆ extractNodeRandomly()

BbParaNodePtr extractNodeRandomly ( )
virtual

extract a BbParaNode object randomly from this pool

Returns
pointer to BbParaNode object extracted

check nodes from the head of this pool

Implements BbParaNodePool.

Definition at line 403 of file bbParaNodePool.h.

References BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE, BbParaMergeNodeInfo_::PARA_MERGED_RPRESENTATIVE, BbParaMergeNodeInfo_::PARA_MERGING, and THROW_LOGICAL_ERROR4.

◆ extractWorstNode()

BbParaNodePtr extractWorstNode ( )
virtual

extract a BbParaNode object with the lowest priority from this pool

Returns
pointer to BbParaNode object extracted TODO: need to debug

Implements BbParaNodePool.

Definition at line 359 of file bbParaNodePool.h.

◆ getBestDualBoundValue()

double getBestDualBoundValue ( )
virtual

get best dual bound value of BbParaNode object in this pool

Returns
best dual bound value

Implements BbParaNodePool.

Definition at line 554 of file bbParaNodePool.h.

◆ getNextNode()

BbParaNodePtr getNextNode ( )

get a BbParaNode object, which is expected to extract from this pool

Returns
pointer to BbParaNode object, which is expected to extract (Note: the BbParaNode object stays in pool)

Definition at line 382 of file bbParaNodePool.h.

◆ getNumOfGoodNodes()

unsigned int getNumOfGoodNodes ( double  globalBestBound)
virtual

get number of good (heavy) BbParaNodes in this pool

Returns
the number of good BbParaNodes

The following code is not a good idea, because only a node is received from a solver, LC can switch out if( globalBestBound > getBestDualBoundValue() ) globalBestBound = getBestDualBoundValue();

Parameters
globalBestBoundglobal best bound value to evaluate goodness

Implements BbParaNodePool.

Definition at line 573 of file bbParaNodePool.h.

◆ getNumOfNodes()

size_t getNumOfNodes ( )
virtual

get number of BbParaNodes in this pool

Returns
number of BbParaNodes

Implements BbParaNodePool.

Definition at line 615 of file bbParaNodePool.h.

◆ insert()

void insert ( BbParaNodePtr  paraNode)
virtual

insert a BbParaNode object to this pool

Parameters
paraNodepointer to BbParaNode object to insert

Implements BbParaNodePool.

Definition at line 288 of file bbParaNodePool.h.

◆ isEmpty()

bool isEmpty ( )
virtual

check if this pool is empty or not

Returns
true if this pool is empty

Implements BbParaNodePool.

Definition at line 303 of file bbParaNodePool.h.

◆ removeBoundedNodes()

int removeBoundedNodes ( double  incumbentValue)
virtual

remove bounded BbParaNodes by given incumbnet value

Returns
the number of bounded BbParaNodes
Parameters
incumbentValueincumbent value

Implements BbParaNodePool.

Definition at line 625 of file bbParaNodePool.h.

References BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE.

◆ removeMergedNodes()

int removeMergedNodes ( BbParaMergedNodeListElement head)
virtual

remove merged BbParaNodes from this pool

Returns
the number of BbParaNodes removed
Parameters
headhead of Merged BbParaNodes list

Implements BbParaNodePool.

Definition at line 678 of file bbParaNodePool.h.

References BbParaNode::getMergeNodeInfo(), BbParaMergedNodeListElement_::next, and BbParaMergedNodeListElement_::node.

◆ toString()

const std::string toString ( )
virtual

stringfy this object

Returns
string which shows inside of this object as string

Implements BbParaNodePool.

Definition at line 738 of file bbParaNodePool.h.

◆ updateDualBoundsForSavingNodes()

void updateDualBoundsForSavingNodes ( )
virtual

update dual bound values for saving BbParaNodes to checkpoint file

Implements BbParaNodePool.

Definition at line 512 of file bbParaNodePool.h.

Member Data Documentation

◆ ascendingPool

std::multimap<BbParaNodePtr, BbParaNodePtr, BbParaNodeSortCriterion > ascendingPool
private

asnding pool

Definition at line 254 of file bbParaNodePool.h.