Optimization of Vehicle Routing with Pickup Based on Multibatch Production

To reduce the inventory cost and ensure product quality while meeting the diverse demands of customers, manufacturers yield products in batches.However, the rawmaterials required for manufacturing need to be obtained from suppliers in advance, making it necessary to understand beforehand how to best structure the pickup routes so as to reduce the cost of picking up and stocking while also ensuring the supply of raw materials required for each batch of production. To reduce the transportation and inventory costs, therefore, this paper establishes a mixed integer programming model for the joint optimization of multibatch production and vehicle routing problems involving a pickup. Following this, a two-stage hybrid heuristic algorithm is proposed to solve this model. In the first stage, an integrated algorithm, combining the Clarke-Wright (CW) algorithm and the Record to Record (RTR) travel algorithm, was used to solve vehicle routing problem. In the second stage, the Particle Swarm Optimization (PSO) algorithm was used to allocate vehicles to each production batch.Multiple sets of numerical experiments were then performed to validate the effectiveness of the proposed model and the performance efficiency of the two-stage hybrid heuristic algorithm.


Introduction
The "truck dispatching problem" was first introduced by Dantzig and Ramser [1]. Then Clarke and Wright [2] generalized the "vehicle routing problem" (VRP) to the domain of logistics and transport; that is, to how to serve a set of customers who are geographically dispersed around the central depot, using a fleet of trucks with varying capacities. Taking into account real-life complexities, this paper expands the traditional VRP by combining VRP with production, in order to consider the vehicle routing problem with raw material pickup under multibatch production (VRPPMP). The problem at hand is defined as follows. The manufacturer divides the production in each cycle into multiple batches and uses vehicles to undertake the pickup from their suppliers, in order to ensure sufficient raw materials prior to the production of each batch. Since the inseparable pickup demands of dispersed suppliers must be met, the manufacturer thus needs to design both the vehicle pickup routes and the batch allocation of the routes in such a way that they satisfy the demand for the raw materials needed for production, while also minimizing the total inventory and transportation costs.
By designing the vehicle pickup routes in the context of multibatch production, the manufacturer can reduce transportation and inventory costs in the production process and ensure product quality. In the automobile assembly industry, for example, automobile producers need to retrieve the parts needed from the auto parts manufacturer, separately. If the producers retrieve all the parts needed for production during each period, this not only will greatly increase the inventory cost, but also cannot guarantee the quality of the parts. Therefore, multibatch production is needed for automobile assembly production, with the VRPPMP of automobile assembly production being investigated in order to plan the vehicle pickup path for each batch, so as to ensure the quality of the raw material and the products and reduce the costs of inventory and transportation.
Prior to initiating periodic production, the manufacturer must pick up raw materials from geographically dispersed locations (suppliers), with the raw materials being picked up periodically at production batches. In single-cycle production planning, there are often multiple batches of production operations. Before each batch of production and processing 2 Discrete Dynamics in Nature and Society begins, the manufacturer needs sufficient raw materials in order to complete the set production volume. If the purchase quantity of raw materials is too large, it will lead to a certain degree of inventory accumulation. This will, in turn, generate the problems of a high inventory management cost and the low quality of raw materials. Thus, according to the production demands of each batch, the problem lies in there being a reasonable arrangement of vehicle pickup routes, and also in matching these routes with production batches in order to minimize the total costs of transportation and inventory.
In line with the above description, this paper proposes an optimization of vehicle routing involving pickup based on multibatch production. The contributions of this paper are as follows: (1) Combining production with the vehicle pickup routing problem, this paper studies the optimization of vehicle routing involving pickup in the context of multibatch production. We design vehicle pickup routes based on the raw material demands of each batch in such a way as to minimize transportation costs and inventory costs while meeting production demands.
(2) We put forward a two-stage hybrid heuristic algorithm to solve the proposed model. In the first stage of the algorithm, the Clarke-Wright (CW) algorithm is proposed to generate the initial vehicle routes, following which the Record to Record (RTR) travel algorithm is used to further optimize the generated routes. In the second stage, a Particle Swarm Optimization (PSO) algorithm is developed to allocate the vehicles to each production batch.
The remainder of this paper is organized as follows. Section 2 reviews the related literature. Section 3 details the vehicle routing involving pickup based on multibatch production and develops the mixed integer programming model. Section 4 introduces a two-stage hybrid heuristic algorithm to solve this model. In Section 5, multiple sets of numerical experiments are performed to validate the effectiveness of the proposed model and the performance efficiency of the two-stage hybrid, heuristic algorithm. Section 6 presents the conclusions of this study and recommendations for future work.

