Skip to Content
SustainabilitySustainability
  • Essay
  • Open Access

20 March 2025

Research on Dynamic Optimization of Takeout Delivery Routes Considering Food Preparation Time

,
,
and
School of Business, Jiangnan University, Wuxi 214122, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.

Abstract

The rapid development of the food delivery industry has imposed higher demands on optimizing delivery routes, especially with regard to addressing dynamic demand and stringent time constraints. As a critical factor impacting delivery efficiency, the food preparation time must be reasonably considered to optimize overall delivery routes effectively. Aiming at enhancing delivery efficiency by minimizing total delivery costs, a novel food delivery route optimization model was designed and constructed. This model specifically takes into account the impact of merchants’ food preparation times on the delivery process and improves upon a genetic algorithm based on clustering ideas for solving the problem. The clustering basis for obtaining initial solutions is calculated through the temporal and spatial similarity of orders. The feasibility of the algorithm is verified through designed computational examples. The simulation results demonstrate that the algorithm excels in reducing average delivery costs per order, decreasing the total mileage traveled by delivery personnel, and shortening average waiting times. Quantitative outcomes confirm that the new model can address dynamic demand issues, significantly reduce wait times for delivery personnel, and maximize platform revenue. Analysis of key parameters yields management insights that could provide references for operational decisions made by food delivery platforms, aiding in promoting environmental protection and sustainable development within the food delivery industry.

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.

3. Model Description and Establishment

3.1. Model Description

In a specific commercial district, there are multiple merchants and users who place orders within this area. The district is equipped with a certain number of delivery personnel whose work status can be updated in real time. The geographical locations of these merchants and consumers are clearly defined. Especially during peak demand periods for food delivery, when consumers within the district place orders with multiple merchants, an effort is made to achieve balanced allocation and dispatching by assigning these food delivery orders to available delivery personnel as close to the merchants as possible. This approach ensures efficient order delivery while maintaining the rational utilization of delivery resources.
In the actual process of food delivery, multiple orders are carried out simultaneously, and these orders are dynamically generated and difficult to predict. For this type of dynamically changing demand in delivery route problems, it is often impossible to directly obtain the optimal solution; hence, this paper adopts a periodic optimization strategy for dynamic solving. The periodic optimization strategy means that orders generated within a certain period are not processed immediately but are globally optimized together with already picked-up but undelivered orders or yet-to-be-processed orders at the end of the period.
As shown in Figure 1, at time T1, all delivery personnel are located at the distribution center. The platform plans the initial delivery plan based on the information of five orders generated during the 0– T 1 period. At time T 2 , it becomes necessary to handle newly added orders (6, 7, 8) during the T 1 T 2 period. From the previous phase, unprocessed orders 4 and 5, and picked-up but undelivered orders 1, 2, and 3 remain. Taking the location where the delivery personnel are situated or are about to arrive as the virtual distribution center, adjustments are made to the delivery personnel’s assigned orders and routes.
Figure 1. Delivery routes of orders and corresponding nodes.

3.2. Model Assumptions and Symbol Explanations

Based on the problem description, this section outlines the assumptions made for the model and provides an explanation of the notation used in Table 1. The specific assumptions are as follows:
Table 1. Explanation of symbols.
Assumption 1. 
The locations of merchants, customers, and delivery personnel are known, and the time windows for customers are also known.
Assumption 2. 
Delivery personnel pick up orders before making deliveries, and once a delivery is completed, they do not need to return to the distribution center.
Assumption 3. 
If a delivery person arrives before the meal preparation is complete, they must wait; otherwise, they can immediately pick up the order and proceed with the delivery.
Assumption 4. 
During the delivery process, it is assumed that the vehicle speed remains constant at v, and external factors such as traffic and weather conditions are not considered.

3.3. Overtime Penalty Function

Late deliveries not only impact customer satisfaction but also degrade the overall quality of delivery services. To minimize late deliveries, this paper introduces a penalty function that incentivizes punctual deliveries through economic means. The function is designed in a segmented form, with the following expressions: Phase 1: If the order is delivered on time, the penalty value is 0. Phase 2: Once an order becomes overdue, the penalty value increases linearly with the delay time. This means the longer the delay, the higher the penalty cost will be. Phase 3: Should the customer refuse to accept the order due to excessively long waiting times, the penalty value will be set to a fixed constant M
t α 1 = t 1 + t α 0 + S α v
t α 2 = t 2 + t α 0 + S α v
f t α f = 0 ; t α f t α 1 t α f t α 1 t α 2 t α 1 ; t α 1 t α f t α 2 M ; t α f t α 2

