Mutation Ant Colony Algorithm of Milk-Run Vehicle Routing Problem with Fastest Completion Time Based on Dynamic Optimization JianhuaMa and

The objective of vehicle routing problem is usually to minimize the total traveling distance or cost. But in practice, there are a lot of problems needed to minimize the fastest completion time. The milk-run vehicle routing problem (MRVRP) is widely used in milk-run distribution. The mutation ACO is given to solve MRVRP with fastest completion time in this paper. The milk-run VRP with fastest completion time is introduced first, and then the customer division method based on dynamic optimization and split algorithm is given to transform this problem into finding the optimal customer order. At last the mutation ACO is given and the numerical examples verify the effectiveness of the algorithm.


Introduction
The vehicle routing problem (VRP) was firstly brought forward by Dantzig and Ramser in 1960 [1].With the development of VRP, there exist several variations and specializations.Mostly VRP aims to minimize the total travel distance (or travel time) and total cost.But for distribution of fast foods, express delivery, and emergency supplies, these objectives are not suitable and the completion time is more important.
Though the vehicle routing problem with time windows takes the service time into consideration [2], it cannot solve the problem when all customers want to be served as early as possible.Nikolakopoulou et al. solved a vehicle routing problem by balancing the vehicles time utilization [3].But it maybe takes a long time for some vehicles to complete the distribution tasks when the vehicles time utilizations are balanced.The VRP with fastest completion time was studied to minimize the fastest completion time [4][5][6].
Traditional vehicle routing problem assumes that the total distribution can be completed by one vehicle in a round trip.In practice, the number of vehicles is limited and there are many customers to be served.So a round trip by one vehicle is impossible and more round trips and vehicles are needed, such as the tobacco distribution with thousands of customers.As JIT production, small-scaled and multiplebatch distributions are more popular, in which one vehicle is needed to collect goods on multiple round trips.This kind of vehicle routing problem is called milk-run vehicle routing problem (MRVRP).
For problem aiming to minimize total travel distance or total cost, MRVRP can be transferred into the traditional VPR by increasing the routes number and allowing a vehicle serving customers in different routes.But for problem to minimize the fastest completion time, the completion time in the first period affects that in the second period.It is multiperiod optimization problem, so the algorithm of the MRVRP with fastest completion time will be studied based on dynamic optimization.
VRP is an NP-hard problem [7]; heuristics and evolutionary algorithms are used to solve VRP.In this paper, mutation ant colony algorithm is used to solve MRVRP with fastest completion time.In the next section, we will give the description of the MRVRP with fastest completion time.In Section 3, optimal division methods of customer orders based on dynamic optimization are given.In Section 4, mutation ant colony algorithm is given to solve the problem.In the last section, a numerical example is given.

MRVRP with Fastest Completion Time
Suppose that there is one depot serving n customers, which have  vehicles with capacity .The demand of customer  is   ( = 1, . . ., ) and satisfies ( − 1) ≤ ∑  =1   < , which means that for every vehicle, it needs  times to finish the distribution tasks on average.
Because the distances between the depot and the customers and the distances between the customers are different, the travel time between any two nodes is different.Supposing that the traveling time between node  and node  is   ,  = 0, 1, . . ., ,  = 0, 1, . . ., , node 0 is depot and the times satisfy the triangle inequality.
The vehicle routes satisfy the following.
(i) Each customer is served by a certain vehicle.
(ii) One vehicle can serve many customers.When the demands of the customers exceed the vehicle capacity, the vehicle returns to the depot to unload and goes back to serve the next customer.
(iii) The demands of the customers served by a vehicle cannot exceed  times vehicle capacity.
(iv) All vehicles should depart from the depot and return to the depot.
When the demands of the customers exceed the vehicle capacity, the customers should be divided into different groups.The customers in the first group are served first, then the second group, until all the customers are served, which is shown in Figure 1.
For the MRVRP aiming to minimize total travel distance or total cost, because the traveling distance of a vehicle is the sum of the distances of each round and the total distance is the sum of all vehicle traveling distances, the MRVRP can be transferred as the VRP with km vehicles.The customers are divided into km routes and each vehicle serves  routes.The total traveling distance of  vehicles equals the total distance of km routes.Then if the total distance of km routes is minimized, the total traveling distance of  vehicles is also minimized.
But for the MRVRP with fastest completion time, the completion time of the whole distribution task is the completion time of the last vehicle.Suppose that the completion time of vehicle  is   ,  = 1, 2, . . ., , and the completion time of the whole distribution task is ; then we have, For each vehicle, the distribution task needs to complete several routes and the completion time is determined by the time when last customer served.Because there is order of each route, the completion time of vehicle  is the sum of every route completion time.In the last route, the time from the customer to the depot is not considered.
If this problem is transferred to the problem with km routes in which each vehicle is in charge of  routes, the completion time is the sum of the travel times of previous −1 routes and the completion time of the last routes.Supposing that the th vehicle is in charge of the distribution task in  routes, the traveling time of the th route is   ,  = 1, 2, . . ., , and the traveling time from the last served customer to the depot is , the completion time of this vehicle is The difficulty of solving VRP lies in too many arrays of customer service order.It is hard to solve VRP by dynamic programming since there are too many states.For a given array of customers, the problem is transferred to how to divide the customers into groups and the customers in the same group are served by one vehicle.The feasible groups' division scheme is much less and it is easy to be solved by dynamic programming.In this paper, we will fix the serving array first and then give the optimal division scheme and calculate the fastest completion time.Taking this completion time as the objective, we will determine the final customer serving order by ACO.

