Heuristic with elements of tabu search for Truck and Trailer Routing Problem

by   Ivan S. Grechikhin, et al.
Higher School of Economics

Vehicle Routing Problem is a well-known problem in logistics and transportation, and the variety of such problems is explained by the fact that it occurs in many real-life situations. It is an NP-hard combinatorial optimization problem and finding an exact optimal solution is practically impossible. In this work, Site-Dependent Truck and Trailer Routing Problem with hard and soft Time Windows and Split Deliveries is considered (SDTTRPTWSD). In this article, we develop a heuristic with the elements of Tabu Search for solving SDTTRPTWSD. The heuristic uses the concept of neighborhoods and visits infeasible solutions during the search. A greedy heuristic is applied to construct an initial solution.


page 1

page 2

page 3

page 4


A Comparative Study of Meta-heuristic Algorithms for Solving Quadratic Assignment Problem

Quadratic Assignment Problem (QAP) is an NP-hard combinatorial optimizat...

Learning to Solve Soft-Constrained Vehicle Routing Problems with Lagrangian Relaxation

Vehicle Routing Problems (VRPs) in real-world applications often come wi...

Intelligent Solution System towards Parts Logistics Optimization

Due to the complication of the presented problem, intelligent algorithms...

A fast and effective MIP-based heuristic for a selective and periodic inventory routing problem in reverse logistics

We consider an NP-hard selective and periodic inventory routing problem ...

MineReduce: an approach based on data mining for problem size reduction

Hybrid variations of metaheuristics that include data mining strategies ...

A matching-based heuristic algorithm for school bus routing problems

School bus planning problem (SBPP) has drawn much research attention due...

Extending the Multiple Traveling Salesman Problem for Scheduling a Fleet of Drones Performing Monitoring Missions

In this paper we schedule the travel path of a set of drones across a gr...

1 Introduction

Vehicle Routing Problem is a well-known problem in combinatorial optimisation and integer programming. The problem can be secribed as follows: there is a set of customers, where each customer has a demand, there is a set of vehicles, which may serve the demand of customers. Using the information on the distances and costs of travelling between each pair of customers, the goal is to find the solution with minimal total cost. This paper considers one version of the problem, which is called Truck and Trailer Routing Problem (TTRP). The problem in consideration is a real-life problem, and contains a big number of constraints.

Truck and trailer routing problem has two sets of customers: truck-customers and trailer-customers. Every vehicle, then, consists of a truck and a trailer of some capacities (sometimes trailer capacity is zero, which means the vehicle does not have a trailer). Truck-customers can not be served by a vehicle with a trailer. It means that the vehicle should not have trailer from the start, or the trailer should be left at some other place before visiting a truck-customer. This requirement is explained by the fact that there may be small stores, that do not have place for vehicle with its trailer. A vehicle with a trailer has a possibility to leave the trailer at a transshipment location, which is basically a special place to leave trailers. Another opportunity is to leave trailer at a previous trailer-customer: in this case the trailer may be unloaded at the trailer-customer and, at the same time, the truck goes to a truck-customer and serves it in parallel with the trailer-customer. Such rules create a necessity to organize load transfer - the operation, where goods are transferred from truck to trailer or vice versa. This may happen, because, for example, the total weight of goods for truck-customers in one route is more than the capacity of the truck.

In the considered problem, the Heterogeneous Fleet of vehicles is present (HFTTRP). This problem differs from homogeneous fleet TTRP, where all vehicles are the same: they have the same fixed costs and capacities. HFTTRP has a set of vehicles with different capacities and fixed costs, which makes the problem even more difficult. Additionally, every customer may have its own preferences on types of vehicles to serve the customer. In this case the problem is called the Site Dependent TTRP (SDTTRP) and there are some developed heuristics for solving such problems sometimes with additional elaborations in constraints .

Another real-life constraints are hard and soft time windows and split-deliveries. Time windows are periods of time, when the delivery is acceptable (hard time windows) and the constraint should be satisfied in the majority of routes (soft time window). Split-deliveries are such deliveries, when there is a possibility to serve one customer with more than one vehicle. The problem in this form is considered in Batsyn & Ponomarenko (2014) and Batsyn & Ponomarenko (2015). These papers suggested greedy heuristic for the problem. In this article, this heuristic is developed in another way with an addition of new heuristic with elements of tabu-search. The greedy heuristic is altered so there are possible operations of both insertion and deletion from the route. After the greedy heuristic, the obtained solution is reconstructed with new heuristic with tabu-search elements.

