Skip to content

Analysis window

analysisWindow is optional on POST /api/v1/calculate. Both hours are military stamps (0, 100, …, 2300). startHour is inclusive and must be less than or equal to endHour. A bad window returns 400.

Omitted means { startHour: 500, endHour: 2100 }. Every supplied hour is still calculated into allMetrics24Hr. These response fields use the window:

  • sixteenHourEfficiency — share of window hours whose v/c is between 0.6 and 1. The name is historical; the default window is 16 hours.
  • sixteenHourExcessCapacity — excess capacity summed over that same window.

maxVcRatio and hoursBelowCapacity stay over every supplied hour. The response echoes the resolved analysisWindow.

Keys are military-time hour stamps: 0 (midnight), 100 (1:00 AM), 200, …, 2300 (11:00 PM). Each value is a leg-movements object with left, thru, and right.

24 entries are expected. The engine accepts fewer entries, but:

  • Windowed efficiency and excess capacity use analysisWindow (default 500–2100). If no supplied hours fall in that window, efficiency is 0.
  • Peak-hour auto-selection picks from the supplied entries only, so partial data may not represent the true peak.
  • Test fixtures and demo data provide a full 24-hour set.

peakHourVolumes is optional. If omitted, the peak is the hour in allDayVolumes with the highest v/c. globalInputsForm (facility names for PDF labels) is ignored by the calculation and passed through.