Lecture 23: Vehicle Routing Problem#

General Description#

Capacitated Vehicle Routing Problem#

A typical Vehicle Routing Problem is defined on a directed graph \(G=(d,C,A)\), where \(d\) represents depot node, node set \(C\) represents customer nodes, and arc set \(A\) represents the set of arcs connecting these nodes. Here, each customer node \(c \in C\) has a demand \(q_c\) that must be fulfilled from the depot via delivery fleet \(V\), wherein each vehicle \(v\) has a capacity \(q_v\) and speed \(s_v\). Given traversal cost \(c_{ij}\) for arc \((i,j) \in A\), the objective of a Vehicle Routing Problem is to develop least cost routes from the depot node using select vehicles such that every customer node is visited exactly once while satisfying all logistic constraints.

Objective:

\[ \min_{\mathbf{x,y}} z = \sum_{v \in V}\sum_{(i,j) \in A} c_{ij}x^v_{ij} \]

Subject to:

\[\begin{split} \begin{aligned} \sum_{v \in V}\sum_{k \in H(c)} x^v_{ck} & = 1 & \ \forall \ c \in C \\ \sum_{i \in T(j)} x^v_{ij} & = \sum_{k \in H(j)} x^v_{jk} & \ \forall \ j \in N, \ v \in V \\ \sum_{c \in H(d)} x^v_{dc} & \leq 1 & \forall \ v \in V \\ \sum_{v \in V}\sum_{c \in H(d)} x^v_{dc} & \leq |V| \\ y^v_k & \leq x^v_{ck}(y^v_c - q_c) + (1 - x^v_{ck})\text{M} & \forall \ c \in C, \ k \in H(c), \ v \in V \\ y^v_c & \leq q_v & \forall \ c \in C, v \in V \\ y^v_d & = 0 & \forall \ v \in V \\ x^v_{ij} & \in \{0,1\} & \ \forall \ (i,j) \in A, \ v \in V \\ y^v_c & \in \mathbb{R}_+ & \forall \ c \in C, \ v \in V \end{aligned} \end{split}\]

Here, \(x^v_{ij}\) represents traversal of arc \((i,j)\) by vehicle \(v\), while \(y^v_c\) represents load on-arrival at customer node \(c\) with vehicle \(v\).

Note,

  • first constraint is the customer service constraint, requiring every customer node to visited exactly once by one of the vehicles

  • second constraint is the flow conservation constraint, necessitating incoming flow for vehicle \(v\) at node \(j\) to match the outgoing flow

  • third constraint is the vehicle use constraint, ensuring that each vehicle only makes at most one delivery tour

  • fourth constraint is the fleet size constraint (note that this is redundant due to the third constraint)

  • fifth constraint is the load balance constraint, managing vehicle load on all the nodes based on the order of customer visit

  • sixth constraint is the vehicle capacity constraint

  • seventh constraint is the boundary condition constraint, ensuring that vehicle arrives back empty at the depot node

Example#

The Chennai head post-office needs to deliver packages via the 9 branch post-offices using a fleet of 3 small delivery trucks, each with capacity of 750, 900, and 1000 kgs. Given the demand at each branch post-office and the distances between these post-offices, how should the head post-office deploy its fleet of delivery trucks.

Table 1. Cost

\(c_{ij}\)

0

1

2

3

4

5

6

7

8

9

0

0

5

10

15

20

25

30

35

40

45

1

5

0

6

12

18

22

28

33

38

44

2

10

6

0

7

14

18

24

29

34

40

3

15

12

7

0

8

14

20

26

30

36

4

20

18

14

8

0

7

13

19

24

30

5

25

22

18

14

7

0

6

13

18

24

6

30

28

24

20

13

6

0

7

14

20

7

35

33

29

26

19

13

7

0

8

14

8

40

38

34

30

24

18

14

8

0

6

9

45

44

40

36

30

24

20

14

6

0

Table 2. Demand

P.O.

\(q_c\)

1

150

2

200

3

250

4

300

5

250

6

150

7

350

8

400

9

300

Note

For only a 10-node problem, we have a huge number of constraints. As the problem size increases, the number of constraints grows exponentially, making direct solution approaches computationally expensive. To address this, researchers have developed exact optimization methods such as Branch-and-Bound (B&B) and Branch-and-Price (which combines Column Generation with B&B). These methods decompose the problem into smaller subproblems and iteratively refine solutions to find the global optimum efficiently. However, for large instances, exact methods may still be computationally prohibitive. In such cases, heuristic and metaheuristic approaches, including Nearest Neighbor, Genetic Algorithms, Simulated Annealing, and Ant Colony Optimization, provide near-optimal solutions in a reasonable time. In the next module, we will explore some of these heuristic approaches.

Capacitated Vehicle Routing Problem with Time-Windows#

