mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 09:42:53 +00:00
33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
/**
|
||
* Tunables for the demand-batching booking → allocation flow.
|
||
* Times run in EAT so the 07:00/10:00/… boundaries match the local operating clock.
|
||
*/
|
||
|
||
/** Batch boundaries — every 3h from 00:00 (00–03, 03–06, … 21–24), matching the board windows. */
|
||
// export const BATCH_CRON = '0 7,10,13,16,19,22 * * *';
|
||
// export const BATCH_CRON = '*/3 * * * *';
|
||
export const BATCH_CRON = '*/5 * * * *';
|
||
// export const BATCH_CRON = '0 */3 * * *';//
|
||
|
||
export const BATCH_TIMEZONE = 'Africa/Addis_Ababa';
|
||
|
||
/** How long a selected commercial customer has to pay before their slot expires. */
|
||
// export const PAYMENT_WINDOW_MS = 60 * 60 * 1000; // 1 hour
|
||
export const PAYMENT_WINDOW_MS = 180 * 60 * 1000; // 5 minutes (test mode)
|
||
|
||
/** Fallback wagons-per-booking when a booking has no computed `wagonsRequired`. */
|
||
export const DEFAULT_WAGONS_PER_BOOKING = 1;
|
||
|
||
/**
|
||
* Fallback per-wagon length (m) for the batch length budget when global rules don't yet
|
||
* define maxTrainLength / maxWagons to derive it from. Used only to estimate train length
|
||
* against the locomotive's max train length.
|
||
*/
|
||
export const DEFAULT_WAGON_LENGTH_METERS = 14;
|
||
|
||
/** Default NW5 flat wagon length for container bookings (m). */
|
||
export const DEFAULT_CONTAINER_WAGON_LENGTH_METERS = 14;
|
||
|
||
/** Default CW3 covered wagon length for bulk bookings (m). */
|
||
export const DEFAULT_BULK_WAGON_LENGTH_METERS = 14;
|