Solving the Tractor and Semi-Trailer Routing Problem Based on a Heuristic Approach

We study the tractor and semi-trailer routing problem TSRP , a variant of the vehicle routing problem VRP . In the TSRPmodel for this paper, vehicles are dispatched on a trailer-flow network where there is only onemain depot, and all tractors originate and terminate in themain depot. Two types of decisions are involved: the number of tractors and the route of each tractor. Heuristic algorithms have seen widespread application to various extensions of the VRP. However, this approach has not been applied to the TSRP. We propose a heuristic algorithm to solve the TSRP. The proposed heuristic algorithm first constructs the initial route set by the limitation of a driver’s on-duty time. The candidate routes in the initial set are then filtered by a two-phase approach. The computational study shows that our algorithm is feasible for the TSRP. Moreover, the algorithm takes relatively little time to obtain satisfactory solutions. The results suggest that our heuristic algorithm is competitive in solving the TSRP.


Introduction
In this paper, we consider the tractor and semi-trailer routing problem TSRP , a variant of the vehicle routing problem VRP . The VRP is one of the most significant problems in the fields of transportation, distribution, and logistics. The basic VRP consists of some geographically dispersed customers, each requiring a certain weight of goods to be delivered or picked up . A fleet of identical vehicles dispatched from a depot is used to deliver the goods, and the vehicles must terminate at the depot. Each vehicle can carry a limited weight and only one vehicle is allowed to visit each customer. It is assumed that some parameters e.g., customer demands and travel times are known with certainty. The solution of the problem consists of finding a set of routes that satisfy the freight demand at minimal total cost. In practice, additional operational requirements and restrictions, as in the case of the truck and trailer routing problem TTRP , may be imposed on the VRP 1 . The TTRP was first studied by Semet and Taillard et al. 2 and Gerdessen 3 in the 1990s, and it was subsequently studied by Chao 4 ,Scheuerer 5 , and others. In the TTRP, the use of trailers a commonly neglected feature in the VRP is considered. Some customers can be served by a combination vehicle i.e., a truck pulling a trailer, as in type II in Figure 1 , while other customers can only be served by a truck as type I in Figure 1 due to some limitations such as government regulations, limited maneuvering space at customer sites, road conditions, and so forth. These constraints exist in many practical situations 1 .
The VRP and its various extensions have long been one of the most studied combinatorial optimization problems due to the problem's complexity and extensive applications in practice 6-10 . The truck and trailer combination is employed widely by enterprises around the world, but there additional features introduced by trailers that have attracted some research. A number of studies have concentrated on applications of the TTRP. For instance, Semet and Taillard et al. 2 and Caramia and Guerriero et al. 11 gave some real-world TTRP applications in collection and delivery operations in rural areas or crowded cities with accessibility constraints. Theoretically, being an extension of the VRP, the TTRP is NP-Hard. The TTRP is computationally more difficult to solve than the VRP 1 . Because the VRP is usually tackled by heuristic methods 6-9, 12-15 , it is feasible to develop heuristic approaches for the TTRP.
Gerdessen 3 extended the VRP to the vehicle routing problem with trailers and investigated the optimal deployment of a fleet of truck-trailer combinations by a construction and improvement heuristic. Scheuerer  Research to date has considered most types of road vehicles, especially trucks and truck and trailer combinations. However, there has been little research on the types of tractor and semi-trailer combinations. Hall and Sabnani et al. 21 studied routes that consisted of two or more segments and two or more stops in the tour for a tractor. At each stop, the tractor could drop off one or more trailers and pick up one or more trailers. Control rules based on predicted route productivity were developed to determine when to release a tractor. established a dispatching model of tractors and semi-trailers in a large steel plant and used a tabu search algorithm to find the optimal driving path and the cycle program. We aim to propose a heuristic for the TSRP. This aim is based on the practical knowledge that tractor and semi-trailer combinations are popular in some countries, particularly China. The remainder of this paper is organized as follows. Section 2 compares the TTRP and the TSRP and defines the TSRP. Section 3 proposes a heuristic algorithm to solve the TSRP. Section 4 employs the heuristic algorithm to solve some experimental networks of the TSR. Section 5 draws conclusions and gives future research directions.

