A Java-based agent-based model (ABM) built with Repast Simphony for simulating disease transmission in healthcare facilities, with a focus on Carbapenem-resistant Enterobacteriaceae (CRE) and other healthcare-associated infections.
This simulation model represents a single healthcare facility where patients are admitted, may become colonized with a disease, can transmit the disease to other patients, and may be clinically detected and isolated. The model is designed to evaluate the effectiveness of different surveillance and intervention strategies in controlling healthcare-associated infections.
- Patient Flow: Realistic patient admission and discharge patterns with exponential length of stay distributions
- Disease Dynamics: Models disease importation, transmission, colonization, clinical detection, and decolonization
- Surveillance Strategies: Configurable active surveillance testing with adjustable intervals and adherence rates
- Intervention Measures: Patient isolation upon detection with configurable effectiveness
- Multiple Metrics: Tracks prevalence, transmission rates, clinical detections, and discharge prevalence
- Burn-in Period: Allows the system to reach steady state before measurement begins
The simulation operates on several key components:
- Agents (Patients): Individual patients with disease status, admission/discharge times, and isolation status
- Facility: The healthcare facility container that manages patient populations and outbreak dynamics
- Disease Model: Represents the specific pathogen (e.g., CRE) with transmission parameters and clinical characteristics
- Processes: Handle patient admissions, discharges, and disease-related events
- Importation: New patients may arrive already colonized based on the importation rate
- Transmission: Colonized patients can transmit the disease to susceptible patients based on contact rates and transmission probability
- Clinical Detection: Colonized patients may be clinically detected after a time delay, triggering isolation
- Surveillance Testing: Active surveillance tests can detect colonized patients before clinical symptoms
- Decolonization: Patients naturally clear the infection over time
- Isolation: Detected patients are isolated, reducing their transmission potential
- Burn-in Period (default: 10 years): Allows the system to reach epidemiological equilibrium
- Measurement Period (default: 5 years): Data collection period for analysis
- Daily Events: Population tallies, surveillance testing, and metric calculations
- Java Runtime Environment (JRE): Java 8 or higher
- Repast Simphony: Included in the project dependencies
- Download the model archive from the releases section
- Extract to your desired location
- Run the appropriate script:
- Windows: Double-click
start_model.bat - Linux/macOS: Double-click
start_model.commandor run from terminal
- Windows: Double-click
-
Clone this repository:
git clone https://github.com/EpiForeSITE/single-facility-repast.git
-
Open Eclipse with Repast Simphony plugin installed
-
Import the project:
- File → Import → General → Existing Projects into Workspace
- Select the cloned directory
-
Build and run the model through Eclipse
After launching, you should see the Repast Simphony GUI with:
- Parameter settings panel
- Run controls (Initialize, Start, Pause, Stop)
- Real-time displays and charts (if configured)
The simulation behavior is controlled through parameters defined in single-facility.rs/parameters.xml:
longTermAcuteCareBeta(default: 0.0615): Base transmission rate coefficientavgDecolonizationTime(default: 387.0 days): Average time for natural clearanceimportationRate(default: 0.206): Probability of arriving colonized
meanDetectionTime(default: 122.0 days): Average time to clinical detectionprobSurveillanceDetection(default: 0.8): Probability of detection by surveillance testing
isolationEffectiveness(default: 0.5): Reduction in transmission when isolateddoActiveSurveillanceAfterBurnIn(default: true): Enable surveillance testingdaysBetweenTests(default: 14.0): Interval between surveillance tests
isBatchRun(default: false): Enable batch mode (disables individual output files)allowImportationsDuringBurnIn(default: false): Allow new infections during burn-in
- Through GUI: Modify parameters in the Repast interface before clicking "Initialize"
- Batch Runs: Configure parameter sweeps for systematic exploration
- Configuration Files: Edit
parameters.xmlfor default values
The model generates several output files for analysis:
simulation_results.txt: Summary statistics for the entire rundaily_population_stats.txt: Daily counts of colonized, detected, and isolated patientsadmissions.txt: Log of all patient admissions with colonization statustransmissions.txt: Record of all transmission eventsclinicalDetection.txt: Log of clinical detection eventsdecolonization.txt: Record of decolonization eventssurveillance.txt: Results of surveillance testing
- Mean Daily Prevalence: Average proportion of patients colonized per day
- Discharge Prevalence: Proportion of patients colonized at discharge
- Importation Prevalence: Proportion of admissions that are colonized
- Clinical Detections per 10,000 Patient-Days: Rate of clinical detection
- Total Transmissions: Number of facility-acquired infections
The output files can be analyzed using statistical software (R, Python, etc.) to:
- Calculate confidence intervals for key metrics
- Compare intervention scenarios
- Analyze temporal trends
- Estimate outbreak probabilities
- Well-mixed Population: All patients have equal contact probability
- Exponential Distributions: Length of stay and event times follow exponential distributions
- Single Disease: Models one pathogen at a time
- Perfect Detection: Surveillance tests detect all colonized patients (with specified probability)
- Compare model outputs to published literature on CRE transmission
- Validate parameter estimates against facility-specific data
- Conduct sensitivity analyses on key parameters
- Modify the
Diseaseclass to add new pathogen-specific parameters - Update
parameters.xmlwith disease-specific values - Adjust transmission and detection logic as needed
The model supports different facility types with varying transmission rates:
- Acute care hospitals
- Long-term acute care hospitals
- Nursing homes
- Multiple Diseases: Extend to model co-circulation of multiple pathogens
- Staff Transmission: Add healthcare worker agents as transmission vectors
- Spatial Structure: Implement ward-based transmission patterns
- Model Won't Start: Verify Java installation and Repast Simphony setup
- Parameter Errors: Check that all required parameters are specified
- Memory Issues: Increase JVM heap size for large population simulations
- Output Files Missing: Ensure
isBatchRunis set tofalsefor individual files
For technical issues or questions about the model:
- Check the Repast Simphony documentation: https://repast.github.io/docs/
- Review the code comments and TODO items in
todo.txt - Contact the development team for assistance
This model is under active development. Contributions are welcome in the form of:
- Bug reports and fixes
- Parameter validation studies
- Feature enhancements
- Documentation improvements
This project is licensed under the terms specified in license.txt. Please contact the developers for details regarding usage and distribution.
When using this model in research, please cite: [Add appropriate citation information once published]
[Add developer contact information]
This documentation provides a comprehensive overview of the single-facility disease transmission model. For technical details about the implementation, refer to the source code and inline comments.