FRED
Person Class Reference

List of all members.

Public Member Functions

 Person ()
 Person (int index, int age, char sex, int marital, int rel, int occ, Place *house, Place *school, Place *work, int day, bool today_is_birthday)
void become_unsusceptible (Disease *disease)
void become_exposed (Disease *disease, Transmission *transmission)
void become_immune (Disease *disease)
void print (FILE *fp, int disease) const
int add_infectee (int disease)
int is_new_case (int day, int disease) const
int addInfected (int disease, vector< int > strains)
void infect (Person *infectee, int disease, Transmission *transmission)
void addIncidence (int disease, vector< int > strains)
void addPrevalence (int disease, vector< int > strains)
void set_changed ()
void update_demographics (int day)
void update_health (int day)
void update_behavior (int day)
void prepare_activities ()
void update_activity_profile ()
void update_household_mobility ()
void become_susceptible (Disease *disease)
void become_infectious (Disease *disease)
void become_symptomatic (Disease *disease)
void recover (Disease *disease)
Persongive_birth (int day)
void assign_classroom ()
void assign_office ()
string to_string ()
int get_id () const
Demographicsget_demographics () const
int get_age () const
int get_init_age () const
int get_init_profession () const
int get_init_marital_status () const
double get_real_age (int day) const
char get_sex () const
int get_marital_status () const
int get_relationship ()
void set_relationship (int rel)
int get_profession () const
bool is_deceased ()
bool is_adult ()
bool is_child ()
Healthget_health () const
int is_symptomatic ()
bool is_susceptible (int dis)
bool is_infectious (int dis)
double get_susceptibility (int disease) const
double get_infectivity (int disease, int day) const
int get_exposure_date (int disease) const
int get_infectious_date (int disease) const
int get_recovered_date (int disease) const
int get_infector (int disease) const
int get_infected_place (int disease) const
char * get_infected_place_label (int disease) const
char get_infected_place_type (int disease) const
int get_infectees (int disease) const
Activitiesget_activities () const
Placeget_neighborhood () const
Placeget_household ()
bool is_householder ()
Placeget_neighborhood ()
Placeget_school ()
Placeget_classroom ()
Placeget_workplace ()
Placeget_office ()
int get_degree ()
int get_household_size ()
int get_neighborhood_size ()
int get_school_size ()
int get_classroom_size ()
int get_workplace_size ()
int get_office_size ()
void start_traveling (Person *visited)
void stop_traveling ()
bool get_travel_status ()
Behaviorget_behavior () const
void select_adult_decision_maker (Person *old_adult)
Personget_adult_decision_maker ()
bool adult_is_staying_home (int day)
bool child_is_staying_home (int day)
bool acceptance_of_vaccine ()
bool acceptance_of_another_vaccine_dose ()
void become_an_adult_decision_maker ()
bool is_sick_leave_available ()
void terminate ()

Constructor & Destructor Documentation

Person::Person ( )

Default constructor

Person::Person ( int  index,
int  age,
char  sex,
int  marital,
int  rel,
int  occ,
Place house,
Place school,
Place work,
int  day,
bool  today_is_birthday 
)

Constructor that sets all of the attributes of a Person object

Parameters:
indexthe person id
age
sex(M or F)
marital1 if married, 0 if not
occthe code for the Person's occupation
housepointer to this Person's Household
schoolpointer to this Person's School
workpointer to this Person's Workplace
daythe simulation day
today_is_birthdaytrue if this is a newborn

Member Function Documentation

int Person::add_infectee ( int  disease)
Parameters:
diseasethe disease in question
Returns:
See also:
Health::add_infectee(int disease)
void Person::assign_classroom ( ) [inline]

Assign the agent to a Classroom

See also:
Activities::assign_classroom()
void Person::assign_office ( ) [inline]

Assign the agent to an Office

See also:
Activities::assign_office()
void Person::become_exposed ( Disease disease,
Transmission transmission 
) [inline]

Make this agent infected by the given disease

Parameters:
diseasethe disease to reference
transmissionthe transmission event
void Person::become_immune ( Disease disease)

Make this agent immune to the given disease

Parameters:
diseasethe disease to reference
void Person::become_infectious ( Disease disease) [inline]

This agent will become infectious with the disease

Parameters:
diseasea pointer to the Disease
void Person::become_susceptible ( Disease disease) [inline]

This agent will become susceptible to the disease

Parameters:
diseasethe disease
void Person::become_symptomatic ( Disease disease) [inline]

This agent will become symptomatic with the disease

Parameters:
diseasea pointer to the Disease
void Person::become_unsusceptible ( Disease disease) [inline]

Make this agent unsusceptible to the given disease

Parameters:
diseasethe disease to reference
Activities* Person::get_activities ( ) const [inline]
Returns:
a pointer to this Person's Activities
int Person::get_age ( ) const [inline]
Returns:
the Person's age
See also:
Demographics::get_age()
Behavior* Person::get_behavior ( ) const [inline]
Returns:
a pointer to this Person's Behavior
Place* Person::get_classroom ( ) [inline]
Returns:
a pointer to this Person's Classroom
See also:
Activities::get_classroom()
int Person::get_degree ( ) [inline]
Returns:
the number of other agents in an agent's neighborhood, school, and workplace.
See also:
Activities::get_degree()
Demographics* Person::get_demographics ( ) const [inline]
Returns:
a pointer to this Person's Demographics
int Person::get_exposure_date ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the simulation day that this agent became exposed to disease
Health* Person::get_health ( ) const [inline]
Returns:
a pointer to this Person's Health
Place* Person::get_household ( ) [inline]
Returns:
a pointer to this Person's Household
See also:
Activities::get_household()
int Person::get_id ( ) const [inline]