Literature Review
The vehicle path problem (VRP) is a key aspect of logistics and transportation research. Selecting the appropriate vehicle path method can speed up the response to customer demands and reduce operation costs. Since first being proposed by Dantzig and Ramser [1], research on VRP has extended into numerous avenues after decades of exploration and research, such as the capacitated vehicle routing problem (CVRP) [3], the vehicle routing problem with time windows (VRPTW) [4], and vehicle routing problems with pickup and delivery (VRPPD) [5,6], among others. This paper focuses on the angle of VRP with pickup and vehicle capacity limitation.
Many scholars have conducted in-depth research on the issues of VRPPD. Savelsbergh and Sol [7] discussed several characteristics distinguishing the latter from standard VRP and presented a survey of the problem types and solution methods. A VRPPD with multiple time windows and vehicle types was considered by Xu et al. [8], where computational results showed that the computational times required by the proposed column-generation-based solution were acceptable. Gábor Nagya [9] proposed a heuristic algorithm that takes the pickup and delivery stages as a whole, and which was used to solve the VRPPD in the context of single and multiple car parks. Kalina and Vokrinek [10] presented a parallel solver for VRPTW and the pickup and delivery problem with time windows, which was based on the parallel competition of particular solvers solving the given problem.
The problem of combining VRPPD with production, which is a type of VRPPD, has been studied extensively. Such problems involve coordinating production, inventory, and delivery operations to meet customer needs and minimize costs. Zheng et al. [11] investigated the vendor-managed, cyclic inventory routing problem under constant customer demand rates. To minimize inventory costs without causing any lack of stock at the customers, a heuristic solution approach was proposed. The latter proved well capable of finding the appropriate cost trade-off under varying circumstances. Shiguemoto and Armentano [12] addressed the problem of optimally coordinating a production-distribution system with a fleet of homogeneous vehicles over a multiperiod finite horizon, proposing a Tabu search procedure for solving the problem. Adulyasak et al. [13] introduced multivehicle production routing problem and inventory routing problem formulations, with and without a vehicle index, to solve these problems under both the maximum level and the order-upto level inventory replenishment policies. To minimize the total distribution cost, Sainathuni et al. [14] introduced the warehouse inventory transportation problem of determining an optimal distribution plan from vendors to customers via one or more warehouses.
Although the research on combining VRPPD with production has made some progress, there is still some room for development. To date, existing studies that have considered combining multibatch production with vehicle pickup routing issues have been rather limited. To enrich the research in this area, based on this combination, the current paper considers two aspects from the perspective of the manufacturer: (i) VRP -the vehicle routing problem from an upstream supplier to the manufacturer's procurement link and (ii) production and processing problems, considering the singlecycle and multibatch production and processing problems of a single manufacturer, how the allocation of vehicles can best be undertaken so as to correspond to the production batches. Under the premise of completing each batch of production and processing operations, the inventory cost should be as low as possible.   Figure 1. The vehicles visit the corresponding suppliers for each production batch and then return to the manufacturer. The retrieved raw material is put into production. If there is any unfinished raw material, this will be used as raw material inventory for the next batch of production. For each batch of access routes, the VRPPMP consists of constructing a structure for the routes in such a way that (i) every route starts and ends at the manufacturer; (ii) all pickup demands are met; (iii) a supplier is visited only by a single vehicle; and (iv) the sum of inventory costs and vehicle transportation costs is minimized. In addition, this paper makes the following assumptions underlying the VRPPMP:

