Person¶
- class archABM.person.Person(env: simpy.core.Environment, db: archABM.database.Database, params: archABM.parameters.Parameters)[source]¶
Person primitive
- id = -1¶
- process() → None[source]¶
Processes the chain of discrete events
The person is moved from the current
Place
to the new one based on the generatedEvent
, and stays there for a defined duration (in minutes).Once an event or task get fulfilled, the
EventGenerator
produces a newEvent
. If, after a limited number of trials, theEventGenerator
is not able to correctly generate an event, a random one is created.If a person gets interrupted while carrying out (waiting) its current task, the assigned event happens to be the new one.
Note
State snapshots are taken after each event if fulfilled.
- Yields
Process – an event yielding generator
- wait() → None[source]¶
Wait for a certain amount of time
- Yields
Timeout – event triggered after a delay has passed
- assign_event(event: archABM.event.Event) → None[source]¶
Interrupt current task and assign new event
- Parameters
event (Event) – new assigned event
- update(elapsed: float, quanta_inhaled: float, CO2_level: float) → None[source]¶
Update the infection risk probability and the CO2 concentration (ppm).
- save_snapshot() → None[source]¶
Saves state snapshot on
SnapshotPerson