Mesa Wrapper
Thin Mesa wrapper around the existing Simulation for SolaraViz.
This module defines the HospitalABM class, which serves as a wrapper around the
existing AMR Hub simulation to enable integration with SolaraViz for visualization
purposes. The functionality mirrors the existing simulation, defined in run.py, but is
adapted to fit the Mesa framework for easier visualization.
HospitalABM
Bases: Model
Mesa model wrapper around the AMR Hub simulation for visualization.
Source code in src/amr_hub_abm/mesa_wrapper.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
__init__(config_path='tests/inputs/simulation_config.yml')
Initialize the model and seed infections for demo purposes.
Source code in src/amr_hub_abm/mesa_wrapper.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
create_new_simulation()
Create a new simulation.
Source code in src/amr_hub_abm/mesa_wrapper.py
39 40 41 | |
step()
Advance the wrapped simulation by one time step.
Source code in src/amr_hub_abm/mesa_wrapper.py
43 44 45 46 47 48 49 | |