class BbParaNodeTh More...
#include <bbParaNodeTh.h>
Public Member Functions | |
BbParaNodeTh () | |
default constructor More... | |
BbParaNodeTh (TaskId inNodeId, TaskId inGeneratorNodeId, int inDepth, double inDualBoundValue, double inOriginalDualBoundValue, double inEstimatedValue, ParaDiffSubproblem *inDiffSubproblem) | |
constructor More... | |
~BbParaNodeTh () | |
destructor More... | |
BbParaNodeTh * | clone (ParaComm *comm) |
clone this BbParaNodeTh More... | |
int | bcast (ParaComm *comm, int root) |
broadcast this object More... | |
int | send (ParaComm *comm, int destination) |
send this object More... | |
int | receive (ParaComm *comm, int source) |
receive this object More... | |
int | sendNewSubtreeRoot (ParaComm *comm, int destination) |
send new subtree root node More... | |
int | sendSubtreeRootNodeId (ParaComm *comm, int destination, int tag) |
send subtree root to be removed More... | |
int | receiveNewSubtreeRoot (ParaComm *comm, int source) |
receive this object More... | |
int | receiveSubtreeRootNodeId (ParaComm *comm, int source, int tag) |
receive this object node Id More... | |
Public Member Functions inherited from BbParaNode | |
BbParaNode () | |
default constructor More... | |
BbParaNode (TaskId inNodeId, TaskId inGeneratorNodeId, int inDepth, double inDualBoundValue, double inOriginalDualBoundValue, double inEstimatedValue, ParaDiffSubproblem *inDiffSubproblem) | |
constructor More... | |
virtual | ~BbParaNode () |
destructor More... | |
int | getDepth () |
getter of depth More... | |
void | setDepth (int inDepth) |
setter of depth More... | |
double | getDualBoundValue () |
getter of dual bound value More... | |
double | getInitialDualBoundValue () |
getter of initial dual bound value More... | |
void | setDualBoundValue (double inDualBoundValue) |
setter of dual bound value More... | |
void | setInitialDualBoundValue (double inTrueDualBoundValue) |
setter of initial dual bound value More... | |
void | resetDualBoundValue () |
reset dual bound value More... | |
BbParaDiffSubproblem * | getDiffSubproblem () |
getter of diffSubproblem More... | |
void | setDiffSubproblem (BbParaDiffSubproblem *inDiffSubproblem) |
setter of diffSubproblem */ More... | |
ParaTaskGenealogicalPtr * | getAncestor () |
getter of ancestor More... | |
void | setAncestor (ParaTaskGenealogicalPtr *inAncestor) |
setter of ancestor More... | |
void | removeDescendant (TaskId removeNodeId) |
remove a descendant More... | |
bool | hasDescendant () |
check if this node has descendant or not More... | |
void | addDescendant (ParaTaskGenealogicalPtr *inDescendant) |
add a descendant More... | |
void | updateInitialDualBoundToSubtreeDualBound () |
update initial dual bound value by checking descendant dual bound values More... | |
double | getMinimumDualBoundInDesendants (double value) |
get minimum dual bound value in descendants More... | |
virtual BbParaNode * | clone (ParaComm *comm)=0 |
clone this BbParaNode More... | |
virtual int | bcast (ParaComm *comm, int root)=0 |
broadcast this object More... | |
virtual int | send (ParaComm *comm, int destination)=0 |
send this object More... | |
virtual int | receive (ParaComm *comm, int source)=0 |
receive this object More... | |
virtual int | sendNewSubtreeRoot (ParaComm *comm, int destination)=0 |
send new subtree root node More... | |
virtual int | sendSubtreeRootNodeId (ParaComm *comm, int destination, int tag)=0 |
send subtree root to be removed More... | |
virtual int | receiveNewSubtreeRoot (ParaComm *comm, int source)=0 |
receive this object More... | |
virtual int | receiveSubtreeRootNodeId (ParaComm *comm, int source, int tag)=0 |
receive this object node Id More... | |
void | write (gzstream::ogzstream &out) |
write to checkpoint file More... | |
bool | read (ParaComm *comm, gzstream::igzstream &in, bool onlyBoundChanges) |
read from checkpoint file More... | |
const std::string | toString () |
stringfy BbParaNode More... | |
const std::string | toSimpleString () |
stringfy BbParaNode as simple string More... | |
void | setMergeNodeInfo (BbParaMergeNodeInfo *mNode) |
set merge node information to this BbParaNode object More... | |
BbParaMergeNodeInfo * | getMergeNodeInfo () |
get merge node information struct More... | |
void | setMergingStatus (int status) |
set merging status More... | |
int | getMergingStatus () |
get merging status More... | |
bool | areNodesCollected () |
check if nodes are collected or not More... | |
void | collectsNodes () |
set all nodes are collected TODO: this function has to be investigated More... | |
bool | isSameNodeIdAs (const BbParaNode &inNode) |
check if this node's id is the same as that of argument ParaNode's task id More... | |
Public Member Functions inherited from ParaTask | |
ParaTask () | |
default constructor More... | |
ParaTask (const ParaTask ¶Task) | |
copy constructor More... | |
ParaTask (TaskId inTaskId, TaskId inGeneratorTaskId, double inEstimatedValue, ParaDiffSubproblem *inDiffSubproblem) | |
constructor More... | |
virtual | ~ParaTask () |
destructor More... | |
bool | isRootTask () |
check if root task or not More... | |
bool | isSameTaskIdAs (const ParaTask &inTask) |
check if this task id is the same as argument ParaTask's task id More... | |
bool | isSameParetntTaskIdAs (const ParaTask &inTask) |
check if this task's parent id is the same as that of argument ParaTask's task id More... | |
bool | isSameParetntTaskSubtaskIdAs (const TaskId &inTaskId) |
check if this task's parent subtree id is the same as that of argument ParaTask's task id More... | |
bool | isSameSubtaskIdAs (const ParaTask &inTask) |
check if this task's subtask id is the same as that of argument ParaTask's task id More... | |
bool | isSameLcIdAs (const ParaTask &inTask) |
check if this task's global subtask id in LC is the same as that of argument ParaTask's task id More... | |
bool | isSameLcIdAs (const int lcId) |
check if this task's global subtask LC id is the same as LC id of argument More... | |
bool | isSameGlobalSubtaskIdInLcAs (const ParaTask &inTask) |
check if this task's global subtask id in LC is the same as that of argument ParaTask's task id More... | |
bool | isSameGlobalSubtaskIdInLcAs (const int globalSubtaskIdInLc) |
check if this task's global subtask id in LC is the same as that of argument More... | |
int | getLcId () |
getter of LoadCoordinator id More... | |
int | getGlobalSubtaskIdInLc () |
getter of global subtask id in Solvers managed by LoadCoordinator More... | |
void | setGlobalSubtaskId (int lcId, int subtaskId) |
setter of global subtask id More... | |
int | getSolverId () |
getter of Solver id More... | |
void | setSolverId (int id) |
setter of Solver id More... | |
TaskId | getTaskId () |
getter of task id More... | |
void | setTaskId (TaskId inTaskId) |
setter of task id More... | |
TaskId | getGeneratorTaskId () |
getter of generator task id More... | |
void | setGeneratorTaskId (TaskId inGeneratorTaskId) |
setter of generator task id More... | |
double | getEstimatedValue () |
getter of estimated value More... | |
void | setEstimatedValue (double inEstimatedValue) |
setter of estimated value More... | |
ParaDiffSubproblem * | getDiffSubproblem () |
getter of diffSubproblem More... | |
void | setDiffSubproblem (ParaDiffSubproblem *inDiffSubproblem) |
setter of diffSubproblem */ More... | |
ParaTaskGenealogicalPtr * | getAncestor () |
getter of ancestor More... | |
void | setAncestor (ParaTaskGenealogicalPtr *inAncestor) |
setter of ancestor More... | |
void | removeDescendant (TaskId removeTaskId) |
remove a descendant More... | |
bool | hasDescendant () |
check if this task has descendant or not More... | |
void | addDescendant (ParaTaskGenealogicalPtr *inDescendant) |
add a descendant More... | |
virtual ParaTask * | clone (ParaComm *comm)=0 |
clone this ParaTask More... | |
virtual int | bcast (ParaComm *comm, int root)=0 |
broadcast this object More... | |
virtual int | send (ParaComm *comm, int destination)=0 |
send this object More... | |
virtual int | receive (ParaComm *comm, int source)=0 |
receive this object More... | |
virtual void | write (gzstream::ogzstream &out)=0 |
write to checkpoint file More... | |
virtual const std::string | toString () |
stringfy ParaTask More... | |
virtual const std::string | toSimpleString () |
stringfy ParaTask as simple string More... | |
Private Member Functions | |
BbParaNodeTh * | createDatatype (ParaComm *comm) |
create BbParaNode datatype More... | |
Additional Inherited Members | |
Public Attributes inherited from BbParaNode | |
BbParaNode * | next |
this pointer is used in case of self-split ramp-up in LC this field is not transferred More... | |
Public Attributes inherited from ParaTask | |
TaskId | taskId |
solving task information More... | |
TaskId | generatorTaskId |
subtree root task id of generator More... | |
ParaTaskGenealogicalPtr * | ancestor |
pointer to ancestor ParaTask : This field is not transferred More... | |
std::map< TaskId, ParaTaskGenealogicalPtrPtr > | descendants |
collection of pointers to descendants : This filed is not transferred More... | |
Protected Attributes inherited from BbParaNode | |
int | depth |
depth from the root node of original tree More... | |
double | dualBoundValue |
dual bound value More... | |
double | initialDualBoundValue |
dual bound value when this node is created This value is updated to precise one when there is guarantee More... | |
int | basisInfo |
indicate if basis information is including or not More... | |
int | mergingStatus |
merging status: -1 - no merging node, 0 - checking, 1 - merged (representative) 2 - merged to the other node 3 - cannot be merged 4 - merging representative was deleted More... | |
BbParaMergeNodeInfo * | mergeNodeInfo |
pointer to mergeNodeInfo. Not zero means merging More... | |
bool | nodesAreCollected |
subproblems generated from this nodes are collected at interruption. this field is not transferred More... | |
Protected Attributes inherited from ParaTask | |
double | estimatedValue |
estimate value More... | |
int | diffSubproblemInfo |
1: with diffSubproblem, 0: no diffSubproblem More... | |
ParaDiffSubproblem * | diffSubproblem |
difference between solving instance data and subproblem data More... | |
class BbParaNodeTh
Definition at line 51 of file bbParaNodeTh.h.
BbParaNodeTh | ( | ) |
default constructor
Definition at line 66 of file bbParaNodeTh.h.
Referenced by BbParaNodeTh::clone().
BbParaNodeTh | ( | TaskId | inNodeId, |
TaskId | inGeneratorNodeId, | ||
int | inDepth, | ||
double | inDualBoundValue, | ||
double | inOriginalDualBoundValue, | ||
double | inEstimatedValue, | ||
ParaDiffSubproblem * | inDiffSubproblem | ||
) |
constructor
inNodeId | node id |
inGeneratorNodeId | generator node id |
inDepth | depth in global search tree |
inDualBoundValue | dual bound value |
inOriginalDualBoundValue | original dual bound value when the node is generated |
inEstimatedValue | estimated value |
inDiffSubproblem | pointer to ParaDiffSubproblem object |
Definition at line 74 of file bbParaNodeTh.h.
~BbParaNodeTh | ( | ) |
destructor
Definition at line 90 of file bbParaNodeTh.h.
|
virtual |
broadcast this object
comm | communicator used |
root | root rank of broadcast |
Implements BbParaNode.
Definition at line 50 of file bbParaNodeTh.cpp.
References BbParaNode::basisInfo, ParaDiffSubproblem::clone(), comm, BbParaNodeTh::createDatatype(), DEF_PARA_COMM, BbParaNode::depth, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, BbParaNode::dualBoundValue, ParaTask::estimatedValue, ParaTask::generatorTaskId, BbParaNode::initialDualBoundValue, BbParaNode::mergeNodeInfo, BbParaNode::mergingStatus, PARA_COMM_CALL, UG::ParaTaskType, UG::TagTask, and ParaTask::taskId.
|
virtual |
clone this BbParaNodeTh
comm | communicator used |
Implements BbParaNode.
Definition at line 99 of file bbParaNodeTh.h.
References BbParaNodeTh::BbParaNodeTh(), ParaDiffSubproblem::clone(), comm, BbParaNode::depth, ParaTask::diffSubproblem, BbParaNode::dualBoundValue, ParaTask::generatorTaskId, BbParaNode::initialDualBoundValue, and ParaTask::taskId.
Referenced by BbParaNodeTh::createDatatype().
|
private |
create BbParaNode datatype
comm | communicator used |
Definition at line 42 of file bbParaNodeTh.cpp.
References BbParaNodeTh::clone(), and comm.
Referenced by BbParaNodeTh::bcast(), BbParaNodeTh::send(), BbParaNodeTh::sendNewSubtreeRoot(), and BbParaNodeTh::sendSubtreeRootNodeId().
|
virtual |
receive this object
comm | communicator used |
source | source rank |
Implements BbParaNode.
Definition at line 178 of file bbParaNodeTh.cpp.
References BbParaNode::basisInfo, ParaDiffSubproblem::clone(), comm, DEF_PARA_COMM, BbParaNode::depth, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, BbParaNode::dualBoundValue, ParaTask::estimatedValue, ParaTask::generatorTaskId, BbParaNode::initialDualBoundValue, BbParaNode::mergingStatus, PARA_COMM_CALL, UG::ParaTaskType, UG::TagTask, and ParaTask::taskId.
|
virtual |
receive this object
comm | communicator used |
source | source rank |
Implements BbParaNode.
Definition at line 208 of file bbParaNodeTh.cpp.
References BbParaNode::basisInfo, ParaDiffSubproblem::clone(), comm, DEF_PARA_COMM, BbParaNode::depth, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, BbParaNode::dualBoundValue, ParaTask::estimatedValue, ParaTask::generatorTaskId, BbParaNode::initialDualBoundValue, BbParaNode::mergingStatus, PARA_COMM_CALL, UG::ParaTaskType, UG::TagNewSubtreeRootNode, and ParaTask::taskId.
|
virtual |
receive this object node Id
comm | communicator used |
source | source rank |
tag | tag of message |
Implements BbParaNode.
Definition at line 238 of file bbParaNodeTh.cpp.
References comm, DEF_PARA_COMM, ParaTask::generatorTaskId, PARA_COMM_CALL, UG::ParaTaskType, and ParaTask::taskId.
|
virtual |
send this object
comm | communicator used |
destination | destination rank |
Implements BbParaNode.
Definition at line 98 of file bbParaNodeTh.cpp.
References comm, BbParaNodeTh::createDatatype(), DEF_PARA_COMM, BbParaNode::mergeNodeInfo, PARA_COMM_CALL, UG::ParaTaskType, and UG::TagTask.
|
virtual |
send new subtree root node
comm | communicator used |
destination | destination rank |
Implements BbParaNode.
Definition at line 117 of file bbParaNodeTh.cpp.
References comm, BbParaNodeTh::createDatatype(), DEF_PARA_COMM, ParaTask::isRootTask(), BbParaNode::mergeNodeInfo, PARA_COMM_CALL, UG::ParaTaskType, and UG::TagNewSubtreeRootNode.
|
virtual |
send subtree root to be removed
comm | communicator used |
destination | destination rank |
tag | tag of message |
Implements BbParaNode.
Definition at line 138 of file bbParaNodeTh.cpp.
References comm, BbParaNodeTh::createDatatype(), DEF_PARA_COMM, BbParaNode::mergeNodeInfo, PARA_COMM_CALL, and UG::ParaTaskType.