Problem Description and Modeling
(1) The manufacturer conducts multiple batches of production and processing operations, with the total amount of materials supplied by the suppliers equaling the total amount acquired for production.
(2) The remaining raw material inventory of each batch can be used for the next batch of production tasks; the inventory capacity of the manufacturer is not considered.
(3) The raw materials for each batch can be delivered to the manufacturer in time for the batch to be produced.
(4) The problem considers vehicle capacity limitations.
In the model, we also assumed that each vehicle can only perform one trip for each production batch. It should be noted that a vehicle's multiple trips for a production batch (the multitrip vehicle routing problem, VRPMT), and the consistency of a vehicle in terms of pickup from material suppliers for different batches (the consistent vehicle routing problem, CVRP), are not considered. In real production activities, the production plan is often based on a day, a week, or a longer time interval, while the vehicles can complete a trip within a relatively shorter time span. Therefore, if a vehicle performs more than one trip for different batches, it can be considered several dummy vehicles. Based on the above definition, the VRPPMP is established as follows:

Mathematical Model
.
Objective function (1) maximizes the total costs of the manufacturer, which are equal to the sum of the inventory costs and shipping costs incurred. Constraints (2) state that each vehicle starts at the manufacturer and ends at the manufacturer. Constraints (3) ensure that each supplier will be accessed once. Flow conservation is ensured by Constraints (4). Constraints (5) indicate that each vehicle that provides suppliers with a pickup service must serve in exactly one production batch. Constraints (6) state that each vehicle can, at most, serve at most one production batch. Constraints (7) ensure that the raw material transported by each vehicle does not exceed the capacity of vehicle. Constraints (8) and (9) represent the total amount of raw material delivery by each vehicle in each production batch. Constraints (10) and (11) indicate the constraint of amount of raw materials that can be put into production in each batch. Constraints (12) to (15) state the relationship between the vehicle load and the quantity supplied. Constraints (16) and (17) represent the raw material inventory after each batch of production and processing.

Solution Algorithm
The above model can be directly solved by using commercial optimization packages, such as CPLEX, when the scale is small. However, when the scale increases by a certain extent, using CPLEX is time consuming or unable to complete the solution. Therefore, the algorithm needs to be added to solve large-scale problems.
Taking the two aspects into account when making a decision, that is, vehicle routing as well as the matching between the vehicle and the production batch, the VRPMP mentioned above cannot be solved directly. In light of this, the VRPPMP was divided into two stages. In the first stage, the problem of vehicle routing in the process of picking up cargoes was solved using the Clarke-Wright and the Record-to-Record travel algorithms. In the second stage, we used the PSO algorithm to allocate each vehicle that needs to be picking up to a certain production batch so as to satisfy the demands of the manufacturer in each production batch.
Discrete Dynamics in Nature and Society

Routes Initialization (CW).
For the purposes of this paper, the CW algorithm was used to generate the initial vehicle path for the first stage problem. The algorithm was first proposed by Clarke and Wright [2] and is applicable to CVRP. It forms a route in the following ways. First, it yields the shortest route between every two suppliers in the system. The desired aim here is to allocate loads to vehicles in such a manner that all the raw materials are assigned and the total mileage covered is at a minimum.
Consider a general savings value, S, given by linking two suppliers i and j as shown in Figure 2: Where = savings value; 0 = distance from supplier i to the manufacturer; = distance between points i and j; = route shape parameter. Special cases: = 1, the savings approach, and = 2, Gaskell's method [15]. With an increase in , greater emphasis is placed on the distance between the suppliers, rather than on the position relative to the manufacturer in selecting an addition to a route.
In line with the savings value S between every two suppliers, the algorithm yields the CW table. In the case of satisfying the on-vehicle capacity, the manufacturer preferentially links a pair of suppliers with a larger S-value and uses one vehicle to provide pickup services for these suppliers. Following the linking method until all the suppliers are serviced, the manufacturer then obtains the initial solution for the pickup vehicle routes. The procedure given is simple but effective in producing a near-optimal solution and has been programmed for several digital computers.