Greedy heuristic constructs the solution iteratively, until there are no unserved customers. For every route, the algorithm randomly chooses one of the farthest customers to be the first customer added to the route. Then, other customers are tried as candidates to the route. The solution has a constraint on the number of split-deliveries and delays (violations of soft time window). For every route, the possibility of a split-delivery and the number of delays is chosen randomly. The route may have only one new split-delivery, and the probability is determined by the fraction of the current allowed split-deliveries to the estimated number of split-deliveries. The number of delays is defined by the fraction of the current allowed soft window violations to the estimated number of soft window violations, however, every route may have different number of delays. The algorithm determines the allowed number of delays before constructing the route. After the solution is obtained, the heuristic with tabu-search elements tries to move customers between the routes to derive better solution. The algorithm uses set of changing parameters, which define “tabu neighbourhood” - the algorithm looks through the infeasible solutions. The degree of infeasibility is determined by the parameters - the number of allowed delays over limit, the number of routes with violated capacity and allowed cost change of the route.

2 Heuristic algorithm

The following parameters are used in the pseudo-code of the algorithm:
- the number of customers
- the set of all customers
- the set of all vehicles
- the set of vehicles, which can serve customer
- the current remaining capacity of vehicle
- the current remaining demand of the customer
- the number of soft time window violations in route R
- the current route
- the current solution
- the best solution found so far
- the number of permitted soft window violations
- the current remaining number of permitted soft time window violations
- the set of all customers sorted the most expensive (farthest) customer first
- the cost of current insertion
- the allowed level of violations
- the current state of second heuristic
- the distance between customers to perform move
- the set of routes, where the capacity of vehicles is violated

