Next Article in Journal
Evolution Trends in Carbon Emissions and Sustainable Development Paths in China’s Planting Industry from the Perspective of Carbon Sources
Previous Article in Journal
Reducing Carbon Emissions: A Multi-Objective Approach to the Hydropower Operation of Mega Reservoirs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Essay

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

School of Business, Jiangnan University, Wuxi 214122, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Sustainability 2025, 17(6), 2771; https://doi.org/10.3390/su17062771
Submission received: 4 February 2025 / Revised: 4 March 2025 / Accepted: 18 March 2025 / Published: 20 March 2025

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.

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.

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.

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:
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.

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:
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.

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.

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 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 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.
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:
  • 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).

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.

Informed Consent 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]
  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]
  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]
  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]
  21. Liu, D.; Wang, W.; Zhao, Y. Effect of weather on online food ordering. Kybernetes 2021, 51, 165–209. [Google Scholar] [CrossRef]
  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]
Figure 1. Delivery routes of orders and corresponding nodes.
Figure 1. Delivery routes of orders and corresponding nodes.
Sustainability 17 02771 g001
Figure 2. Initial solution construction process.
Figure 2. Initial solution construction process.
Sustainability 17 02771 g002
Figure 3. Crossover process diagram.
Figure 3. Crossover process diagram.
Sustainability 17 02771 g003
Figure 4. Mutation operation schematic.
Figure 4. Mutation operation schematic.
Sustainability 17 02771 g004
Figure 5. Impact of different merchant distance weights w on delivery.
Figure 5. Impact of different merchant distance weights w on delivery.
Sustainability 17 02771 g005
Figure 6. Impact of meal preparation time difference conversion coefficient δ on delivery.
Figure 6. Impact of meal preparation time difference conversion coefficient δ on delivery.
Sustainability 17 02771 g006
Figure 7. Comparison of order delivery times.
Figure 7. Comparison of order delivery times.
Sustainability 17 02771 g007
Table 1. Explanation of symbols.
Table 1. Explanation of symbols.
SymbolsSymbols Description
t α 1 The latest possible delivery time of order α
t 1 , t 2 The empirical constant
t α 0 The meal preparation time of order α
S α The distance from restaurant to customer for order α
vThe speed constant
t α f The delivery time of order α
t α 2 The maximum penalty time
c 1 Cost of per unit distance for delivery person
ISet of restaurants
JSet of customers
d i j The distance between node i and node j
KSet of delivery people
x i j Whether the delivery person k travels from node i to node j; 1 if yes, 0 if no
c 2 Order overtime cost
c 3 Cost of per unit time for the delivery person waiting at the restaurant
ASet of delivery network nodes, A = {I ∪J∪ K}
t j k a The time at which delivery person k, after passing through the a-th node, arrives at customer node j
l j The latest arrival time at customer node j
q i k a The load of delivery person k arriving at node i after passing through the a-th point
q i The pickup or delivery quantity at node I
QThe maximum load capacity of delivery person
y i k Whether order i is delivered by rider k, 1 if yes, 0 if no
z i j Whether customer j is served by restaurant i; 1 if yes, 0 if no
l i k a The time at which delivery person k, after passing through the a-th node, departs from merchant node j
t i k a The time at which delivery person k, after passing through the a-th node, arrives at merchant node i
wtRestaurant meal preparation time
S α , β O , D The spatial distance between order α and order β
wThe restaurant distance coefficient, 0 ≤ w ≤1
S α , β O The distance between the restaurants of order α and order β
S α , β D The distance between the customers of order α and order β
S α , β T The time distance between order α and order β
δ The meal preparation time difference conversion coefficient
S α , β The order distance between order α and order β
λ The spatial distance coefficient, 0 ≤ λ ≤1
Table 2. Workflow of genetic algorithm based on cluster analysis.
Table 2. Workflow of genetic algorithm based on cluster analysis.
StepProcess Description
1Import current scenario data (number of scenarios, order data, delivery personnel data).
2Perform clustering analysis on delivery personnel and order information to generate the initial population.
3Decode and set up the method for calculating the fitness of chromosomes.
4Calculate the fitness of all chromosomes in the initial population and select individuals with higher fitness values for subsequent operations based on their fitness.
5Perform crossover operations on individuals with a crossover probability p c , and mutation operations with a mutation probability p m to produce the next-generation population.
6Merge the parent and offspring populations, calculate the fitness of each chromosome, compare these values with those from previous generations, rank them by fitness, and select the top-performing population size to undergo crossover, mutation, and other genetic operations to generate the next-generation population.
7Repeat Step 2 until the maximum number of iterations is reached, at which point the algorithm terminates.
8Output the solution with the best fitness obtained throughout all iterations as an optimal or near-optimal solution to the problem.
Table 3. Data generation parameters for the case study.
Table 3. Data generation parameters for the case study.
Data NameParameter Value
Total Number of Orders60
Total Number of Delivery Personnel10
Waiting Time Cost Coefficient c 1 0.2
Late Penalty Cost Coefficient c 2 0.6
Delivery Cost Coefficient c 3 0.2
t 1 25
t 2 45
Population Size40
Crossover Probability p c 0.95
Mutation Probability p m 0.05
Elite Population Ratio E r 0.05
Table 4. Path optimization results.
Table 4. Path optimization results.
Objective FunctionAlgorithm 1Algorithm 2Algorithm 3Algorithm 4Algorithm 5
Average Delivery Cost per Order (CNY)14.8830.2124.4713.9815.12
Total Distance Traveled by Delivery Personnel (km)603.901082.40747.93630.81638.95
Late Delivery Ratio (%)2.78.33.82.32.9
Average Penalty Cost per Order (Yuan)4.335.194.464.084.66
Average Waiting Time (min)3.625.435.313.513.84
Table 5. Experimental results for different values of σ 2 .
Table 5. Experimental results for different values of σ 2 .
Data NameAverage Waiting CostAverage Distance CostAverage Penalty Cost
μ = 10 , σ 2 = 6 558.97122.34230.61
μ = 10 , σ 2 = 9 557.58121.98228.78
μ = 10 , σ 2 = 12 558.35122.62229.93
μ = 15 , σ 2 = 6 557.23118.12229.05
μ = 15 , σ 2 = 9 561.45119.18232.30
μ = 15 , σ 2 = 12 558.82118.69231.51
μ = 20 , σ 2 = 6 571.53124.36281.99
μ = 20 , σ 2 = 9 596.83125.47282.77
μ = 20 , σ 2 = 12 571.42123.01284.43
Table 6. Experimental results for different values of μ .
Table 6. Experimental results for different values of μ .
Data NameAverage Waiting CostAverage Distance CostAverage Penalty Cost
μ = 10 , σ 2 = 9 557.58121.98228.78
μ = 15 , σ 2 = 9 561.45119.18232.30
μ = 20 , σ 2 = 9 568.83125.47282.77
μ = 25 , σ 2 = 9 582.18118.56319.83
μ = 30 , σ 2 = 9 578.93118.73355.23
Table 7. Experimental results for different values of μ and σ 2 .
Table 7. Experimental results for different values of μ and σ 2 .
Data NameAverage Waiting CostAverage Distance CostAverage Penalty Cost
μ = 10 , σ 2 = 6 558.97122.34230.61
μ = 15 , σ 2 = 9 561.45119.18232.30
μ = 20 , σ 2 = 12 572.42123.01284.43
μ = 25 , σ 2 = 15 583.71124.53329.65
μ = 30 , σ 2 = 18 585.48128.76344.09
Table 8. Stage-by-stage delivery situation.
Table 8. Stage-by-stage delivery situation.
StageNumber of OrdersAssigned Delivery PersonnelAverage Distance per OrderPenalty CostTotal Cost
11066.110.6532.76
217106.2813.98115.21
323106.74140.72419.69
410106.3969.18189.83
SUM601025.52224.53757.29
Table 9. Part of takeaway order information.
Table 9. Part of takeaway order information.
Order IDMerchant CoordinatesCustomer CoordinatesOrder TimeEstimated Delivery Time
1(121.43, 39.04)(121.45, 39.03)16:31:2017:29:20
2(121.38, 39.14)(121.39, 39.14)16:34:4017:32:40
3(121.63, 39.14)(121.63, 39.13)16:37:5217:05:32
4(121.53, 19.19)(121.54, 19.19)16:42:1317:20:13
5(121.53, 19.19)(121.54, 19.18)16:44:0517:17:05
6(121.36, 39.29)(121.34, 39.30)16:48:4317:32:43
7(121.44, 39.21)(121.46, 39.23)16:55:4117:40:20
Table 10. Delivery routes for some delivery personnel in stage 3.
Table 10. Delivery routes for some delivery personnel in stage 3.
Delivery Personnel IDClustering LocationCollected but Not DeliveredOrders Allocated in StageDelivery Route in Stage
1Merchant Point372, 37342-37-(34)-34
2Merchant Point10103510-(35)-35
3Merchant Point99369-(36)-36
4Merchant Point425, 42385-42-(38)-38
5Customer Point16, 3186-3-(18)-18
Table 11. Partial information on new orders in stage 4.
Table 11. Partial information on new orders in stage 4.
Order IDMerchant CoordinatesCustomer CoordinatesOrder Time (min)Expected Duration (min)
13(121.6, 39.17)(121.63, 39.16)16:3822:32
14(121.97, 39.60)(121.96, 39.95)17:3332:13
16(121.98, 39.60)(121.97, 39.64)18:4630:25
17(121.47, 39.23)(121.47, 39.19)19:3727:16
19(121.53, 39.34)(121.58, 39.32)19:2128:20
Table 12. Delivery routes for some delivery personnel in stage 4.
Table 12. Delivery routes for some delivery personnel in stage 4.
Delivery Personnel IDClustering LocationCollected but Not DeliveredOrders Allocated in StageDelivery Route in Stage
1Merchant Point343413, 2134-(13)-13-(21)-21
2Merchant Point35None16, 20(16)-16-(20)-20
3Merchant Point36None14, 19(14)-14-(19)-19
4Merchant Point383819, 2238-(19)-19-(22)-22
5Customer Point18181718-(17)-17
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.

Share and Cite

MDPI and ACS Style

Wang, X.; Ji, C.; Xu, H.; Guo, K. Research on Dynamic Optimization of Takeout Delivery Routes Considering Food Preparation Time. Sustainability 2025, 17, 2771. https://doi.org/10.3390/su17062771

AMA Style

Wang X, Ji C, Xu H, Guo K. Research on Dynamic Optimization of Takeout Delivery Routes Considering Food Preparation Time. Sustainability. 2025; 17(6):2771. https://doi.org/10.3390/su17062771

Chicago/Turabian Style

Wang, Xuan, Chunyi Ji, Hanrong Xu, and Kaiyi Guo. 2025. "Research on Dynamic Optimization of Takeout Delivery Routes Considering Food Preparation Time" Sustainability 17, no. 6: 2771. https://doi.org/10.3390/su17062771

APA Style

Wang, X., Ji, C., Xu, H., & Guo, K. (2025). Research on Dynamic Optimization of Takeout Delivery Routes Considering Food Preparation Time. Sustainability, 17(6), 2771. https://doi.org/10.3390/su17062771

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop