Engine

class archABM.engine.Engine(config: dict)[source]

Core class of the archABM package

Launches the agent-based simulation with the specified configuration.

db: archABM.database.Database
env: simpy.core.Environment
config: dict
retrieve_schema()[source]

Get configuration file JSON schema

Returns

json-schema

Return type

dict

preprocess(config)None[source]

Processes the configuration dictionary to generate people.

Based on the specified configuration of number of people per group, this method generates an array of people, and assignes a incremental name to each person.

setup()None[source]

Setup for a simulation run.

Creates the environment and the required assets to run a simulation: Options, AerosolModel, Event, Place, Actions, Person.

run(until: Optional[int] = None, number_runs: Optional[int] = None)dict[source]

Launches a batch of simulations

Parameters
  • until (int, optional) – duration of each simulation, in minutes. Defaults to None.

  • number_runs (int, optional) – number of simulation runs. Defaults to None.

Returns

simulation history and configuration

Return type

dict