Modeling and Optimization of Multi-Model Waste Vehicle Routing Problem Based on the Time Window

With the development of China’s economy, the urban floating population is also increasing, resulting in a sharp increase in the amount of urban waste. How to recycle and dispose of municipal waste more efficiently has become the top concern of municipalities and other relevant departments. In this article, the above problem is transformed into the municipal waste collection vehicle routing problem (MWCVRP) to solve the problem with the minimum total waste transportation cost. Because the carrying capacity of different models is different, this article introduces a cost calculation criterion that combines the total mileage of different models of transport vehicles and the number of station services. A multi-model garbage truck path optimization model is established, and then a heuristic-based task dynamic assignment algorithm is designed to solve the problem. The Solomon dataset is used to verify the feasibility and effectiveness of the model and algorithm through experiments.


INTRODUCTION
With the continuous development of China's economy and the explosive increase in the population, the production of municipal waste has also entered an exponential growth stage.Lie (Yang and Chen et al., 2013) found that in the past fifteen years, the production of municipal waste in China has increased significantly compared with that in the United States.In the face of massive urban waste production, how to recycle and dispose of waste has become the most concerning issue of municipal and other related departments.This paper converts the waste collection problem into a classic Vehicle Routing Problem (VRP) and further expands it to the Municipal Waste Collection Vehicle Routing Problem (Han and Ponce Cueto, 2015) (MWCVRP), which aims to study how to minimize the total cost of transporting waste.
This problem has been identified as an NP-hard problem since it was proposed (Kim and Ong et al., 2015) (Yousefikhoshbakht and Didehvar et al., 2014); that is, it is difficult to solve with an exact algorithm, so people have proposed two less accurate but very effective solutions to this problem (Beliën and De Boeck et al., 2014), namely, the classical heuristics algorithm and the meta-heuristics algorithm.Gevorg (Guloyan and Aydin, 2020) used the genetic greedy hybrid algorithm to find a route with the lowest total transportation cost in the case of municipal solid waste recycling in Yerevan.Sobhan (Darmian and Moazzeni, et al., 2020) used a heuristic-based multi-objective local search algorithm to determine the collection center and the route with the lowest total cost as the recycling route.Emre (Eren and Tuzkaya, 2021) converted the vehicle routing problem into the traveling salesman problem (TSP) and solved a safe recycling route when recycling COVID-19 medical waste.Meiling (He and Wei et al., 2021) adopted an adaptive variable neighborhood.The search ant colony algorithm solves the vehicle routing problem with time windows.Luis (Flores-Luyo and Agra et al., 2020) brought the traditional vehicle routing problem into the wireless network environment and used greedy combined with a heuristic algorithm to improve the loading rate of vehicles.They (Zhang and Yang et al., 2020) used a multi-objective evolutionary algorithm to reduce the vehicle waiting time in the path planning problem with time windows.Combining (Dong and Zhou et al., 2018) the discrete firefly evolution mechanism with the variable neighborhood evolution mechanism, and its design scheme was efficient in dealing with multi-objective path planning problems.Based on the Solomon dataset, they (Nasri and Hafidi et al., 2020) adopted a parallel adaptive large neighborhood search metaheuristic algorithm to obtain the best robust solution under different scenarios in the dataset.
The above studies have good results in their respective application scenarios, but there are few studies on multi-model routing problems with time windows and capacity constraints (Mojtahedi and Fathollahi-Fard et al., 2021).For this reason, this paper is closer to reality (Ticha and Absi et al., 2017) (Fallah and Tavakkoli-Moghaddam et al., 2019), studies the routing problem based on multi-model waste transport vehicles, considers the difference in the mileage fee and station service fee of different types of transport vehicles, introduces a cost calculation criterion that combines the total mileage and the number of service stations, establishes a multi-model waste transport vehicle path optimization model, and then like Chenxin (Sun and Huang et al., 2022) designs a simple and effective heuristic-based task dynamic assignment algorithm to solve the problem.Different from the genetic algorithm (Ombuki and Ross et al., 2006) (Yusuf and Baba et al.,2014) that requires multiple iterations, the algorithm used in this paper focuses more on a timely assignment strategy, and we believe that this can better combine the real-life urban waste transportation problem with the theoretical multi-model routing problem with time windows.At the same time, the Solomon dataset (Solomon, 1987) is used to verify the feasibility and effectiveness of the proposed model and algorithm through experiments, which provides methodological guidance for decision support for urban waste transportation.
The remaining chapters of the article are arranged as follows: Section 2 introduces the multimodel route optimization model with a time window; Section 3 proposes an algorithm to solve the optimization model, that is, the heuristic-based task dynamic assignment algorithm; and Section 4 proves the proposed algorithm through experiments.The algorithm can solve the above practical problems very well.Section 5 gives a summary.

