MultiAgentDecisionProcess  Release 0.2.1
SimulationDecPOMDPDiscrete Class Reference

SimulationDecPOMDPDiscrete simulates policies in DecPOMDPDiscrete's. More...

#include <SimulationDecPOMDPDiscrete.h>

+ Inheritance diagram for SimulationDecPOMDPDiscrete:
+ Collaboration diagram for SimulationDecPOMDPDiscrete:

Public Member Functions

SimulationResult RunSimulations (const JointPolicyDiscrete *jp) const
 Run simulations using a particular discrete joint policy.
template<class A >
SimulationResult RunSimulations (const std::vector< A * > &agents) const
 Run simulations using a vector of SimulationAgent.
void SaveIntermediateResults (std::string filename)
 Indicate that intermediate should be stored to file named filename.
 SimulationDecPOMDPDiscrete (const PlanningUnitDecPOMDPDiscrete &pu, int nrRuns, int seed=illegalRandomSeed)
 Constructor specifying the number of runs and the random seed.
 SimulationDecPOMDPDiscrete (const PlanningUnitDecPOMDPDiscrete &pu, const ArgumentHandlers::Arguments &args)
 Constructor which parses the command-line arguments.
 ~SimulationDecPOMDPDiscrete ()
 Destructor.
- Public Member Functions inherited from Simulation
int GetNrRuns () const
int GetRandomSeed () const
bool GetVerbose () const
void SetRandomSeed (int s)
void SetVerbose (bool verbose)
 Simulation (int nrRuns, int seed=illegalRandomSeed)
 Constructor that specifies the number of runs and the random seed.
virtual ~Simulation ()
 Destructor.

Protected Attributes

size_t _m_horizon

Private Member Functions

Index GetAction (const std::vector< AgentLocalObservations * > &agents, Index i, Index jaI, Index joI, double r, Index prevJoI, Index sI) const
Index GetAction (const std::vector< AgentSharedObservations * > &agents, Index i, Index jaI, Index joI, double r, Index prevJoI, Index sI) const
Index GetAction (const std::vector< AgentDelayedSharedObservations * > &agents, Index i, Index jaI, Index joI, double r, Index prevJoI, Index sI) const
Index GetAction (const std::vector< AgentFullyObservable * > &agents, Index i, Index jaI, Index joI, double r, Index prevJoI, Index sI) const
void Initialize ()
double RunSimulation (const JointPolicyDiscrete *jp) const
 Simulate a run of a discrete joint policy.
void Step (Index jaI, unsigned int t, Index &sI, Index &joI, double &r, double &sumR) const
 Perform one step of the simulation.

Private Attributes

std::string _m_intermediateResultsFilename
const
PlanningUnitDecPOMDPDiscrete
_m_pu
 Pointer to the planning unit that generated the policy.
bool _m_saveIntermediateResults

Additional Inherited Members

- Static Protected Attributes inherited from Simulation
static const int illegalRandomSeed = INT_MAX

Detailed Description

SimulationDecPOMDPDiscrete simulates policies in DecPOMDPDiscrete's.

Definition at line 50 of file SimulationDecPOMDPDiscrete.h.

Constructor & Destructor Documentation

SimulationDecPOMDPDiscrete::SimulationDecPOMDPDiscrete ( const PlanningUnitDecPOMDPDiscrete pu,
int  nrRuns,
int  seed = illegalRandomSeed 
)

Constructor specifying the number of runs and the random seed.

Definition at line 42 of file SimulationDecPOMDPDiscrete.cpp.

References Initialize().

SimulationDecPOMDPDiscrete::SimulationDecPOMDPDiscrete ( const PlanningUnitDecPOMDPDiscrete pu,
const ArgumentHandlers::Arguments args 
)

Constructor which parses the command-line arguments.

Definition at line 52 of file SimulationDecPOMDPDiscrete.cpp.

References Initialize(), Simulation::SetVerbose(), and ArgumentHandlers::Arguments::verbose.

SimulationDecPOMDPDiscrete::~SimulationDecPOMDPDiscrete ( )

Destructor.

Definition at line 64 of file SimulationDecPOMDPDiscrete.cpp.

Member Function Documentation

Index SimulationDecPOMDPDiscrete::GetAction ( const std::vector< AgentLocalObservations * > &  agents,
Index  i,
Index  jaI,
Index  joI,
double  r,
Index  prevJoI,
Index  sI 
) const
private
Index SimulationDecPOMDPDiscrete::GetAction ( const std::vector< AgentSharedObservations * > &  agents,
Index  i,
Index  jaI,
Index  joI,
double  r,
Index  prevJoI,
Index  sI 
) const
private

Definition at line 204 of file SimulationDecPOMDPDiscrete.cpp.

Index SimulationDecPOMDPDiscrete::GetAction ( const std::vector< AgentDelayedSharedObservations * > &  agents,
Index  i,
Index  jaI,
Index  joI,
double  r,
Index  prevJoI,
Index  sI 
) const
private
Index SimulationDecPOMDPDiscrete::GetAction ( const std::vector< AgentFullyObservable * > &  agents,
Index  i,
Index  jaI,
Index  joI,
double  r,
Index  prevJoI,
Index  sI 
) const
private

Definition at line 225 of file SimulationDecPOMDPDiscrete.cpp.

SimulationResult SimulationDecPOMDPDiscrete::RunSimulations ( const JointPolicyDiscrete jp) const
void SimulationDecPOMDPDiscrete::SaveIntermediateResults ( std::string  filename)

Indicate that intermediate should be stored to file named filename.

Definition at line 102 of file SimulationDecPOMDPDiscrete.cpp.

References _m_intermediateResultsFilename, and _m_saveIntermediateResults.

Member Data Documentation

size_t SimulationDecPOMDPDiscrete::_m_horizon
protected

Definition at line 88 of file SimulationDecPOMDPDiscrete.h.

Referenced by Initialize(), RunSimulation(), and RunSimulations().

std::string SimulationDecPOMDPDiscrete::_m_intermediateResultsFilename
private

Definition at line 59 of file SimulationDecPOMDPDiscrete.h.

Referenced by RunSimulations(), and SaveIntermediateResults().

const PlanningUnitDecPOMDPDiscrete* SimulationDecPOMDPDiscrete::_m_pu
private

Pointer to the planning unit that generated the policy.

Definition at line 55 of file SimulationDecPOMDPDiscrete.h.

Referenced by GetAction(), Initialize(), RunSimulation(), RunSimulations(), and Step().

bool SimulationDecPOMDPDiscrete::_m_saveIntermediateResults
private

Definition at line 57 of file SimulationDecPOMDPDiscrete.h.

Referenced by RunSimulations(), and SaveIntermediateResults().


The documentation for this class was generated from the following files: