A sequential insertion heuristic for the initial solution to a constrained vehicle routing problem

The Vehicle Routing Problem (VRP) is a well-researched problem in the Operations Research literature. It is the view of the authors of this paper that the various VRP variants have been researched in isolation. This paper embodies an attempt to integrate three specific variants of the VRP, namely the VRP with multiple time windows, the VRP with a heterogeneous fleet, and the VRP with double scheduling, into an initial solution algorithm. The proposed initial solution algorithm proves feasible for the integration, while the newly introduced concept of time window compatibility decreases the computational burden when using benchmark data sets from literature as a basis for efficiency testing. The algorithm also improves the quality of the initial solution for a number of problem classes.


Introduction
The Vehicle Routing Problem (VRP) is a well-researched problem in the Operations Research literature.The main objective in this type of problem is to minimize an objective function value, which is typically distribution cost for individual carriers.The area of application is wide, and specific variants of the VRP transform the basic problem to conform to application specific requirements.It is the view of the authors that the various VRP variants have been researched in isolation, with little effort to integrate various problem variants into an instance that is more appropriate to the South African particularity with regards to logistics and vehicle routing.
The VRP may be described as the problem of assigning optimal delivery or collection routes from a depot to a number of geographically distributed customers, subject to side constraints.The most basic version of the VRP may be defined in terms of a bi-directed complete graph G = (V, E), where V = {v 0 , v 1 , . . ., v n } is a set of vertices with v 0 representing the depot where m identical vehicles, each with capacity Q, are located.The remaining vertices, denoted by V \{v 0 }, represent customers each having a non-negative demand q i and a non-negative service time s i [17].The edge set connecting the vertices is given by E = {(v i , v j ) | v i , v j ∈ V, i = j}.A distance matrix C = {c ij } is defined on E. In some contexts, c ij may be interpreted as travel cost or travel distance from vertex v i to vertex v j .Hence, the terms distance, travel cost, and travel time are used interchangeably.The VRP consists of designing a set of m vehicle routes having a minimum total length such that: • each route starts and ends at the depot, • each remaining vertex (V \{v 0 }) is visited exactly once by exactly one vehicle, • the total demand of a route does not exceed Q, and • the total duration (including service and travel time) of a route does not exceed a preset limit L.
The VRP is an NP-hard combinatorial optimization problem for which several exact and approximate solution methods have been proposed (see Laporte [8] for a review).Early researchers, such as Clarke and Wright [1], realized that exact algorithms can only solve relatively small problems, but a number of heuristic algorithms have proved very satisfactory, in many cases yielding near-optimal solutions to relatively large problems.
The basic VRP is based on a number of assumptions, such as utilizing a homogeneous fleet, a single depot, and allocating one route per vehicle.These assumptions may be eliminated or relaxed by introducing additional constraints to the problem.This implies increasing the complexity of the problem, and, by restriction, classifies the extended problem as an NP-hard problem.It should be noted that most of these additional constraints are often implemented in isolation, without integration, due to the increased complexity of solving such problems.Thus the problem statement: Is it possible to solve a vehicle routing problem with multiple integrated constraints?
Finding a feasible, and integrated initial solution to a hard problem is the first step in addressing the scheduling issue.In this paper an algorithm is proposed that integrates three specific variants of the VRP.The paper also contributes to reducing the computational burden by proposing a concept referred to as time window compatibility (TWC) to evaluate the insertion of customers on positions within routes intelligently.The authors investigate the feasibility of integrating multiple soft time windows, a heterogeneous fleet and double scheduling constraints into a single problem instance, referred to simply in this paper as the Vehicle Routing Problem with Multiple Constraints (VRPMC).
A time window is the period of time during which deliveries can be made to a specific customer, indexed by i, and has three main characteristics: the earliest allowed arrival time denoted by e i , the latest allowed arrival time denoted by l i , and whether the time window is considered soft (allowing a penalized late service) or hard (no late service allowed).It is an extension of the VRP that has been researched extensively [5,14,15,16].
Gendreau et al. [3] propose a solution methodology for cases where the fleet is heterogeneous, that is, where the fleet is composed of vehicles with different capacities and costs.Their objective is to determine what the optimal fleet composition should be, and is referred to as either the Heterogeneous Fleet Vehicle Routing Problem (HVRP), or the Fleet Size and Mix Vehicle Routing Problem (FSMVRP).Taillard [14] formulates the Vehicle Routing Problem with a Heterogeneous fleet of vehicles (VRPHE) where the number of vehicles of type t in the fleet is limited; the objective being to optimize the utilization of the given fleet.Salhi and Rand [12] incorporate vehicle routing into the vehicle composition problem, and refer to it as the Vehicle Fleet Mix problem (VFM).
Double scheduling occurs where vehicles are routed in a manner that allows a vehicle to complete one route, return to the depot to replenish its capacity, i.e. load for deliveries or unload collected cargo, before embarking on a subsequent route.The aggregated routes for a vehicle is referred to as a tour, and a vehicle is required to complete its tour within the depot's provided time window.
The concept of TWC is introduced in §2 along with the initial solution algorithm.The results from simulated data sets are presented in §3, before conclusions are drawn, and a research agenda is established in §4.