The TTRP and the TSRP
Although there is little literature devoted to the definition and solution of the TSRP in the fields of transportation or logistics, plenty of research has been done on the TTRP, providing important references for the TSRP. In the TTRP, a heterogeneous fleet composed of m tu trucks and m tr trailers m tu > m tr serves a set of customers from a main depot. Each customer has a certain demand, and the distances between any two points including customers and depots are known. The capacities of the trucks and trailers are determinate. Some customers must be served only by a truck, while other customers can be served either by a truck or by a combination vehicle. The objective of the TTRP is to find a set of routes with minimum total distance or cost so that each customer is visited in a route performed by a compatible vehicle, the total demand of the customers visited on a route does not exceed the capacity of the allocated vehicle, and the numbers of required trucks and trailers are not greater than m tu and m tr , respectively 1, 17 . There are three types of routes in a TTRP solution, as illustrated in Figure 2: 1 a pure truck route traveled by a single truck; 2 a pure vehicle route without any subtour traveled by a combination vehicle; 3 a combination vehicle route consisting of a main tour traveled by a combination vehicle and at least one subtour traveled by the truck alone.
The vehicle types in the TSRP are different from those in the TTRP. The TTRP focuses on trucks and trailers, both of which can carry cargo. The TSRP involves m ta tractors and m st semi-trailers m ta < m st . Although a tractor cannot carry cargo, it has more flexible dispatching options, and it can pull different semi-trailers on various segments of its route by the pick-up and drop-off operation at depots.

Customers for combination vehicles visiting
Loaded carriages of trucks Unloaded carriages of trucks . . , T n Customers for trucks visiting Figure 2: Different types of vehicle routes in the TTRP.
The TSRP can be formally defined on a directed graph G V, A , where V {0, 1, 2, . . . , n} is the set of vertices and A { i, j : i, j ∈ V } is the set of arcs. Each arc i, j is generally associated with a transportation distance decided by road infrastructure. The freight flow from i to j is regarded as certain weight of arc i, j . Vertex 0, . . . , v v < n represents the main depots, in which many tractors and semi-trailers park. Some loaded semi-trailers wait for visiting customers, and other unloaded semi-trailers wait for visiting or maintenance. The remaining vertices s i in V i.e., V \ {0, . . . , v} correspond to customers who have m m ≥ 1 loaded semi-trailers waiting to visit l 1 ≤ l ≤ n and l ≤ m orientations at the beginning of the simulation. Customers may have other unloaded semi-trailers waiting for loading.
There are various tractor-driving modes on graph G during one daily period. For example, 1 tractor Tr j , pulling one loaded semi-trailer, goes from its main depot to a customer in one-day period, and the customer has tractor-parking available; 2 tractor Tr j , pulling one loaded semi-trailer, goes from its main depot to c 1 . After the dropping and pulling operations at c 1 , the tractor goes on to another customer, c 2 . The tractor Tr j terminates at a customer who has tractor-parking available. 3 It is similar to the running course listed in 2 , but Tractor Tr j terminates at its main depot. The most basic elements of tractor-driving modes include the following: how many semi-trailers can be pulled synchronously by a tractor, how many vertexes are passed by the tractor, how many times per day the tractor can drop off one or more trailers and pick up one or more trailers, whether a tractor terminates at its original main depot, whether the semi-trailer pulled by a tractor loads cargo, and if a tractor runs alone. In addition, a time window constraint is probably required.

Mathematical Problems in Engineering 5
The first selection The second selection

