FRED
|
Public Member Functions | |
void | setup (int loc_id, const char *lab, double lon, double lat, Place *cont, Population *pop) |
virtual void | prepare () |
void | update (int day) |
virtual void | print (int disease_id) |
virtual void | enroll (Person *per) |
virtual void | unenroll (Person *per) |
virtual void | add_susceptible (int disease_id, Person *per) |
virtual void | add_infectious (int disease_id, Person *per) |
void | print_susceptibles (int disease_id) |
void | print_infectious (int disease_id) |
virtual void | spread_infection (int day, int disease_id) |
bool | is_open (int day) |
bool | is_infectious (int disease_id) |
void | modifyIncidenceCount (int disease_id, vector< int > strain, int incr) |
void | modifyPrevalenceCount (int disease_id, vector< int > strain, int incr) |
void | print_stats (int day, int disease_id) |
virtual void | get_parameters (int disease_id)=0 |
virtual int | get_group (int disease_id, Person *per)=0 |
virtual double | get_transmission_prob (int disease_id, Person *i, Person *s)=0 |
virtual double | get_contacts_per_day (int disease_id)=0 |
virtual bool | should_be_open (int day, int disease_id)=0 |
int | get_id () |
char * | get_label () |
char | get_type () |
bool | is_workplace () |
double | get_latitude () |
double | get_longitude () |
int | get_S (int disease_id) |
int | get_I (int disease_id) |
int | get_symptomatic (int disease_id) |
int | get_size () |
int | get_close_date () |
int | get_open_date () |
Population * | get_population () |
int | get_daily_cases (int disease_id) |
int | get_daily_deaths (int disease_id) |
int | get_total_cases (int disease_id) |
int | get_total_deaths (int disease_id) |
double | get_incidence_rate (int disease_id) |
void | set_id (int n) |
void | set_type (char t) |
void | set_latitude (double x) |
void | set_longitude (double x) |
void | set_close_date (int day) |
void | set_open_date (int day) |
void | set_population (Population *p) |
void | set_container (Place *cont) |
Place * | get_container () |
void | add_case () |
void | add_deaths () |
Cell * | get_grid_cell () |
void | set_grid_cell (Cell *p) |
Place * | select_neighborhood (double community_prob, double community_distance, double local_prob) |
int | get_days_infectious () |
double | get_attack_rate () |
Protected Member Functions | |
double | get_contact_rate (int day, int disease_id) |
int | get_contact_count (Person *infector, int disease_id, int day, double contact_rate) |
void | attempt_transmission (double transmission_prob, Person *infector, Person *infectee, int disease_id, int day) |
Protected Attributes | |
int | id |
char | label [32] |
char | type |
Place * | container |
double | latitude |
double | longitude |
int | N |
vector< Person * > * | susceptibles |
vector< Person * > * | infectious |
int * | S |
int * | I |
int * | Sympt |
int | close_date |
int | open_date |
int * | cases |
int * | deaths |
int * | total_cases |
int * | total_deaths |
Population * | population |
Cell * | grid_cell |
vector< map< int, int > > | incidence |
vector< map< int, int > > | prevalence |
int | days_infectious |
int | total_infections |
double * | beta |
void Place::add_case | ( | ) | [inline] |
Increment the cases count. Note that the cases variable will be reset when update()
is called
void Place::add_deaths | ( | ) | [inline] |
Increment the deaths count. Note that the deaths variable will be reset when update()
is called
void Place::add_infectious | ( | int | disease_id, |
Person * | per | ||
) | [virtual] |
Add a infectious person to the place. This method adds the person to the infectious vector and increments the number of infectious in the place (I).
disease_id | an integer representation of the disease |
per | a pointer to a Person object that will be added to the place for a given diease |
void Place::add_susceptible | ( | int | disease_id, |
Person * | per | ||
) | [virtual] |
Add a susceptible person to the place. This method adds the person to the susceptibles vector and increments the number of susceptibles in the place (S).
disease_id | an integer representation of the disease |
per | a pointer to a Person object that will be added to the place for a given diease |
void Place::enroll | ( | Person * | per | ) | [virtual] |
int Place::get_close_date | ( | ) | [inline] |
Get the simulation day (an integer value of days from the start of the simulation) when the place will close.
virtual double Place::get_contacts_per_day | ( | int | disease_id | ) | [pure virtual] |
int Place::get_daily_cases | ( | int | disease_id | ) | [inline] |
Get the number of cases of a given diease for day. The member variable cases gets reset when update()
is called, which for now is on a daily basis.
disease_id | an integer representation of the disease |
int Place::get_daily_deaths | ( | int | disease_id | ) | [inline] |
Get the number of deaths from a given diease for a day. The member variable deaths gets reset when update()
is called, which for now is on a daily basis.
disease_id | an integer representation of the disease |
Cell* Place::get_grid_cell | ( | ) | [inline] |
Get the grid_cell where this place is.
virtual int Place::get_group | ( | int | disease_id, |
Person * | per | ||
) | [pure virtual] |
Get the age group for a person given a particular disease_id.
disease_id | an integer representation of the disease |
per | a pointer to a Person object |
Implemented in Classroom, Hospital, Household, Neighborhood, Office, School, and Workplace.
int Place::get_I | ( | int | disease_id | ) | [inline] |
Get the count of (I)nfectious for a given diease in this place.
disease_id | an integer representation of the disease |
int Place::get_id | ( | ) | [inline] |
Get the id.
double Place::get_incidence_rate | ( | int | disease_id | ) | [inline] |
Get the number of cases of a given diease for the simulation thus far divided by the number of agents in this place.
disease_id | an integer representation of the disease |
char* Place::get_label | ( | ) | [inline] |
Get the label.
double Place::get_latitude | ( | ) | [inline] |
Get the latitude.
double Place::get_longitude | ( | ) | [inline] |
Get the longitude.
int Place::get_open_date | ( | ) | [inline] |
Get the simulation day (an integer value of days from the start of the simulation) when the place will open.
virtual void Place::get_parameters | ( | int | disease_id | ) | [pure virtual] |
Population* Place::get_population | ( | ) | [inline] |
Get the population.
int Place::get_S | ( | int | disease_id | ) | [inline] |
Get the count of (S)usceptibles for a given diease in this place.
disease_id | an integer representation of the disease |
int Place::get_size | ( | ) | [inline] |
Get the count of agents in this place.
int Place::get_symptomatic | ( | int | disease_id | ) | [inline] |
Get the count of (S)ymptomatics for a given diease in this place.
disease_id | an integer representation of the disease |
int Place::get_total_cases | ( | int | disease_id | ) | [inline] |
Get the number of cases of a given diease for the simulation thus far. This value is not reset when update()
is called.
disease_id | an integer representation of the disease |
int Place::get_total_deaths | ( | int | disease_id | ) | [inline] |
Get the number of deaths from a given diease for the simulation thus far. This value is not reset when update()
is called.
disease_id | an integer representation of the disease |
virtual double Place::get_transmission_prob | ( | int | disease_id, |
Person * | i, | ||
Person * | s | ||
) | [pure virtual] |
Get the transmission probability for a given diease between two Person objects.
disease_id | an integer representation of the disease |
i | a pointer to a Person object |
s | a pointer to a Person object |
Implemented in Classroom, Hospital, Household, Neighborhood, Office, School, and Workplace.
char Place::get_type | ( | ) | [inline] |
Get the type (H)OME, (W)ORK, (S)CHOOL, (C)OMMUNITY).
bool Place::is_infectious | ( | int | disease_id | ) | [inline] |
Test whether or not any infectious people are in this place.
true
if any infectious people are here; false
if not bool Place::is_open | ( | int | day | ) |
Is the place open on a given day?
day | the simulation day |
true
if the place is open; false
if not void Place::modifyIncidenceCount | ( | int | disease_id, |
vector< int > | strain, | ||
int | incr | ||
) |
Allow update of incidence vector.
disease_id | an integer representation of the disease @param strain a vector of integers representing strains |
incr | is unused at this time |
void Place::modifyPrevalenceCount | ( | int | disease_id, |
vector< int > | strain, | ||
int | incr | ||
) |
Allow update of prevalence vector.
disease_id | an integer representation of the disease @param strain a vector of integers representing strains |
incr | is unused at this time |
void Place::print | ( | int | disease_id | ) | [virtual] |
Display the information for a given disease.
disease | an integer representation of the disease |
Reimplemented in School.
void Place::print_infectious | ( | int | disease_id | ) |
Prints the id of every person in the infectious vector for a given diease.
disease_id | an integer representation of the disease |
void Place::print_stats | ( | int | day, |
int | disease_id | ||
) |
<bold>Deprecated.</bold>
void Place::print_susceptibles | ( | int | disease_id | ) |
Prints the id of every person in the susceptible vector for a given diease.
disease_id | an integer representation of the disease |
void Place::set_close_date | ( | int | day | ) | [inline] |
Set the simulation day (an integer value of days from the start of the simulation) when the place will close.
day | the simulation day when the place will close |
void Place::set_container | ( | Place * | cont | ) | [inline] |
Set the container.
cont | the new container |
void Place::set_grid_cell | ( | Cell * | p | ) | [inline] |
Set the grid_cell where this place will be.
p | the new grid_cell |
void Place::set_id | ( | int | n | ) | [inline] |
Set the id.
n | the new id |
void Place::set_latitude | ( | double | x | ) | [inline] |
Set the latitude.
x | the new latitude |
void Place::set_longitude | ( | double | x | ) | [inline] |
Set the longitude.
x | the new longitude |
void Place::set_open_date | ( | int | day | ) | [inline] |
Set the simulation day (an integer value of days from the start of the simulation) when the place will open.
day | the simulation day when the place will open |
void Place::set_population | ( | Population * | p | ) | [inline] |
Set the population.
p | the new population |
void Place::set_type | ( | char | t | ) | [inline] |
Set the type.
t | the new type |
void Place::setup | ( | int | loc_id, |
const char * | lab, | ||
double | lon, | ||
double | lat, | ||
Place * | cont, | ||
Population * | pop | ||
) |
Sets the id, label, logitude, latitude , container and population of this Place Allocates disease-related memory for this place
loc_id | this Place's id |
lab | this Place's label |
lon | this Place's longitude |
lat | this Place's latitude |
cont | this Place's container |
pop | this Place's population |
virtual bool Place::should_be_open | ( | int | day, |
int | disease_id | ||
) | [pure virtual] |
Determine if the place should be open. It is dependent on the disease_id and simulation day.
day | the simulation day |
disease_id | an integer representation of the disease |
true
if the place should be open; false
if not Implemented in Classroom, Hospital, Household, Neighborhood, Office, School, and Workplace.
void Place::spread_infection | ( | int | day, |
int | disease_id | ||
) | [virtual] |
Attempt to spread the infection for a given diease on a given day.
day | the simulation day |
disease_id | an integer representation of the disease |
Reimplemented in Household.
void Place::unenroll | ( | Person * | per | ) | [virtual] |
void Place::update | ( | int | day | ) |
Perform a daily update of this place. The daily count arrays will all be reset and the vectors containing infectious and symptomatics will be cleared.