Place¶
- class archABM.place.Place(env: simpy.core.Environment, db: archABM.database.Database, params: archABM.parameters.Parameters)[source]¶
Place primitive
- get_events() → None[source]¶
Yields the corresponding
EventModel
- Returns
place’s type of activity
- Return type
- add_person(person, event)[source]¶
Add person to place
Prior to the inclusion of the person, the
air quality
of the place is updated. Then, the number of people in the place is incremented by one unit, and the number of infective people is updated in case the entering person’s status isinfective
. Finally, asnapshot
is taken and saved into the simulation history.- Parameters
person (Person) – person to be added
- remove_person(person) → None[source]¶
Remove person from place
Prior to the exclusion of the person, the
air quality
of the place is updated. Then, the number of people in the place is decremented by one unit, and the number of infective people is updated in case the leaving person’s status isinfective
. Finally, asnapshot
is taken and saved into the simulation history.- Parameters
person (Person) – person to be removed
- update_place()[source]¶
Update place air quality
Updates the
air quality
of the place and saves asnapshot
into the simulation history.
- update_air(event=None) → None[source]¶
Air quality update
This method updates the air quality based on the selected
AerosolModel
.The infection risk is also computed by the aerosol model, and is transferred to every person in the room.
- people_attending() → int[source]¶
Number of people attending a collective event
Note
If the place is full, this method yields
0
people.- Returns
number of people
- Return type
- full() → bool[source]¶
Checks whether the place is full
num_people < capacity
- Returns
place is full
- Return type
- save_snapshot() → None[source]¶
Saves state snapshot on
SnapshotPlace