class BbParaNodePoolForMinimization More...
#include <bbParaNodePool.h>
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... | |
| int | writeBbParaNodesToCheckpointFile (gzstream::ogzstream &out) |
| write 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... | |
| 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... | |
Private Attributes | |
| std::multimap< BbParaNodePtr, BbParaNodePtr, BbParaNodeSortCriterion > | ascendingPool |
| 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... | |
class BbParaNodePoolForMinimization
Definition at line 251 of file bbParaNodePool.h.
| BbParaNodePoolForMinimization | ( | double | inBgap | ) |
constructor
| inBgap | gap to evaluate a BbParaNode is good or not |
Definition at line 261 of file bbParaNodePool.h.
destructor
Definition at line 271 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
virtual |
extract a BbParaNode from this pool
Implements BbParaNodePool.
Definition at line 313 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool, BbParaNode::getMergeNodeInfo(), BbParaMergeNodeInfo_::mergedTo, BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE, BbParaMergeNodeInfo_::PARA_MERGED_RPRESENTATIVE, BbParaMergeNodeInfo_::PARA_MERGING, and BbParaMergeNodeInfo_::status.
Referenced by BbParaLoadCoordinator::warmStart().
|
virtual |
extract a BbParaNode object randomly from this pool
check nodes from the head of this pool
Implements BbParaNodePool.
Definition at line 403 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool, BbParaNode::getMergeNodeInfo(), BbParaMergeNodeInfo_::mergedTo, BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE, BbParaMergeNodeInfo_::PARA_MERGED_RPRESENTATIVE, BbParaMergeNodeInfo_::PARA_MERGING, BbParaMergeNodeInfo_::paraNode, BbParaMergeNodeInfo_::status, and THROW_LOGICAL_ERROR4.
|
virtual |
extract a BbParaNode object with the lowest priority from this pool
Implements BbParaNodePool.
Definition at line 359 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
virtual |
get best dual bound value of BbParaNode object in this pool
Implements BbParaNodePool.
Definition at line 554 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
| BbParaNodePtr getNextNode | ( | ) |
get a BbParaNode object, which is expected to extract from this pool
Definition at line 382 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
virtual |
get number of good (heavy) BbParaNodes in this pool
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();
| globalBestBound | global best bound value to evaluate goodness |
Implements BbParaNodePool.
Definition at line 573 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool, and BbParaNodePool::bgap.
|
virtual |
get number of BbParaNodes in this pool
Implements BbParaNodePool.
Definition at line 615 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
Referenced by BbParaLoadCoordinator::warmStart().
|
virtual |
insert a BbParaNode object to this pool
| paraNode | pointer to BbParaNode object to insert |
Implements BbParaNodePool.
Definition at line 288 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool, and BbParaNodePool::maxUsageOfPool.
Referenced by BbParaLoadCoordinator::warmStart().
|
virtual |
check if this pool is empty or not
Implements BbParaNodePool.
Definition at line 303 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
virtual |
remove bounded BbParaNodes by given incumbnet value
| incumbentValue | incumbent value |
Implements BbParaNodePool.
Definition at line 625 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool, and BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE.
|
virtual |
remove merged BbParaNodes from this pool
| head | head of Merged BbParaNodes list |
Implements BbParaNodePool.
Definition at line 678 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool, BbParaNode::getMergeNodeInfo(), BbParaMergedNodeListElement_::next, and BbParaMergedNodeListElement_::node.
|
virtual |
stringfy this object
Implements BbParaNodePool.
Definition at line 738 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
virtual |
update dual bound values for saving BbParaNodes to checkpoint file
Implements BbParaNodePool.
Definition at line 512 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
virtual |
write BbParaNodes to checkpoint file
| out | gzstream for output |
Implements BbParaNodePool.
Definition at line 531 of file bbParaNodePool.h.
References BbParaNodePoolForMinimization::ascendingPool.
|
private |
asnding pool
Definition at line 254 of file bbParaNodePool.h.
Referenced by BbParaNodePoolForMinimization::extractNode(), BbParaNodePoolForMinimization::extractNodeRandomly(), BbParaNodePoolForMinimization::extractWorstNode(), BbParaNodePoolForMinimization::getBestDualBoundValue(), BbParaNodePoolForMinimization::getNextNode(), BbParaNodePoolForMinimization::getNumOfGoodNodes(), BbParaNodePoolForMinimization::getNumOfNodes(), BbParaNodePoolForMinimization::insert(), BbParaNodePoolForMinimization::isEmpty(), BbParaNodePoolForMinimization::removeBoundedNodes(), BbParaNodePoolForMinimization::removeMergedNodes(), BbParaNodePoolForMinimization::toString(), BbParaNodePoolForMinimization::updateDualBoundsForSavingNodes(), BbParaNodePoolForMinimization::writeBbParaNodesToCheckpointFile(), and BbParaNodePoolForMinimization::~BbParaNodePoolForMinimization().