00001 /* 00002 Copyright 2009 by the University of Pittsburgh 00003 Licensed under the Academic Free License version 3.0 00004 See the file "LICENSE" for more information 00005 */ 00006 00007 // 00008 // 00009 // File: Random_Cognitive_model.h 00010 // 00011 00012 #ifndef _FRED_RANDOM_COGNITIVE_MODEL_H 00013 #define _FRED_RANDOM_COGNITIVE_MODEL_H 00014 00015 #include "Cognitive_Model.h" 00016 00017 #include "Global.h" 00018 #include "Random.h" 00019 00020 class Person; 00021 00022 extern double Prob_accept_vaccine; 00023 00024 class Random_Cognitive_Model : public Cognitive_Model { 00025 public: 00026 Random_Cognitive_Model(Person *p); 00027 void reset() {}; 00028 void update(int day) { 00029 accept_vaccine = (RANDOM() < Prob_accept_vaccine); 00030 } 00031 bool will_accept_vaccine(int strain) { return accept_vaccine; } 00032 private: 00033 Person * self; 00034 bool accept_vaccine; 00035 protected: 00036 ~Random_Cognitive_Model() {} 00037 }; 00038 00039 #endif // _FRED_RANDOM_COGNITIVE_MODEL_H 00040