MultiAgentDecisionProcess
Release 0.2.1
|
PlanningUnit represents a planning unit, i.e., a planning algorithm. More...
#include <PlanningUnit.h>
Public Member Functions | |
size_t | GetHorizon () const |
Returns the planning horizon. | |
virtual JointPolicy * | GetJointPolicy ()=0 |
Returns a pointer to the computed joint policy. | |
Index | GetNextAgentIndex () |
Maintains a agent index and returns the next one on calling */. | |
size_t | GetNrAgents () const |
Return the number of agents. | |
const MultiAgentDecisionProcessInterface * | GetProblem () const |
Get the problem pointer. | |
int | GetSeed () const |
Returns the random seed stored. | |
void | InitSeed () const |
Initializes the random number generator (srand) to the stored seed. | |
virtual void | Plan ()=0 |
The function that performs the actual planning. | |
PlanningUnit (size_t horizon, MultiAgentDecisionProcessInterface *p) | |
(default) Constructor | |
virtual void | SetHorizon (size_t horizon) |
Updates the horizon of the planning problem. | |
void | SetProblem (MultiAgentDecisionProcessInterface *p) |
Updates the problem pointer. | |
void | SetSeed (int s) |
Stores the random seed and calls InitSeed(). | |
virtual | ~PlanningUnit () |
Destructor. |
Private Attributes | |
Index | _m_agentI |
Used by GetNextAgentIndex(). | |
size_t | _m_horizon |
The planning horizon: MAXHORIZON for infinite horizon. */. | |
MultiAgentDecisionProcessInterface * | _m_problem |
Pointer to the problem. | |
int | _m_seed |
The random seed. |
PlanningUnit represents a planning unit, i.e., a planning algorithm.
This is a very general class, that only manages the planning horizon and can initialize the random number generator (srand).
Definition at line 48 of file PlanningUnit.h.
|
inline |
(default) Constructor
Constructor which sets the horizon and the problem.
Definition at line 70 of file PlanningUnit.h.
|
inlinevirtual |
Destructor.
Definition at line 79 of file PlanningUnit.h.
|
inline |
Returns the planning horizon.
Definition at line 98 of file PlanningUnit.h.
References _m_horizon.
Referenced by Perseus::CheckConvergence(), GMAA_MAAstar::ConstructAndValuateNextPolicies(), GMAA_kGMAA::ConstructAndValuateNextPolicies(), PlanningUnitMADPDiscrete::CreateActionHistoryTree(), PlanningUnitMADPDiscrete::CreateActionObservationHistoryTree(), PlanningUnitMADPDiscrete::CreateObservationHistoryTree(), PlanningUnitMADPDiscrete::Deinitialize(), Perseus::GetInitialNonStationaryQFunctions(), Perseus::GetInitialValueFunction(), MDPValueIteration::Initialize(), PlanningUnitMADPDiscrete::Initialize(), SimulationDecPOMDPDiscrete::Initialize(), PlanningUnitMADPDiscrete::InitializeActionHistories(), PlanningUnitMADPDiscrete::InitializeActionObservationHistories(), PlanningUnitMADPDiscrete::InitializeJointActionHistories(), PlanningUnitMADPDiscrete::InitializeJointActionObservationHistories(), PlanningUnitMADPDiscrete::InitializeJointObservationHistories(), PlanningUnitMADPDiscrete::InitializeObservationHistories(), MDPValueIteration::Plan(), Perseus::PlanEndOfIteration(), Perseus::PlanLeadOut(), MDPValueIteration::PlanSlow(), Perseus::PlanStartOfIteration(), AlphaVectorPlanning::SampleBeliefs(), PlanningUnitDecPOMDPDiscrete::SanityCheck(), Perseus::UpdateValueFunctionName(), and ValueFunctionDecPOMDPDiscrete::ValueFunctionDecPOMDPDiscrete().
|
pure virtual |
Returns a pointer to the computed joint policy.
Implemented in DICEPSPlanner, GeneralizedMAAStarPlannerForDecPOMDPDiscrete, JESPDynamicProgrammingPlanner, JESPExhaustivePlanner, BruteForceSearchPlanner, NullPlanner, and NullPlannerTOI.
|
inline |
Maintains a agent index and returns the next one on calling */.
Definition at line 106 of file PlanningUnit.h.
References _m_agentI, and GetNrAgents().
Referenced by JESPExhaustivePlanner::Plan(), and JESPDynamicProgrammingPlanner::Plan().
|
inline |
Return the number of agents.
Reimplemented in PlanningUnitMADPDiscrete.
Definition at line 103 of file PlanningUnit.h.
References _m_problem, and MultiAgentDecisionProcessInterface::GetNrAgents().
Referenced by GetNextAgentIndex(), and PlanningUnitMADPDiscrete::GetNrAgents().
|
inline |
Get the problem pointer.
Reimplemented in PlanningUnitMADPDiscrete.
Definition at line 113 of file PlanningUnit.h.
References _m_problem.
Referenced by directories::MADPCreateResultsDir(), directories::MADPGetResultsDir(), and directories::MADPGetResultsFilename().
|
inline |
|
inline |
Initializes the random number generator (srand) to the stored seed.
Definition at line 94 of file PlanningUnit.h.
References _m_seed.
Referenced by SetSeed().
|
pure virtual |
The function that performs the actual planning.
Implemented in DICEPSPlanner, GeneralizedMAAStarPlannerForDecPOMDPDiscrete, JESPDynamicProgrammingPlanner, JESPExhaustivePlanner, BruteForceSearchPlanner, NullPlanner, and NullPlannerTOI.
|
inlinevirtual |
Updates the horizon of the planning problem.
Reimplemented in PlanningUnitMADPDiscrete.
Definition at line 91 of file PlanningUnit.h.
References _m_horizon.
|
inline |
|
inline |
Stores the random seed and calls InitSeed().
Definition at line 85 of file PlanningUnit.h.
References _m_seed, and InitSeed().
|
private |
Used by GetNextAgentIndex().
Definition at line 56 of file PlanningUnit.h.
Referenced by GetNextAgentIndex().
|
private |
The planning horizon: MAXHORIZON for infinite horizon. */.
Definition at line 59 of file PlanningUnit.h.
Referenced by GetHorizon(), and SetHorizon().
|
private |
Pointer to the problem.
Definition at line 53 of file PlanningUnit.h.
Referenced by GetNrAgents(), GetProblem(), and SetProblem().
|
private |
The random seed.
Definition at line 61 of file PlanningUnit.h.
Referenced by GetSeed(), InitSeed(), and SetSeed().