3.4. Objective Function Construction

Min z 1 = c 1 i A j A d i j x i j k + c 2 f t α f + c 3 j A max t j k a l j , 0
The objective function aimed at minimizing costs encompasses two main components: distance cost and time cost. The time cost is further subdivided into the waiting cost incurred by delivery personnel at merchants’ locations and the penalty cost associated with late deliveries.
s.t.
i A k K x i j k = 1 , j J
j A k K x i j k = 1 , i I
q i k a + q i Q , i I , k K
k K y i k = 1 , i I
z i j = i A x i j k , i I , j J , k K
x i j k = 0 , i I , , j , k K
l i k a = t i k a + w t
t j k a = t j k a 1 + w t + d i j v , i , j A , k K , i j
x i j k ( t j k a + w t + d i j v t i k ) 0 , i , j A , k K , i j
Constraint (5) indicates that an order can only be picked up by one delivery person. Constraint (6) indicates that an order can only be delivered by one delivery person. Constraint (7) ensures that the load carried by a delivery person does not exceed their carrying capacity. Constraint (8) ensures that an order is delivered by the same delivery person from pickup to drop-off. Constraint (9) ensures the correspondence between the merchant and customer for each order. Constraint (10) ensures the avoidance of invalid delivery routes. Constraint (11) states that the time a delivery person leaves the merchant is equal to the sum of their arrival time and the meal preparation time. Constraint (12) represents the time constraint for a delivery person transferring between two points. Constraint (13) ensures that, for the same order, a delivery person picks up the order before delivering it.

4. Algorithm Design and Implementation

4.1. Algorithm Design

The food delivery route optimization problem is a special type of vehicle routing problem. Due to its dynamic complexity, exact algorithms are often time-consuming and yield suboptimal results. Currently, in China, hybrid heuristic algorithms are predominant. Considering the dynamic nature of food delivery demands and the large number of nodes involved, the solution efficiency of the algorithm is as important as minimizing costs. This paper designs a “Genetic Algorithm Based on Cluster Analysis” for solving this problem. Initially, all orders are clustered based on distance to generate an initial population. The genetic algorithm is then applied to solve the problem, with orders being refreshed each time period to continuously update delivery routes. The algorithm flow is shown in Table 2.
Table 2. Workflow of genetic algorithm based on cluster analysis.

4.2. Clustering for Initial Solution Construction

Optimizing delivery routes involves two critical steps: order assignment among delivery personnel, and the route planning for each delivery person. These two processes correspond to the allocation of orders across different chromosomes and the optimization of the order sequence within each chromosome when generating the initial population. The optimization of the second process is more crucial for the quality of the solution and the efficiency of solving the problem. In our research, to improve delivery efficiency and optimize route planning, we first performed clustering of orders, taking the temporal and spatial similarities of orders into comprehensive consideration. The construction process is shown in Figure 2, and it specifically includes the following:
Figure 2. Initial solution construction process.
1. Order similarity clustering: We first clustered all orders based on the similarity between them. Similarity is determined by calculating the distance between orders.Current vehicle routing problems with time windows have, in measuring the proximity in time and space, adopted the concept of spatiotemporal distance, which has already made many contributions [29]. Drawing on the definition of spatiotemporal distance, the order similarity designed in this paper is as follows: the similarity between orders is considered from two dimensions—spatial similarity and temporal similarity. Spatial similarity reflects the proximity between merchant locations and customer locations for different orders, while temporal similarity focuses on the closeness of meal preparation times for orders. Quantification uses the location distance between orders as an indicator to describe spatial and temporal similarity, and it serves as the measurement standard for subsequent cluster analysis.
The spatial distance formula covers the distances between merchants and between customers.
S α , β O , D = w S α , β O + ( 1 w ) S α , β D
The temporal distance formula, under the condition of constant delivery person speed, is related to each delivery time window.
S α , β T = δ t α 0 t β 0
The order distance formula calculates the distance between orders based on both spatial and temporal factors.
S α , β = λ S α , β O , D + ( 1 λ ) S α , β T
According to the calculated distances between orders, they are assigned to corresponding clusters. As the distances between orders within each cluster decrease, the overlap in delivery routes gradually increases. By generating the initial solution through calculating the similarity between orders, it effectively eliminates some inferior delivery plans. All orders are clustered into multiple sets L 1 , L 2 , …, L n . Each set contains a group of orders with high similarity.
2. Assignment of orders to delivery personnel: Next, these order sets are assigned to different delivery personnel. The principle of assignment is based on the similarity of the order sets and the availability of the delivery personnel. For example, in Figure 2, order set L 2 is assigned to Delivery Person 1, while order set L 1 is assigned to Delivery Person 3.
3. Generation of initial solutions: We generate an initial delivery plan for each delivery person following the principle of “pick up first, then deliver”.

