-
Notifications
You must be signed in to change notification settings - Fork 0
R2 Simulation Spec
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.
{
version?: number // defaults to 1
start_time: string, // "HH:MM" timestamp
end_time: string, // "HH:MM" timestamp
vehicle_battery_capacity: number, // probably should have check that it isn't 0
stations: [
{
name: string,
position: [number, number], // [lon, lat]
initial_task_count?: number, // defaults to 0
scheduled_tasks: string[] // list of "DAY:HH:MM" 8601 timestamps
}
],
vehicles: [
{
name: string,
position?: [number, number] | string, // [lon, lat] or station name - can be omitted
battery_count?: number // assume 0 if not provided
}
],
drivers: [
{
name: string, // is a name necessary?
shift: {
start_time: string, // "DAY:HH:MM" timestamp
end_time: string, // "DAY:HH:MM" timestamp
lunch_break?: string, // "DAY:HH:MM" timestamp marking beginning of 30 minute lunch break - can be omitted
}
}
],
}- There must be at least 1 station, 1 vehicle, 1 driver, and 1 task in any scenario created.
- There must be as many drivers that are on-shift at simulation start time as there are vehicles with a specified position.
- No vehicle should have a
battery_countthat is greater thanvehicle_battery_capacity.
The biggest simulation change in release 2 is the separation of resources into distinct driver and vehicle entities. The list below details their behaviour over the course of a running sim:
- At simulation start, every non-HQ vehicle is assigned a driver whose shift is beginning / has already begun.
- When a driver's shift ends, they return to HQ, and their vehicle is reassigned to another driver if one is waiting (on-shift) at HQ.
- When a driver's shift ends, they return to HQ, and their tasks are released as unassigned.
- When a driver ends their shift, returns to HQ, and releases their vehicle, this vehicle enters "battery refill state" even if immediately assigned to a new driver that had been waiting at HQ.
interface R2Payload {
simId: string
tasks: {
id: number
stationId: number
state: 'open' | 'assigned' | 'inprogress' | 'closed'
assignedDriverId: number | null
}
stations: {
id: number
name: string
position: [number, number]
taskIds: number[]
}
drivers: {
id: number
position: [number, number]
taskIds: number[]
route?: {
coordinates: [number, number][]
}
// NEW 'state' attribute
// not strictly necessary but nice-to-have - wait to see what amby ends up doing for driver state in sim side
state:
| 'off_shift'
| 'on_route'
| 'servicing_station'
| 'lunch_break'
| 'idle'
| 'ending_shift'
// NEW 'shift' attribute
shift: {
start_time: string // "DAY:HH:MM" timestamp
end_time: string // "DAY:HH:MM" timestamp
lunch_break?: string // "DAY:HH:MM" timestamp - might NOT be ommitable if in the end we decide all lunch breaks on sim init / start - tbd.
}
inProgressTaskId: number | null
vehicleId: number | null // null implies at HQ, not on route
}
vehicles: {
id: number
driverId: number | null // null implies at HQ, not on route
batteryCount: number
}
clock: {
simSecondsPassed: number
simMinutesPassed: number
realSecondsPassed: number
realMinutesPassed: number
startTime: number
}
}Simulation Meeting Minutes
Frontend Meeting Minutes
Backend Meeting Minutes
Risks
User Consent and End-User License Agreement
Legal and Ethical Issues
Economic
Budget
Personas
Diversity Statement
Overall Architecture and Class Diagrams
Infrastructure and Tools
Name Conventions
Testing Plan and Continuous Integration
Security
Performance
Deployment Plan and Infrastructure
Missing Knowledge and Independent Learning
Glossary
Mockups
UI Evolution
Logging
Metrics
VeloSim Observability & Performance Insights
User Manual
Usability Tests