MultiAgentDecisionProcess
PlanningUnit Class Referenceabstract

PlanningUnit represents a planning unit, i.e., a planning algorithm. More...

#include <PlanningUnit.h>

Inheritance diagram for PlanningUnit:
[legend]

Public Member Functions

size_t GetHorizon () const
 Returns the planning horizon. More...
 
virtual boost::shared_ptr
< JointPolicy
GetJointPolicy ()=0
 Returns a pointer to the computed joint policy. More...
 
Index GetNextAgentIndex ()
 Maintains a agent index and returns the next one on calling */. More...
 
size_t GetNrAgents () const
 Return the number of agents. More...
 
const
MultiAgentDecisionProcessInterface
GetProblem () const
 Get the problem pointer. More...
 
int GetSeed () const
 Returns the random seed stored. More...
 
void InitSeed () const
 Initializes the random number generator (srand) to the stored seed. More...
 
virtual void Plan ()=0
 The function that performs the actual planning. More...
 
 PlanningUnit (size_t horizon, MultiAgentDecisionProcessInterface *p)
 (default) Constructor More...
 
virtual void SetHorizon (size_t horizon)
 Updates the horizon of the planning problem. More...
 
void SetProblem (MultiAgentDecisionProcessInterface *p)
 Updates the problem pointer. More...
 
void SetSeed (int s)
 Stores the random seed and calls InitSeed(). More...
 
virtual ~PlanningUnit ()
 Destructor. More...
 

Private Attributes

Index _m_agentI
 Used by GetNextAgentIndex(). More...
 
size_t _m_horizon
 The planning horizon: MAXHORIZON for infinite horizon. */. More...
 
MultiAgentDecisionProcessInterface_m_problem
 Pointer to the problem. More...
 
int _m_seed
 The random seed. More...
 

Detailed Description

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).

Constructor & Destructor Documentation

PlanningUnit::PlanningUnit ( size_t  horizon,
MultiAgentDecisionProcessInterface p 
)
inline

(default) Constructor

Constructor which sets the horizon and the problem.

virtual PlanningUnit::~PlanningUnit ( )
inlinevirtual

Destructor.

Member Function Documentation

size_t PlanningUnit::GetHorizon ( ) const
inline

Returns the planning horizon.