Model of the Municipal Waste Collection Vehicle Routing Problem
A typical MWCVRP model consists of a garage, a waste disposal station, and multiple waste transfer stations, in which there are multiple waste trucks in the garage.Each waste truck must start from the garage, visit and collect part of the waste at the waste transfer station, then transport it to the waste disposal station for unloading treatment, and finally return to the garage to complete a transportation process (Golden and Assad et al., 2002).
The model in this paper is extended on the basis of the MWCVRP model according to the waste transportation requirements in the real world to form the model of the mixed capacitated vehicle routing problem with a time window.That is, there can be various types of waste trucks, and an accessible time interval for each waste transfer station is set.The model concept diagram is shown below (Fig. 1).
The points involved in the model are represented by the set  =  ∪ {0,  + 1}, where  is the set of waste transfer stations, node represents the garage, and node n +1 represents the waste disposal station.The distance between node i and node j is denoted by D ij , where 1 £ £ i j n , .The amount of waste in each waste transfer station is represented by q i , where q 0 = q n +1 = 0.
where ± i indicates the start time when the transfer station is accessible, and ² i indicates the end time when the transfer station is accessible.
The goal of building this model is to minimize the total cost of waste transportation, which includes not only the shortest total transportation distance but also the smallest possible station service fee received per vehicle.Although the total station service fee is a fixed value, the station service fee of  vehicles can be kept within a normal range, that is, an average value, through an assignment algorithm.This can ensure that the total cost of each vehicle is roughly the same, and the cost of each vehicle in the real world is roughly the same, which is conducive to the coordinated assignment of resources.

Model of the municipal waste collection vehicle routing problem
Then, x ij k is used to indicate whether node i accesses node j after transport vehicle v k visits, where x ij k = 1 is Access, and x ij k = 0 is no access (Kumar and Panneerselvam, 2012).s i k represents the start time when waste transfer station N i is visited, and d i represents the remaining amount of waste in node i .Combining the above parameters and decision variables, the mathematical model expression of the MWCCVRPTW is: (1) subject to: Constraint ( 1) is the optimization objective function, that is, the total cost of waste trucks; Constraint (2) ensures that all waste transfer stations can be accessed; Constraints (3) and ( 4) ensure that each waste transfer station can only be accessed once; Constraint (5) ensures the correct direction of the vehicle, that is, the vehicle should leave immediately after visiting node i ; Constraint (6) emphasizes that the vehicle must start from node 0 , then visit other nodes, finally visit node n +1 and return to node 0 ; Constraint (7) is the time window constraint to ensure that the vehicle must reach within the specified time of node i ; Constraint (8) is a capacity constraint, limiting the amount of waste to not exceed the capacity of the car; Constraint (9) means that after all nodes have been visited, each node has 0 waste remaining.

The Basic Thinking
The multi-model waste transportation vehicle routing problem studied in this paper is a typical discrete optimization problem.To solve the optimal solution agreed upon in the model, this paper adopts a heuristic-based task dynamic assignment algorithm.The general idea of the algorithm is to regard each waste truck as a Worker and regard all waste transfer station processing requests as tasks and push them into the task queue of Master so that Master can dynamically assign the optimal task for each Worker requesting task so that the dynamic assignment algorithm can solve the discrete optimization problem of the vehicle path.The flow chart of the assignment algorithm is as follows (Fig. 2).

Init Master and Worker
Suppose depot has  vehicles, that is, there are  Worker, and only Ask Task, Working and Back to depot three behaviors.Because this paper studies the multi-model vehicle routing problem, it is assumed that there are three types of vehicles, namely, A, B, and C, and the corresponding rated capacity is ,  and ; each transporter, namely, Worker i , must determine its own model t i during initialization, where 1 ≤  ≤  .The processing request task of each transfer station mainly includes Cust No., Xcoord., Ycoord., Demand, Ready Time, Due Date, Service Time properties, push all Tasks into Master TaskQueue T v .

The Process of Algorithm
When Worker i sends an Ask Task request to Master, Master selects from T v according to a heuristicbased assignment strategy.The most suitable task is assigned to Worker i , that is, the master sends the dispatch task signal to Worker i .After Worker i receives the signal, execute the working operation, that is, go to the transfer station marked in Task for service.
When there is no Task available for assignment in the Master TaskQueue T v , Master will send the signal of The All Tasks Done to all Workers that all transfer stations have been serviced.The worker automatically ends the worker process after receiving the signal.