An initial solution approach
Heuristics typically use a greedy approach to obtain a good initial solution in an efficient manner and then incrementally improve the solution by neighborhood exchanges or local searches.Solomon [13] divides VRP tour-building algorithms into either sequential or parallel methods.Sequential procedures construct one route at a time until all customers are scheduled.Parallel procedures are characterized by the simultaneous construction of routes, while the number of parallel routes may either be limited to a predetermined number, or formed freely.Solomon concludes that, from the five initial solution heuristics evaluated, the Sequential Insertion Heuristic (SIH) proved to be very successful, both in terms of the quality of the solution, as well as the computational time required to find the solution [9].
When finding an initial solution to a routing problem, the initialization criteria refers to the process of finding the first customer to insert into a route.The most commonly used initialization criteria is the farthest unrouted customer, and the customer with the earliest deadline, or the earliest latest allowed arrival.The first customer inserted on a route is referred to as the seed customer.Once the seed customer has been identified and inserted, the SIH algorithm considers, for the unrouted nodes, the insertion place that minimizes a weighted average of the additional distance and time needed to include a customer in the current partially constructed route -referred to as determining the insertion criteria.The third step, the selection criteria, tries to maximize the benefit derived from inserting a customer in the current partial route rather than on a new direct route.Note that the terms nodes and customers are used interchangeably.It can easily be shown that the number of criteria calculations for the SIH algorithm is a third order polynomial function of the number of nodes in the network.
A shortcoming of Solomon's SIH [13] is that it considers all unrouted nodes when calculating the insertion and selection criteria for each iteration.The fact that all unrouted nodes are considered makes it computationally expensive.The VRP variant considered in this paper has multiple additional constraints.The occurrence of infeasible nodes, due to their incompatible time windows, in a partially constructed route therefore becomes significant.The introduction of the TWC concept assists in identifying and eliminating the obvious infeasible nodes.This results in a more effective and robust route construction heuristic.
The purpose of TWC is to determine the time overlap of all edges, or node combinations, (v i , v j ), where i, j ∈ {0, 1, 2, . . ., n}.During the route construction phase, TWC may be tested, and nodes that are obviously infeasible may be eliminated from the set of considered nodes.The Time Window Compatibility Matrix (TWCM) is a nonsymmetrical matrix as the sequence of two consecutive nodes, v i and v j , is critical.The following notation is used in the problem formulation: e i : the earliest allowed arrival time at customer i, l i : the latest allowed arrival time at customer i, s i : the service time at node i, t ij : the travel time from node i to node j, a e i j : the actual arrival time at node j, given that node j is visited directly after node i, and that the actual arrival time at node i was e i , a l i j : the actual arrival time at node j, given that node j is visited directly after node i, and that the actual arrival time at node i was l i , and T W C ij : the TWC when node i is directly followed by node j.
Here T W C ij indicates the entry in row i, column j of the TWCM.Five scenarios exist and are covered in more detail by Joubert [6].The scenarios depend on the level and direction of overlap between the time windows of two consecutive customers, and are represented in Figure 1.
Each scenario represents a relationship between e i , l i , a e i j and a l i j , and assumes customer j to be serviced directly after customer i.In its generalized form, the expression for T W C ij is given by The higher the value of T W C ij in (1), the better the compatibility of the two time windows considered.Therefore an incompatible time window is defined to have a compatibility of negative infinity.
Consider an improved case where node v u is considered for insertion between nodes v i and v j .As the TWCM is already calculated, it is possible to test the compatibility of node v u with the routed nodes v i and v j .If either T W C iu or T W C uj is negative infinity (−∞), indicating an incompatible time window, the insertion heuristic moves on and considers the next edge, without wasting computational effort on calculating the insertion and selection criteria.Only if the time windows are considered compatible will the insertion and selection criteria be evaluated.The improvement of the computational burden is a direct function  of the characteristics of the customer time windows.The computational complexity is of the same order as that of the SIH, with expected constant factor improvements possible due to the TWCM.
As opposed to the two most common initialization criteria, namely customer with earliest deadline, and furthest customer, as suggested by Dullaert et al. [2], the authors of this paper also use the TWCM to identify seed nodes based on their TWC (the number of infeasible TWCs is calculated for each customer).The customer with the highest number of TWCs is identified as the seed customer.Ties are broken arbitrarily.It may be possible to not have any infeasible time window instances.In such a case a total compatibility value may be determined for each node v a by means of the expression where M denotes the number of unrouted nodes.The customer with the lowest total compatibility is selected as seed customer.A graphical presentation of the initial solution algorithm is given in Figure 2.

