Person

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

Person primitive

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

Resets Person ID.

static next()None[source]

Increments one unit the Person ID.

start()None[source]

Initiates the event queue processing

process()None[source]

Processes the chain of discrete events

The person is moved from the current Place to the new one based on the generated Event, and stays there for a defined duration (in minutes).

Once an event or task get fulfilled, the EventGenerator produces a new Event. If, after a limited number of trials, the EventGenerator 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).

Parameters
  • elapsed (float) – event elapsed time (in minutes)

  • infection_risk (float) – infection risk probability

  • CO2_level (float) – CO2 concentration (ppm)

save_snapshot()None[source]

Saves state snapshot on SnapshotPerson