NeedFix false delay ReadyTime true delay ReadyTime
where delay i represents the latest time that the task should theoretically be served.Such a classification operation enables Master to identify urgent tasks and delay tasks, thereby improving the accuracy of assignment.
For example, four tasks have been reached now, as shown in the following table (Table 1).Perform type classification on four tasks, according to the above algorithm, to identify that Task 1 and Task 4 are delay tasks, which can be assigned slowly, and the other tasks are all urgent tasks, which need to be assigned to the free worker immediately.However, it is not enough to have such a Task type classification because some Task Ready Time is too early or too late, which will lead to many Tasks being aggregated for a certain period of time.When the number of idle workers is less than the number of tasks, it will affect the master assignment strategy and task execution process, so the next step of data correction is needed.
The data correction is mainly to reset the Reay Time so that there is a certain time interval between Task and Task , which can greatly reduce the degree of the assignment difficulty of Master and improve the efficiency of scheduling idle Worker.The idea of the data correction algorithm is simple, and it has achieved good results on the Solomon public dataset.
2. Date Correction: First, initialize two empty sets S needFix and S nonFix and a hash table map with all zero status bits.Traverse T v of Master, for each Task i , if its Need Fix status bit is true, then Task i is pushed into S needFix , and map is subscripted to the state position of Ready Time; otherwise, it is pushed into S nonFix .
After the push-to-set operation is completed, the data correction process begins.Traverse the set S needFix , and perform a ready time reset operation for each Task i .The random time method is used here, that is, the random number time is generated by calling the rand function of the system to ensure that time is not greater thandelay i , not less than Ready Time.If the status bit of the map subscripted by time is zero, set the value of ready time of this Task i to time, set the corresponding state position of the map to 1, and add it to S nonFix ; otherwise, regenerate the random number time until time meets the requirements.
After the above set division operation, there are Task 1 and Task 4 in S needFix and S nonFix in Task 2 and Task 3 .Assuming that the random generation time of Task 1 is 50, and the status bit of the 50th position in the map is zero, then the ready time is modified to 50, and the map corresponds to the position state turn 1.The random time generated by Task 4 is also 50, but the 50th position in the map.The status bit is already 1, so it is necessary to regenerate time, and it is 60.The status bit of the 60th position in the map is zero, and the data are corrected in the same way.Among them, 1 ≤ ≤ ( ) j length T v , map status bit is 1 means that there is Task at this point, and zero means no Task at this point.The rand function is used to reset Ready Time instead of the traditional iterative reset method because the data processed by the rand function combined with the status bit reset method are more accurate and conform to the law of uniform distribution.For example, Task 1 and Task 4 are classified as delay tasks.If the traditional iterative reset algorithm is used, that is, traversing map, if Ready Time is reset, then there will be a high probability that the Ready Time of Task 1 will be lower than Task 4 .This is something we don't want to see.Although both Task 1 and Task 4 are delay tasks, there are also task priorities.According to the design idea of the master assignment strategy and under the nature of delay tasks, the task with the lower Due Date should also be assigned first.Therefore, the Ready Time of Task 4 should be as low as possible as Task 1 .Using the rand function can greatly increase the probability of this happening, but the traditional iterative reset algorithm cannot do so.
3. Init TaskQueue: Push Task in S nonFix into T v in Master, according to the corrected Ready Time Sort in ascending order.If Ready Time is equal, then sort in ascending order according to Due Date of the task to complete the initialization of the task queue.4. Dispatch Algorithm of Master: When Master receives Ask Task request from Worker i , first record the arrival time of Worker i request TimeStamp, current location Location, rated capacity VehcCap, and remaining capacity RestCap.Then, Master will find the Task available for assignment at this TimeStamp moment in the task queue T v , that is, Ready Time ≤ TimeStamp ≤ Due Date, and Demand ≤ VehcCap, then push these tasks into the candidate queue C v .This paper assumes that there is no penalty function, that is, it is not allowed that TimeStamp exceeds the Due date of the Task; otherwise, the dispatch scheme fails.The Elitist Genetic Algorithm (EGA) proposed by YanFei (Zhu and Lee et al., 2021) is assisted by a penalty function; even if TimeStamp exceeds the Due date of the Task, it will not lead to the failure of the dispatch scheme, at most increasing the cost of its scheme.Because this paper studies the Mixed Capacitated Vehicle Routing Problem with a Time Window, we feel that the method without a penalty function is more suitable for the scene where the Task needs to be serviced in time in this paper.
Traverse the candidate queue C v , according to the idea of heuristic search (Yelmewad and Talawar, 2021), calculate the evaluation function f k ( ) , the minimum cost function g k ( ) and the heuristic function h k that is, from the current position to the location of Task k ; h k ( ) is Worker i the estimated cost, that is, from the location of Task k to Depot.
When calculating the heuristic function h k ( ) , because the next route of Worker i cannot be determined, this algorithm uses the Manhattan method to roughly calculate the distance between Task k and Depot, which is taken as h k ( ) .
Sort C v in ascending order according to the  value of Task, select the Task with the smaller first two  values, and record them as Task ± and Task ² , where the  value of Task ± is f ± , and the demand is demand ± .The  value of Task ² is f ² , and the demand is demand ² .If f ± < f ² , directly assign Task ± to Worker i ; in the case of f ± = f ² , then compare the demand of the two demand ± and demand ² , and select the Task with the larger demand for assignment, for example (Table 2).
The arrival time TimeStamp of the request of Worker i is 728, the current location Location is (30, 70), the rated capacity VehcCap is 36, and the remaining capacity RestCap is 25.The selection scheme is shown below (Fig. 3).
The master selects two tasks with the smallest  value from the task queue T v , that is, the  value of Task 3 is 50, where g 3 = 25, h 3 = 25; the  value of Task 2 is 50, where g 2 = 20, h 2 = 30.At = , and it is necessary to compare the demand demand 2 and demand 3 .It can be seen from the above table that demand 2 is larger, so Master assigns Task 2 as the optimal task to Worker i .