The TSRP Model
In practice, there are many depots on the freight transportation network of an enterprise. Depots have different functions and sizes. In the TSRP, we classify these depots into two types: main depots and customer depots. The flow of freight between any two depots is usually uneven. In our method, we abstract the freight transportation network onto a graph denoted by G 00 . Graph G 00 has one main depot and a number of customer depots where semi-trailers can park. Initially, all tractors are parked in the main depot, and semi-trailers that carry cargos are waiting for transport. Because the freight flows among various depots are unequal, we select a freight flow network denoted by G 01 . G 01 is a subset of G 00 on which the freight flows among various depots are equal. Graph G 01 is probably a combination of some unit-flow network. On a unitflow network, the freight flow on every arc is one semi-trailer. We denote the subset G 00 − G 01 by G 02 . We go on to select another equal flow network denoted by G 11 from G 02 . After repeating this process several times, the original freight flow network is split into several unit-flow networks e.g., G 01 , G 11 , and G 21 in Figure 3 . The study of unit-flow networks is meaningful and important in solving the TSRP. 6 Mathematical Problems in Engineering The TSRP model in this paper uses the unit-flow network. Vertex 0 represents the main depot where some loaded semi-trailers are waiting to be delivered to customers. The vertices in V \ {0} correspond to customers who have m 1 ≤ m ≤ n loaded semi-trailers waiting for going to m customers. The n customers have no parked tractors. The tractor-driving modes must satisfy some constraints, including the following: tractors terminate at the main depot, a tractor can pull one loaded semi-trailer and can also run alone, and the working time of a tractor is decided by its driver team. All tractors or vehicles a vehicle is one tractor pulling one semi-trailer originate and terminate at the main depot. Whenever a tractor passes by a customer, the tractor picks up a semi-trailer. Whenever a vehicle passes by a customer, the vehicle drops off its semi-trailer and picks up another one. After one-day period, the number of semi-trailers parked in every customer point is not less than a minimum Figure 4 .
The TSRP model consists of determining the number of tractors to be used and the route of each tractor so that the variable costs and service level are balanced, while each route starts and ends at the main depot. Variable costs are reduced by decreasing the overlap distance of tractors running alone. The service level is based on the percentage of customer demand that is satisfied.

Construct the Initial Solution Set
Drivers are assigned to ensure flexible running of tractors. A driver's on-duty hours per day are determined by the legal on-duty time and driver dispatching mode. On-duty hours consist of driving hours plus temporary rest time or residence time in depots. The residence time at the main depot denoted by H is for pick-up, drop-off, and some essential maintenance work on vehicles. The temporary rest time at other depots denoted by s i i 1, 2, . . . is for pick-up and/or drop-off semi-trailers. The driving hours restrict tractor running time.

Mathematical Problems in Engineering 7
The elements of the initial solution set are tractor routes. To give the form of a route, we suggest the following procedure. The number of drivers assigned to each tractor is k. The on-duty time of each driver is T hours per person · day . The distance between depots i and j is d ij . The depot sequence on each route is denoted by H − s 1 − · · · − s f − H, which is the form of a route. The same customer is visited only once on a certain tractor's route, and each s i i 1, 2, . . . f is unique. The on-duty time T is a constraint on the route. That is, where t s and t H are the temporary rest time and the residence time, respectively. ρ 1 0 < ρ 1 < 1 and ρ 2 1 ≤ ρ 2 ≤ τ, τ is a limited number are the lower and upper limits of the utilization ratio of the on-duty time, respectively. v is the average velocity of the tractor. We suggest the steps below to construct elements of the initial solution set.
Step 1. Transform the distance matrix into a running time matrix. Use v as the parameter in the transformation. Factors affecting v in practice include the tractor condition, the driver's skill, and traffic conditions. We estimate v by enterprise experience.
Step 2. Search the running time matrix. Let f be the sum of customers on a route. If f is very large, there are too many customers on the route to allow too much temporary rest time. Therefore, f has a maximum, and the maximum is certainly less than kT − 2 · t H /t s . Once f is found, we implement an entire search on the running time matrix to find all routes that satisfy the constraint 3.1 .
Step 3. Compare the routes with freight flow demand. Every route in Step 2, which contains many segments, is constructed by the segment running time of all customer pairs. In fact, not all pairs of customers require freight exchange. There are segments on which no freight flows, and tractors run alone on such segments. To save variable costs, the time of tractors running alone is limited. Therefore, we obtain the initial solution set after the elimination of routes based on the freight flow demand and the cost-saving requirement.

The First Phase
The more elements i.e., tractor routes in the initial solution set, the more choices for freight enterprises. We classify tractor routes into certain types, according to the number of customers on a route. There is one customer passed by in the 1st type, two customers passed by in the 2nd type, and so on. When there are many customers on a route, the tractor can serve more freight demand. When more temporary rest time is consumed at customer points, the effective running hours of the tractor are reduced. Routes of the same type generally have some "overlap arcs" in which only one tractor pulls a semi-trailer, and others run alone. We suggest reducing the total distance of "overlap arcs." 1 The first step is for the same type. An overlap arc i, j where the tractor running time is less than a maximum t ij max can be accepted. If the tractor needs more time 8 Mathematical Problems in Engineering than t ij max on arc i, j , only one of the routes containing arc i, j is permitted to be chosen.
2 The second step is for different types. A "tractor route-overlap arc" matrix A 0 , with elements a ik is constructed. The rows of matrix A 0 are serial numbers sn i of routes and the columns are various overlap arcs. The elements of matrix A 0 are 1 or 0. If the element on row i and column k is "1", then the sn i route has an overlap arc. When a ik 1, any elements of the matrix that satisfy a ij 1 are considered. The column which contains a ij has a sum i a ij . If the route with serial number sn i is chosen, j i a ij should be at a minimum. Once the sn i route is chosen, other routes that have the same overlap arcs with the sn i route are eliminated from A 0 . Consequently, a row in A 0 changes, and a new matrix A 1 appears. The operation is repeated until there is no row available in the last "tractor route-overlap arc" matrix.
In the first phase, a transitional solution set that contains such elements as the sn i routes is constructed by improving the initial solution set.

