MultiAgentDecisionProcess
MultiAgentDecisionProcess Class Reference

MultiAgentDecisionProcess is an class that defines the primary properties of a decision process. More...

#include <MultiAgentDecisionProcess.h>

Inheritance diagram for MultiAgentDecisionProcess:
[legend]

Public Member Functions

void AddAgent (std::string name)
 Add a new agent with name "name" to the MADP. More...
 
Index GetAgentIndexByName (const std::string &s) const
 Returns the index of an agent given its name, if it exists. More...
 
std::string GetAgentNameByIndex (Index i) const
 Returns the name of the agent at the given index. More...
 
const ScopeGetAllAgentScope () const
 
std::string GetDescription () const
 
std::string GetName () const
 
size_t GetNrAgents () const
 Returns the number of agents in this MultiAgentDecisionProcess. More...
 
std::string GetProblemFile () const
 Returns the name of the problem file. More...
 
std::string GetUnixName () const
 Returns a name which can be in unix path, by default the base part of the problem filename. More...
 
 MultiAgentDecisionProcess (size_t nrAgents, const std::string &name="received unspec. by MultiAgentDecisionProcess", const std::string &description="received unspec. by MultiAgentDecisionProcess", const std::string &pf="received unspec. by MultiAgentDecisionProcess")
 Constructor. More...
 
 MultiAgentDecisionProcess (const std::string &name="received unspec. by MultiAgentDecisionProcess", const std::string &description="received unspec. by MultiAgentDecisionProcess", const std::string &pf="received unspec. by MultiAgentDecisionProcess")
 Default Constructor without specifying the number of agents. More...
 
void Print () const
 
void SetDescription (const std::string &description)
 
void SetName (const std::string &name)
 
void SetNrAgents (size_t nrAgents)
 Sets the number of agents. More...
 
void SetUnixName (std::string unixName)
 Sets the name which can be used inin unix paths. More...
 
std::string SoftPrint () const
 Prints some information on the MultiAgentDecisionProcess. More...
 
virtual ~MultiAgentDecisionProcess ()
 Destructor. More...
 
- Public Member Functions inherited from MultiAgentDecisionProcessInterface
virtual
MultiAgentDecisionProcessInterface
Clone () const =0
 Returns a copy of this class. More...
 
virtual ~MultiAgentDecisionProcessInterface ()
 Destructor. More...
 

Protected Attributes

std::vector< Agent_m_agents
 Vector containing Agent objects, which are indexed named entities. More...
 
Scope _m_allAgentsScope
 Scope containing all agents - usefull sometimes. More...
 
size_t _m_nrAgents
 The number of agents participating in the MADP. More...
 
std::string _m_problemFile
 String holding the filename of the problem file to be parsed - if applicable. More...
 
std::string _m_unixName
 String for the unix name of the MADP. More...
 

Private Member Functions

void InitializeUnixName ()
 

Private Attributes

NamedDescribedEntity _m_name
 

Detailed Description

MultiAgentDecisionProcess is an class that defines the primary properties of a decision process.

These primary properties are: -the number of agents -possibly, a vector of (named) agents -the filename to be parsed, if applicable.

It is the only current implementation of MultiAgentDecisionProcessInterface

Constructor & Destructor Documentation

MultiAgentDecisionProcess::MultiAgentDecisionProcess ( size_t  nrAgents,
const std::string &  name = "received unspec. by MultiAgentDecisionProcess",
const std::string &  description = "received unspec. by MultiAgentDecisionProcess",
const std::string &  pf = "received unspec. by MultiAgentDecisionProcess" 
)

Constructor.

References _m_allAgentsScope, InitializeUnixName(), and Scope::Insert().

MultiAgentDecisionProcess::MultiAgentDecisionProcess ( const std::string &  name = "received unspec. by MultiAgentDecisionProcess",
const std::string &  description = "received unspec. by MultiAgentDecisionProcess",
const std::string &  pf = "received unspec. by MultiAgentDecisionProcess" 
)

Default Constructor without specifying the number of agents.

References InitializeUnixName().

MultiAgentDecisionProcess::~MultiAgentDecisionProcess ( )
virtual

Destructor.

References _m_problemFile.

Member Function Documentation

void MultiAgentDecisionProcess::AddAgent ( std::string  name)

Add a new agent with name "name" to the MADP.

NOTE: This increments the number of agents as well!

References _m_agents, _m_allAgentsScope, _m_nrAgents, and Scope::Insert().

Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), and DPOMDPFormatParsing::ParserDPOMDPFormat_Spirit::AddAgents::operator()().

Index MultiAgentDecisionProcess::GetAgentIndexByName ( const std::string &  s) const

Returns the index of an agent given its name, if it exists.

References _m_agents.

string MultiAgentDecisionProcess::GetAgentNameByIndex ( Index  i) const

Returns the name of the agent at the given index.

References _m_agents.

Referenced by FactoredDecPOMDPDiscrete::ExportSpuddFile().