Routes Improvement (RTR).
After the initial vehicle route was generated, we further optimized it using the RTR travel method, which was first proposed by Dueck [16]. We improved the solutions using the operations specified by Li et al. ( [17], namely, a one-point move and two-point move. In the one-point move, we attempted to move each supplier in the existing solution to a new position on the same route or on a different route. In the two-point move, we tried to exchange the positions of two suppliers. These improvement moves are shown in Figure 3.
The routes were improved by repeatedly applying these two local search operators in two phases: diversification and improvement. In the diversification phase, we attempted to explore new areas in the solution space by accepting both improving and deteriorating moves. In the improvement phase, we attempted to improve the current solution as much as possible by accepting only improving moves until we reached a local minimum.
By combining the CW algorithm and RTR travel method, we were able to obtain a better pickup vehicle routing solution. Based on the routes, we then solved the decision making problems pertaining to vehicle allocation in each production batch by using the PSO algorithm, in order to satisfy the manufacturer's demands in each production batch and lower the inventory cost as far as possible.

Batch Allocation (PSO).
The first stage enabled us to obtain all the routes that the vehicles needed to cover, then making it necessary to assign the routes to each production batch in the second stage. Consequently, the PSO algorithm developed by Eberhart and Kennedy [18] was employed to solve the route allocation problem and can be seen as an efficient stochastic global optimization technique.
In the PSO algorithm, the position of each particle represents a feasible solution in the search domain, and each particle changes its position and velocity depending on its flying experience. The decision variables , , and , which are related to the pickup service were determined in the first stage. and could be calculated according to constraints (16) and (17) as long as was determined in the second stage. The core variable , which determines whether the raw material transported by vehicle m was assigned to production batch t, ∈ , ∈ , was coded as follows. All the utilized vehicles were grouped in set , ∈ . Each particle with | | dimensions was represented by = { 1 , 2 , . . . , , . . . , | | }. Each dimension was coded as a positive number. After the vehicle sequence was reordered according to the nondescending order of the , vehicles were assigned to the production batches. The main idea behind the distribution rule is as follows: vehicles at the front of the sorted sequence have priority in terms of assignation to the previous production batch.
For instance, if the amount of materials acquired by a production batch is {10, 10, 10}, the utilized vehicles would be {1, 2, 3, 4, 5}, and the quantity of materials corresponding to the vehicles would be {4, 6, 8, 7, 5}. If the sorted vehicle sequence is {2, 3, 1, 5, 4}, the amount of materials would be {6, 8, 5, 4, 7}, accordingly. Vehicle {2} was first assigned to production batch {1}, given that the amount of material acquired in this batch was 10, which is greater than the amount that vehicle {2} carried. The next vehicle in the sorted sequence, that is, vehicle {3}, was assigned to batch {1}, thus giving the storage material of production batch {1} a value of 4. Accordingly, vehicles {4 and 5} were assigned to batch {2} with the storage value of 3, and vehicle {7} was assigned to batch {3} with no storage material in the last.
In applying the PSO algorithm, we assumed that a swarm has k particles.
= {V } was the velocity of particle k at iteration n, and = { } the position of particle k at iteration n. Each particle had its personal best position, , at iteration n on dimensions m and t.
is the global best positon of the entire swarm on dimensions m and t, up until iteration n. The swarm flies through hyperspace according to the experience of its neighbors. The ordinary updating formulates used to calculate speed and position were as follows: Where w is an inertia weight parameter, which affects the convergence procedure of the optimal solution; 1 and 2 are the cognitive and social learning parameters, respectively; 1 and 2 are random numbers generated between [0, 1].
Based on the above description, we now present the PSO algorithm process for solving the route allocation problem.
Step 1. Set the iteration number n = 1. Initialize k particles whose positions and velocities are randomly generated. The particles' positions represent the result of the route allocation and determine their qualities.
Step 2. Evaluate the fitness value of each particle using the commercial software CPLEX. More specifically, we used the route allocation result obtained by the particles to fix the variables and then used CPLEX to solve the original model.
Step 3. For each particle, compare its fitness value and the global best optimal solution ; if > , replace the value of using the value of .
Step 5. If n reaches the preset maximum iteration or has not been improved during a preset number of iterations, end the procedure; otherwise, set = + 1and then go on to Step 2.

Numerical Experiments
To validate the performance of the proposed two-stage heuristic, numerical experiments were carried out on the VRPPMP. For the PSO algorithm, the maximum number of iterations was set to 100, while the population size was 30. According to the previous tests, we set 1 = 2 = 1. From preliminary testing of = 0, 0.5, 1, 1.5, and 2, it emerged that = 1 performed the best; thus, we adopted = 1 for the next experiments. Based on the same decision obtained in the first stage, another nature inspired algorithm, the Tabu search (TS) algorithm, was applied for comparison purposes. We listed the optimal solutions obtained by CPLEX in smallscale instances.
All the experiments were performed on a computer with 3.60 gigahertz Intel (R) Core (TM) i7-4790 CPU and 3.60 gigabyte RAM. The model and solution methods, including the CW algorithm, RTR travel algorithm, and the PSO algorithm, were implemented using CPLEX 12.6, with C# (VS2015) concert technology.

Generation of Test Instance.
In this section, we demonstrate the implementation of numerical experiments to validate the effectiveness of the proposed model and the efficiency of the proposed algorithm. For small-scale instances, the results of the proposed two-stage heuristic algorithm were compared with the optimal solutions obtained by CPLEX and the solutions obtained using the TS algorithm. Based on the same decision obtained in the first stage, the results obtained using the PSO heuristic were compared with those of the TS algorithm in medium-and large-scale instances, given that CPLEX would have been time consuming or unable to solve the problem.
For the numerical experiments on the VRPPMP, instances were randomly generated in the three scales. We simulated the cases of 10 suppliers and two production batches, and 15 suppliers and three production batches for the small-scale; 30 suppliers and six production batches, and 50 suppliers and 10 production batches for the medium scale; 70 suppliers and 14 production batches, 90 suppliers and 18 production batches, 100 suppliers and 18 production batches for the large scale. Information pertaining to the coordinate positions and pickup demands of the 10 suppliers of the first small-scale instance (i.e., 10-2-1) are shown in Table 1. The coordinate position of the manufacturer was (5,5), and the cost of unit distance traveled by vehicle was $2. The manufacturer had sufficient pickup vehicles with the capacity of 10 tons to provide a service to suppliers. The volume of raw materials required for each production batch was 10 tons, and the unit inventory cost of unprocessed raw materials in each batch was $20.

Analysis of Calculation Results.
We tested examples at different scales and used CPLEX, the PSO algorithm, and the TS algorithm, respectively, to solve the VRPPMP.

Conclusion
This paper discusses a novel and practical research issue arising in the manufacturing industry; namely, the problem of vehicle routing involving pickup in the context of multibatch production. In order to reduce transportation costs and inventory costs in the production process, a mixed integer programming model was developed. Following this, a two-stage hybrid, heuristic algorithm was put forward to solve this model. In the first stage, the CW algorithm was proposed in order to generate the initial vehicle routes. The  RTR travel algorithm was then used further to optimize the generated routes. In the second stage of the algorithm, the PSO algorithm was developed so as to allocate the vehicles to each production batch. This process ensured that the manufacturer first assigned each supplier to the appropriate route and then assigned each route to the appropriate batch.
By testing examples at different scales, we were able to validate the effectiveness of the proposed model and the performance efficiency of the two-stage hybrid, heuristic algorithm. First, in the small-scale examples, the exact solution was obtained using CPLEX, and the accuracy of the model was verified. Second, after the scale was expanded, it was found that CPLEX had difficulty in solving this over a short period of time and that the PSO algorithm took less time to obtain a relatively appropriate result than the TS algorithm. This proves that the two-stage heuristic algorithm is well placed to help us solve such problems.
There are certain limitations to the current study. First, we assumed that the amount of the single raw material required for each production batch would be the same; in practice, however, the amount of multiple raw materials varies for each production batch. Second, this paper only considered the combination of the pickup stage and the production stage, without considering product delivery. The joint optimization of multibatch production and the vehicle routing problem with pickup and delivery, considering inventory, will thus be addressed in future studies.

Data Availability
The data used to support this study have been deposited in the Baidu Netdisk, readers can access the data at: https://pan .baidu.com/s/1ZSkGF-syiNTk FN9JNShbA.