1. Introduction
According to the Statistical Report on the Development of China’s Internet released by the China Internet Network Information Center, as of December 2024, the number of online food delivery users in China has reached 592 million, with a user adoption rate of 53.4% [
1]. Supportive national policies and the trend of consumption upgrades have created a favorable external environment for China’s food delivery industry, while fierce market competition has driven platforms like Ele.me and Meituan to continuously innovate. With the surge in food delivery orders, issues related to delivery efficiency have become increasingly prominent. However, while pursuing efficient delivery, we cannot overlook sustainability challenges during this process. From an economic perspective, delivery personnel face immense work pressure, especially when merchants handle dine-in orders alongside other delivery orders simultaneously. The uncertainty in preparation times leads to prolonged waiting periods for delivery personnel, increasing the risk of delays and affecting their income levels. This situation not only damages the customer experience but may also cause conflicts between merchants and delivery personnel, hindering healthy industry development. From a societal viewpoint, any order fulfillment time is limited; failing to promptly pick up meals from merchants significantly affects subsequent order deliveries. Near meal times, a large number of users place orders on food delivery platforms, while physical stores see a surge in offline customers. For merchants, a massive influx of orders during peak hours can lead to order backlogs if they cannot prepare meals promptly, affecting both online and offline service quality. During peak times, the demand from delivery personnel for early meal pickups clashes with insufficient merchant preparation capabilities, leading to numerous social incidents that challenge the establishment of harmonious social relations. When conducting analysis from an environmental dimension, frequent traffic movements and unreasonable delivery route planning not only increase carbon emissions but are also detrimental to environmental protection.
Therefore, considering actual preparation times, determining how to balance delivery efficiency and achieve effective dynamic delivery route planning has become an urgent challenge within the industry. According to a survey conducted among food delivery personnel on “external factors influencing delivery times”, 70.27% of respondents believed that the speed of merchant food preparation was the primary factor affecting deliveries, the highest among all influencing factors. This indicates that optimizing delivery routes and reducing waiting times for delivery personnel are crucial for enhancing overall delivery efficiency.
To address these issues, this paper proposes a dynamic optimization method for food delivery routes that takes into account preparation times. By calculating order similarity, this method dynamically adjusts delivery personnel routes to minimize delivery times and service delays.
To validate the effectiveness of the proposed method, we first constructed a simulation model aimed at minimizing delivery costs (including travel costs, penalty costs, and waiting costs). Then, we optimized delivery routes under various scenarios using a clustering genetic algorithm. The experimental results show that compared to traditional methods, our approach can significantly reduce average delivery times, decrease waiting times for delivery personnel, and improve the efficiency and sustainability of the entire food delivery system by reducing travel distances.The following sections will discuss related work, modeling, algorithms, simulation results analysis, and conclusions.
2. Related Work
Currently, there is a considerable amount of research on food delivery logistics. Li et al. [
2] investigated the simultaneous delivery problem of products and services with order release dates and designed an adaptive large neighborhood search algorithm for solving it. Ren et al. [
3] studied the conversion of merchant and customer satisfaction into penalty functions to construct a vehicle routing problem model in food delivery pickup and delivery scenarios. Yang Haoxiong et al. [
4] explored the time window-constrained food delivery order distribution problem under the context of single-order multiple-item food delivery, aiming at minimizing delivery costs, and utilized a genetic algorithm for solution. Tang et al. [
5] devised a two-stage multi-objective optimization algorithm combining genetic algorithms with large neighborhood search algorithms for problem-solving.
To make research more closely aligned with reality, many scholars have also focused on the dynamic nature of orders. Li Taoying et al. [
6] simulated the distribution of order generation intervals with the total increment of food delivery costs as the objective function. Marlin et al. [
7] proposed an anticipated customer allocation strategy for dynamic orders to achieve greater flexibility in order allocation. Zhou Chenghao [
8] introduced a business district-centered O2O dynamic food delivery route optimization model, converting dynamic adjustment issues into a series of static TSP sub-problems by periodically processing new orders. Fan Houming et al. [
9] established an optimization model considering constraints such as customer order times, merchant preparation times, rider waiting times for pickup, and customer service times, employing periodic optimization methods to dynamically adjust delivery routes. Xie et al. [
10] took into account the impacts of different times and road levels on vehicle routes, proposing a dynamic optimization model for food delivery vehicle routes based on time-varying subdivided road networks.
For the multi-objective delivery route optimization problem, Li Taoying et al. introduced time penalty costs and proposed a “merchant–customer” clustering method [
6]; Chen Ping and Li Hang chose to improve customer satisfaction by optimizing time satisfaction [
11]; Liao et al. designed a route optimization model that includes multiple objectives such as carbon emissions, rider utility, and user satisfaction, using a two-stage strategy for solving [
12]; Xu Qian et al. proposed a vehicle routing optimization model aimed at minimizing the total cost of logistics platforms, choosing an adaptive neighborhood search algorithm for solving [
13]; Liu specifically improved the low-carbon mixed-integer programming model for unmanned vehicle scenarios [
14]; Yu Haiyan et al. developed a real-time order assignment and route optimization model [
15]; Yu Jianjun et al., targeting self-operated fresh food deliveries, pioneered a weighted method to improve the multi-objective model of delivery cost and customer satisfaction [
16]; Yang Donglin and Rong Ying compared and analyzed the “centralized order allocation” and “regional bidding” O2O delivery models [
17]; and Zhang Liya et al. proposed a multi-objective pickup and delivery vehicle routing model, solved through an improved iterative local search algorithm [
18].
Regarding the factors influencing the quality of food delivery services, Saad studied major factors affecting delivery service, including delivery status, cost, and delivery time [
19]; He et al. found that the key to users’ willingness to place orders lies in food quality and merchant distance, recommending differentiated delivery based on different conditions [
20]; and Liu et al. explored the mechanism of weather factors on the food delivery order market and courier efficiency [
21]; Ji et al. focused on customer time windows, studying group delivery to enhance food delivery levels [
22]. Dai Hongyan et al. [
23] identified during their research that traditional O2O instant delivery decision-making assumptions do not align with real-world situations, leading to a decrease in the precision of decisions. Consequently, they proposed a new decision-making system based on personalized broad assumptions. This system incorporates historical operational data into the model and updates parameter information, such as delivery personnel speeds, in real time to enhance the accuracy of the decision-making system. Yu Haiyan et al. [
24] addressed the issue that instant delivery platforms cannot meet the varying urgency levels of delivery times demanded by different customers. They introduced customer differential response as an incentive function into the delivery scheduling model, establishing four distinct reward mechanisms. The study verified the efficiency of these different mechanisms under various scenarios.
In terms of algorithm research, Wu Tengyu et al. designed the JLNO algorithm to solve the optimization model adapted to urban road structures [
25]; Xu Qian et al. chose targeted insertion and deletion based on orders, utilizing an adaptive neighborhood search algorithm to achieve the lowest platform total cost [
26]; Zhao Xiangnan et al. improved the non-dominated genetic algorithm to address the uncertainty of travel time and enhance the robustness of the model [
27]; Yu Haiyan et al. designed a rolling horizon delay algorithm for hard time window orders, using the idea of consolidated delivery to solve the model [
28]. Chen Yanru designed an optimized strategy for instant food delivery called PPO-IH, which combines the Proximal Policy Optimization (PPO) algorithm with the Insertion Heuristic (IH) algorithm. PPO-IH employs a policy network integrated with an attention mechanism to match orders with riders. The network is trained using the PPO algorithm, and the rider routes are updated using the Insertion Heuristic algorithm [
29].
Thus far, relatively in-depth research has been conducted on the vehicle routing problems in food delivery, yielding a series of valuable research outcomes. Understanding basic data in food delivery, including order information and estimated delivery time, provides data support for studies focusing on uncertain travel times for delivery personnel, customer satisfaction, customer priority, etc., offering both theoretical foundations and practical guidance for improving dispatch strategies on food delivery platforms and maximizing customer satisfaction. These studies characterize aspects such as costs, revenues, and delivery efficiency related to route optimization problems, with models that are closer to reality, providing methodological support for future research.
However, with the rapid development of the food delivery market today, demand during peak meal times continues to expand, and customer requirements for timeliness are continuously increasing. This often necessitates constructing models that meet practical needs according to the characteristics of the objects under study. Therefore, optimizing key factors affecting food delivery becomes an urgent issue to be addressed. At the same time, existing research mainly focuses on multi-objective optimization methods and route optimization algorithms, while real-time dynamic adjustment of critical time windows and clustering in food delivery remains less explored. Through analysis of relevant work, several critical areas still require further investigation:
Research on optimizing food delivery routes considering preparation times is not yet mature. There is a lack of accurate reflection of the operational rules and characteristics of merchant preparation times, and the fuzzy membership function relationship between delivery efficiency and preparation times does not fully consider the actual situation of food delivery, requiring further clarification and demonstration.
Most existing studies allocate based on single-order attributes. In the process of optimizing food delivery routes, the interrelation between multiple orders lacks clear quantitative expression. The literature exploring how to depict similarities among multiple orders to address combined delivery issues is scarce.
The innovations of this paper are as follows:
Previous studies have considered the impact of preparation times when researching food delivery issues, but most scholars set preparation times as fixed values. In real life, preparation times are highly random due to various influencing factors. Setting them as fixed values may affect the accuracy of scheduling models and algorithms, which is not conducive to guiding real-world scheduling. This paper explores the impact of merchant preparation times on costs, introduces an overtime penalty function, and analyzes the mechanism by which delivery route optimization is affected by preparation times. Using periodic optimization, it dynamically adjusts delivery routes based on changes in delivery personnel and order status within different phases to avoid order delays or prolonged wait times, thereby enhancing the precision of food delivery and customer experience.
During actual food delivery, orders within business districts exhibit temporal and spatial similarities that can be considered in dispatch scheduling. However, current research pays little attention to similarities between orders. This paper fully considers factors affecting order similarity, employing clustering ideas to optimize initial solutions using order similarity as the basis for clustering.
5. Experimental Design and Result Analysis
To verify the effectiveness of the algorithm proposed in this paper, we refer to actual data from the “Ele.me” food delivery platform and other relevant literature to generate simulation test cases and provide corresponding computational results. The code for these case studies is written using Matlab R2018b. The primary subjects of this section’s case studies are 60 orders during peak hours. Additionally, information on the number, IDs, and locations of available delivery personnel at that moment is included. According to field research at delivery stations, the cost of cycling is CNY 0.2 per minute, and the delivery time for each order mostly ranges between 25 and 45 min. Specific parameter settings are detailed in
Table 3.
5.1. Comparison and Analysis of Path Optimization Algorithms
To verify the effectiveness of the proposed model and algorithm, five algorithms are designed for comparison: Algorithm 1: A clustering heuristic algorithm that considers order preparation times. Algorithm 2: A heuristic algorithm that does not consider order clustering. Algorithm 3: A clustering heuristic algorithm that does not consider preparation times. Algorithm 4: Utilizes the Gurobi solver called by Python 3.8 to solve the model. Algorithm 5: Utilizes the simulated annealing algorithm to solve the model.
By comparing these four algorithms, the aim is to validate the effectiveness of the clustering method, the model, and the algorithms.
The comparison between Algorithm 1 and Algorithm 2 aims to verify the effectiveness of the clustering method. The comparison between Algorithm 1 and Algorithm 3 aims to verify the effectiveness of the model that considers preparation times. The comparison between Algorithm 1 and Algorithm 4 aims to evaluate the efficiency and effectiveness of the heuristic algorithm relative to an exact solver. The comparison between Algorithm 1 and Algorithm 5 to verify the performance of the algorithm.
Table 4 presents the overall test results obtained by the four algorithms after dynamic scheduling has concluded. Algorithm 1 shows significant advantages over Algorithm 2 and Algorithm 3 in key metrics such as average delivery cost per order, total mileage of delivery personnel, proportion of overdue deliveries, average penalty cost per order, and average waiting time. This indicates that the clustering method and the model considering preparation times are crucial for enhancing overall delivery efficiency and service quality.
Comparing Algorithm 1 with Algorithm 4 shows that Algorithm 4 is slightly better than Algorithm 1 in terms of certain metrics, such as average delivery cost per order and total mileage of delivery personnel. However, considering the computational complexity and the need for real-time scheduling, Algorithm 1 is more practical in large-scale real-time scheduling scenarios. This means that although exact solvers can provide better solutions, computational efficiency and response speed are equally important in dynamic environments.
The comparison between Algorithm 1 and Algorithm 5 further demonstrates the superiority of the optimization strategy proposed in this paper when balancing efficiency and effectiveness. Although both algorithms are close for most metrics, Algorithm 1 has slight advantages with regard to the average waiting time and average penalty cost per order, which further validates its potential for practical application.
In summary, the clustering heuristic algorithm (Algorithm 1) proposed in this paper, which takes into account the preparation times of orders, not only theoretically enhancing delivery efficiency but also demonstrating high practical value in actual operations. Especially when dealing with large-scale real-time scheduling problems, this algorithm, with its lower computational complexity and excellent comprehensive performance, is an ideal choice for optimizing delivery routes on food delivery platforms.
5.2. Random Meal Preparation Time
In the food delivery process, there is randomness in the appearance of food orders and the meal preparation time by merchants; orders received by merchants may not immediately enter the preparation process. Therefore, investigating the patterns of order preparation times is crucial for platforms to plan reasonable pickup times. The meal preparation time of the merchants is a random variable in this problem, denoted as . To study the relationship between this random variable and the final solution, this paper conducts experiments with different parameter settings. The average results of the experiments are shown below.
Table 5 shows that, under the conditions where
is fixed at 10, 15, and 20, respectively, even slight variations in variance result in relatively stable final solutions. This indicates that under this specific mean value, the model exhibits strong robustness to minor fluctuations in external parameters. This finding suggests that when the mean meal preparation time is relatively stable, slight changes in the variability of preparation times do not significantly impact the results of delivery route optimization or computational efficiency. Therefore, for food delivery platforms, ensuring the relative stability of meal preparation times by merchants is crucial. This approach allows for maintaining efficient delivery services without adding an extra computational burden. When designing and optimizing food delivery systems, emphasis should be placed on stabilizing meal preparation times rather than focusing solely on their variability. This can help enhance overall delivery efficiency and service quality while reducing unnecessary waste of computational resources.
Table 6 shows that when the variance
is held constant, adjusting the parameter
leads to significant fluctuations in the results. Specifically, when
is set to 10 and 15, the penalty costs are relatively low; with
=15, the total cost is slightly higher than when
= 10. However, as
increases to 20 and 25, the penalty costs rise noticeably. Furthermore, when
increases to 30, the penalty costs spike sharply. This indicates that an extension in meal preparation time significantly increases the penalty costs during the delivery process, thereby raising the total costs. Therefore, in the O2O food delivery model, it is crucial for merchants to shorten their preparation times and complete meal preparation as soon as possible. Timely meal preparation not only helps reduce penalty costs due to delays but also effectively lowers overall delivery costs, enhancing delivery efficiency and service quality. By optimizing meal preparation time management, food delivery platforms can achieve more efficient operations, improve customer satisfaction, and ultimately enhance market competitiveness.
As
and
increase proportionally, the experimental results, as described in
Table 7, show that all costs also increase. This result indicates that the higher the mean and variance of meal preparation times, the higher the total costs during the delivery process. This has important implications for food delivery platforms:
Shorten preparation time: To reduce overall delivery costs, merchants need to minimize preparation times and enhance productivity.
Reasonable order acceptance: When the order volume exceeds their production capacity, merchants should appropriately decline orders to ensure they can maintain stable preparation times, avoiding long delays caused by overloading operations.
Ensure production consistency: Merchants should strive to keep their production levels consistent, reducing fluctuations in meal preparation times, and thereby lowering penalty costs due to delayed meal preparation.
By optimizing preparation times and managing order volumes, food delivery platforms can achieve more efficient operations, improving overall service quality and customer satisfaction. This not only helps reduce costs but also enhances the platform’s market competitiveness and customer loyalty.
5.3. Dynamic Case Analysis
To further investigate the effectiveness of the order assignment strategy proposed in this study during dynamic order allocation, we chose to divide sixty peak-period orders into stages, with each stage covering a ten-minute interval. This approach better reflects the critical factors in the actual delivery process, thereby evaluating the effectiveness of the allocation strategy (
Table 8).
Within a forty-minute period, 60 orders were generated and divided into four stages, with a total of 10 delivery personnel called upon. Some of the order information is shown in
Table 9. The total cost amounted to CNY 757.29, with an average delivery cost per order of CNY 12.62. The simulation experiment showed that the average delivery time was 22.13 min, while the actual average time per order was 11.54 min, demonstrating a good delivery rate. This result further verifies the effectiveness and practicality of the order assignment strategy in food delivery services.
To further validate the effectiveness of the dynamic update strategy, stages 3 and 4 were selected for analysis, as shown in
Table 10,
Table 11 and
Table 12. During the fourth stage, there were significant changes in the status of many orders for pickup and delivery. The improved strategy from stage 3 did not match the actual conditions of subsequent stages. Therefore, the current order status was reanalyzed for secondary scheduling to obtain an improved strategy for the fourth stage.
Through the analysis of delivery situations across different stages, especially the detailed comparison between stages 3 and 4, the following conclusions can be drawn:
Importance of dynamic adjustment: The significant changes in a large number of orders during stage 4 highlight the importance of a dynamic adjustment strategy. By updating delivery routes in real time, the system can better respond to changes in order status, thereby improving delivery efficiency.
Effectiveness of secondary scheduling: Conducting secondary scheduling based on the current order status effectively optimized the delivery routes for stage 4. This approach minimized unnecessary waiting times and distances traveled, reducing penalty costs.
Overall performance improvement: Throughout the experiment, the average delivery cost per order was kept within a reasonable range, and the actual time spent per order was significantly lower than the simulated time. This demonstrates the high efficiency and practicality of the proposed order assignment strategy in relation to food delivery services.
In summary, the proposed order assignment strategy and dynamic update mechanism not only enhance delivery efficiency but also significantly improve overall service quality. This provides an effective solution for optimizing food delivery systems.
5.4. Analysis of Solution Results
5.4.1. Merchant Distance Weight
The experimental results show that setting an appropriate merchant distance weight
w can effectively reduce travel costs. As illustrated in
Figure 5, the merchant distance weight is negatively correlated with waiting costs and positively correlated with travel costs. Specifically, increasing the merchant distance weight in order allocation can effectively mitigate the adverse impact of meal preparation waiting times on total costs, thereby reducing waiting costs. However, this adjustment strategy also leads to a diminished influence of customer distance factors in order allocation, indirectly resulting in suboptimal delivery route optimization and increased travel costs.
It is recommended that platforms adopt a flexible strategy:
During off-peak hours: When transportation resources are relatively abundant, the platform can moderately decrease the merchant distance weight to achieve the goal of minimizing total costs. By optimizing the utilization of delivery resources, the platform can enhance its competitiveness.
During peak Hours or for operational stability and customer experience optimization: Especially when transportation capacity is tight during peak hours, the platform can appropriately increase the merchant distance weight. This approach involves slightly sacrificing travel costs to reduce delivery personnel’s waiting time at merchants, thereby lowering the incidence of late orders.
Through strategic adjustments, platforms can more precisely meet the demands of different operational scenarios, achieving a win–win situation of cost efficiency and customer satisfaction.
5.4.2. Meal Preparation Time Difference Conversion Coefficient
As the meal preparation time difference conversion coefficient
increases, the travel cost exhibits an upward trend. With higher values of
, the similarity in meal preparation times within order subsets increases. Given that transportation time is primarily influenced by spatial distance factors, the decrease in spatial similarity directly leads to delayed delivery times. Waiting costs are not only affected by the differences in meal preparation times between orders but also involve key factors such as the geographical distance between orders and merchants, as well as the travel distance for delivery personnel to reach the merchants (
Figure 6).
Therefore, by adjusting the meal preparation time difference conversion coefficient, it is possible to effectively manage the variation in meal preparation times within order subsets, ensuring they remain within an appropriate range. This strategy not only aids in optimizing order allocation but also provides valuable guidance for subsequent route optimization, ensuring the efficiency and rationality of the delivery process. The system can more intelligently plan the sequence of order deliveries, thereby minimizing waiting times caused by differences in meal preparation times, which in turn optimizes overall delivery efficiency and duration.
5.4.3. Meal Preparation Time
From
Figure 7, it can be seen that meal preparation time is positively correlated with penalty costs. As the meal preparation time increases, the risk of order delays also rises, thereby increasing penalty costs.
When the meal preparation time is less than 10 min, the delivery personnel’s waiting time is relatively short, resulting in lower waiting costs. However, when the meal preparation time exceeds 15 min, although actual waiting time increases, due to the clustering effect of orders, the system manages multiple nearly completed orders within this period. By reducing the idle travel time between merchants and optimizing the pickup sequence, the system improves delivery efficiency, which in turn lowers waiting costs.
In summary, the refresh cycle for dynamic order times should be adjusted based on the distribution of meal preparation times. Precisely setting the time cycle can balance delivery costs, shorten order delivery durations, and enhance food delivery efficiency. When setting the time cycle, historical data should be fully considered. If a certain type of merchant generally has longer meal preparation times, the time cycle can be appropriately extended to improve delivery efficiency. Conversely, if preparation times are shorter, the cycle should be flexibly shortened.
Therefore, reasonably controlling meal preparation times is not only key to managing penalty costs but also allows platforms to save on waiting processes through strategic adjustments in pickup and delivery sequences, thus achieving maximum cost-effectiveness in operations.
5.4.4. Managerial Implications
For dynamic demand issues, a periodic optimization strategy can effectively address redundant delivery routes, thereby enhancing delivery efficiency.
Introducing clustering methods based on order similarity to improve the genetic algorithm allows for more efficient initial solutions, significantly reducing delivery personnel’s waiting time and maximizing platform profits.
The platform’s decision preferences regarding merchant distance weights and meal preparation time weights have a significant impact on optimization outcomes. Therefore, food delivery platforms must not only focus on cost control but also prioritize improving delivery quality (shorter average delivery times and lower rates of delayed deliveries).