1 Introduction
Vehicle Routing Problem is a wellknown 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 reallife problem, and contains a big number of constraints.
Truck and trailer routing problem has two sets of customers: truckcustomers and trailercustomers. 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). Truckcustomers 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 truckcustomer. 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 trailercustomer: in this case the trailer may be unloaded at the trailercustomer and, at the same time, the truck goes to a truckcustomer and serves it in parallel with the trailercustomer. 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 truckcustomers 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 reallife constraints are hard and soft time windows and splitdeliveries. 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). Splitdeliveries 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 tabusearch. 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 tabusearch 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 splitdeliveries and delays (violations of soft time window). For every route, the possibility of a splitdelivery and the number of delays is chosen randomly. The route may have only one new splitdelivery, and the probability is determined by the fraction of the current allowed splitdeliveries to the estimated number of splitdeliveries. 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 tabusearch 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 pseudocode 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
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.
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 overcapacitated 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 overcapacitated routes and insert them in other routes without capacity violations. If there is no such move possible and there are overcapacitated routes left, the second part of the algorithm creates new routes with customers from overcapacitated 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.
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 SiteDependent 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

Batsyn, M., & Ponomarenko, A. (2014). Heuristic for a Reallife Truck and Trailer Routing Problem. Procedia Computer Science, 31, 778792.
doi:10.1016/j.procs.2014.05.328 
Batsyn, M., & Ponomarenko, A. (2015). Heuristic for SiteDependent 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, 6579. doi:10.1007/9783319279268_7