4.3. Generation of Food Delivery Route Plans

4.3.1. Natural Number Encoding

Due to the significant challenges associated with controlling the number of gene bits and numerical range using binary encoding, and because this problem requires a one-to-one correspondence between picking up and delivering meals, this study opts for natural number encoding. Assuming the order volume is A, after virtualization, the merchant nodes are I = {1, 3, 5, …, 2a−1}, and the customer nodes are C = {2, 4, …, 2a}. This means that each chromosome consists of 2a genes. Each gene represents a specific pickup or delivery task.

4.3.2. Selection Operation

To enhance the overall quality of the population, the algorithm uses the reciprocal as the fitness value, i.e., Fitness = 1/objective function. During the selection process, a probability of 0.9 is set to directly retain 90% of individuals with higher fitness for the next generation. Specifically, the magnitude of the fitness function value directly reflects the effectiveness of the delivery plan represented by the chromosome; the larger the value, the better the plan performs after considering multiple objectives. This process ensures the inheritance and diffusion of high-quality solutions within the population. Subsequently, based on the new generation of the population, the algorithm performs crossover and mutation operations in hopes of discovering even better delivery plans.
When the genetic algorithm reaches the preset maximum number of iterations, it stops the iteration process and selects the best chromosome from all iteration records. Finally, by decoding this optimal chromosome, the specific paths and sequence for food delivery riders are restored, thereby obtaining the optimal scheduling plan for the entire food delivery system.

4.3.3. Crossover Operation

This study employs an improved crossover method that enhances the algorithm’s search capability while ensuring that the offspring chromosomes satisfy the sequence of first picking up and then delivering. The specific process is as follows: randomly select a crossover point and compare its sequence with the corresponding parts of other parent individuals. After eliminating duplicate segments, perform the crossover operation to ultimately generate two new offspring individuals. For instance, suppose a crossover point is arbitrarily selected, and two sequences are compared, removing any repeated nodes to obtain partial gene segments. These segments are then inherited in their original order to fill the empty gene positions of the offspring; subsequent operations follow the same logic, as illustrated in Figure 3.
Figure 3. Crossover process diagram.

4.3.4. Mutation Operation

After the crossover operation has been successfully executed and generated a new population of chromosomes, the mutation operation is then carried out. The mutation operation serves as another significant mechanism in genetic algorithms for introducing diversity. Its purpose is to introduce randomness into the algorithm’s search process, helping the algorithm escape local optima and explore other potentially high-quality areas within the solution space.
Based on the basic background of the food delivery route optimization problem, a mutation operation based on orders is designed, ensuring that merchant nodes and customer nodes are paired and have a specific sequence. Firstly, two random numbers a 1 and a 2 are randomly selected from the order numbers 1 to a. The corresponding paired orders { 2 a 1 1 , 2 a 1 } and { 2 a 2 1 , 2 a 2 } are obtained. Then, the positions of these two paired orders are swapped to generate a new chromosome. For example, consider the chromosome ‘1-3-2-4-7-5-6-8’. First, two numbers are randomly selected from the order numbers 1 to 4, obtaining 2 and 4. The paired orders corresponding to these two numbers are identified as {3, 4} and {7, 8}. Their positions are swapped within the chromosome to obtain a new chromosome ‘1-7-2-8-3-5-6-4’.The specific process is illustrated in Figure 4.
Figure 4. Mutation operation schematic.

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.
Table 3. Data generation parameters for the case study.

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.
Table 4. Path optimization results.
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 w t N μ , σ 2 . 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 5. Experimental results for different values of σ 2 .
Table 6 shows that when the variance σ 2 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.
Table 6. Experimental results for different values of μ .
As μ and σ 2 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:
Table 7. Experimental results for different values of μ and σ 2 .
  • 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).