const Scope& MultiAgentDecisionProcess::GetAllAgentScope ( ) const
inlinevirtual
std::string MultiAgentDecisionProcess::GetDescription ( ) const
inline
std::string MultiAgentDecisionProcess::GetName ( ) const
inline
size_t MultiAgentDecisionProcess::GetNrAgents ( ) const
virtual

Returns the number of agents in this MultiAgentDecisionProcess.

Implements MultiAgentDecisionProcessInterface.

References _m_nrAgents.

Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), ProblemFireFightingGraph::ConstructActions(), ProblemFOBSFireFightingGraph::ConstructActions(), TransitionObservationIndependentMADPDiscrete::ConstructJointObservationsRecursively(), TransitionObservationIndependentMADPDiscrete::CreateCentralizedObservationTransitionModel(), TransitionObservationIndependentMADPDiscrete::CreateCentralizedSparseTransitionModel(), TransitionObservationIndependentMADPDiscrete::CreateISD(), TransitionObservationIndependentMADPDiscrete::CreateJointActions(), TransitionObservationIndependentMADPDiscrete::CreateJointObservations(), TransitionObservationIndependentMADPDiscrete::CreateJointStates(), MultiAgentDecisionProcessDiscreteFactoredStates::CreateNewObservationModel(), TOIDecPOMDPDiscrete::CreateNewRewardModel(), TOIDecMDPDiscrete::CreateStateObservations(), FactoredDecPOMDPDiscrete::ExportSpuddFile(), DecPOMDPDiscrete::ExtractMADPDiscrete(), TransitionObservationIndependentMADPDiscrete::GetInitialStateProbability(), TransitionObservationIndependentMADPDiscrete::GetJointActionDiscrete(), TransitionObservationIndependentMADPDiscrete::GetJointObservation(), TransitionObservationIndependentMADPDiscrete::GetObservationProbability(), TOIFactoredRewardDecPOMDPDiscrete::GetReward(), TOICompactRewardDecPOMDPDiscrete::GetReward(), TransitionObservationIndependentMADPDiscrete::GetState(), TransitionObservationIndependentMADPDiscrete::GetTransitionProbability(), MultiAgentDecisionProcessDiscreteFactoredStates::Initialize2DBN(), TransitionObservationIndependentMADPDiscrete::JointToIndividualObservationIndicesNoCache(), MultiAgentDecisionProcessDiscreteFactoredStates::MarginalizeTransitionObservationModel(), ParserTOIDecPOMDPDiscrete::Parse(), ParserTOIDecPOMDPDiscrete::ParseRewards(), POSGDiscrete::POSGDiscrete(), MultiAgentDecisionProcessDiscreteFactoredStates::RemoveStateFactor(), TransitionObservationIndependentMADPDiscrete::SampleInitialStates(), TransitionObservationIndependentMADPDiscrete::SampleJointObservation(), TransitionObservationIndependentMADPDiscrete::SampleSuccessorState(), TOIFactoredRewardDecPOMDPDiscrete::SetInitialized(), TOICompactRewardDecPOMDPDiscrete::SetInitialized(), TransitionObservationIndependentMADPDiscrete::SetInitialized(), ProblemFireFightingGraph::SetYScopes(), ProblemFOBSFireFightingGraph::SetYScopes(), ProblemFOBSFireFightingFactored::SetYScopes(), ProblemFireFightingFactored::SetYScopes(), TOIFactoredRewardDecPOMDPDiscrete::SoftPrint(), TOICompactRewardDecPOMDPDiscrete::SoftPrint(), POSGDiscrete::SoftPrint(), TransitionObservationIndependentMADPDiscrete::SoftPrint(), and ProblemAloha::SoftPrintBriefDescription().

std::string MultiAgentDecisionProcess::GetUnixName ( ) const
inlinevirtual

Returns a name which can be in unix path, by default the base part of the problem filename.

Implements MultiAgentDecisionProcessInterface.

void MultiAgentDecisionProcess::InitializeUnixName ( )
private

References _m_problemFile, and _m_unixName.

Referenced by MultiAgentDecisionProcess().

void MultiAgentDecisionProcess::Print ( ) const
inline

References SoftPrint().

void MultiAgentDecisionProcess::SetUnixName ( std::string  unixName)
inline

Member Data Documentation

std::vector<Agent> MultiAgentDecisionProcess::_m_agents
protected

Vector containing Agent objects, which are indexed named entities.

Referenced by AddAgent(), GetAgentIndexByName(), GetAgentNameByIndex(), and SetNrAgents().

Scope MultiAgentDecisionProcess::_m_allAgentsScope
protected

Scope containing all agents - usefull sometimes.

Referenced by AddAgent(), GetAllAgentScope(), MultiAgentDecisionProcess(), and SetNrAgents().

NamedDescribedEntity MultiAgentDecisionProcess::_m_name
private

Referenced by SoftPrint().

std::string MultiAgentDecisionProcess::_m_problemFile
protected

String holding the filename of the problem file to be parsed - if applicable.

Referenced by GetProblemFile(), InitializeUnixName(), SoftPrint(), and ~MultiAgentDecisionProcess().

std::string MultiAgentDecisionProcess::_m_unixName
protected

String for the unix name of the MADP.

Referenced by InitializeUnixName(), and SoftPrint().