Getting Started

Installation & Setup

System Requirements

  • Java 11 (or later)
  • Repast Simphony 2.11.0
  • Eclipse IDE (recommended for development)
  • R 4.0+ (for analysis scripts)

See System Requirements for detailed setup instructions.

Project Structure

FacilityEpiSim/
├── src/                          # Java source code
│   ├── agents/                   # Agent classes (Person, DischargedPatient)
│   ├── agentcontainers/          # Container classes (Facility, Region)
│   ├── builders/                 # Simulation builder (FacilityEpiSim)
│   ├── disease/                  # Disease logic (Disease, FacilityOutbreak, PersonDisease)
│   ├── processes/                # Process definitions (Admission)
│   ├── data/                     # Data classes (PatientData)
│   └── utils/                    # Utility classes (TimeUtils, Chooser)
│
├── FacilityEpiSim.rs/            # Repast Simphony configuration
│   ├── parameters.xml            # Parameter defaults
│   └── scenario.xml              # Scenario definition
│
├── batch/                        # Batch configuration files
│   └── batch_params.xml          # Batch Parameters
│              
├── launchers/                    # Eclipse launch configurations
├── new_analysis/                 # R analysis scripts
└── Makefile                      # Build targets

Running Your First Simulation

Eclipse

  1. Import Project
    • Clone FacilityEpiSim into a working folder
    • In Repast: File → Import → General → Existing Projects into Workspace
    • Select the project directory
    • Click Finish
  2. Launch and Run
    • Use the green run button with the drop-down to select the single-run version of the launcher
    • Configure the parameters in the parameters tab, initialize the simulation and run it
    • Look in the root folder for the txt files

Manual Parameter Configuration

Configure parameters through the Repast runtime or by manually editing the parameters file.

Parameters File

Edit FacilityEpiSim.rs/parameters.xml to configure:

<!-- Disease transmission -->
<parameter name="beta" value="0.0615"/>

<!-- Importation probability -->
<parameter name="importationRate" value="0.206"/>

<!-- Decolonization timing -->
<parameter name="avgDecolonizationTime" value="387"/>

<!-- Surveillance -->
<parameter name="daysBetweenTests" value="14"/>
<parameter name="admissionSurveillanceAdherence" value="0.911"/>
<parameter name="midstaySurveillanceAdherence" value="0.954"/>

<!-- Isolation effectiveness -->
<parameter name="isolationEffectiveness" value="0.5"/>

See Parameters for complete documentation.

Understanding Output

After running a simulation, check:

  • Batch-run Mode:
    • outputs/sim_modeloutputs.<datetime>.txt - Summary statistics and aggregates - One row per iteration
  • Single-run Mode:
    • daily_population_stats.txt Time series data (one row per day)
    • admissions.txt - Patient admission events
    • transmissions.txt - Transmission events (if enabled)
    • clinicalDetection.txt - Clinical detection events
    • decolonization.txt - Decolonization outcomes
    • surveillance.txt - Surveillance test results

Troubleshooting

No Launchers Availble in Repast IDE

  • make sure the name of the local project is the same as the name of the scenario folder, without the .rs.
  • find the appropriate launcher in the launchers folder. Right click and “run as..”

Resources