Table 8. Stage-by-stage delivery situation.
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.
Table 9. Part of takeaway order information.
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.
Table 10. Delivery routes for some delivery personnel in stage 3.
Table 11. Partial information on new orders in stage 4.
Table 12. Delivery routes for some delivery personnel in stage 4.
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.
Figure 5. Impact of different merchant distance weights w on delivery.
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).
Figure 6. Impact of meal preparation time difference conversion coefficient δ on delivery.
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.
Figure 7. Comparison of order delivery times.
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).

6. Conclusions and Prospect

6.1. Conclusions

The main research work and conclusions of this paper include the following aspects:
  • Impact of merchant preparation time on order allocation: Merchant preparation time significantly affects the rationality and accuracy of food delivery order allocation. Accurately estimating the preparation time can not only reduce the extra waiting time for delivery personnel but also avoid the phenomenon of “food waiting for people”. Based on the uncertainty characteristics of merchant preparation times, this paper explores the impact of different probability distributions of preparation times on food delivery problems. Research shows that by introducing an overtime penalty function, the cost of delayed delivery can be effectively quantified, ensuring a balance between platform profits and customer satisfaction during the optimization process. These findings provide recommendations for food delivery platforms to better plan and schedule resources to cope with peak hour order pressures.
  • Improved clustering genetic algorithm considering order similarity and its application: This paper adopts an improved clustering genetic algorithm, using order distances for clustering, making orders within subsets possess certain spatial and temporal similarities. Numerical experiments show that reasonable settings of merchant distance weights and spatial conversion coefficients are conducive to improving clustering effects, reducing delivery costs, and enhancing delivery efficiency. Specifically, by improving the clustering method, it not only simplifies the construction process of the initial solution but also significantly enhances the rationality and efficiency of delivery routes. This not only improves delivery efficiency but also enhances customer experience, bringing higher operational benefits to food delivery platforms.
  • Experimental verification and parameter analysis: Based on actual data from food delivery platforms, this paper generates experimental cases and conducts case experiments. The experiments prove the feasibility and effectiveness of the proposed algorithm in solving vehicle routing problems with uncertain preparation times. Additionally, related experiments were designed to study the contribution of the algorithm’s dynamics to the final solution and the impact of various parameters on the solving results. Through such in-depth parameter analysis, valuable insights are provided to readers and demonstrate the application potential of the methods or principles presented in this paper in solving other extended vehicle routing problems.

6.2. Prospect

This paper proposes and addresses the food delivery order allocation and route optimization problem with preparation times, holding practical significance for food delivery during peak hours. However, due to limitations in researchers’ capabilities, some aspects may not fully meet actual needs. To further enhance the efficiency and sustainability of food delivery systems, the following points deserve deeper investigation:
  • Simulating extreme scenarios: Future research will involve an in-depth analysis of the existing model and algorithm’s computational efficiency and performance under high-load conditions, particularly during demand fluctuations in peak hours or large-scale events. By introducing more datasets with extreme demand fluctuations, we aim to simulate real operational environments during peak times and major events, testing the model’s stability and responsiveness.
  • Application of real-time data and intelligent algorithms: Introducing real-time data update mechanisms combined with intelligent algorithms (such as machine learning and deep learning) can facilitate more precise order allocation and route optimization. For example, training models using historical data to predict future order distributions and preparation times allows for advance scheduling preparations. Moreover, intelligent algorithms can dynamically adjust delivery routes based on real-time traffic conditions and weather changes, optimizing delivery paths to reduce unnecessary waiting times and travel distances.
  • Assessment of environmental and social impacts: Evaluating the impact of optimized delivery routes on the environment and society, such as reducing carbon emissions and easing traffic pressures, exploring green delivery models, and promoting sustainable development. Future research could further quantify these impacts to provide scientific bases for policy-making and guidance for fulfilling social responsibilities by food delivery platforms. This not only contributes to environmental protection but also enhances corporate social image and public recognition.
  • Analysis of user behavior and preferences: Gaining a deeper understanding of user behavior and preferences can help food delivery platforms better meet customers’ needs and improve user experience. For instance, analyzing information such as users’ ordering habits and preferred delivery time slots can optimize order allocation strategies, reducing delivery pressure caused by concentrated orders. Simultaneously, personalized recommendation systems can offer meal suggestions that align more closely with users’ preferences based on their historical orders, increasing user loyalty and satisfaction.
  • Implementation methods for food delivery platforms: Subsequent studies will consider integrating the optimization model into the daily operations of food delivery platforms. After the platform obtains critical order data in real time, it should be deeply integrated with existing order management systems and GPS tracking systems. Establishing an effective data cleansing mechanism ensures the accuracy of data fed into the optimization model. It is necessary to design and implement an open, secure API to facilitate easy interaction between third-party services and food delivery platforms. Through modular design to reduce integration complexity, seamless connection with existing software is achieved, and before actual deployment, the entire system’s performance should be assessed based on test results, and necessary adjustments and optimizations should be made accordingly.
