Scippy

UG

Ubiquity Generator framework

BbParaNodesMerger Class Reference

#include <bbParaNodesMerger.h>

Public Member Functions

 BbParaNodesMerger (int inVarIndexRange, int inNBoundChangesOfBestNode, ParaTimer *inParaTimer, BbParaInstance *inParaInstance, ParaParamSet *inParaParamSet)
 
 ~BbParaNodesMerger ()
 
void addNodeToMergeNodeStructs (BbParaNode *node)
 add a node to nodes merger More...
 
void generateMergeNodesCandidates (ParaComm *paraComm, ParaInitiator *paraInitiator)
 generate merge nodes candidates More...
 
void regenerateMergeNodesCandidates (BbParaNode *node, ParaComm *paraComm, ParaInitiator *paraInitiator)
 regenerate merge nodes candidates More...
 
void deleteMergeNodeInfo (BbParaMergeNodeInfo *mNode)
 delete merge node info More...
 
int mergeNodes (BbParaNode *node, BbParaNodePool *paraNodePool)
 make a merge node More...
 
double getAddingNodeToMergeStructTime ()
 getter of addingNodeToMergeStructTime More...
 
double getGenerateMergeNodesCandidatesTime ()
 getter of generateMergeNodesCandidatesTime More...
 
double getRegenerateMergeNodesCandidatesTime ()
 getter of regenerateMergeNodesCandidatesTime More...
 
double getMergeNodeTime ()
 getter of mergeNodeTime More...
 

Private Attributes

int varIndexRange
 variable index range More...
 
int nBoundChangesOfBestNode
 bound changes of the best node More...
 
ParaTimerparaTimer
 normal timer used More...
 
BbParaInstanceinstance
 pointer to ParaInstance object More...
 
ParaParamSetparaParamSet
 pointer to ParaParamSet object More...
 
BbParaFixedValue ** varIndexTable
 variable indices table. More...
 
BbParaMergeNodeInfomergeInfoHead
 head of BbParaMergeNodeInfo list More...
 
BbParaMergeNodeInfomergeInfoTail
 tail of BbParaMergeNodeInfo list times More...
 
double addingNodeToMergeStructTime
 accumulate time to add Node to merge struct More...
 
double generateMergeNodesCandidatesTime
 accumulate time to generate merge nodes candidates More...
 
double regenerateMergeNodesCandidatesTime
 accumulate time to regenerate merge nodes candidates More...
 
double mergeNodeTime
 accumulate time to make a merged node More...
 

Detailed Description

Definition at line 125 of file bbParaNodesMerger.h.

Constructor & Destructor Documentation

◆ BbParaNodesMerger()

BbParaNodesMerger ( int  inVarIndexRange,
int  inNBoundChangesOfBestNode,
ParaTimer inParaTimer,
BbParaInstance inParaInstance,
ParaParamSet inParaParamSet 
)

◆ ~BbParaNodesMerger()

Definition at line 174 of file bbParaNodesMerger.h.

Member Function Documentation

◆ addNodeToMergeNodeStructs()

◆ deleteMergeNodeInfo()

◆ generateMergeNodesCandidates()

void generateMergeNodesCandidates ( ParaComm paraComm,
ParaInitiator paraInitiator 
)

generate merge nodes candidates

Parameters
paraCommpointer to paraComm object
paraInitiatorpointer to ParaInitiatior object, this can be 0, if it is not

Definition at line 191 of file bbParaNodesMerger.cpp.

References BbParaDiffSubproblem::createDiffSubproblem(), BbParaNodesMerger::deleteMergeNodeInfo(), BbParaSortedVariable_::fixedVariable, BbParaMergeNodeInfo_::fixedVariables, UG::FixedVariablesRatioInMerging, BbParaNodesMerger::generateMergeNodesCandidatesTime, BbParaNode::getDiffSubproblem(), ParaTimer::getElapsedTime(), BbParaNode::getMergeNodeInfo(), ParaParamSet::getRealParamValue(), BbParaInstance::getVarIndexRange(), BbParaSortedVariable_::idxInFixedVariabes, BbParaNodesMerger::instance, BbParaMergeNodeInfo_::keyIndex, BbParaMergeNodeInfo_::mergedDiffSubproblem, BbParaMergeNodeInfo_::mergedTo, BbParaNodesMerger::mergeInfoHead, BbParaNodesMerger::mergeInfoTail, BbParaFixedVariable_::mnode, BbParaNodesMerger::nBoundChangesOfBestNode, BbParaFixedValue_::next, BbParaMergeNodeInfo_::next, BbParaFixedVariable_::next, BbParaMergeNodeInfo_::nFixedVariables, BbParaMergeNodeInfo_::nMergedNodes, BbParaFixedVariable_::nSameValue, BbParaMergeNodeInfo_::nSameValueVariables, BbParaMergeNodeInfo_::origDiffSubproblem, BbParaMergeNodeInfo_::PARA_MERGE_CHECKING_TO_OTHER_NODE, BbParaMergeNodeInfo_::PARA_MERGED_RPRESENTATIVE, BbParaMergeNodeInfo_::PARA_MERGING, paraInitiator, BbParaMergeNodeInfo_::paraNode, BbParaNodesMerger::paraParamSet, BbParaNodesMerger::paraTimer, BbParaNode::setDiffSubproblem(), BbParaNode::setMergeNodeInfo(), BbParaNode::setMergingStatus(), BbParaMergeNodeInfo_::status, and BbParaNodesMerger::varIndexTable.

