Place

class archABM.place.Place(env: simpy.core.Environment, db: archABM.database.Database, params: archABM.parameters.Parameters)[source]

Place primitive

id: int = -1
classmethod reset()None[source]

Resets Place ID.

static next()None[source]

Increments one unit the Place ID.

get_events()None[source]

Yields the corresponding EventModel

Returns

place’s type of activity

Return type

EventModel

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 is infective. Finally, a snapshot 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 is infective. Finally, a snapshot 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 a snapshot 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

int

full()bool[source]

Checks whether the place is full num_people < capacity

Returns

place is full

Return type

bool

save_snapshot()None[source]

Saves state snapshot on SnapshotPlace