MultiAgentDecisionProcess  Release 0.2.1
DecPOMDP.cpp
Go to the documentation of this file.
1 
28 #include "DecPOMDP.h"
29 
30 using namespace std;
31 
33 {
34  _m_rewardType = REWARD;
35  _m_discount = 1.0;
36 }
37 
38 void DecPOMDP::SetDiscount(double d)
39 {
40  if(d>=0 && d<=1)
41  _m_discount=d;
42  else
43  throw(E("DecPOMDP::SetDiscount() discount not valid, should be >=0 and <=1"));
44 }
45 
46 string DecPOMDP::SoftPrint() const
47 {
48  stringstream ss;
49  ss << "Discount factor: " << _m_discount << endl;
50  ss << "Reward type: " << _m_rewardType << endl;
51  return ss.str();
52 }
53 
55 {
56  if(r!=REWARD)
57  throw(E("DecPOMDP::SetRewardType only reward type REWARD is supported"));
58  _m_rewardType = r;
59 }