Results
The algorithm's objective function is defined as the total scheduling distance.For algorithmic evaluation purposes the basic concept of Solomon [13] is used in terms of classifying benchmark data sets as being either clustered (C), randomly distributed (R), or a combination of the two (RC), and having either short, or long scheduling horizons.
To incorporate multiple time windows, an extended data set from Homberger [4] is used.The data set was generated in a similar fashion to that of Solomon [13], but contains 200 customers.The time windows from customers 101 through 200 were used as second time window for customers 1 through 100.Where an overlap of time windows occurred, a single (wider) time window was created by combining the two overlapping windows.The earliest opening time of the two time windows is used along with the latest closing time [7].
The fleet structure proposed by Liu and Shen [11,10] is used to introduce their insertion based savings heuristic, and to incorporate a heterogeneous fleet.It is important to evaluate the contribution that the proposed TWC has on the results of the algorithm.
For this purpose a comparative control algorithm is created.The control algorithm differs only in two respects from the proposed algorithm: • It does not evaluate nodes for TWC when calculating the insertion criteria, and therefore considers every node for insertion on every edge of a partially constructed route.
• As no TWC is calculated for any node, the initialization criterium is changed to identify the seed customer as the unrouted customer with the earliest deadline.
The control algorithm was executed for all problem classes, and the initial solution summaries are provided in Table 1.
Although the results from the various problem classes, and even among the instances within a problem class, vary significantly, there is sufficient evidence that the notion of TWC improves the quality of the initial solution, on average from 60 problem instances, by more than 9%.There is, in general, a direct relationship between the distance saving and the computational saving for the proposed algorithm.It may be observed that when there are distance savings, there are also computational savings.
Although the specific problem instance impacts both the quality of the solution found, and the time required to find such a solution, it is clear that when customers with tight time windows are either randomly distributed or distributed in a semi-clustered manner, that the proposed algorithm performs consistently worse than the control algorithm, both in terms of finding a good quality solution, and in the computational time required.Should the R1 and RC1 problem classes be omitted, i.e. the proposed algorithm not be applied to such problem instances, then an average distance saving of 14%, and an average CPU time saving of 19% may be achieved, respectively.

Conclusions
The results of the initial solution algorithm proposed in this paper demonstrate that multiple variants of the vehicle routing problem, i.e. multiple soft time windows, a heterogeneous fleet and double scheduling, may indeed be integrated into a single initial solution algorithm.
The initial solution algorithm is the first step in obtaining near optimal solutions for vehicle routing and scheduling type problems.In this paper the concept of time window compatibility is introduced to ease the computational burden of the algorithm, and to find a better seed customer.The amount by which the proposed algorithm eases the computational burden is a direct function of the time window characteristics of the customers in the network.Numerical results indicate that initial solution algorithms are highly sensitive to the specific problem instance.This paper claims that the proposed algorithm holds both distance and savings opportunities for problem instances where customers are clustered, or where longer time windows exist for customers.At worst, the number of evaluative criteria calculations is a third order polynomial function of the number of nodes in the network, similar to the SIH on which it is based.Currently the TWC is determined after the selection criteria, and future research could evaluate the positioning of the TWC portion of the algorithm.
As the proposed algorithm is but the first step in obtaining a final solution, integration with metaheuristics is required before the algorithm can be implemented.Some metaheuristic algorithms, such as Tabu Search, are sensitive to the quality of an initial solution.The concept of TWC should again be introduced and evaluated at metaheuristic level as a potential performance improvement tool.

Figure 2 :
Figure 2: Overview of the initial solution algorithm.

Table 1a :
Results for the C1-class of problems.

Table 1b :
Results for the C2-class of problems.

Table 1c :
Results for the R1-class of problems.

Table 1d :
Results for the R2-class of problems.

Table 1e :
Results for the RC1-class of problems.

Table 1f :
Results for the RC2-class of problems.