The Second Phase
In the second phase, we propose the "fill-and-cut" approach to attain a satisfactory solution to the TSRP.
Step 1. Construct a zero matrix O its elements are o ij whose rows and columns are depots i.e., the main depot and customer depots . Because of transportation demand, there are freight flows between two particular depots. Because the segments of tractor routes in the transitional solution set are defined by depots, we add 1 to o ij when there is a route containing arc i, j . We call such an operation a "fill". By a "fill" operation, we mark all segments of routes in the transitional solution set on matrix O. A new matrix B 0 is thus formed.
Step 2. All route segments in the transitional solution set actually have corresponding elements in matrix B 0 . If a certain percentage e.g., 80∼100% of all corresponding elements of the sn i route are greater than 1, the sn i route is eliminated. When the sn i route is eliminated, all of the corresponding elements subtract 1. We call such an operation a "cut". Repeat the "cut" operation, and a new matrix B 1 finally forms. The routes corresponding to B 1 make up the satisfactory solution set.
In some cases, the number of nonzero elements of B 1 is less than that of the freight flow demands . Therefore, routes corresponding to B 1 cannot satisfy all transportation demand. In order to satisfy more customers' demands , we can add some routes that contain overlap arcs to increase the market adaptability of the satisfactory solution. However, too many overlap arcs can exist because of uneven freight flows. Therefore, to balance the service level and costs, meeting a certain percentage e.g., 80% of all transportation demand can be the objective.

Computational Study
We abstract the transportation network on an N × N grid, where the nodes denote the main depot and customer depots. In our computational study, the "RANDOM" function in Matlab,    which can generate random arrays from a specified distribution, is used. By RANDOM "norm",1,1,10,10 , a random array is generated. We select the negative positions of the array as nodes and the minimum position as the main depot. The distance between any two nodes is calculated by the gaps of rows and columns. The "RANDOM" function in MATLAB is also used to determine the freight flow between two depots. The network expressed by Table 1 and the flow expressed by Table 2 make up example No. 1. By the above generation method, we produce some transportation networks that are used to test the heuristic algorithm. According to some enterprise experience, a driver's on-duty time is 8.5 hours per day. One or two drivers are assigned to a tractor. A tractor with two drivers can work consecutively for no more than 17 hours in a 24-consecutive-hour period. The temporary rest time in customer depots is 0.5 hour, and the residence time in H is 1 hour. By using the approach mentioned in Section 3.1, we attain different types of tractor routes for the No. 1 example. There are 175 elements in the initial solution set. By using the 2-phase approach, we attain the satisfactory solution of the No. 1 example Table 3 . When the enterprise employs tractor routes as the satisfactory solution, it can satisfy 80 percent of all transportation demand. Sixteen tractors and thirty-two drivers are needed during a 24-consecutive-hour period. The total running time of 16 tractors is 230 hours per day. In 15 percent of the total running time, tractors run alone.
It is feasible to propose exact algorithms e.g., integer programming for the TSRP when the initial solution set is constructed. We proposed a 0-1 integer programming for the No. 1 example and attained the exact solution. The exact solution can satisfy 84 percent of all transportation demand. Sixteen tractors and thirty-two drivers are needed during a 24-consecutive-hour period. In 10 percent of the total running time, tractors run alone. We implemented the proposed heuristic algorithm using Matlab and the 0-1 integer programming with QS. Although the exact algorithm can attain a slightly better solution, it requires more calculating time. For the No. 1 example, the solving time using the heuristic algorithm was approximately 80 seconds while that for the exact algorithm was approximately 2000 seconds. We suggest that the heuristic algorithm has an advantage for solving the TSRP.