Referenced by GMAA_MAA_ELSI::CAVNP_quick_n_dirty2(), GMAA_MAAstarClassic::ConstructAndValuateNextPolicies(), GMAA_kGMAA::ConstructAndValuateNextPolicies(), GMAA_MAAstar::ConstructAndValuateNextPolicies(), GMAA_MAAstarCluster::ConstructAndValuateNextPolicies(), GMAA_kGMAACluster::ConstructAndValuateNextPolicies(), GMAA_MAA_ELSI::ConstructAndValuateNextPoliciesExactBG(), PlanningUnitMADPDiscrete::CreateActionHistoryTree(), PlanningUnitMADPDiscrete::CreateActionObservationHistoryTree(), PlanningUnitMADPDiscrete::CreateObservationHistoryTree(), PlanningUnitMADPDiscrete::Deinitialize(), FactoredQLastTimeStepOrElse::GetAgentScopeForLQF(), ArgumentUtils::GetHybridQheuristicFromArgs(), Perseus::GetInitialNonStationaryQFunctions(), Perseus::GetInitialValueFunction(), FactoredQLastTimeStepOrElse::GetNrLQFs(), PlanningUnitMADPDiscrete::GetNrPolicyDomainElements(), FactoredQLastTimeStepOrElse::GetStateFactorScopeForLQF(), PlanningUnitMADPDiscrete::GetSuccessorAHI(), PlanningUnitMADPDiscrete::GetSuccessorAOHI(), PlanningUnitMADPDiscrete::GetSuccessorJAHI(), PlanningUnitMADPDiscrete::GetSuccessorJAOHI(), PlanningUnitMADPDiscrete::GetSuccessorJOHI(), PlanningUnitMADPDiscrete::GetSuccessorOHI(), PlanningUnitMADPDiscrete::GetTimeStepForAHI(), PlanningUnitMADPDiscrete::GetTimeStepForAOHI(), PlanningUnitMADPDiscrete::GetTimeStepForJAHI(), PlanningUnitMADPDiscrete::GetTimeStepForJAOHI(), PlanningUnitMADPDiscrete::GetTimeStepForJOHI(), PlanningUnitMADPDiscrete::GetTimeStepForOHI(), MDPPolicyIteration::Initialize(), MDPPolicyIterationGPU::Initialize(), MDPValueIteration::Initialize(), PlanningUnitMADPDiscrete::Initialize(), SimulationDecPOMDPDiscrete::Initialize(), PlanningUnitMADPDiscrete::InitializeActionHistories(), PlanningUnitMADPDiscrete::InitializeActionObservationHistories(), PlanningUnitMADPDiscrete::InitializeJointActionHistories(), PlanningUnitMADPDiscrete::InitializeJointActionObservationHistories(), PlanningUnitMADPDiscrete::InitializeJointObservationHistories(), PlanningUnitMADPDiscrete::InitializeObservationHistories(), MDPValueIteration::Plan(), MonahanPlanner::Plan(), PerseusNonStationaryQPlanner::PlanAll(), Perseus::PlanEndOfIteration(), Perseus::PlanLeadOut(), PerseusNonStationaryQPlanner::PlanSampling(), MDPValueIteration::PlanSlow(), MDPPolicyIteration::PlanSlow(), MDPPolicyIterationGPU::PlanSlow(), Perseus::PlanStartOfIteration(), MDPValueIteration::PlanWithCache(), PlanningUnitMADPDiscrete::PolicyToDotGraph(), QAV< PerseusPOMDPPlanner >::QAV(), JointPolicyPureVectorForClusteredBG::RecursivelyFillPolicyForAgent(), GMAA_MAAstarCluster::ResetPlanner(), GMAA_kGMAACluster::ResetPlanner(), AlphaVectorPlanning::SampleBeliefs(), AlphaVectorPlanning::SampleBeliefsNonStationary(), PlanningUnitDecPOMDPDiscrete::SanityCheck(), TreeIncPruneBGPlanner::SaveStats(), GeneralizedMAAStarPlannerForDecPOMDPDiscrete::SetCBGbounds(), GeneralizedMAAStarPlannerForFactoredDecPOMDPDiscrete::SetCBGbounds(), JointPolicyPureVectorForClusteredBG::StartRecursiveConstructionPerAgent(), JointPolicyPureVectorForClusteredBG::ToJointPolicyPureVector(), Perseus::UpdateValueFunctionName(), and ValueFunctionDecPOMDPDiscrete::ValueFunctionDecPOMDPDiscrete().

Index PlanningUnit::GetNextAgentIndex ( )
inline

Maintains a agent index and returns the next one on calling */.

References _m_agentI, and GetNrAgents().

Referenced by JESPExhaustivePlanner::Plan(), and JESPDynamicProgrammingPlanner::Plan().

size_t PlanningUnit::GetNrAgents ( ) const
inline
const MultiAgentDecisionProcessInterface* PlanningUnit::GetProblem ( ) const
inline
int PlanningUnit::GetSeed ( ) const
inline

Returns the random seed stored.

void PlanningUnit::InitSeed ( ) const
inline

Initializes the random number generator (srand) to the stored seed.

Referenced by SetSeed().

virtual void PlanningUnit::SetHorizon ( size_t  horizon)
inlinevirtual

Updates the horizon of the planning problem.

Reimplemented in PlanningUnitMADPDiscrete.

Referenced by PlanningUnitMADPDiscrete::SetHorizon().

void PlanningUnit::SetProblem ( MultiAgentDecisionProcessInterface p)
inline

Updates the problem pointer.

Referenced by PlanningUnitMADPDiscrete::SetProblem().

void PlanningUnit::SetSeed ( int  s)
inline

Stores the random seed and calls InitSeed().

References InitSeed().

Member Data Documentation

Index PlanningUnit::_m_agentI
private

Used by GetNextAgentIndex().

Referenced by GetNextAgentIndex().

size_t PlanningUnit::_m_horizon
private

The planning horizon: MAXHORIZON for infinite horizon. */.

MultiAgentDecisionProcessInterface* PlanningUnit::_m_problem
private

Pointer to the problem.

int PlanningUnit::_m_seed
private

The random seed.