Customer Division Method Based on Dynamic Programming
The problem of dividing customers into groups is how to divide a given serving array  1 ,  2 , . . .,   into m groups to ensure that the completion time of all the distribution tasks is minimized and the total demands of the same group do not exceed kw.The customers belonging to the same group are served by one vehicle on the array order.Usually there are a lot of division schemes and their completion times are different.Nikolakopoulou gave the split method to minimize the total traveling distances by transferring the dividing problem into the shortest-path problem [3].We gave the improved split method to minimize the fastest completion time by transferring the division problem into the longest-edge shortest problem [5].The improved split method spends a long calculation time, as it repeats to find the shortest paths.Then the customer division method based on dynamic programming is given which spends less time [6].
For the MRVRP, there are two divisions: the first is to divide the customers into  groups and the second is to divide the customers in the same groups into  routes.The aim of the first division is to minimize the longest completion time and is solved with dynamic programming.The aim of the second division is to minimize the total traveling time and is solved with split method.

The First Division of Customers.
The problem of dividing customers into  groups is to determine  − 1 cut points and can be looked as at -period decision problem.In a period, the number of customers served by a vehicle is determined.So the state variable is the number of customers who have not assigned, denoted as , and the number of vehicles which have not assigned, denoted as .Then the state variable is (, ), and the initial state is (, ).The decision variable is the number  of customers served by the next vehicle.
In the next period, the numbers of unassigned customers and vehicles are − and −1.The state variable is (−, −1).The state variable and decision variable are both confined by the vehicle capacity.For a given (, ), the demands of assigned customer cannot exceed  times vehicle capacity.Supposing that   ( = 1, . . ., ) is the total demand from the first customer to the th customer, we have When the decision variable in the present period is  and the unassigned customers need  − 1 vehicles to distribute, the total demand of the  customers cannot exceed ; that is, Denote decision variable set as Ω; then Supposing that (, ) is the fastest completion time of serving the  customers with  vehicles and ℎ(, ) is the completion time if the former  customers are served by a vehicle, we have When there is a vehicle left, if the total demands of  customers do not exceed kw, the  customers are served by this vehicle and the completion time is ℎ(, ); otherwise the completion time is infinite; that is, The state variable and decision variable are discrete.It can be solved by enumeration method.In a period, the vehicle number decreases one unit and the unassigned vehicle is determined by the periods.Then the number of states is determined by the number of unassigned customers, the number of states of each period does not exceed .Since the upper bound of vehicle capacity is , there is also an upper bound of the number of customers to be served, denoted as .The maximum iteration time of the method is .In practice, since the state variable should satisfy the inequality (3) and the decision variable should satisfy the inequality (4), the actual iteration time is much less than .
In each period, the completion time of every vehicle is needed to calculate and the second division of customers is needed.