In conclusion, this study provides valuable theoretical foundations and technical support for food delivery order allocation and route optimization but leaves many areas for further exploration and improvement. By continuously deepening research, it is hoped to build a more efficient, environmentally friendly, and humanized food delivery system, promoting the continuous healthy development of the industry.

Author Contributions

Conceptualization, X.W. and C.J.; methodology, X.W.; software, X.W.; validation, C.J., H.X. and K.G.; formal analysis, X.W.; investigation, X.W.; resources, X.W.; data curation, X.W.; writing—original draft preparation, X.W.; writing—review and editing, C.J.; visualization, X.W.; supervision, C.J.; project administration, C.J.; funding acquisition, C.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Humanities and Social Science Foundation of Ministry of Education of China [grant number 22YJAZH033]; the Major Project of Philosophy and Social Science Research in Colleges and Universities of Jiangsu Province [grant number 2021SJZDA134]; the Fundamental Research Funds for the Central Universities [grant number No. JUSRP123137].

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. China Internet Network Information Center. Statistical Report on the Development of China’s Internet. 2025. Available online: https://www3.cnnic.cn/NMediaFile/2025/0220/MAIN1740036167004CKE0DITFO1.pdf (accessed on 17 January 2025).
  2. Li, W.; Li, K.; Kumar, P.R.; Tian, Q. Simultaneous product and service delivery vehicle routing problem with time windows and order release dates. Appl. Math. Model. 2021, 89, 669–987. [Google Scholar]
  3. Teng, R.; Xu, H.; Jin, K.; Luo, T.; Wang, L.; Xing, L. Optimisation of takeaway delivery routes considering the mutual satisfactions of merchants and customers. Comput. Ind. Eng. 2021, 162, 107728. [Google Scholar]
  4. Yang, H.; Gao, J.; Shao, E. Vehicle Routing Problem with Time Window of Takeaway Food Considering One-order-multiproduct Order Delivery. Comput. Sci. 2022, 49, 191–198. [Google Scholar]
  5. Tang, C.; Liu, C.; Li, C. Research on delivery problem based on two-stage multi-objective optimization for takeout riders. J. Ind. Manag. Optim. 2023, 19, 7881–7919. [Google Scholar]
  6. Li, T.Y.; Lyu, X.; Li, F.; Chen, Y. Routing optimization model and algorithm for takeout distribution with multiple fuzzy variables under dynamics demand. Control Decis. 2019, 34, 406–413. [Google Scholar]
  7. Ulmer, M.W.; Thomas, B.W.; Campbell, A.M.; Woyak, N. The Restaurant Meal Delivery Problem: Dynamic Pickup and Delivery with Deadlines and Random Ready Times. Transp. Sci. 2020, 55, 75–100. [Google Scholar]
  8. Zhou, C.; Lyu, B.; Zhou, H.; Lu, H. Optimization model and algorithm for Online to Offline dynamic take-out delivery routing problem centered on business districts. Transp. Sci. 2022, 26, 17–30. [Google Scholar]
  9. Fan, H.; Xian, F.; Wang, H. Takeout Distribution Routes Optimization Considering Order Clustering under Dynamic Demand. J. Syst. Simul. 2023, 35, 396–407. [Google Scholar]
  10. Xie, F.; Chen, Z.; Zhang, Z. Research on Dynamic Takeout Delivery Vehicle Routing Problem under Time-Varying Subdivision Road Network. Mathematics 2024, 12, 962. [Google Scholar] [CrossRef] [Scilit]
  11. Chen, P.; Li, H. Optimization model and algorithm based on time satisfaction for O2O food delivery. Chin. J. Manag. Sci. 2016, 24, 173–176. [Google Scholar]
  12. Liao, W.; Zhang, L.; Wei, Z. Multi-objective green meal delivery routing problem based on a two-stage solution strategy. J. Clean. Prod. 2020, 258, 120627. [Google Scholar] [CrossRef] [Scilit]
  13. Xu, Q.; Xiong, J.; Yang, Z.; Jin, Z. Route optimization of takeout delivery vehicles based on adaptive large neighborhood search algorithm. Ind. Eng. Manag. 2021, 26, 115–122. [Google Scholar]
  14. Liu, Y. An optimization-driven dynamic vehicle routing algorithm for on-demand meal delivery using drones. Comput. Oper. Res. 2019, 111, 1–20. [Google Scholar] [CrossRef] [Scilit]
  15. Yu, H.; Jiang, R. Study on the real-time order allocation and routing problem of takeout food distribution on crowdsourcing platform. Ind. Eng. Manag. 2022, 27, 146–152. [Google Scholar]
  16. Yu, J.; Cheng, W.; Wu, Y. Path planning of fresh takeout considering customer satisfaction. Ind. Eng. Manag. 2021, 26, 158–167. [Google Scholar]
  17. Yang, D.; Rong, Y. Comparison of different pick-up and drop-off modes under the O2O environment. Control Decis. 2019, 33, 205–210. [Google Scholar]
  18. Zhang, L.; Zhang, J.; Xiao, B. Multi-objective O2O take-out instant delivery routing optimization considering customer priority. Ind. Eng. Manag. 2021, 26, 196–204. [Google Scholar]
  19. Tausif, S.A. Factors affecting online food delivery service in bangladesh: An empirical study. Br. Food J. 2020, 123, 535–550. [Google Scholar]
  20. He, Z.; Han, G.; Cheng, T.C.E.; Fan, B.; Dong, J. Evolutionary food quality and location strategies for restaurants in competitive online-to-offline food ordering and delivery markets: An agent-based approach. Int. J. Prod. Econ. 2019, 215, 61–72. [Google Scholar] [CrossRef] [Scilit]
  21. Liu, D.; Wang, W.; Zhao, Y. Effect of weather on online food ordering. Kybernetes 2021, 51, 165–209. [Google Scholar] [CrossRef] [Scilit]
  22. Ji, S.; Zheng, Y.; Wang, Z.; Li, T. Alleviating users’ pain of waiting: Effective task grouping for online-to-offline food delivery services. In Proceedings of the WWW ’19: The Web Conference, San Francisco, CA, USA, 13–17 May 2019. [Google Scholar]
  23. Dai, Y.; Tao, J.; Jiang, H.; Zhou, W. Paradigm shift for big data-driven decision making: New paradigm for O2O on-demand logistics. J. Manag. Sci. China 2023, 26, 53–69. [Google Scholar]
  24. Yu, H.; Li, H.; Wang, S. The Applicability of Incentive Mechanism of O2O Takeaway Crowdsourcing Realtime Distribution Platform. Syst. Eng. 2022, 40, 89–99. [Google Scholar]
  25. Wu, T.; Zhang, J.; Yu, H. The real-time pick-up and delivery problem with the asymmetric network. Chin. J. Manag. Sci. 2023, 31, 214–221. [Google Scholar]
  26. Zhao, X.; Xing, L.; Jin, Z. Bi-objective takeaway distribution route optimization considering uncertain driving time. J. Dalian Marit. Univ. 2019, 45, 65–72. [Google Scholar]
  27. Yu, H.; Tang, W.; Wu, T. Vehicle routing problem with hard time windows for instant delivery of O2O fresh takeout orders. J. Syst. Manag. 2022, 40, 89–99. [Google Scholar]
  28. Chen, Y.; Liu, K.; Ran, M. Real-time optimization of instant meal delivery based on deep reinforcement learning. Comput. Eng. 2025, 1, 1–15. [Google Scholar]
  29. Qi, M.Y.; Zhang, J.J.; Ren, L. Vehicle routing algorithm based on spatiotemporal clustering. Comput. Sci. 2014, 41, 218–222. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.