{
  "format": "Bus Bunching Lab scenario",
  "notes": "Units: seconds from time zero; bus numbers start at 1. At equal timestamps, mandatory arrivals and completions precede listed manual actions, then one automatic decision batch, then door starts and departures. Cutoff includes arrivals at that timestamp, cancels later demand and ends new automatic decisions. The temporal control window is start inclusive, end exclusive; its automatic components restore normal service at end. Manual bounded instructions may finish or expire during drain. Cohort includes all present just before its boundary plus births through cutoff, retaining original whole-journey clocks. until_recovered uses forward gap at most 110% of ideal; a convoy leader owns the long wrap arc. Stopping precedes overhead and sequential door service; both overlap holds. Starting extends the following travel segment after service/holds. True bypasses incur neither stopping nor starting penalties. A boarding_limit permits the specified number of new boardings per visit; existing boarding finishes. See scenario-guide.html for bounds and definitions.",
  "name": "two-gap-hold",
  "description": "Matched skip and hold comparison.",
  "setup": {
    "stops": 12,
    "buses": 4,
    "travel_seconds_per_segment": 40,
    "passengers_per_stop_per_minute": 3,
    "arrival_pattern": "poisson",
    "boarding_seconds_per_passenger": 2,
    "debarking_seconds_per_passenger": 1,
    "ride_length_stops": 2,
    "ride_pattern": "random",
    "random_seed": 970074056
  },
  "model": {
    "stop_overhead_seconds": 0,
    "stopping_delay_seconds": 5,
    "starting_delay_seconds": 5,
    "bus_capacity": null,
    "allow_overtaking": true,
    "calibration_notes": "Illustrative teaching model; not empirically calibrated."
  },
  "observation": {
    "cohort_start_seconds": 1200,
    "arrival_cutoff_seconds": 3600,
    "drain_max_seconds": 14400
  },
  "interventions": [
    {
      "at_seconds": 1200,
      "bus": 1,
      "action": "hold",
      "seconds": 180
    }
  ],
  "recovery_policy": {
    "rule": "two-gap",
    "rule_explanation": "Polling comparison: use one ordered snapshot, once per visit. Holding has leader protection, 30-second action limit, 90-second total budget and two-visit cooldown. Service restrictions preserve accepted drop-offs; no temporal coverage guarantee is claimed. Use passenger-cost for destination safeguards.",
    "start_seconds": 1500,
    "end_seconds": 3600,
    "check_every_seconds": 5,
    "condition": {
      "ahead": "small",
      "behind": "large",
      "small_ratio": 0.9,
      "large_ratio": 1.1
    },
    "response": {
      "action": "hold",
      "seconds": 30
    }
  }
}
