MultiAgentDecisionProcess  Release 0.2.1
ProblemFireFighting.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _PROBLEMFIREFIGHTING_H_
30 #define _PROBLEMFIREFIGHTING_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
34 #include "DecPOMDPDiscrete.h"
35 #include "IndexTools.h"
36 
41 {
42  private:
44  size_t _m_nrAgents;
45  size_t _m_nrHouses;
48 
50  //vector that stores the number of values per state feature.
51  std::vector<size_t> _m_nrPerStateFeatureVec;
52 
54  //vector that stores the number of values per state feature.
55  std::vector<size_t> _m_nrFLs_vec;
56 
58  void ConstructActions();
60  void ConstructObservations();
62  void FillTransitionModel();
64  void FillObservationModel();
66  void FillRewardModel();
67 
69  std::vector<Index>& state) const;
70  protected:
71  static std::string SoftPrintBriefDescription(
72  size_t nrAgents, size_t nrHouses, size_t nrFLs);
73  static std::string SoftPrintDescription(size_t nrAgents,
74  size_t nrHouses, size_t nrFLs);
75  std::vector< Index> GetStateVector(Index sI) const
76  {
79  }
80  double ComputeTransitionProb(
81  const std::vector< Index>& s1,
82  const std::vector< Index>& ja,
83  const std::vector< Index>& s2
84  ) const;
86  const std::vector< Index>& ja,
87  const std::vector< Index>& s1,
88  const std::vector< Index>& jo
89  ) const;
90  double ComputeReward(Index sI) const;
91  //is a neighbor of house hI burning?
92  static bool isNeighborBurning( const std::vector< Index>& s1,
93  Index hI) ;
94 
95 
96  public:
97  // Constructor, destructor and copy assignment.
99  ProblemFireFighting(size_t nrAgents, size_t nrHouses, size_t nrFLs,
100  double costOfMove=0.0, bool forcePositionRepres = false);
101 };
102 
103 
104 #endif /* !_PROBLEMFIREFIGHTING_H_ */
105 
106 // Local Variables: ***
107 // mode:c++ ***
108 // End: ***