FRED
Workplace Class Reference
Inheritance diagram for Workplace:
Place

List of all members.

Public Member Functions

 Workplace ()
 Workplace (int, const char *, double, double, Place *, Population *pop)
void get_parameters (int diseases)
void prepare ()
int get_group (int disease, Person *per)
double get_transmission_prob (int disease, Person *i, Person *s)
double get_contacts_per_day (int disease)
void setup_offices ()
Placeassign_office (Person *per)
bool should_be_open (int day, int disease)

Constructor & Destructor Documentation

Workplace::Workplace ( ) [inline]

Default constructor

Workplace::Workplace ( int  loc,
const char *  lab,
double  lon,
double  lat,
Place container,
Population pop 
)

Convenience constructor that sets most of the values by calling Place::setup

See also:
Place::setup(int loc_id, const char *lab, double lon, double lat, Place* cont, Population *pop)

Member Function Documentation

Place * Workplace::assign_office ( Person per)

Assign a person to a particular Office

Parameters:
perthe Person to assign
Returns:
the Office to which the Person was assigned
double Workplace::get_contacts_per_day ( int  disease) [virtual]
See also:
Place::get_contacts_per_day(int disease)

This method returns the value from the static array Workplace::Workplace_contacts_per_day that corresponds to a particular disease.
The static array Workplace_contacts_per_day will be filled with values from the parameter file for the key workplace_contacts[].

Implements Place.

int Workplace::get_group ( int  disease,
Person per 
) [inline, virtual]
void Workplace::get_parameters ( int  diseases) [virtual]
double Workplace::get_transmission_prob ( int  disease,
Person i,
Person s 
) [virtual]
See also:
Place::get_transmission_prob(int disease, Person * i, Person * s)

This method returns the value from the static array Workplace::Workplace_contact_prob that corresponds to a particular age-related value for each person.
The static array Workplace_contact_prob will be filled with values from the parameter file for the key workplace_prob[].

Implements Place.

void Workplace::prepare ( ) [virtual]

Initialize the workplace and its offices

Reimplemented from Place.

void Workplace::setup_offices ( )

Setup the offices within this Workplace

bool Workplace::should_be_open ( int  day,
int  disease 
) [inline, virtual]

Determine if the Workplace should be open. It is dependent on the disease and simulation day.

Parameters:
daythe simulation day
diseasean integer representation of the disease
Returns:
whether or not the workplace is open on the given day for the given disease

Implements Place.


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