Skip to main content

Time Window Buffer

Overview

In real-world logistics, arriving exactly at a location's closing time is often operationally infeasible. If a warehouse closes at 5:00 PM and unloading takes 30 minutes, a vehicle arriving at 4:59 PM cannot be serviced, even though it technically arrived within the "open" window.

The Time Window Buffer feature solves this by automatically "shrinking" the effective time window of a location. It ensures vehicles arrive with enough lead time to complete their service before the facility closes.

Value to Planner

  • Operational Reliability: Guarantees that vehicles don't just "arrive" on time, but arrive early enough to perform the work.
  • Reduced Failures: Prevents failed deliveries caused by gate closures or shift ends.
  • Simplified Planning: Planners don't need to manually calculate "safe arrival times" for every order; the system applies a standard safety margin automatically.

How It Works

The system applies a buffer (offset) to the closing time of the OperationsLocation. This creates an "Effective Closing Time" that the optimization engine must respect.

Formula: Effective Close Time = Location Close Time - Close Time Offset

  • Example:
    • Location Open/Close: 09:00 AM - 05:00 PM
    • Buffer (Close Time Offset): 30 minutes
    • Effective Window: 09:00 AM - 04:30 PM

The vehicle is forced to arrive by 4:30 PM, leaving 30 minutes for operations before the 5:00 PM hard stop.

Configuration

This constraint is configured via the calculation_params object on Operations Locations.

Levels of Application

You can define this constraint at two levels, with standard inheritance logic:

  1. Operations Location Group (Area Level):

    • Define the buffer once for a group (e.g., "All Retail Stores").
    • Benefit: Applies a standard safety policy to hundreds of locations instantly.
    • Behavior: Any location in this group inherits this buffer automatically.
  2. Operations Location (Specific Level):

    • Define the buffer on a specific location (e.g., "Store #105 Downtown").
    • Benefit: Overrides the group setting for specific needs (e.g., this store has slower security).
    • Behavior: This setting overrides the group setting. If a specific value is set here, it ignores the group value. If left blank, the group value is inherited.

Parameter Structure

"calculation_params": {
"close_ts_offset": {
"fixed": 1800 // 1800 seconds = 30 minutes
},
"open_ts_offset": {
"fixed": 0 // Optional: buffer for opening time
}
}
  • close_ts_offset: Seconds to subtract from the closing time.
  • open_ts_offset: Seconds to add to the opening time (rarely used).

Enabling the Feature

To use this feature, ensure it is enabled in your logistics_api_settings:

ParameterValueDescription
enable_time_windows_adjustmenttrueActivates the adjustment logic.
time_windows_adjustment_strategyDROPOFF_FIXED_CLOSE_TS_OFFSETUses the fixed offset strategy described above.