FRED
Vaccine_Manager.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: Vaccine_Manager.h
00010 //
00011 
00012 #ifndef _FRED_VACCINE_MANAGER_H
00013 #define _FRED_VACCINE_MANAGER_H
00014 
00015 #define VACC_NO_PRIORITY  0
00016 #define VACC_AGE_PRIORITY 1
00017 #define VACC_ACIP_PRIORITY 2
00018 
00019 #define VACC_DOSE_NO_PRIORITY 0
00020 #define VACC_DOSE_FIRST_PRIORITY 1
00021 #define VACC_DOSE_RAND_PRIORITY 2
00022 #define VACC_DOSE_LAST_PRIORITY 3
00023 
00024 #include <list>
00025 #include <vector>
00026 #include <string>
00027 #include "Manager.h"
00028 
00029 using namespace std;
00030 
00031 class Manager;
00032 class Population;
00033 class Vaccines;
00034 class Person;
00035 class Policy;
00036 class Timestep_Map;
00037 
00038 class Vaccine_Manager: public Manager {
00039   //Vaccine_Manager handles a stock of vaccines
00040 public:
00041   // Construction and Destruction
00042   Vaccine_Manager();
00043   Vaccine_Manager(Population *_pop);
00044   ~Vaccine_Manager();
00045   
00046   //Parameters Access
00047   bool do_vaccination()                     const { return do_vacc; }
00048   Vaccines* get_vaccines()                  const { return vaccine_package; }
00049   list < Person* > get_priority_queue()     const { return priority_queue;}
00050   list < Person* > get_queue()              const { return queue;}
00051   int get_number_in_priority_queue()        const { return priority_queue.size(); }
00052   int get_number_in_reg_queue()             const { return queue.size(); }
00053   int get_current_vaccine_capacity()        const { return current_vaccine_capacity; }
00054   
00055   // Vaccination Specific Procedures
00056   void fill_queues();
00057   void vaccinate(int day);
00058   void add_to_queue(Person* person);                 //Adds person to queue based on current policies
00059   void remove_from_queue(Person* person);            //Remove person from the vaccine queue
00060   void add_to_priority_queue_random(Person* person); //Adds person to the priority queue in a random spot
00061   void add_to_regular_queue_random(Person* person);  //Adds person to the regular queue in a random spot
00062   void add_to_priority_queue_begin(Person* person);  //Adds person to the beginning of the priority queue
00063   void add_to_priority_queue_end(Person* person);    //Adds person to the end of the priority queue
00064 
00065   //Paramters Access Members
00066   int get_vaccine_priority_age_low()  const {return vaccine_priority_age_low;}
00067   int get_vaccine_priority_age_high() const {return vaccine_priority_age_high;}
00068   int get_vaccine_dose_priority()     const {return vaccine_dose_priority;}
00069   string get_vaccine_dose_priority_string() const;
00070   
00071   // Utility Members
00072   void update(int day);
00073   void reset();
00074   void print();
00075   
00076 private:
00077   Vaccines* vaccine_package;              //Pointer to the vaccines that this manager oversees
00078   list < Person* > priority_queue;      //Queue for the priority agents
00079   list < Person* > queue;               //Queue for everyone else
00080   
00081   //Parameters from Input 
00082   bool   do_vacc;                         //Is Vaccination being performed
00083   bool   vaccine_priority_only;           //True - Vaccinate only the priority
00084   
00085   int vaccine_priority_age_low;           //Age specific priority
00086   int vaccine_priority_age_high;
00087   int vaccine_dose_priority;              //Defines where people getting multiple doses fit in the queue
00088                                           // See defines above for values
00089   
00090   Timestep_Map *vaccination_capacity_map; // How many people can be vaccinated now,
00091                                           // gets its value from the capacity change list
00092   int current_vaccine_capacity;           // variable to keep track of how many persons this 
00093                                           // can vaccinate each timestep.
00094 };
00095 
00096 
00097 #endif
00098 
00099 
 All Classes Functions