Additional to the problem attributes stated above, if each arc \((i,j) \in A\) spans a length \(l_{ij}\), each customer node \(c \in C\) has a service time \(\tau_c\) as well as a service time-window (earliest and latest service time) \([t^e_c, t^l_c]\), and if each vehicle \(v \in V\) has a loading time \(\tau_v\), then the formulation should be augmented as follows,

Objective:

\[ \min_{\mathbf{x,y,t}} z = \sum_{v \in V}\sum_{(i,j) \in A} c_{ij}x^v_{ij} \]

Subject to:

\[\begin{split} \begin{aligned} \sum_{v \in V}\sum_{k \in H(c)} x^v_{ck} & = 1 & \ \forall \ c \in C \\ \sum_{i \in T(j)} x^v_{ij} & = \sum_{k \in H(j)} x^v_{jk} & \ \forall \ j \in N, \ v \in V \\ \sum_{c \in H(d)} x^v_{dc} & \leq 1 & \forall \ v \in V \\ \sum_{v \in V}\sum_{c \in H(d)} x^v_{dc} & \leq |V| \\ y^v_k - M(1 - x^v_{ck}) & \leq x^v_{ck}(y^v_c - q_c) & \forall \ c \in C, \ k \in H(c), \ v \in V \\ y^v_c & \leq q_v & \forall \ c \in C, \ v \in V \\ y^v_d & = 0 & \forall \ v \in V \\ ^at^v_c & \geq x^v_{ic}(^dt^v_i + l_{ic}/s_v) + (1 - x^v_{ic})(-\text{M}) & \ \forall \ c \in C, \ i \in T(c), \ v \in V \\ ^dt^v_c & \geq \text{max}({}^at^v_c, t^e_c) + \tau_c & \ \forall \ c \in C, \ v \in V \\ ^dt^v_d & = \tau_v\sum_{c \in C}\sum_{i \in T(C)}x^v_{ic}q_c & \ \forall \ v \in V \\ ^at^v_c & \leq t^l_c & \ \forall \ c \in C, \ v \in V \\ x^v_{ij} & \in \{0,1\} & \ \forall \ (i,j) \in A, \ v \in V \\ y^v_c, {}^at^v_c, {}^dt^v_c & \in \mathbb{R}_+ & \forall \ c \in C, \ v \in V \end{aligned} \end{split}\]

Here, \(^at^v_c\) and \(dt^v_c\) represent the arrival and departure times of vehicle \(v\) at customer node \(c\), respectively.

Note,

  • first constraint is the customer service constraint, requiring every customer node to visited exactly once by one of the vehicles

  • second constraint is the flow conservation constraint, necessitating incoming flow for vehicle \(v\) at node \(j\) to match the outgoing flow

  • third constraint is the vehicle use constraint, ensuring that each vehicle only makes at most one delivery tour

  • fourth constraint is the fleet size constraint (note that this is redundant due to the third constraint)

  • fifth constraint is the load balance constraint, managing vehicle load on all the nodes based on the order of customer visit

  • sixth constraint is the vehicle capacity constraint

  • seventh constraint is the boundary condition constraint, ensuring that vehicle arrives back empty at the depot node

  • eigth and ninth constraints are arrival and departure time constraints, respectively, at customer nodes

  • tenth constraint is departure time constraint at depot node

  • eleventh constraint is customer time-window constraint

Caution

In the above formulation, we assume that a vehicle can arrive early at a customer node, and consequently wait before starting service (soft time-windows). This could be the case with delivery systems for commercial clients or warehouses, where operations are scheduled to align with fixed working hours or batch processing.

In an even more linient variant, the vehicle need not wait, but instead start service upon arrival. This is the case with most e-commerce deliveries, wherein if the package arrives earlier than expected/promised, then it could be left outside the customer’s door.

However, in a more stringent version (hard time-windows), the vehicle must arrive and service, both, within the specified time-window. This could be the case with supply-chains where precise timing is necessary to maintain the integrity of items or to ensure the availability of trained personnel for handling sensitive products.

Note

The Vehicle Routing Problem (VRP) has numerous variants, each addressing specific operational constraints or objectives. The Capacitated VRP focuses on minimizing the total cost of routing vehicles to service a set of customers using a fixed fleet of delivery vehicles, each with a given capacity. Additionally, the VRP with Time Windows (VRPTW) adds the requirement to service customers within specific time intervals. In the VRP with Pickup and Delivery (VRPPD), vehicles must handle both pickups and deliveries with precedence constraints, whereas the Split Delivery VRP (SDVRP) allows dividing customer demands across multiple vehicles for efficiency. The Open VRP (OVRP) relaxes the need for vehicles to return to the depot after completing their routes, and the Multi-Depot VRP (MDVRP) extends the problem to include multiple depots. Beyond these, many other variants of VRP exist to address specific logistic scenarios.

To address these sophisiticated variants of VRP, we typically deploy metaheuristic algorithms for practical purposes (discussed in the next module).