The Working Process of Worker:
When the Worker i process starts, record the current location, that is, the location of the garage depot, determine the car capacity VehcCap according to your own model, and initialize the remaining capacity RestCap = VehcCap.
After making an Ask Task request to Master, wait for the Dispatch Task signal from Master.Perform Working or Back to depot operations according to the type of signal; if the signal of Master is TaskEnd, it means that at this time TaskQueue T v of Master has no tasks, and Worker i will end the work process; if the signal of Master is TaskWait, it means that there is no suitable task in TaskQueue T v of Master for Worker i , notify Worker i to rest for 1 time unit and then request Master; other in the case of Worker i , the Working operation should be performed, but it needs to be checked before execution.If the signal of Master is TaskNonHandle, it means There is a suitable task for Worker i , but the demand of this task is greater than the remaining capacity of Worker i , and it needs Worker i to execute Back to depot Back to warehouse unloading operation, and then go to the task marked location to serve.
The working operation is realized by letting the worker process of Worker i sleep for service time unit time, that is, simulating the operation of going to the target transfer station for service.The prototype of the dataset used in this experiment is the Solomon dataset.According to the category of waste trucks provided by Chengli Special Automobile Co., Ltd., this paper selects three types of vehicles with different loads, and the parameters of the three vehicles are also proportional to each other's zoom.The vehicle parameters are shown in Table 3, in which the transfer station service cost includes loss cost and loading cost (mechanical cost or labor cost).All the experimental environments tested in this article are Ubuntu 20.04LTS.

