FRED
School.h
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: School.h
00010 //
00011 
00012 #ifndef _FRED_SCHOOL_H
00013 #define _FRED_SCHOOL_H
00014 
00015 #include "Place.h"
00016 #include <vector>
00017 
00018 class School : public Place {
00019 public: 
00020   School() {}
00021   ~School() {}
00022   School(int,const char*,double,double,Place *, Population *pop);
00023   void prepare();
00024   void get_parameters(int diseases);
00025   int get_group(int disease, Person * per);
00026   double get_transmission_prob(int disease, Person * i, Person * s);
00027   bool should_be_open(int day, int disease);
00028   double get_contacts_per_day(int disease);
00029   void enroll(Person * per);
00030   void unenroll(Person * per);
00031   int children_in_grade(int age) {
00032     if (-1 < age && age < 20) return students_with_age[age];
00033     else return 0;
00034   }
00035   int classrooms_for_age(int age) { return (int) classrooms[age].size(); }
00036   void print(int disease);
00037   void setup_classrooms();
00038   Place * assign_classroom(Person *per);
00039 
00040 private:
00041   static double *** school_contact_prob;
00042   static char school_closure_policy[];
00043   static int school_closure_day;
00044   static double school_closure_threshold;
00045   static int school_closure_period;
00046   static int school_closure_delay;
00047   static bool school_parameters_set;
00048   static int school_summer_schedule;
00049   static char school_summer_start[];
00050   static char school_summer_end[];
00051   static int school_classroom_size;
00052   static double * school_contacts_per_day;
00053 
00054   int students_with_age[20];
00055   vector <Place *> classrooms[20];
00056   int next_classroom[20];
00057   int next_classroom_without_teacher[20];
00058   int total_classrooms;
00059 };
00060 
00061 #endif // _FRED_SCHOOL_H
 All Classes Functions