The id is generated at runtime

Returns:
the id of this Person
int Person::get_infected_place ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the id of the location where this agent became infected with disease
char* Person::get_infected_place_label ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the label of the location where this agent became infected with disease
char Person::get_infected_place_type ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the type of the location where this agent became infected with disease
int Person::get_infectees ( int  disease) const [inline]
Parameters:
diseasethe disease in question
Returns:
the infectees
See also:
Health::get_infectees(int disease)
int Person::get_infectious_date ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the simulation day that this agent became infectious with disease
double Person::get_infectivity ( int  disease,
int  day 
) const [inline]
Parameters:
diseasethe disease to check
Returns:
the specific Disease's infectivity for this Person
See also:
Health::get_susceptibility(int disease)
int Person::get_infector ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the id of the Person who infected this agent with disease
int Person::get_init_age ( ) const [inline]
Returns:
the Person's initial age
See also:
Demographics::get_init_age()
int Person::get_init_marital_status ( ) const [inline]
Returns:
the Person's initial marital status
See also:
Demographics::get_init_marital_status()
int Person::get_init_profession ( ) const [inline]
Returns:
the Person's initial profession
See also:
Demographics::get_init_profession()
int Person::get_marital_status ( ) const [inline]
Returns:
the Person's marital status
Place* Person::get_neighborhood ( ) const [inline]
Returns:
the a pointer to this agent's Neighborhood
Place* Person::get_neighborhood ( ) [inline]
Returns:
a pointer to this Person's Neighborhood
See also:
Activities::get_neighborhood()
Place* Person::get_office ( ) [inline]
Returns:
a pointer to this Person's Office
See also:
Activities::get_office()
int Person::get_profession ( ) const [inline]
Returns:
the Person's profession
double Person::get_real_age ( int  day) const [inline]
Returns:
the Person's age as a double value based on the number of days alive
See also:
Demographics::get_real_age()
int Person::get_recovered_date ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the simulation day that this agent became recovered from disease
Place* Person::get_school ( ) [inline]
Returns:
a pointer to this Person's School
See also:
Activities::get_school()
char Person::get_sex ( ) const [inline]
Returns:
the Person's sex
double Person::get_susceptibility ( int  disease) const [inline]
Parameters:
diseasethe disease to check
Returns:
the specific Disease's susceptibility for this Person
See also:
Health::get_susceptibility(int disease)
bool Person::get_travel_status ( ) [inline]
Returns:
true if the Person is traveling, false if not
See also:
Activities::get_travel_status()
Place* Person::get_workplace ( ) [inline]
Returns:
a pointer to this Person's Workplace
See also:
Activities::get_workplace()
Person * Person::give_birth ( int  day)

This agent creates a new agent

Returns:
a pointer to the new Person
bool Person::is_adult ( ) [inline]
Returns:
true if this agent is an adult, false otherwise
bool Person::is_deceased ( ) [inline]
Returns:
true if this agent is deceased, false otherwise
bool Person::is_infectious ( int  dis) [inline]
Parameters:
disthe disease to check
Returns:
true if this agent is infectious with disease, false otherwise
See also:
Health::is_infectious(int disease)
int Person::is_new_case ( int  day,
int  disease 
) const [inline]
Parameters:
daythe simulation day
diseasethe disease to check
Returns:
true if the exposure day to the disease = day, false otherwise
bool Person::is_susceptible ( int  dis) [inline]
Parameters:
disthe disease to check
Returns:
true if this agent is susceptible to disease, false otherwise
See also:
Health::is_susceptible(int dis)
int Person::is_symptomatic ( ) [inline]
Returns:
true if this agent is symptomatic, false otherwise
See also:
Health::is_symptomatic()
void Person::prepare_activities ( ) [inline]

::prepare()

void Person::print ( FILE *  fp,
int  disease 
) const

Print out information about this object with regards to a disease to a file.

Parameters:
fpa pointer to the file where this print should write
diseasethe disease about which to get information
void Person::recover ( Disease disease) [inline]

This agent will recover from the disease

Parameters:
diseasea pointer to the Disease
void Person::set_changed ( )

Notify the population that this Person has changed

void Person::start_traveling ( Person visited) [inline]

Have this Person begin traveling

Parameters:
visitedthe Person this agent will visit
See also:
Activities::start_traveling(Person *visited)
void Person::stop_traveling ( ) [inline]

Have this Person stop traveling

See also:
Activities::stop_traveling()
string Person::to_string ( )

Will print out a person in a format similar to that read from population file (with additional run-time values inserted (denoted by *)):
(i.e Label *ID* Age Sex Married Occupation Household School *Classroom* Workplace *Office*)

Returns:
a string representation of this Person object
void Person::update_activity_profile ( ) [inline]

::update_profile()

void Person::update_behavior ( int  day) [inline]
Parameters:
daythe simulation day
See also:
Behavior::update(int day)
void Person::update_demographics ( int  day) [inline]
Parameters:
daythe simulation day
See also:
Demographics::update(int day)
void Person::update_health ( int  day) [inline]
Parameters:
daythe simulation day
See also:
Health::update(int day)
void Person::update_household_mobility ( ) [inline]

The documentation for this class was generated from the following files:
 All Classes Functions