VRP with Time Windows (VRPTW)
The VRPTW is the same problem as the VRP with the additional restriction that a time window is associated with each customer
, defining an interval
within which the customer has to be supplied. The interval
at the depot is called the scheduling horizon.
Formal description
- Objective: minimize the vehicle fleet and the sum of the travel time and waiting time needed to supply all customers within their required hours.
- Feasibility: with respect to the VRP, the VRPTW is characterized by the following additional restrictions:
- a solution becomes infeasible if a customer is supplied after the upper bound of its time window;
- a vehicle arriving before the lower bound of a time window incurs additional waiting time on the route;
- each route must start and end within the time window associated with the depot;
- in the case of soft time windows, late service does not make the solution infeasible but is penalized by adding a value to the objective function.
- Formulation: let
denote the beginning of service at customer
. For a route
to be feasible it must additionally hold that
,
and
. Provided that a vehicle travels to the next customer as soon as it has finished service at the current one,
can be computed recursively as
, with
and
. Thus, a waiting time
may be induced at customer
.
The cost of route
is now given by
. For a solution
with routes
, the cost of
is given by
, where M is a large constant. M is added because minimizing the fleet size is considered the primary objective of the VRPTW.
is feasible if all its routes are feasible and each customer is served by exactly one route.As described by Solomon [Solomon 1995], we assume that initially all vehicles leave the depot at the earliest possible time
. Once a solution has been obtained, the depot departure time of each vehicle is adjusted to eliminate any unnecessary waiting time.
The figure below shows a graph representing a VRPTW instance and a solution. The blue and white bars represent the time windows (i.e. business hours), the white area being when a delivery can be made at that customer, while the red line shows when the delivery is actually made in this particular solution.
See also: VRP formulation · Capacitated VRP · Solomon benchmark instances