1:function InitialGreedyHeuristic
2:      Creates one initial feasible solution
3:      sorting customers so that has maximal
5:     while  do
7:         Random choose from the most expensive
8:         ChooseVehicle()
9:         BasicRoute()
10:         FindNumberOfViolations()
14:         for  do
15:              if  then
16:                  continue
17:              end if
19:              GetInsertionCost(j,R,mayViolate,,,)
21:              GetInsertionCost(j,R,mayViolate,,,)
22:               There are two possible insertions, with violation or without
23:              if  then
25:                  InsertCustomer(j,R,,,)
27:              end if
28:              if  then
30:                  InsertCustomer(j,R,,,)
32:              end if
Algorithm 1 Initial Greedy heuristic Part 1
33:              if  then
37:                  break
38:              else if  then
41:              else if  then
44:              else
45:                  if  then
48:                  else
51:                  end if
52:              end if
53:         end for
54:     end while
55:end function
Algorithm 2 Initial Greedy heuristic Part 2
1:function TabuSearchHeuristic(,,,)
3:     repeat
4:         HeuristicStep(,,)
5:         ChangeStateForTabuStepSuccess(,)
6:         if ShouldObtainFeasibleSolution(then
7:               Recovery procedures work here
8:              RoutesOptimization()
9:              RecoverCapacityViolations()
10:              FinalzeRoutesTimes()
11:              RecoverSoftWindowViolations()
12:              if Cost() Cost(then
14:                  ChangesStateForChangeInBest()
15:              end if
16:         end if
17:         ChangeCorridor(,)
18:     until StoppingCondition()
19:end function
Algorithm 3 Heuristic with Tabu Search

The first important function of the whole algorithm is initial greedy heuristic, which constructs initial solution (Algorithms 1 and 2). The function works so that the solution will be necessarily constructed, but its cost may not be satisfactory. First, the algorithm sorts all customers by the distance from the depot (or, by the cost of direct travel from depot, which is the same) so the first customer in is the farthest. Then, the process of solution construction begins. Routes of the solution are constructed in cycle, until there are unserved customers. For every route, the algorithm chooses one of the farthest customers, after that the vehicle is determined for the route. Also, function BasicRoute() creates the route with one chosen customer.

The function FindNumberOfViolations() determines maximal possible number of soft window violations for the current route. The function uses the relation of current remaining soft window violations to the estimated number of remaining soft window violations and increases the number of allowed violations until the random generator returns numbers less than this relation. After that, the algorithm tries to insert all other customers in the route , however, the algorithm does the insertion in two ways - allowing the violation of soft time window and forbidding the violation. If the number of soft window violations exceeds the allowed number, the route is forbidden. From obtained routes, there is chosen the best. Step by step the algorithm inserts customers until there are no possible insertions.

The whole idea of the greedy algorithm is based on Batsyn & Ponomarenko (2014) and Batsyn & Ponomarenko (2015)

Second important function is the second heuristic with elements of tabu search (Algorithm 3). Its goal is to take initial solution and improve it by performing simple moves. The algorithm makes steps and at each step there is a possible move happens. The variety of possible moves depends on the and parameters. Also, there is of the algorithm, which tracks successes, changes in the current best and some other parameters. From time to time, the algorithm tries to obtain feasible solution from current solution. The algorithm also may change depending on of the heuristic or even stop it in order to get new initial solution and start the procedure again.

At every step of the second heuristic (Algorithm 4), first, the customer is chosen randomly from one of the route of the current solution. After that, the customer is tried to be inserted in other routes in such way that the adjacent customer is close - the time of travel is less than parameter. Variables contains all such places of insertion in the route . After finding the best move by the cost this move may be performed if it does not violate too many constraints.

1:function HeuristicStep(,,)
2:     ChooseRandomCustomer()
3:      is deleted customer, the algorithm also needs the cost of deletion of this customer from its current route
6:     for all  do
7:         FindPlacesForInsertion(,)
8:         for all  do
9:              AddCustomer(,)
10:              FindMoveCost(,,,,)
11:              if  then
14:              end if
15:         end for
16:     end for
17:     AllowMove(,)
18:     if  then
21:         ChangeCurrentViolations(,)
22:     end if
23:end function
Algorithm 4 Heuristic Step Algorithm
1:function RecoverCapacityViolations()
2:     FindRoutesWithCapacityViolations()
3:     for all  do
8:         for all  do
9:              for all  do
10:                  FindCostOfMove(,,)
11:                  if  then
16:                  end if
17:              end for
18:         end for
19:         if  then
20:              ReplaceRoutes(,,)
21:         end if
22:     end for
23:     FindRoutesWithCapacityViolations()
24:     while  do
25:         ChooseRandomRoute()
26:         ChooseCustomerToRecoverCapacity()
29:         while  do
34:              for all  do
35:                  for all  do
36:                       FindCostOfMove(,,)
37:                       if  then
42:                       end if
43:                  end for
44:              end for
45:         end while
46:     end while
47:end function
Algorithm 5 Recovery Capacity Violations Procedure Part 1

Finally, when the second heuristic tries to obtain the feasible solution from current infeasible, the recovery procedure takes place(Algorithm 3). Basically, the whole solution is likely to be in infeasible region because of moves. In that case, the algorithm needs to decrease the number of soft time window violations and recover over-capacitated routes to be under constraints. The recovery procedures start with route optimization - it creates some free space inside routes in order to recover solution more efficiently. After that, the algorithm recovers capacities of routes. Next step is finalization of times - the procedure goes through every route and compacts the time of the route. The last step is recovering soft time window violations.

The algorithm of capacity constraints recovery is described in Algorithm 5. There are two parts in this algorithm. First part of the algorithm repeatedly tries to take customers from over-capacitated routes and insert them in other routes without capacity violations. If there is no such move possible and there are over-capacitated routes left, the second part of the algorithm creates new routes with customers from over-capacitated routes. At the end of the procedure all routes have total demand less or equal to the capacity of the vehicle of the route.

3 Computational results

Experiments were performed for seven experimental days, for which the good results of greedy heuristic are known. The column Greedy Heuristic Results, contains the value of objective function obtained by the greedy heuristic for this day (Batsyn & Ponomarenko, 2015). The third column shows the results of heuristic with tabu search elements for the experimental days. The second heuristic worked for 3 hours for every experimental day. All experiments were conducted on Intel Xeon X5675 machine, with base processor frequency 3.06 GHz and 64 GB of memory.

Table 1: Computational results
Day Greedy Heuristic Results Tabu Search Heuristic Results Improvement
Day 1 1200000 1155000 -4%
Day 2 1100000 1100000 0%
Day 3 1160000 1100000 -5%
Day 4 1200000 1140000 -5%
Day 5 1245000 1220000 -2%
Day 6 1235000 1225000 -1%
Day 7 1275000 1175000 -8%

4 Conclusion

In this paper new heuristic was developed for the Site-Dependent Truck and Trailer Routing Problem with Time Windows and Split Deliveries. The heuristic uses a greedy approach for the initial solution construction and then employs elements of local search and tabu search to improve the initial solution. The obtained results are promising as they show improvement in most cases.

The following work should be directed to the improvement of the speed of the algorithm and to guarantee the best possible results as well. One of the way to improve the algorithm is to use new neighborhood - swap neighborhood, where two customers from different routes can be swapped. Also, there are more constraints that can be relaxed, such as time windows and split deliveries.

5 Acknowledgments

The author is supported by LATNA Laboratory, NRU HSE, RF government grant, ag. 11.G34.31.0057.

6 References

  1. Batsyn, M., & Ponomarenko, A. (2014). Heuristic for a Real-life Truck and Trailer Routing Problem. Procedia Computer Science, 31, 778-792.

  2. Batsyn, M., & Ponomarenko, A. (2015). Heuristic for Site-Dependent Truck and Trailer Routing Problem with Soft and Hard Time Windows and Split Deliveries.

    Lecture Notes in Computer Science Machine Learning, Optimization, and Big Data, 65-79. doi:10.1007/978-3-319-27926-8_7