MultiAgentDecisionProcess
|
JointObservationHistory represents a joint observation history. More...
#include <JointObservationHistory.h>
Public Member Functions | |
virtual JointObservationHistory * | Clone () const |
Returns a pointer to a copy of this class. More... | |
const std::vector< Index > & | GetIndividualObservationHistoryIndices () const |
Returns the indices of the indiv. observation histories. More... | |
Index | GetJointObservationIndex () const |
Returns the index of the last received joint observation. More... | |
JointObservationHistory (PlanningUnitMADPDiscrete &pu) | |
Constructor - creates a new initial (=empty) JointObservationHistory. More... | |
JointObservationHistory (Index jObsI, JointObservationHistory *pred) | |
Creates a observation history specifying jObsI for the last joint observation and pred as the preceeding JointObservationHistory. More... | |
JointObservationHistory (const JointObservationHistory &a) | |
Copy constructor. More... | |
void | Print () const |
Prints the joint observation history. More... | |
std::string | SoftPrint () const |
SoftPrints the joint observation history. More... | |
~JointObservationHistory () | |
Destructor. More... | |
Public Member Functions inherited from JointHistory | |
JointHistory () | |
(default) Constructor More... | |
virtual | ~JointHistory () |
Destructor. More... | |
Public Member Functions inherited from History | |
size_t | GetLength () const |
Returns the length of the history, i.e., the number of time steps. More... | |
History () | |
(default) Constructor More... | |
void | SetLength (size_t length) |
Set the length of the history, i.e., the number of time steps. More... | |
virtual | ~History () |
Destructor. More... | |
Private Attributes | |
bool | _m_containsEmptyJOI |
True if the last joint observation (index) is empty (i.e., there is no last joint observation.) This is particularly true for a observation history at time step t=0 in a MADP that does not issue an initial observation. More... | |
std::vector< Index > | _m_individualObservationHistories |
A vector of ints which are the indices of individual ObservationHistories this gives an alternate description of the current JointObservation History. More... | |
Index | _m_jointObservationI |
The last joint observation (index). More... | |
PlanningUnitMADPDiscrete * | _m_planningUnitMADPDiscrete |
ref to the pu More... | |
JointObservationHistory * | _m_pred |
The predecessor joint belief. More... | |
Additional Inherited Members | |
Protected Attributes inherited from History | |
size_t | _m_length |
How long (how many time-steps) is this history? More... | |
JointObservationHistory represents a joint observation history.
This consists of a joint observation history index, the last joint observation (index) a pointer to the predecessor JOH. and a vector of indexes to the individual observation histories.
JointObservationHistory::JointObservationHistory | ( | PlanningUnitMADPDiscrete & | pu | ) |
Constructor - creates a new initial (=empty) JointObservationHistory.
This method relies on the fact that the empty individual observation histories are indexed 0.
References _m_containsEmptyJOI, _m_individualObservationHistories, _m_jointObservationI, _m_pred, PlanningUnitMADPDiscrete::GetNrAgents(), and History::SetLength().
Referenced by Clone().
JointObservationHistory::JointObservationHistory | ( | Index | jObsI, |
JointObservationHistory * | pred | ||
) |
Creates a observation history specifying jObsI for the last joint observation and pred as the preceeding JointObservationHistory.
References _m_containsEmptyJOI, _m_individualObservationHistories, _m_jointObservationI, _m_planningUnitMADPDiscrete, _m_pred, Globals::CastLIndexToIndex(), History::GetLength(), ObservationHistoryTree::GetSuccessor(), and History::SetLength().
JointObservationHistory::JointObservationHistory | ( | const JointObservationHistory & | a | ) |
JointObservationHistory::~JointObservationHistory | ( | ) |
Destructor.
References _m_individualObservationHistories, DEBUG_JOH, and Print().
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements History.
References JointObservationHistory().
const vector< Index > & JointObservationHistory::GetIndividualObservationHistoryIndices | ( | ) | const |
Returns the indices of the indiv. observation histories.
References _m_individualObservationHistories.
|
inline |
Returns the index of the last received joint observation.
|
inlinevirtual |
Prints the joint observation history.
Implements History.
References SoftPrint().
Referenced by PlanningUnitMADPDiscrete::InitializeJointObservationHistories(), JointObservationHistory(), and ~JointObservationHistory().
string JointObservationHistory::SoftPrint | ( | ) | const |
SoftPrints the joint observation history.
References _m_containsEmptyJOI, _m_jointObservationI, History::_m_length, _m_planningUnitMADPDiscrete, _m_pred, PlanningUnitMADPDiscrete::GetJointObservation(), SoftPrint(), and JointObservation::SoftPrintBrief().
Referenced by Print(), and SoftPrint().
|
private |
True if the last joint observation (index) is empty (i.e., there is no last joint observation.) This is particularly true for a observation history at time step t=0 in a MADP that does not issue an initial observation.
(this behavior is defined in MADPComponentDiscreteObservations)
Referenced by JointObservationHistory(), and SoftPrint().
|
private |
A vector of ints which are the indices of individual ObservationHistories this gives an alternate description of the current JointObservation History.
Referenced by GetIndividualObservationHistoryIndices(), JointObservationHistory(), and ~JointObservationHistory().
|
private |
The last joint observation (index).
Referenced by JointObservationHistory(), and SoftPrint().
|
private |
ref to the pu
Referenced by JointObservationHistory(), and SoftPrint().
|
private |
The predecessor joint belief.
Together with the last joint observation(_m_jointObservationI) this gives a full description of this joint observation history.
Referenced by JointObservationHistory(), and SoftPrint().