MultiAgentDecisionProcess
BGIP_BnB_Node Class Reference

BGIP_BnB_Node represents a node in the search tree of BGIP_SolverBranchAndBound. More...

#include <BGIP_BnB_Node.h>

Public Member Functions

 BGIP_BnB_Node (size_t nrAgents)
 
 BGIP_BnB_Node (const BGIP_BnB_Node &n)
 
void ClearAlreadyExpanded ()
 
Index GetAction (Index agentI) const
 
size_t GetDepth () const
 the depth of a node is the number of joint types specified i.e., a node with depth d specifies the joint type with jt_oI = d - 1; More...
 
double GetF () const
 
double GetG () const
 
double GetH () const
 
void GetImpliedJPol (BayesianGameIdenticalPayoffInterface *bgip, const std::vector< Index > &jtIndexMapping, std::vector< std::vector< Index > > &impliedJPol) const
 
void GetImpliedJPol (std::vector< std::vector< Index > > &impliedJPol) const
 
BGIP_BnB_NodePtr GetParent () const
 
Index GetSpecifiedAction (Index agI, Index depth_tI) const
 
bool IsFullySpecifiedPolicy (Index maxDepth) const
 
void SetAction (const std::vector< Index > &ja)
 
void SetAction (Index agentI, Index action)
 
void SetAlreadyExpanded (Index ja)
 
void SetDepth (Index nr)
 
void SetH (double h)
 
void SetParent (const BGIP_BnB_NodePtr &parent)
 
std::string SoftPrint () const
 
std::string SoftPrint (const std::vector< Index > &jtIndexMapping) const
 
std::string SoftPrintPartiallySpecifiedPolicy (BayesianGameIdenticalPayoffInterface *bgip, const std::vector< Index > &jtIndexMapping) const
 
void UpdateG (double dG)
 
void UpdateH (double dH)
 
 ~BGIP_BnB_Node ()
 

Static Public Member Functions

static Index GetOrderIndexForDepth (Index depth)
 

Private Member Functions

void UpdateF ()
 

Private Attributes

Index _m_depth
 _m_depth is equal to the number of joint types for which a joint action is specified More...
 
double _m_g
 The sum of the values for the joint types already specified. More...
 
double _m_h
 The sum of the heuristic values for joint types not yet specified. More...
 
BGIP_BnB_NodePtr _m_parent
 The parent of this node in the search tree. More...
 
std::vector< Index_m_specifiedActions
 _m_specifiedActions[agentI] contains the index of the individual action this node specifies for agentI (for the typeI implied by the joint type of this node) More...
 

Detailed Description

BGIP_BnB_Node represents a node in the search tree of BGIP_SolverBranchAndBound.

Constructor & Destructor Documentation

BGIP_BnB_Node::BGIP_BnB_Node ( size_t  nrAgents)
BGIP_BnB_Node::BGIP_BnB_Node ( const BGIP_BnB_Node n)
BGIP_BnB_Node::~BGIP_BnB_Node ( )

Member Function Documentation

void BGIP_BnB_Node::ClearAlreadyExpanded ( )
Index BGIP_BnB_Node::GetAction ( Index  agentI) const
inline
size_t BGIP_BnB_Node::GetDepth ( ) const
inline

the depth of a node is the number of joint types specified i.e., a node with depth d specifies the joint type with jt_oI = d - 1;

Referenced by GetImpliedJPol(), and GetSpecifiedAction().

double BGIP_BnB_Node::GetF ( ) const
inline
double BGIP_BnB_Node::GetG ( ) const
inline
double BGIP_BnB_Node::GetH ( ) const
inline
void BGIP_BnB_Node::GetImpliedJPol ( BayesianGameIdenticalPayoffInterface bgip,
const std::vector< Index > &  jtIndexMapping,
std::vector< std::vector< Index > > &  impliedJPol 
) const
void BGIP_BnB_Node::GetImpliedJPol ( std::vector< std::vector< Index > > &  impliedJPol) const
static Index BGIP_BnB_Node::GetOrderIndexForDepth ( Index  depth)
inlinestatic

Referenced by GetImpliedJPol().

BGIP_BnB_NodePtr BGIP_BnB_Node::GetParent ( ) const
inline
Index BGIP_BnB_Node::GetSpecifiedAction ( Index  agI,
Index  depth_tI 
) const
inline

References GetDepth().

bool BGIP_BnB_Node::IsFullySpecifiedPolicy ( Index  maxDepth) const
void BGIP_BnB_Node::SetAction ( const std::vector< Index > &  ja)
inline
void BGIP_BnB_Node::SetAction ( Index  agentI,
Index  action 
)
inline
void BGIP_BnB_Node::SetAlreadyExpanded ( Index  ja)
void BGIP_BnB_Node::SetDepth ( Index  nr)
inline
void BGIP_BnB_Node::SetH ( double  h)

References _m_h, and UpdateF().

void BGIP_BnB_Node::SetParent ( const BGIP_BnB_NodePtr parent)
inline
string BGIP_BnB_Node::SoftPrint ( void  ) const

References _m_depth, _m_g, _m_h, and GetF().

string BGIP_BnB_Node::SoftPrint ( const std::vector< Index > &  jtIndexMapping) const
string BGIP_BnB_Node::SoftPrintPartiallySpecifiedPolicy ( BayesianGameIdenticalPayoffInterface bgip,
const std::vector< Index > &  jtIndexMapping 
) const
void BGIP_BnB_Node::UpdateF ( )
private

References _m_g, and _m_h.

Referenced by SetH(), UpdateG(), and UpdateH().

void BGIP_BnB_Node::UpdateG ( double  dG)

References _m_g, _m_parent, and UpdateF().

void BGIP_BnB_Node::UpdateH ( double  dH)

References _m_h, _m_parent, and UpdateF().

Member Data Documentation

Index BGIP_BnB_Node::_m_depth
private

_m_depth is equal to the number of joint types for which a joint action is specified

Referenced by IsFullySpecifiedPolicy(), SoftPrint(), and SoftPrintPartiallySpecifiedPolicy().

double BGIP_BnB_Node::_m_g
private

The sum of the values for the joint types already specified.

Referenced by SoftPrint(), UpdateF(), and UpdateG().

double BGIP_BnB_Node::_m_h
private

The sum of the heuristic values for joint types not yet specified.

Referenced by SetH(), SoftPrint(), UpdateF(), and UpdateH().

BGIP_BnB_NodePtr BGIP_BnB_Node::_m_parent
private

The parent of this node in the search tree.

Referenced by GetImpliedJPol(), UpdateG(), and UpdateH().

std::vector< Index > BGIP_BnB_Node::_m_specifiedActions
private

_m_specifiedActions[agentI] contains the index of the individual action this node specifies for agentI (for the typeI implied by the joint type of this node)

Referenced by GetImpliedJPol().