The Second Division of Customers.
Suppose that the customers served by a given vehicle are  1 ,  2 , . . .,   .Because the total demands exceed the vehicle capacity , the route should be cut into smaller groups to ensure that the customers in the same group can be served by the same vehicle.This is also a division problem which is different from that in Section 3.1 in the scale.The scale is smaller and the objective is not to minimize the maximal completion but to minimize the total milk run completion time.
To get the division schemes, a directed graph is constructed.The vertex set has the depot and the customers served by the same vehicle.For nodes  1 and  2 , supposing that   1 is in front of   2 , the total demand of all customers between   1 and   2 (Including customer   1 but not   2 ) is calculated.If the total demand is less than , an arc from 1 to  2 is drawn.The weight is the traveling time from the depot in turn reach all customers between   1 and   2 (including customer   1 but not   2 ), and then return.The weighted direct graph is called split graph which is shown in Figure 2.
The shortest distance from 1 to  + 1 is the shortest travel time of all distribution tasks and the fastest completion time is this time minus the return time from customer   to depot.
Suppose the capacity of a vehicle is 15 and the order of customers to be served by the vehicle is 1-2-5-3-4-7; the traveling times between the nodes are shown in Figure 3, where the numbers in the brackets are the demands.
The total demand of customers 1, 2, and 5 is no more than 15; then an edge is drawn between node 1 and 3 with the weight 90.The other weights are got similarly.After calculation, the directed weighted graph is got in Figure 4.
The shortest path is from node 1 to node 3 plus from node 3 to node 0. The optimal distance is 180.Customers 1, 2, and 5 construct the first route.Customers 3, 4, and 7 construct the second route.The completion time is 155 (= 180 − 25).
The algorithm to solve the shortest path problem such as Dijkstra algorithm is polynomial.Its complexity is ( 2 ), where  is the number of nodes.For this problem, the maximum number of nodes is  and the complexity is ( 2 ).Because for every iteration the shortest path problem should be solved to calculate the completion time of a vehicle, the complexity of the whole algorithm is ( 3 ).

Mutation ACO Algorithm
In this section, we will give an improved ACO to solve the optimal customers array.

ACO Algorithm.
The main idea of ant colony algorithms is to mimic the pheromone trail used by real ants as a medium for communication and feedback among ants.Basically, the ACO algorithm is a population-based, cooperative search procedure that is derived from the behavior of real ants.ACO algorithms make use of simple agents called ants that iteratively construct solutions to combinatorial optimization problems.The key problem to solve VRP with ACO is how an individual ant constructs a complete solution by starting with a null solution and iteratively adding solution components until a complete solution is constructed.The key problem of ACO is to determine the pheromone matrix.The pheromone matrix is ( + 1) ×  when there are  customers, where the last row stands for the information from the depot to the customer and the th row stands for the information from customer  to other customers.Initially, since for a given customer there is the same possibility following other customers, the pheromone matrix starts with equal probable matrix.When  = 0, the pheromone matrix is where   ,  = 1, 2, . . .,  + 1,  = 1, 2, . . .,  is the pheromone from  to j.
In the th iteration, there are  ants and  customer arrays can be got.Supposing that the fastest completion time of each array is   ();  = 1, 2, . . ., , the increased value of pheromone in the th iteration is Δ  () = ∑  =1 Δ   (), where ; if  follows  closely, where  is a constant, 0; otherwise. ( Local update is performed during the ant constructive procedure in the following way: where  is the evaporation coefficient.The heuristic information is in an ( + 1) ×  matrix, with the last row  +1, = /  and the other rows   = /  , where   is the traveling time between two nodes,   is the average traveling time from customer  to the depot, and  is a constant depending on the situations.
In a given service order, the first served customer is determined by probability.The next served customer is selected from the allowing set allowed  , which is the customers set that can be served after .The customer  is chosen with the probability   , where is the importance of pheromone information, and  is the importance of heuristics information.After calculation of the probability matrix, the node is selected by the probability   and the node is deleted from the allowing set.Then a customer service order is got with the pheromone.

Mutation
Operator.ACO algorithm possibly runs into prematurity just as other evolutionary algorithms.The main reason is the concentrations of pheromone which makes the same solutions be got.In reality, the pheromone may be changed by rain and other factors and this change may help the ants find a new route.A mutation operator will be introduced into the pheromone of ACO to escape from local optima and strengthen its global search ability.The initial pheromone matrix's factors are the same.As time goes on, some elements become large but other elements become small in the same row.The pheromone is concentrated which obstructs the ability to find more optimal solutions.The concentration of a row is defined as the ratio of the maximum factor and the sum of the factors in the row.flight time is reduced by 19.76759 minutes.In emergency management, effectively shortening the completion time is very necessary, and therefore the first scheme is more reasonable.

Conclusions
In this paper, the MRVRP with fastest completion time is proposed, which has many applications in fast foods distribution, express delivery, and emergency supplies.Solving the problem is more difficult than the general VRP.The key problem to solve MRVRP with fastest completion time is to give the division method for customer array.The customer division method based on dynamic programming and split method is given in this paper, which can transfer MRVRP with fastest completion time into the problem of finding the optimal customer service order.Then the problem is solved with mutation ACO.

Figure 1 :
Figure 1: The milk-run vehicle routes of two vehicles.

Figure 3 :
Figure 3: The distribution of customers.

Figure 6 :
Figure 6: Optimal scheme of MRVRP with fastest completion time.