Vehicle Type's Influence
To illustrate the difference between a single model and a hybrid model, we designed the following experiments.In the experiment, according to the algorithm mentioned in this paper, the scheme using only three single models is tested, and the test dataset is the dataset C101.Compared with other datasets with scattered data points, the station distribution of the C1 series is more in line with the urban structure and is more scientific and realistic.The test results are shown in Table 4.
The travel cost refers to the sum of the costs of each type of vehicle travel distance in each scheme, and the total cost is equal to the sum of the travel cost and the station service fee.Compared with S 2 , the total distance of S 3 is greatly shortened due to the large capacity of the C-type models, but the total cost is 21.33% higher due to the higher fuel cost per mileage of the C-type models.Table 5 shows the access path and loading rate of the C-type vehicles in solution S 3 , where node 1 is the waste disposal station, and the S 1 solution that uses all the A-type vehicles.Due to the small capacity of the A-type vehicles, some large-capacity sites may be unable to be served, so it has no practical significance.
From the results in Table 5, among the 11 C-type waste trucks, only 2 waste trucks have a loading rate of 90%, the No. 3 vehicle's loading rate is only 60.00%, the average loading rate of the 11 vehicles is 79.09%, and the loading rate is too low, resulting in an extremely high waste of resources.From the above test results for a single model, it can be seen that a single model will bring problems such as high total cost or low efficiency in the process of vehicle transportation.Therefore, this paper proposes a transportation solution based on a multi-model model to solve the unequal distribution and high total costs of the resources brought by the single vehicle type model.Two approximate optimal solutions S 4 and S 5 are obtained through the calculation of the transportation plan based on the multi-model model, where S 4 is the approximate solution of S 1 , that is, while ensuring that the transportation task can be completed on time, use as many vehicles of A-type as possible; S 5 is an approximate solution of S 2 , that is, use as many vehicles of B-type as possible while ensuring that the transportation task can be completed on time.As N is the number of vehicles, TD is the travel distance, and SC is the service cost.
As seen from Table 6, after using multiple models and reducing the use of large capacity C-type vehicles, not only can the transportation task be completed on time, but the total transportation cost has been greatly reduced, and the reduction in the use of large capacity C-type vehicles has also solved the problem.For the problem of uneven resource allocation (too low loading rate), Table 7 records the access path and loading rate of the only C-type vehicle in the optimal solution S 5 .
Figure 4 shows the path on a time slice in the optimal solution S 5 .It can be seen from the figure that the B-type vehicle (dotted line) has a wider service range than the A-type vehicle (solid line), and the A-type vehicle is used for those service points with farther distances and smaller clusters.The model reduces the travel cost of long-distance station clusters in this way and further improves the efficiency of resource allocation and vehicle loading rate.The above tests are the approximate solution S 1 that uses as many A-type vehicles as possible and the optimal solution S 5 that uses as many B-type vehicles as possible.It can be seen from the comparison that under the same conditions, the B-type vehicles are preferred, the transportation scheme assisted by other models has the best effect, and the total transportation cost is saved by approximately 3.27%.Since the B-type vehicles inherit the advantages of A-type and C-type vehicles (low cost and high load), the optimal solution can be proposed based on the approximate solution S 4 and the optimal solution S 5 .Then, for the datasets C101, R101 and RC101, this idea is proven by experimental comparison with a single vehicle model.The experimental results are shown in Table 8 below.whereD 1 represents the percentage of the travel cost of a single B-type vehicle higher than the optimal solution, and D 2 refers to the percentage of the total cost of a single B-type vehicle higher than the optimal solution.From the comparison of the three datasets, it can be seen that the optimal plan is to give priority to the use of B-type vehicles, and the proportion of investment exceeds 45.45%.In summary, solving the problem of mixed vehicles can reduce the travel cost and the total cost to a certain extent.

Comparisons with GA and p-SA
Finally, to verify the efficiency of the heuristic-based task dynamic assignment algorithm proposed in this paper in solving the time window-based multi-model urban waste transport vehicle routing problem, the algorithm in this paper is compared with two traditional algorithms for solving vehicle routing problems, GA (Wang and Chen, 2012) and p-SA (Wang and Mu et al., 2015).Under the condition of ensuring the use of the same vehicle type and the same number of vehicles, the optimal solutions of the three algorithms in the C101, R101 and RC101 datasets are solved.The evaluation indicators mainly include the total distance, travel cost and total cost.The experimental comparison results are shown in Table 9.
It can be seen from Table 9 that on three typical datasets, the algorithm proposed in this paper is better than GA and p-SA in solving R101 because the M2W algorithm gives full play to the characteristics of dynamic task assignment, which can be more reasonable and accurate.When solving RC101, better than p-SA but slightly inferior to GA, it is because most of the points in the dataset RC101 are aggregated and mixed with some randomly distributed points, so M2W cannot give full play to the heuristic-based characteristics of the task dynamic assignment strategy.In summary, the M2W proposed in this paper outperforms traditional pathfinding algorithms on relatively discrete and randomly distributed datasets.

CONCLUSION
This paper takes the vehicle routing problem with a time window as the basic model, introduces multi-model and capacity constraints and cost calculation criteria, establishes a multi-model waste transporter route optimization model, and then designs a heuristic-based task dynamic assignment algorithm to solve the problem.The research in this paper provides a model and method for municipal and other related departments to solve the problem of urban waste recycling, especially in the case of multi-model waste trucks.The method in this paper will greatly improve the utilization of resources and save the cost of manpower and material resources.The innovation in the algorithm also includes considering that the vehicle has a capacity limit, so there is a high possibility that the vehicle will be fully loaded during transportation.If this happens, it needs to return to the processing station for the unloading operation and then go to the next station for service.
In developing countries, research on the problem of urban waste vehicle routing is still in its infancy.This paper only considers the economic factors of the recycling process, ignoring the impact on the surrounding environment, so it studies how to minimize the environmental impact while ensuring the total transportation cost.The minimum will be the next research content.
Figure 1.Model of the municipal waste collection vehicle routing problem Figure 2. A Heuristic-based dynamic task assignment algorithm

1.
The Classification of Task Type: Calculate delay i based on Ready Time, Due Date and Service Time of Task i .on each Task in Master TaskQueue T v .
Figure 3. Selection between two tasks Figure 4. Partial path of optimal solution