How dimastoyanov/ambulance-dispatching works
Project type and purpose
• This is an academic research pipeline for “Ambulance Dispatching.”
• It couples game-theoretic models with discrete-event simulation to explore ambulance dispatch policies and regulation effects.
• The Jupyter notebooks at the root provide interactive exploration and presentation of results; the src directory contains all the implementation modules.
File structure
• Top-level folders and files
– Jupyter notebooks (GT.ipynb, Dispatcher Agent.ipynb, Healthcare Regulation.ipynb): user interface and result walkthrough.
– docs/: static documentation in docx and PDF formats.
– src/: source code subdivided into data, game theory models (gt), Nash equilibrium engine (neng), simulation modules, and shared utilities.
• src/data: raw and aggregated CSV inputs for hospitalizations and transportation networks.
• src/gt: core game-theoretic model definitions plus plotting subpackages.
• src/neng: numerical engine for computing Nash equilibria and strategy profiles.
• src/simulation: discrete-event simulation of patients, hospitals, and transport, plus statistics and plotting.
• Configuration/build scripts: none (pure Python modules).
README insights
• Literature references define the academic context.
• Implementation section points to three main notebooks and the /src folder as the implementation.
Main components
a. Data layer
– Raw CSV source files under src/data
– Aggregated transportation data
b. Preprocessing/Utilities
– src/common.py for shared routines
– src/data/transportation/prepare_data.py
c. Game Theory Engine
– src/gt/core: models of hospitals, dispatcher, Nash equilibrium routines
– src/neng: solver algorithms
d. Simulation Engine
– src/simulation/core: event and patient flow modeling
– src/simulation/surgery, /transportation: domain-specific extensions
– src/simulation/stats: data collection from runs
e. Visualization/Reporting
– src/gt/plot and src/simulation/plot: generate charts
– Jupyter notebooks: orchestrate modules, render plots, present results
f. External references
– PDF literature, static docs in docs/
Relationships and interactions
• Data flows from the Data layer into both the Game Theory Engine and the Simulation Engine.
• The Game Theory Engine may feed optimal dispatch strategies into the Simulation Engine to compare outcomes.
• The Nash equilibrium solver (neng) is invoked by gt/core modules.
• Both engines output results consumed by their respective plotting modules.
• Jupyter notebooks import common, engine modules, run experiments, and render visualizations in-line.
Architectural patterns and principles
• Modular separation of concerns: data ingestion, core computation (game vs. simulation), numerical solvers, visualization.
• Pipeline pattern: raw data → preprocessing → modeling → analysis → reporting.
• Reusable library modules (common, neng) that can be tested independently.
Detailed capture of essential elements
• Shared/common utilities as a side-connected component.
• Documentation (docs/) as a passive artifact.