pandemia.world.agent

Module Contents

Classes

Agent

Represents an individual person.

Attributes

log

pandemia.world.agent.log
class pandemia.world.agent.Agent(age)

Represents an individual person.

Parameters:

ageint

The age of the individual, in years.

Attributes:

uuidstr

A universally unique identifier for this agent.

ageint

The age of the individual, in years.

weekly_routinelist[str]

A sequence of activites, representing a weekly routine. This specifies which activities this agent performs and in which order. For example, suppose this agent performs two activities, “Home” and “Work”. Then their weekly routine might be:

[“Home”, “Home”, “Home”, “Home”, “Work”, “Home”, “Home”, “Work”, “Home”, “Home”, “Work”, “Home”, “Home”, “Work”, “Home”, “Home”, “Work”, “Home”, “Home”, “Home”, “Home”]

In this example, each string refers to an eight-hour time interval, since it will be assumed that the routine divides the week into time intervals of equal length.

activity_locationslist[Location]

For each string appearing in the weekly routine, a list of objects of type Location, indicating at which locations it is possible for the agent to perform that activity. In the weekly_routine example, the agent would require two lists, one for activity “Home” and one for activity “Work”. The list for activity “Home” might consist of a single Location of an appropriate type, for example “House”.

activity_location_weightslist[float]

For each of the activity_locations lists, an associated list of weights, indicating how likely it is that the agent will choose the corresponding locations when performing each activity. These lengths of these lists of weights should therefore be the same as the lengths of the lists of locations, for each activity. The weights need not sum to one.