Skip to content

R2 Simulation Spec

Thomas Mahut edited this page Nov 17, 2025 · 20 revisions

Release 2 Scenario Content

Scenarios are a set of initial conditions and parameters that define how a simulation will "play" against a dispatcher. This document outlines a schema for the scenario payload (content) for the given release.

Schema

{
  start_time: string, // ISO 8601 timestamp
  end_time: string, // ISO 8601 timestamp
  stations: [
    {
      station_name: string,
      station_position: [number, number], // [lon, lat]
      station_initial_task_count: number, // could make omittable?
      station_scheduled_tasks: string[] // list of ISO 8601 timestamps
    }
  ],
  vehicles: [
    {
      vehicle_name: string,
      vehicle_position?: [number, number] | string, // [lon, lat] or station name - can be omitted
      vehicle_battery_count: number // could nest in an `inventory` attribute for extensibility?
    }
  ],
  drivers: [
    {
      driver_name: string, // is a name necessary?
      driver_shift: {
        start_time: string, // ISO 8601 timestamp
        end_time: string, // ISO 8601 timestamp
        lunch_break?: string, // ISO 8601 timestamp marking beginning of 30 minute lunch break - can be omitted
      }
    }
  ],
}

Logical constraints

  1. There must be at least 1 station, 1 vehicle, 1 driver, and 1 task in any scenario created.
  2. There must be as many drivers that are on-shift at simulation start time as there are vehicles with a specified position.

Clone this wiki locally