Referenced by BbParaLoadCoordinator::processTagCompletionOfCalculation(), BbParaNodesMerger::regenerateMergeNodesCandidates(), and BbParaLoadCoordinator::warmStart().

◆ getAddingNodeToMergeStructTime()

double getAddingNodeToMergeStructTime ( )

getter of addingNodeToMergeStructTime

Returns
addingNodeToMergeStructTime

Definition at line 223 of file bbParaNodesMerger.h.

References BbParaNodesMerger::addingNodeToMergeStructTime.

Referenced by BbParaLoadCoordinator::writeLoadCoordinatorStatisticsToCheckpointFile().

◆ getGenerateMergeNodesCandidatesTime()

double getGenerateMergeNodesCandidatesTime ( )

getter of generateMergeNodesCandidatesTime

Returns
generateMergeNodesCandidatesTime

Definition at line 233 of file bbParaNodesMerger.h.

References BbParaNodesMerger::generateMergeNodesCandidatesTime.

Referenced by BbParaLoadCoordinator::writeLoadCoordinatorStatisticsToCheckpointFile().

◆ getMergeNodeTime()

double getMergeNodeTime ( )

getter of mergeNodeTime

Returns
mergeNodeTime

Definition at line 253 of file bbParaNodesMerger.h.

References BbParaNodesMerger::mergeNodeTime.

Referenced by BbParaLoadCoordinator::writeLoadCoordinatorStatisticsToCheckpointFile().

◆ getRegenerateMergeNodesCandidatesTime()

double getRegenerateMergeNodesCandidatesTime ( )

getter of regenerateMergeNodesCandidatesTime

Returns
regenerateMergeNodesCandidatesTime

Definition at line 243 of file bbParaNodesMerger.h.

References BbParaNodesMerger::regenerateMergeNodesCandidatesTime.

Referenced by BbParaLoadCoordinator::writeLoadCoordinatorStatisticsToCheckpointFile().

◆ mergeNodes()

◆ regenerateMergeNodesCandidates()

Member Data Documentation

◆ addingNodeToMergeStructTime

double addingNodeToMergeStructTime
private

accumulate time to add Node to merge struct

Definition at line 136 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::addNodeToMergeNodeStructs(), and BbParaNodesMerger::getAddingNodeToMergeStructTime().

◆ generateMergeNodesCandidatesTime

double generateMergeNodesCandidatesTime
private

accumulate time to generate merge nodes candidates

Definition at line 137 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::generateMergeNodesCandidates(), and BbParaNodesMerger::getGenerateMergeNodesCandidatesTime().

◆ instance

◆ mergeInfoHead

◆ mergeInfoTail

◆ mergeNodeTime

double mergeNodeTime
private

accumulate time to make a merged node

Definition at line 139 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::getMergeNodeTime(), and BbParaNodesMerger::mergeNodes().

◆ nBoundChangesOfBestNode

int nBoundChangesOfBestNode
private

bound changes of the best node

Definition at line 128 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::addNodeToMergeNodeStructs(), and BbParaNodesMerger::generateMergeNodesCandidates().

◆ paraParamSet

ParaParamSet* paraParamSet
private

pointer to ParaParamSet object

Definition at line 131 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::generateMergeNodesCandidates().

◆ paraTimer

◆ regenerateMergeNodesCandidatesTime

double regenerateMergeNodesCandidatesTime
private

accumulate time to regenerate merge nodes candidates

Definition at line 138 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::getRegenerateMergeNodesCandidatesTime(), and BbParaNodesMerger::regenerateMergeNodesCandidates().

◆ varIndexRange

int varIndexRange
private

variable index range

Definition at line 127 of file bbParaNodesMerger.h.

Referenced by BbParaNodesMerger::BbParaNodesMerger().

◆ varIndexTable