MultiAgentDecisionProcess
Release 0.2.1
|
MultiAgentDecisionProcess is an class that defines the primary properties of a decision process. More...
#include <MultiAgentDecisionProcess.h>
Public Member Functions | |
void | AddAgent (std::string name) |
Add a new agent with name "name" to the MADP. | |
size_t | GetNrAgents () const |
Returns the number of agents in this MultiAgentDecisionProcess. | |
std::string | GetProblemFile () const |
Returns the name of the problem file. | |
std::string | GetUnixName () const |
Returns a name which can be in unix path, by default the base part of the problem filename. | |
MultiAgentDecisionProcess (size_t nrAgents, std::string name="received unspec. by MultiAgentDecisionProcess", std::string description="received unspec. by MultiAgentDecisionProcess", std::string pf="received unspec. by MultiAgentDecisionProcess") | |
Constructor. | |
MultiAgentDecisionProcess (std::string name="received unspec. by MultiAgentDecisionProcess", std::string description="received unspec. by MultiAgentDecisionProcess", std::string pf="received unspec. by MultiAgentDecisionProcess") | |
Default Constructor without specifying the number of agents. | |
void | Print () const |
Prints the name and description (by default). | |
void | SetNrAgents (size_t nrAgents) |
Sets the number of agents. | |
void | SetUnixName (std::string unixName) |
Sets the name which can be used inin unix paths. | |
std::string | SoftPrint () const |
Prints some information on the MultiAgentDecisionProcess. | |
virtual | ~MultiAgentDecisionProcess () |
Destructor. | |
![]() | |
virtual MultiAgentDecisionProcessInterface * | Clone () const =0 |
Returns a copy of this class. | |
virtual | ~MultiAgentDecisionProcessInterface () |
Destructor. | |
![]() | |
std::string | GetDescription () const |
Get the description of the NamedDescribedEntity. | |
std::string | GetName () const |
Get the name of the NamedDescribedEntity. | |
NamedDescribedEntity (std::string name=std::string("undefined"), std::string description=std::string("undefined")) | |
(default) Constructor | |
NamedDescribedEntity (const NamedDescribedEntity &) | |
copy constructor. | |
void | PrintBrief () const |
Prints the name (by default). | |
void | SetDescription (std::string description) |
Set the description. | |
void | SetName (std::string name) |
Set the name. | |
virtual std::string | SoftPrintBrief () const |
Returns the name (if not reimplemented). | |
virtual | ~NamedDescribedEntity () |
Destructor. |
Protected Attributes | |
std::vector< Agent > | _m_agents |
Vector containing Agent objects, which are indexed named entities. | |
size_t | _m_nrAgents |
The number of agents participating in the MADP. | |
std::string | _m_problemFile |
String holding the filename of the problem file to be parsed - if applicable. | |
std::string | _m_unixName |
String for the unix name of the MADP. | |
![]() | |
std::string * | _m_description |
Pointer to the description. | |
std::string * | _m_name |
Pointer to the name. |
Private Member Functions | |
void | InitializeUnixName () |
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
Definition at line 51 of file MultiAgentDecisionProcess.h.
MultiAgentDecisionProcess::MultiAgentDecisionProcess | ( | size_t | nrAgents, |
std::string | name = "received unspec. by MultiAgentDecisionProcess" , |
||
std::string | description = "received unspec. by MultiAgentDecisionProcess" , |
||
std::string | pf = "received unspec. by MultiAgentDecisionProcess" |
||
) |
Constructor.
Definition at line 34 of file MultiAgentDecisionProcess.cpp.
References InitializeUnixName().
MultiAgentDecisionProcess::MultiAgentDecisionProcess | ( | std::string | name = "received unspec. by MultiAgentDecisionProcess" , |
std::string | description = "received unspec. by MultiAgentDecisionProcess" , |
||
std::string | pf = "received unspec. by MultiAgentDecisionProcess" |
||
) |
Default Constructor without specifying the number of agents.
Definition at line 43 of file MultiAgentDecisionProcess.cpp.
References InitializeUnixName().
|
virtual |
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!
Reimplemented in TransitionObservationIndependentMADPDiscrete.
Definition at line 79 of file MultiAgentDecisionProcess.cpp.
References _m_agents, and _m_nrAgents.
|
virtual |
Returns the number of agents in this MultiAgentDecisionProcess.
Implements MultiAgentDecisionProcessInterface.
Definition at line 66 of file MultiAgentDecisionProcess.cpp.
References _m_nrAgents.
Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), TransitionObservationIndependentMADPDiscrete::ConstructJointObservationsRecursively(), TransitionObservationIndependentMADPDiscrete::CreateISD(), TransitionObservationIndependentMADPDiscrete::CreateJointActions(), TransitionObservationIndependentMADPDiscrete::CreateJointObservations(), TransitionObservationIndependentMADPDiscrete::CreateJointStates(), TOIDecPOMDPDiscrete::CreateNewRewardModel(), TOIDecMDPDiscrete::CreateStateObservations(), DecPOMDPDiscrete::ExtractMADPDiscrete(), TransitionObservationIndependentMADPDiscrete::GetJointActionDiscrete(), TransitionObservationIndependentMADPDiscrete::GetJointObservation(), TransitionObservationIndependentMADPDiscrete::GetObservationProbability(), TOIFactoredRewardDecPOMDPDiscrete::GetReward(), TOICompactRewardDecPOMDPDiscrete::GetReward(), TransitionObservationIndependentMADPDiscrete::GetState(), TransitionObservationIndependentMADPDiscrete::GetTransitionProbability(), TransitionObservationIndependentMADPDiscrete::IndividualToJointObservationIndices(), TransitionObservationIndependentMADPDiscrete::JointToIndividualObservationIndicesNoCache(), ParserTOIDecPOMDPDiscrete::Parse(), ParserTOIDecPOMDPDiscrete::ParseAgent(), ParserTOIDecPOMDPDiscrete::ParseRewards(), POSGDiscrete::POSGDiscrete(), TransitionObservationIndependentMADPDiscrete::SampleInitialStates(), TransitionObservationIndependentMADPDiscrete::SampleJointObservation(), TransitionObservationIndependentMADPDiscrete::SampleSuccessorState(), TOIFactoredRewardDecPOMDPDiscrete::SetInitialized(), TOICompactRewardDecPOMDPDiscrete::SetInitialized(), TransitionObservationIndependentMADPDiscrete::SetInitialized(), TOIFactoredRewardDecPOMDPDiscrete::SoftPrint(), TOICompactRewardDecPOMDPDiscrete::SoftPrint(), POSGDiscrete::SoftPrint(), and TransitionObservationIndependentMADPDiscrete::SoftPrint().
string MultiAgentDecisionProcess::GetProblemFile | ( | ) | const |
Returns the name of the problem file.
Definition at line 85 of file MultiAgentDecisionProcess.cpp.
References _m_problemFile.
Referenced by TransitionObservationIndependentMADPDiscrete::AddAgent(), ParserTOIDecPOMDPDiscrete::ParseAgent(), ParserTOIDecPOMDPDiscrete::ParseBase(), ParserTOIDecPOMDPDiscrete::ParseRewards(), and TransitionObservationIndependentMADPDiscrete::SetNrAgents().
|
inlinevirtual |
Returns a name which can be in unix path, by default the base part of the problem filename.
Implements MultiAgentDecisionProcessInterface.
Definition at line 102 of file MultiAgentDecisionProcess.h.
References _m_unixName.
|
private |
Definition at line 52 of file MultiAgentDecisionProcess.cpp.
References _m_problemFile, and _m_unixName.
Referenced by MultiAgentDecisionProcess().
|
inline |
Prints the name and description (by default).
Reimplemented from NamedDescribedEntity.
Reimplemented in TransitionObservationIndependentMADPDiscrete, MultiAgentDecisionProcessDiscrete, and TOIDecPOMDPDiscrete.
Definition at line 109 of file MultiAgentDecisionProcess.h.
References SoftPrint().
void MultiAgentDecisionProcess::SetNrAgents | ( | size_t | nrAgents | ) |
Sets the number of agents.
this creates nrAgents unnamed agents.
Reimplemented in TransitionObservationIndependentMADPDiscrete.
Definition at line 71 of file MultiAgentDecisionProcess.cpp.
References _m_agents, and _m_nrAgents.
Referenced by DecPOMDPDiscrete::ExtractMADPDiscrete(), ProblemDecTiger::ProblemDecTiger(), and ProblemFireFighting::ProblemFireFighting().
|
inline |
Sets the name which can be used inin unix paths.
Definition at line 105 of file MultiAgentDecisionProcess.h.
References _m_unixName.
|
virtual |
Prints some information on the MultiAgentDecisionProcess.
Reimplemented from NamedDescribedEntity.
Reimplemented in TransitionObservationIndependentMADPDiscrete, MultiAgentDecisionProcessDiscrete, TOIDecPOMDPDiscrete, DecPOMDPDiscrete, POSGDiscrete, TOICompactRewardDecPOMDPDiscrete, and TOIFactoredRewardDecPOMDPDiscrete.
Definition at line 90 of file MultiAgentDecisionProcess.cpp.
References _m_nrAgents, _m_problemFile, NamedDescribedEntity::GetDescription(), and NamedDescribedEntity::GetName().
Referenced by Print().
|
protected |
Vector containing Agent objects, which are indexed named entities.
Definition at line 63 of file MultiAgentDecisionProcess.h.
Referenced by AddAgent(), and SetNrAgents().
|
protected |
The number of agents participating in the MADP.
Definition at line 61 of file MultiAgentDecisionProcess.h.
Referenced by AddAgent(), ProblemDecTiger::ConstructActions(), ProblemDecTiger::ConstructObservations(), TransitionObservationIndependentMADPDiscrete::CreateJointActionsRecursively(), GetNrAgents(), SetNrAgents(), SoftPrint(), and TransitionObservationIndependentMADPDiscrete::SoftPrintActionSets().
|
protected |
String holding the filename of the problem file to be parsed - if applicable.
Definition at line 67 of file MultiAgentDecisionProcess.h.
Referenced by GetProblemFile(), InitializeUnixName(), SoftPrint(), and ~MultiAgentDecisionProcess().
|
protected |
String for the unix name of the MADP.
Definition at line 69 of file MultiAgentDecisionProcess.h.
Referenced by GetUnixName(), InitializeUnixName(), and SetUnixName().