Files
edr-platform/apps/edr-freight-api/src/modules/train-scheduling/booking-batch.constants.ts
Marshal 56de90892d Add booking window management and locomotive scheduling features
- Implemented migration to release stuck assigned locomotives.
- Added schedule window phases to train schedules.
- Created booking batch offers table for partial capacity bookings.
- Developed BookingSplitService to handle partial booking offers and splits.
- Introduced BookingWindowService to manage booking window lifecycle and transitions.
- Added BookingBatchOffer entity to represent offers made during booking splits.
- Enhanced locomotive options with warnings for scheduling.
- Created UpcomingWindowsSection component to display upcoming booking windows.
2026-07-03 03:36:06 +00:00

27 lines
1.0 KiB
TypeScript

/**
* Tunables for the demand-batching booking → allocation flow.
* Times run in EAT so window boundaries match the local operating clock.
*
* Cadence and pay-window durations moved to the train_scheduling_global_rules
* table (TrainSchedulingService.getWindowConfig) — the window engine
* (BookingWindowService) drives all timing off that config.
*/
export const BATCH_TIMEZONE = 'Africa/Addis_Ababa';
/** 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;