Welcome to the AMR-Hub Project. We aim to model the transmission of Anti-Microbial Resistance in Hospitals.
As a part of the Digital Health Hub for Antimicrobial Resistance (AMR), this project is an open-source agent-based modelling (ABM) framework for simulating hospital workflows, human movement, and antimicrobial resistance (AMR) transmission dynamics within healthcare environments. The project is designed around a Trusted Research Environment (TRE)-centric workflow that separates sensitive healthcare data from publicly distributable simulation software and anonymised outputs.
The framework combines hospital geometry modelling, task scheduling, infection propagation, movement simulation, and interactive visualisation into a modular research software platform. It is intended both as a scientific modelling framework and as a reusable infrastructure for future epidemiological and operational healthcare simulations.
The architecture is structured around four major stages:
This separation ensures that sensitive healthcare datasets remain securely inside Trusted Research Environments while allowing the simulation engine itself to remain open-source and publicly distributable.
The input layer contains sensitive or restricted healthcare datasets that remain inside the TRE. These include hospital floorplans, routinely collected operational data, infection-related datasets, and simulation configuration files. Before simulation, the data is transformed into simulation-ready formats that define hospital geometry, infection parameters, agent schedules, and movement constraints.
The simulation configuration is typically controlled using YAML files, while healthcare datasets may originate from databases, spreadsheets, or time-series movement records. Architectural hospital layouts are converted into structured geometric representations suitable for spatial simulation.
The simulation engine is the core computational layer of the project and is designed to be publicly distributable. The codebase handles agent movement, task scheduling, occupancy modelling, interaction generation, infection transmission, and temporal progression within hospital environments.
Agents may represent patients, healthcare workers, visitors, cleaning staff, or administrative personnel. Their behaviour combines deterministic scheduling with stochastic movement and environmental awareness. The simulation environment itself is composed of buildings, floors, rooms, walls, and doors, allowing the framework to support realistic hospital geometries rather than simple grid-based environments.
The architecture is intentionally modular and extensible to support future developments such as uncertainty quantification, reinforcement learning approaches, GPU acceleration, and modelling of multiple pathogens.
More information on the simulation code can be found in the simulation documentation.
The simulation produces anonymised outputs suitable for downstream analysis and visualisation. These outputs include movement trajectories, interaction timelines, task histories, and infection progression records.
Agent movement trajectories can be used to analyse occupancy patterns and movement hotspots. Interaction matrices and timelines support contact-network analysis and transmission studies. Task histories provide insight into operational workflows, while infection timelines allow researchers to study outbreak progression and intervention effectiveness over time.
The output layer is designed so that only anonymised summaries need to leave the TRE environment.
The dashboard layer provides interactive visualisation and reporting capabilities built using Mesa, Solara, Matplotlib, and Pandas. Depending on governance requirements, the dashboard may operate entirely inside the TRE or on anonymised exported outputs.
The dashboard can provide live floorplan visualisation, task monitoring, infection summaries, occupancy statistics, movement replay, animations, and interactive reports. The visualisation layer is designed to be configurable according to end-user requirements while preserving privacy and governance constraints.
The repository is organised to separate simulation code, documentation, examples, and development infrastructure.
amr-hub/
├── .devcontainer/ # Development container configuration
├── .github/ # GitHub Actions and repository automation
├── docker/ # Docker configurations and supporting
|
├── docs/ # Documentation source files
├── examples/ # Example simulations and demonstrations
├── python-code/ # Core AMR-Hub simulation package
├── schemas/ # Configuration and data schemas
├── static/ # Static assets for documentation and
|
├── workspace_settings/ # Shared development environment settings
├── README.md
├── CONTRIBUTING.md
├── Makefile
└── LICENSE
python-code/contains the core simulation framework, including agent definitions, environment models, infection dynamics, task scheduling, visualisation components, and tests. The core agent-based model is implemented inpython-code/src/amr_hub_abm/, whilepython-code/src/floorplan_extractor/contains logic to convert floorplan data into the simulation format.docs/contains the source files used to build the project documentation website.examples/provides example configurations, demonstrations, and tutorials for users and developers.schemas/defines the validation rules and schemas used for simulation input files.static/stores images, diagrams, and other static assets referenced throughout the documentation..github/,.devcontainer/, andworkspace_settings/provide the tooling required for continuous integration, reproducible development environments, and containerised workflows.
The project emphasises modularity, reproducibility, extensibility, testing, and documentation. The architecture is intentionally designed so that preprocessing pipelines, simulation logic, visualisation layers, and TRE infrastructure remain independently maintainable and replaceable.
The framework follows modern research software engineering practices with a focus on maintainability, transparency, and long-term reuse.
See the contributing guidelines for more information on how to get involved with the project.
This project is licensed under the MIT License. Welcome to the AMR-Hub Project. We aim to model the transmission of Anti-Microbial Resistance in Hospitals.
This work is being undertaken as part of the Digital Health Hub for Antimicrobial Resistance (AMR), which is funded by the EPSRC (EP/X031276/1).
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
