MultiAgentDecisionProcess  Release 0.2.1
POSGDiscrete.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _POSGDISCRETE_H_
30 #define _POSGDISCRETE_H_ 1
31 
32 /* the include directives */
33 #include <vector>
34 #include <string>
35 #include "Globals.h"
37 #include "RewardModelMapping.h"
38 #include "POSG.h"
39 #include "POSGDiscreteInterface.h"
40 
54 class POSGDiscrete :
55  virtual public POSGDiscreteInterface,
57  public POSG
58 {
59  private:
62 
63  protected:
64 
66  std::vector<RewardModelMapping*> _m_p_rModel;
67 
68  public:
69 
70  // Constructor, destructor and copy assignment.
72 
74  POSGDiscrete(std::string name="received unspec. by POSGDiscrete",
75  std::string descr="received unspec. by POSGDiscrete",
76  std::string pf="received unspec. by POSGDiscrete");
78  ~POSGDiscrete();
79 
80  //data manipulation (set) functions:
82 
85  bool SetInitialized(bool b);
87  void CreateNewRewardModel( Index agentI, size_t nrS, size_t nrJA);
89  void SetReward(Index agentI, Index sI, Index jaI, double r)
90  { _m_p_rModel.at(agentI)->Set(sI, jaI, r);}
91 
93  void SetReward(Index agentI, Index sI, Index jaI, Index sucSI,
94  double r);
95 
97  void SetReward(Index agentI, Index sI, Index jaI, Index sucSI,
98  Index joI, double r);
99 
100  // 'get' functions:
102  double GetReward(Index agentI, Index sI, Index jaI) const
103  { return(_m_p_rModel.at(agentI)->Get(sI, jaI));}
104 
106  std::string SoftPrint() const;
107 
108  //We need to implement this for POSG:
109  double GetReward(Index agentI, State* s, JointAction* ja) const;
110 
112  virtual POSGDiscrete* Clone() const = 0;
113 
114 };
115 
116 #endif /* !_POSGDISCRETE_H_ */
117 
118 
119 // Local Variables: ***
120 // mode:c++ ***
121 // End: ***