Activity module¶
Python library to model the spread of infectious diseases within a microenvironment
-
class
Activity.
Visitor_activity
(simulation_params, **kwargs)¶ Bases:
object
Person’s activity within the system, models interaction between people and environment
-
infected_visitor
(callback_add_quanta, request_to_leave, periods)¶ Callback from microenvironment for an infected person to generate quanta
Arguments: callback_add_quanta Callback to microenvironment to add quanta request_to_leave Event notification to let microenvironment know we wish to leave
to allow clean up before existing the microenvironment.
periods Number of periods person in the microenvironment
-
log_visitor_activity
(activity)¶ Log visitor activity within the process visitor process
Arguments: activity String describing the activity that has occurred.
-
classmethod
pack_parameters
(microenvironment, duration)¶ Pack parameters for the activity into a dictionary.
- Parameters
{microenvironment obj} -- Microenvironment that the person will enter (microenvironment) –
{number} -- Amount of time person spends in the environment (duration) –
- Returns
Tuple(class, dictionary) – This class and a dictionary of parameters required to instantiate an instance
-
start
(finished_activity)¶ Introduce a person to the microenvironment
Arguments: finished_activity Event notification that activity has completed duration Length of time that infected person remains in the microenvironment
-
susceptible_visitor
(callback_quanta_concentration, request_to_leave, periods)¶ Callback from microenvironment for a susceptible person to calculate exposure
Arguments: callback_quanta_concentration callback to microenvironment to get quanta_concentration request_to_leave Event notification to let microenvironment know we wish to leave
to allow clean up before existing the microenvironment.
periods Number of period that person in the microenvironment
-
unpack_parameters
(**kwargs)¶ Unpack the parameter list and store in local instance variables.
-