Skip to main content

Slack

Term explanation

In the context of Vehicle Routing Problems (VRPs), slack refers to the unused time at a particular location. This unused time arises when a vehicle arrives at a location earlier than the scheduled start of service and must wait before starting the service.

Why Slack is Important in VRPs

  • Realistic Modeling: Slack allows for more realistic modeling of real-world scenarios where vehicles often arrive early due to traffic conditions or other factors.
  • Flexibility: Incorporating slack into VRP models provides flexibility in scheduling and routing decisions, potentially leading to more efficient solutions.
  • Time Window Constraints: In VRPs with time window constraints (VRPTW) and\or with capacity constrains CVRPTW, slack is crucial for ensuring that vehicles arrive within the specified time windows.

Relation between slack and time_factor in routing engine settings

**Slack time** = (next waypoint scheduled timestamp - current waypoint’s scheduled TS) - current waypoint’s service time - (current waypoint’s leg duration * time_factor)

warning

time_factor should be coming from the route engine settings if not, please use 1.0 as the default value. It allows for manual adjustment of travel time between the waypoints.

Please do not adjust this parameter since it can lead to inaccurate time\distance matrixes for route optimization.

If the slack value < 0, assign 0 for the slack value; otherwise, the slack value = new slack value/ number of bookings of the waypoint