Method for constructing path planning model, path planning method and device
By constructing a route planning model based on historical delivery data and integrating the real-world characteristics of order splitting, delivery time windows, and various types of vehicles, the problem of inaccurate calculations caused by the single data in the fresh food delivery model in the pre-warehouse scenario is solved, achieving more accurate and efficient route planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JINGDONG YUANSHENG TECH CO LTD
- Filing Date
- 2025-01-03
- Publication Date
- 2026-07-14
AI Technical Summary
In existing fresh food delivery models for pre-positioned warehouses, the limited data leads to inaccurate calculation results and poor practical application performance.
By constructing a route planning model based on historical delivery data, integrating the real-world characteristics of order splitting, delivery time windows, and various vehicle types, constraints and objective functions are set, including order splitting constraints, delivery time window constraints, and vehicle restriction constraints, to optimize the route planning model.
It improves the accuracy of model calculation results and the effectiveness of practical applications, enhances the user experience, and meets the needs of complex and ever-changing actual delivery scenarios.
Smart Images

Figure CN122390586A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method for constructing a path planning model, a path planning method, and an apparatus. Background Technology
[0002] A forward warehouse is a new business model that combines online retail and last-mile delivery, where companies operate online from their headquarters and place goods at stations within a pre-defined kilometer radius of users to achieve rapid delivery. Currently, models or research solutions for fresh food delivery in the forward warehouse scenario only consider overall efficiency, and the data used in modeling is relatively limited, leading to inaccurate calculation results and poor practical application. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method for constructing a route planning model, a route planning method, and an apparatus. By constructing rich model elements through historical delivery data, the present invention also explores the realities of large-volume orders requiring splitting within the warehouse, delivery time window requirements, and the mixed use of various types of vehicles. By integrating and considering various real-world factors, the accuracy of the model calculation results is improved and the practical application effect is enhanced.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for constructing a path planning model is provided, comprising:
[0005] The model elements are constructed based on historical delivery data, which includes data from distribution centers, forward warehouses, and vehicles.
[0006] Based on the model elements, set the corresponding constraints and configure the objective function; among them, the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints;
[0007] A path planning model is constructed based on model elements, constraints, and objective functions.
[0008] Optionally, model elements include distribution centers, forward warehouses, and vehicles;
[0009] Based on the model elements, set the corresponding constraints, including:
[0010] Set constraints on the number of vehicles for the distribution center model elements; set constraints on the number of visits, traffic balance, visit time, and order allocation for the forward warehouse model elements; and set constraints on cargo capacity, right-of-way for fuel vehicles, battery capacity for new energy vehicles, and sub-loop constraints for the vehicle model elements.
[0011] Optionally, the objective function is to minimize the total delivery cost; the total delivery cost includes fixed costs, energy consumption costs of fuel-powered refrigerated trucks, energy consumption costs of new energy refrigerated trucks, refrigeration costs, cargo damage costs, and time window penalty costs.
[0012] Optionally, the time window penalty cost is obtained through the following steps:
[0013] Determine the degree of breach of contract within a time window based on the actual and expected arrival times of vehicles in historical delivery data.
[0014] Configure cargo volume influencing factors based on vehicle cargo load data from historical delivery data;
[0015] Calculate the product of the cargo volume impact factor and the default degree within the time window, and then apply weights to the product to obtain the time window penalty cost.
[0016] According to a second aspect of the present invention, a path planning method is provided, comprising:
[0017] Obtain the delivery data corresponding to the order to be planned, and input the delivery data corresponding to the order to be planned into the pre-built route planning model; the route planning model is obtained by any of the methods in the first aspect of the present invention.
[0018] The path planning model is solved based on a pre-configured path repair algorithm to obtain the path planning result;
[0019] Based on the path planning results, perform path planning for the orders to be planned.
[0020] Optionally, the path planning model is solved based on a pre-configured path repair algorithm to obtain the path planning results, including:
[0021] The delivery data corresponding to the planned orders is preprocessed to obtain target combination data; the target combination data includes the available vehicles and the usage time of each available vehicle for each forward warehouse.
[0022] Based on the target combination data and the pre-configured time window processing strategy, the initial solution is determined;
[0023] The initial solution is repaired based on a pre-configured node splitting strategy to obtain the optimal solution, which is then used as the path planning result.
[0024] Optionally, after solving the path planning model and obtaining the path planning result, the following steps are also included:
[0025] Call the map service interface and use the map service interface to visualize the vehicle delivery route based on the route planning results.
[0026] According to a third aspect of the present invention, an apparatus for constructing a path planning model is provided, comprising:
[0027] The first building module is used to construct model elements based on historical delivery data; whereby historical delivery data includes delivery center data, forward warehouse data, and vehicle data.
[0028] The data configuration module is used to set corresponding constraints and configure objective functions based on model elements; among them, the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints.
[0029] The second building module is used to construct a path planning model based on model elements, constraints, and objective functions.
[0030] According to a fourth aspect of the present invention, a path planning apparatus is provided, comprising:
[0031] The acquisition module is used to acquire the delivery data corresponding to the order to be planned, and input the delivery data corresponding to the order to be planned into a pre-built route planning model; the route planning model is obtained by any of the methods in the first aspect of the present invention.
[0032] The solver module is used to solve the path planning model based on a pre-configured path repair algorithm to obtain the path planning results.
[0033] The planning module is used to perform route planning for orders to be planned based on the route planning results.
[0034] According to a fifth aspect of the present invention, an electronic device is provided, comprising:
[0035] One or more processors;
[0036] Storage device for storing one or more programs.
[0037] When one or more programs are executed by one or more processors, the one or more processors implement the methods of any of the above embodiments.
[0038] According to a sixth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method of any of the above embodiments.
[0039] According to a seventh aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method of any of the above embodiments.
[0040] One embodiment of the above invention has the following advantages or beneficial effects: It constructs model elements based on historical delivery data, including distribution center data, forward warehouse data, and vehicle data; it sets corresponding constraints and configures objective functions based on the model elements, including order splitting constraints, delivery time window constraints, and vehicle restriction constraints; it constructs a path planning model based on the model elements, constraints, and objective functions. This embodiment constructs rich model elements using historical delivery data and identifies the realities of order splitting due to high demand in warehouses, delivery time window requirements, and the mixed use of various vehicle types. By integrating various real-world factors, it improves the accuracy of model calculation results and enhances practical application effectiveness. It obtains the delivery data corresponding to the order to be planned and inputs this data into a pre-constructed path planning model. The path planning model is obtained using any method described in the first aspect of this invention. The path planning model is solved based on a pre-configured path repair algorithm to obtain the path planning result. The path planning result is then used to plan the path for the order to be planned. This makes the path planning result more in line with real-world needs and improves the user experience.
[0041] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0042] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0043] Figure 1 This is a schematic diagram of the main process of constructing a path planning model according to an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of the main flow of the path planning method according to an embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of the main flow of a path planning method according to a preferred embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the main modules of a path planning model construction device according to an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of the main modules of the path planning device according to an embodiment of the present invention;
[0048] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0049] Figure 7This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0050] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0051] It should be noted that the acquisition, storage, and application of personal information involved in the embodiments of the present invention comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0052] A pre-positioned warehouse is a new business model that combines online retail and last-mile delivery, where companies operate online from their headquarters and place goods at stations within a pre-defined kilometer radius of users, enabling rapid delivery. Currently, models and research solutions for fresh food delivery in the pre-positioned warehouse scenario only consider overall efficiency, resulting in overly simplistic studies that fail to accurately depict real-world situations, leading to conclusions that are more theoretical than theoretical. In other words, the data used in modeling is relatively limited, resulting in inaccurate calculations and poor practical application performance.
[0053] In view of this, according to a first aspect of the present invention, a method for constructing a path planning model is provided.
[0054] Figure 1 This is a schematic diagram illustrating the main flow of a path planning model construction method according to an embodiment of the present invention. Figure 1 As shown, the method for constructing a path planning model according to an embodiment of the present invention mainly includes the following steps S101 to S103.
[0055] Step S101: Construct model elements based on historical delivery data; wherein, historical delivery data includes delivery center data, forward warehouse data, and vehicle data.
[0056] Historical delivery data refers to key datasets related to delivery activities over a past period. This data includes distribution center data, forward warehouse data, and vehicle data. Distribution center data includes information such as geographical location, capacity, and order processing capability; forward warehouse data includes information such as storage capacity, coverage area, and time windows; and vehicle data includes information such as vehicle quantity, type, maximum load capacity, delivery speed, fuel consumption, restricted areas, and times. Model elements are the core components for building a route planning model, used to express various variables, constraints, and objectives in delivery activities. The model, through the combination of these elements, describes and optimizes the solution space of the delivery problem, thereby generating efficient route planning solutions.
[0057] Model elements can be constructed using statistical data analysis. Historical delivery data can be cleaned, processed, and statistically analyzed to extract key descriptive parameters. For example, the average and variance of order processing capacity can be extracted from distribution center data; the average speed and fuel efficiency of different vehicles during historical delivery processes can be analyzed from vehicle data; and inventory turnover rate and coverage radius can be obtained from pre-positioned warehouse data. These parameters can be used to constrain model variables or construct objective functions. For instance, the average speed of vehicles can be used as input for time constraints in a route planning model, and the coverage radius of pre-positioned warehouses can be used to limit the delivery range. Alternatively, intelligent modeling can be used to learn from and train historical delivery data, constructing more dynamic and complex model elements. For example, order processing records from distribution centers and pre-positioned warehouses, as well as vehicle delivery trajectory data, can be used to train a time prediction model to estimate delivery times under different conditions. In this way, model elements can not only accurately represent the actual operating status of the delivery system but also dynamically respond to changes in the environment and demand, improving the model's robustness and adaptability.
[0058] Step S102: Set the corresponding constraints and configure the objective function based on the model elements; wherein, the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints.
[0059] Constraints refer to the rules or restrictions used in a model to limit the solution space, ensuring that the generated solution conforms to the actual business scenario and operational requirements. Constraints include, but are not limited to, order splitting constraints, delivery time window constraints, and vehicle restriction constraints. For example, order splitting constraints indicate that orders should be split when there is a large demand in the warehouse; delivery time window constraints indicate that orders need to be delivered within a specific time period; and vehicle restriction constraints indicate that vehicles must comply with traffic regulations or city regulations, such as vehicle route restrictions or time restrictions. The objective function defines the goal of the optimization problem and is used to measure the quality of the model solution. In logistics and delivery scenarios, the objective function can be to minimize the total delivery cost, the shortest delivery route, the shortest delivery time, or maximize customer satisfaction, etc.
[0060] Specifically, the rule-setting method can be used to directly embed constraints into the optimization model by defining model elements based on business needs and actual constraints. For example, for order splitting constraints, the minimum and maximum splitting ratios of orders can be defined based on historical order data, and this rule can be added to the model as a constraint. For delivery time window constraints, the service time range of each delivery node can be set using historical customer time preference data. For vehicle restriction constraints, traffic regulations and historical vehicle driving data can be combined to restrict the feasibility of vehicles on certain road sections or during certain time periods. Simultaneously, the objective function can be determined by analyzing historical delivery cost, time, and route data to identify the priority objectives of model optimization. For example, the total delivery cost can be used as the objective, expressed through linear or nonlinear functions, and weights can be used to reflect the focus of multi-objective optimization. Furthermore, machine learning or optimization algorithms can be used to automatically extract constraints and objective functions from historical delivery data. For instance, the optimal splitting strategy for different orders can be predicted by training the model and used as a dynamic constraint. Regarding objective function configuration, the weights of the objective function can be dynamically adjusted using optimization algorithms based on cost distribution data and route planning data to achieve a balance between cost, time, and customer satisfaction.
[0061] Step S103: Construct a path planning model based on model elements, constraints, and objective function.
[0062] Specifically, based on model elements, data such as distribution centers, forward warehouses, customers, and vehicles are mapped into a graph structure of nodes and edges, and constraints are used to limit the feasible solution space. For example, based on delivery time window constraints, the arrival time of vehicles can be limited by setting the service time range for each customer; based on vehicle restriction constraints, the edges in the road network can be constrained to eliminate paths that do not comply with the restriction rules. In the objective function configuration, minimizing the total delivery cost can be the objective, and traditional optimization algorithms such as linear programming or integer programming can be used to find the optimal path from the distribution center to all customers. In addition, heuristic algorithms or metaheuristic algorithms can be selected to further improve the solution efficiency depending on the complexity of the delivery network. Furthermore, machine learning and deep learning technologies can be used to dynamically adjust the path planning model by combining historical delivery data and real-time environmental data. For example, through deep reinforcement learning algorithms, a model can be built to intelligently select the next optimal path for vehicles while satisfying constraints such as order splitting, delivery time windows, and vehicle restrictions. In the objective function, multi-objective optimization algorithms can be used to combine indicators such as cost, time, and customer satisfaction into a comprehensive objective function, which can then be solved using genetic algorithms or particle swarm optimization algorithms to balance various business needs. The construction of the path planning model deeply integrates model elements, constraints, and the objective function, ensuring that the optimization results not only meet business requirements but also cope with complex and ever-changing real-world delivery scenarios. This provides efficient decision support for logistics and delivery, significantly improving delivery efficiency and customer satisfaction.
[0063] Optionally, the model elements include distribution centers, forward warehouses, and vehicles; corresponding constraints are set based on the model elements, including: setting vehicle quantity constraints for distribution center model elements; setting access frequency constraints, traffic balance constraints, access time constraints, and order allocation constraints for forward warehouse model elements; and setting cargo capacity constraints, fuel vehicle right-of-way constraints, new energy vehicle battery capacity constraints, and sub-loop constraints for vehicle model elements.
[0064] The model elements, which form the basis of the route planning model, include core components such as distribution centers, forward warehouses, and vehicles. For each model element, constraints that conform to the actual business scenario can be set to ensure that the route planning results meet the optimization objectives while also complying with the limitations and requirements of actual operation.
[0065] Distribution centers are core nodes in a logistics network, used to store goods and organize delivery tasks. For distribution center model elements, vehicle quantity constraints can be set, specifying an upper limit on the number of vehicles departing from the distribution center to ensure that scheduling schemes conform to logistics resource limitations. For example, if the number of available vehicles at a distribution center is fixed, vehicle quantity constraints can restrict the model to selecting solutions only within this range, thus avoiding unrealistic scheduling schemes. Forward warehouses are transit nodes distributed throughout the distribution network. For forward warehouse model elements, access frequency constraints can be set to limit the number of times each forward warehouse is accessed by vehicles; flow balance constraints to ensure flow balance between vehicles entering and leaving forward warehouses; access time constraints to specify the access time range for forward warehouses, such as adjusting delivery plans based on forward warehouse operating hours or peak periods; and order allocation constraints to ensure that each order is assigned to a unique forward warehouse, and that order allocation within a forward warehouse matches the vehicle's carrying capacity. Vehicles are the crucial execution entities in logistics distribution, used to transport goods from distribution centers or forward warehouses to customers. For vehicle model elements, you can set cargo capacity constraints to limit the cargo capacity of each vehicle; right-of-way constraints for fuel vehicles to restrict their right-of-way, such as avoiding entry into low-emission areas with restricted access; battery constraints for new energy vehicles to limit the range of battery capacity for electric vehicles, while also considering the location of charging facilities along the way; and sub-loop constraints to avoid unnecessary sub-loops or repeated visits in the path.
[0066] By setting constraints for different model elements, the route planning model can better fit actual delivery scenarios and achieve a dynamic balance between business needs and resource constraints. These constraints ensure the model's practical operability and provide a clear range of constraints for the optimization algorithm, thereby generating higher-quality route planning results.
[0067] Optionally, the objective function is to minimize the total delivery cost; the total delivery cost includes fixed costs, energy consumption costs of fuel-powered refrigerated trucks, energy consumption costs of new energy refrigerated trucks, refrigeration costs, cargo damage costs, and time window penalty costs.
[0068] The objective function can be set to minimize the total delivery cost. By quantifying the factors affecting delivery efficiency and resource consumption, these factors are transformed into an optimizable mathematical form. The total delivery cost mainly includes fixed costs, transportation energy consumption costs, refrigeration costs, cargo damage costs, and time window penalty costs. Fixed costs refer to unavoidable basic expenses during the delivery process, such as vehicle dispatch fees, driver wages, and vehicle maintenance costs. By incorporating fixed costs into the objective function, the number of vehicles used and the route length in the delivery plan can be effectively constrained. The transportation energy consumption costs of fuel-powered refrigerated trucks and new energy refrigerated trucks are significant variable costs in the delivery process. The energy consumption costs of fuel-powered trucks are mainly related to fuel consumption and mileage, while the energy consumption costs of new energy vehicles are related to battery power consumption. The energy consumption costs of the two types of transportation tools are quantified separately, and dynamically adjusted according to the mileage and vehicle type under different route plans, thereby optimizing the energy consumption costs. Refrigeration costs are a key factor in cold chain transportation, reflecting the energy consumption required to maintain the temperature of goods during transportation. Combining refrigeration costs with the time distribution of route planning schemes allows the optimization results to balance refrigeration demand and transportation time. Damage costs are losses incurred during transportation due to delays or improper temperature control. Time window penalty costs are constraints designed to prevent orders from exceeding the stipulated delivery time window; late delivery may lead to customer dissatisfaction or additional charges.
[0069] By breaking down the total delivery cost into sub-factors such as fixed costs, energy costs, refrigeration costs, damage costs, and time window penalty costs, the objective function can effectively guide the optimization algorithm to find the optimal path under multiple constraints, thereby minimizing delivery costs while ensuring service quality.
[0070] Optionally, the time window penalty cost is obtained through the following steps: determining the degree of time window default based on the actual arrival time and expected arrival time of the vehicle in historical delivery data; configuring the cargo volume influencing factor according to the cargo load in historical delivery data; calculating the product of the cargo volume influencing factor and the degree of time window default, and weighting the product to obtain the time window penalty cost.
[0071] The time window penalty cost quantifies the additional costs incurred due to failure to meet order delivery time window requirements. Based on historical delivery data, the degree of time window default is determined. This degree reflects the extent to which the actual arrival time deviates from the expected arrival time. A linear or nonlinear function can be used to map this deviation to a penalty value; the larger the deviation, the higher the default degree, and the larger the corresponding penalty value. The cargo volume impact factor measures the sensitivity of cargo volume to time window default. In actual delivery scenarios, orders with different cargo volumes may have different sensitivities to delays. For example, cold chain goods may be more sensitive to delays, thus requiring the introduction of a cargo volume impact factor for adjustment. This factor can be derived by analyzing historical data and empirical parameters, and is typically expressed as a function of cargo volume. The product of the cargo volume impact factor and the time window default degree is calculated, combining these two factors to form a more comprehensive penalty index. The product accurately reflects the combined effect of cargo volume and time window deviation; for example, even a slight delay in a large-volume order can result in a significant penalty. The product result is weighted to adjust the impact of penalty costs. For example, the weight of important customers or high-value orders can be set higher. The weight calculation can be determined based on order value, customer level, or business rules.
[0072] Through the above steps, the calculation process of time window penalty cost fully considers the actual impact of the degree of default and the volume of goods in the time window. At the same time, a weighting mechanism is introduced to meet the business needs under different scenarios. This not only improves the accuracy of the model, but also provides a more scientific decision-making basis for the optimization of route planning, thereby achieving a more efficient delivery solution.
[0073] According to a second aspect of the present invention, a path planning method is provided.
[0074] Figure 2 This is a schematic diagram of the main flow of the path planning method according to an embodiment of the present invention. Figure 2 As shown, the path planning method according to an embodiment of the present invention includes the following steps S201 to S203.
[0075] Step S201: Obtain the delivery data corresponding to the order to be planned, and input the delivery data corresponding to the order to be planned into the pre-built route planning model; the route planning model is obtained by any of the methods in the first aspect of the present invention.
[0076] Step S202: Solve the path planning model based on the pre-configured path repair algorithm to obtain the path planning result.
[0077] Step S203: Perform route planning for the orders to be planned based on the route planning results.
[0078] The delivery data for orders to be planned includes basic order information and logistics information, such as the order's delivery address, delivery time window, goods type, goods quantity, and relevant historical delivery records. This data is used to determine the optimal delivery route for each order. The route repair algorithm is an algorithm used to optimize the solution results of the route planning model, mainly correcting potential constraint conflicts or suboptimal solutions that may occur during the route planning process. The route repair algorithm can comprehensively consider factors such as vehicle capacity limitations, time window constraints, and route connectivity, improving the route planning results through iterative optimization or heuristic adjustments, making the generated solution more in line with actual needs.
[0079] Specifically, order data can be automatically extracted from the order management system or warehouse management system via system interface, or manually entered or imported in batches. The order information to be planned can be manually entered into the route planning system, and users can import data into the system in batches using spreadsheets or designated upload functions. The acquired delivery data is used to solve the model, obtaining preliminary route planning results. Heuristic algorithms, genetic algorithms, etc., are used to continuously adjust the route until all constraints are met and delivery costs are optimized. Alternatively, simulated annealing or other intelligent optimization methods can be used to solve the route planning model. Through multiple trials and adjustments, the optimal solution or near-optimal solution is found within a certain time limit, satisfying different constraints. Based on the route planning results output by the route planning model, the delivery route is further adjusted according to the specific requirements of the order. Then, the optimal delivery route is automatically generated and vehicles are allocated, taking into account actual traffic conditions and resource allocation. Alternatively, the order can be manually confirmed or adjusted based on the route planning results to ensure that all delivery parameters meet actual needs. Finally, the delivery route is determined and issued to delivery personnel through the scheduling system.
[0080] Optionally, the path planning model is solved based on a pre-configured path repair algorithm to obtain the path planning result, including: preprocessing the delivery data corresponding to the order to be planned to obtain target combination data; the target combination data includes the available vehicles and usage time corresponding to each pre-positioned warehouse; determining the initial solution based on the target combination data and the pre-configured time window processing strategy; performing path repair on the initial solution based on the pre-configured node splitting strategy to obtain the optimal solution, and using the optimal solution as the path planning result.
[0081] Preprocessing the delivery data corresponding to planned orders can categorize the data by region or order characteristics to allocate vehicles and routes more effectively. For example, available warehouse and vehicle combinations can be selected based on the order's geographical location, cargo type, and priority. Alternatively, machine learning algorithms can be used to cluster the delivery data, analyzing historical delivery patterns to determine the optimal warehouse and vehicle combination, thus improving data processing efficiency. When determining the initial solution based on the target combination data and time window processing strategy, an initial solution for route planning can be gradually constructed by sequentially selecting the warehouse and vehicle combination that meets the time window requirements and has the lowest cost. Dynamic programming can also be used to process the delivery data in stages, selecting the optimal path at each stage while satisfying the time window constraints, gradually generating a globally optimized initial solution. After obtaining the initial solution, it can be further optimized based on a node splitting strategy. This strategy allows nodes exceeding capacity or time constraints to be reassigned to other paths during route planning, alleviating local overload problems. Through reasonable node splitting and route adjustment, the flexibility and applicability of the routes can be significantly improved, making route planning more efficient and in line with actual needs. For example, when repairing the initial solution, nodes exceeding the time window or capacity limit are reassigned to neighboring paths to ensure the rationality and feasibility of each path; or, by constructing a flow graph between nodes, conflicting nodes in the path are identified, and the node allocation and path structure are readjusted to optimize the overall path while satisfying constraints. After path repair, the optimal solution is obtained. The optimal solution comprehensively considers all constraints and optimizes delivery costs. The optimal solution is used as the final result of path planning, completing the path planning task for the orders to be planned.
[0082] Optionally, after solving the route planning model and obtaining the route planning results, the method also includes: calling the map service interface and using the map service interface to visualize the vehicle delivery route based on the route planning results.
[0083] After solving the route planning model and obtaining the route planning results, the vehicle delivery routes can be visualized by calling the map service interface. Map background data is obtained through the map service interface, and the delivery routes of each vehicle in the route planning results are marked with lines on a static map. Different colors or line types are used to distinguish the delivery routes of different vehicles, and key nodes such as the delivery start point, destination, and intermediate stops are marked to provide a clear visual effect. Furthermore, the dynamic display function of the map service interface can be used to dynamically load the route planning results into the map platform. By setting a real-time delivery status update mechanism, dynamic information such as the vehicle's current location and estimated arrival time can be synchronized to the map, and the vehicle's movement trajectory along the route can be displayed with animation effects. Combined with delivery time windows and node status data, an interactive delivery route display method is provided for users, thereby improving the intuitiveness and practicality of the visualization.
[0084] This invention provides an embodiment of the invention that obtains delivery data corresponding to an order to be planned and inputs this data into a pre-built route planning model. The route planning model is obtained by any of the methods described in the first aspect of this invention. The route planning model is solved based on a pre-configured route repair algorithm to obtain the route planning result. The route planning is then performed on the order to be planned based on the route planning result. This makes the route planning result more in line with real-world needs and improves the user experience.
[0085] Figure 3 This is a schematic diagram of the main flow of a route planning method according to a preferred embodiment of the present invention. In the scenario of fresh food logistics distribution under the pre-warehouse model, this embodiment delves into the characteristics of fresh food logistics distribution pre-warehouses in this scenario, such as the requirement of delivery time windows, the mixed use of multiple types of vehicles, the need to split large orders in the warehouse, and the need for cold chain transportation. It integrates models such as VRP (Vehicle Routing Problem), VRPTW (Vehicle Routing Problem with Time Windows), SDVRP (Split Delivery Vehicle Routing Problem), HFVRP (Heterogeneous Fleet Vehicle Routing Problem), and Cold Chain VRP (Vehicle Routing Problem), and establishes the C-SD-HFVRP-TW (Cold-Chain Split Delivery Heterogeneous Fleet Vehicle Routing Problem with Time Windows) model to characterize the first delivery stage under the pre-warehouse model. Meanwhile, in C-SD-HFVRP-TW, this embodiment also proposes order splitting constraints, warehouse time window penalty cost calculation methods, and mixed vehicle traffic restriction policy constraints, taking into account the characteristics of the front warehouse. It also quantifies fixed costs, delivery costs, refrigeration costs, and cargo damage costs, and constructs the C-SD-HFVRP-TW model for fresh food logistics distribution under the front warehouse model, namely the route planning model.
[0086] like Figure 3As shown, firstly, data related to distribution centers, forward warehouses, and vehicles is extracted from the database and parsed to transform it into model elements. Secondly, a route planning model is built using these model elements. This model needs to consider multiple cost items such as fixed costs, energy costs, and refrigeration costs, as well as constraints on different elements. For example, for forward warehouses, it is necessary to ensure that all their orders are delivered within the specified time; for vehicles, it is necessary to ensure that they are not overloaded or violate traffic restriction policies. Finally, after the model is solved, in addition to outputting the specific results for each delivery route, a map interface can be called to visualize the vehicle's route on the front end. Specifically, the set, parameters, and variables of the route planning model are shown in Tables 1, 2, and 3 below.
[0087] Table 1. Set of Path Planning Models
[0088]
[0089] Table 2 Parameters of the Path Planning Model
[0090]
[0091] Table 3 Variables in the Path Planning Model
[0092]
[0093] The goal of this model is to minimize delivery costs, which consist of fixed costs, energy consumption costs of fuel-powered refrigerated trucks, energy consumption costs of new energy refrigerated trucks, refrigeration costs, cargo damage costs, and time window penalty costs.
[0094] Fixed costs primarily refer to the costs incurred when purchasing fuel-powered refrigerated trucks and new energy refrigerated trucks. This article discusses different specifications of fuel-powered and new energy refrigerated trucks, each with varying purchase costs. Incorporating these costs into the total cost helps companies make informed purchasing decisions and optimize their fleet configuration.
[0095]
[0096] In equation (1) above, M is the set of delivery vehicle types, which in this model represents fuel vehicles and new energy vehicles; K is the set of delivery vehicles, which represents all delivery vehicles; and C is the set of forward warehouses. It is easy to see that... This indicates whether vehicle k (of type m) departing from the distribution center delivers to the forward warehouse j. At this time, it represents delivery, and at this time, the fixed cost corresponding to this vehicle type is incurred. m Conversely, no fixed costs will be incurred if the values are not equal, and the final summation represents the fixed costs associated with all vehicles in use.
[0097] The energy consumption cost of fuel-powered refrigerated trucks is as follows: fuel-powered refrigerated trucks consume a certain amount of fuel during delivery, thus incurring energy costs, as shown in equation (2). Based on the basic assumption that the fuel consumption of fuel-powered trucks is linear, therefore, α... m This is expressed as the amount of fuel consumed per unit distance by a gasoline-powered vehicle, which corresponds to the fuel consumption per 100 kilometers often used to measure vehicle performance. Given α... m And the distance d from front warehouse i to front warehouse j ij Then, you can get the amount of fuel consumed during the car's operation, multiplied by the corresponding unit fuel price c. f This gives you the fuel cost consumed by the fuel-powered refrigerated truck during transportation.
[0098]
[0099] The energy consumption cost of new energy cold chain vehicle transportation is shown in equation (3) below. Analogous to fuel vehicles, β m Let β represent the power consumption per unit distance of the new energy vehicle. Assuming linear power consumption for the new energy vehicle, β... m This can be calculated based on the vehicle's battery capacity and maximum driving range. Similarly, it can be calculated based on the power consumption β per unit distance. m Multiply by distance d ij This gives you the electricity consumption of the new energy refrigerated truck, multiplied by the unit electricity price c. e This gives the cost of electricity consumed by the fuel-powered refrigerated truck during transportation.
[0100]
[0101] The refrigeration cost is shown in equation (4) below. For fresh produce, cold chain transportation is required. Currently, both fuel-powered and new energy cold chain transport vehicles rely on refrigerant for refrigeration, thus incurring certain refrigeration costs. Furthermore, the external temperature and humidity differ depending on whether the vehicle doors are closed during transport or open during unloading, resulting in different amounts of refrigeration required to maintain the temperature, and consequently, different unit costs of refrigerant consumed per unit distance and per unit time. Therefore, this embodiment will... This is expressed as the cost of refrigerant consumed per unit distance during transportation. This is expressed as the cost of refrigerant consumed per unit time during unloading, thus separating the two scenarios. Specifically, The cost of refrigerant consumed by vehicle k (representing class m) during its journey from front cargo compartment i to front cargo compartment j; This represents the service time of vehicle k (class m) in the front-end warehouse i. This represents the cost of refrigerant consumed during service.
[0102]
[0103] The cost of cargo damage is shown in equation (5). Fresh produce will suffer certain losses during transportation, resulting in a certain cost of cargo damage. Similarly, the unit cost of cargo damage will differ depending on whether the truck door is closed or open during unloading, due to changes in external temperature, humidity, and other factors. This refers to the cost of cargo damage per unit distance during transportation. This represents the cost of cargo damage per unit time during the unloading process, calculated using the same logic as the refrigeration cost.
[0104]
[0105] The time window penalty cost is shown in equation (6). In this embodiment, each forward warehouse has a desired time window. When goods arrive within the time window, the time window penalty cost is 0; when goods arrive outside the time window, a certain penalty cost will be incurred. Adding the time window penalty cost can help avoid violations of the forward warehouse time window limit when planning vehicle routes. The degree of violation of the time window is determined by... It means that, among them To represent the time it takes for vehicle k of class m to reach node i, EA i LA is the earliest arrival time of the forward warehouse i. i This represents the latest arrival time of front warehouse i. Furthermore, since this embodiment performs route planning at the front warehouse level, violating the time window will also affect the next stage of delivery to the user. The larger the amount of goods carried by the vehicle, the greater the impact, and the greater the penalty cost for the time window should be. Therefore, it is necessary to introduce... Finally, it is also necessary to introduce γ to unify with other costs.
[0106]
[0107] In summary, the objective function of this paper is as follows (7):
[0108] minC1+C2+C3+C4+C5+C6#(7)
[0109] For the different components of this embodiment—the distribution center, the forward warehouse, and the vehicles—corresponding constraints need to be set. First, for the distribution center, it's necessary to ensure that the number of vehicles departing from the distribution center remains within the existing vehicle pool. Second, for the forward warehouse, since the demand for the forward warehouse can be broken down, it's necessary to set a forward warehouse that can be accessed by multiple vehicles, and the number of vehicles arriving at the warehouse should equal the number leaving, maintaining flow balance. Simultaneously, it's crucial to note that each order for a forward warehouse can only be delivered by one vehicle, and only vehicles serving that warehouse can load the warehouse's orders. Finally, for the vehicles, in addition to common constraints such as weight, volume, and sub-loops, it's necessary to ensure that the electric vehicles don't run out of power during delivery, and that fuel-powered vehicles comply with restrictions on driving times and areas.
[0110] A vehicle quantity constraint is set for the distribution center, as shown in equation (8). For each type of vehicle, the number of vehicles departing from the distribution center cannot exceed the existing quantity of that type of vehicle.
[0111]
[0112] Access frequency constraints are set for the front warehouse, as shown in equation (9). Since the requirements can be split, any front warehouse can be accessed multiple times, and at least once.
[0113]
[0114] A flow balancing constraint is also set for the front warehouse, as shown in equation (10). For any front warehouse, the number of vehicles traveling from other front warehouses to this warehouse is equal to the total number of vehicles accessing this node. As shown in equation (11), the number of vehicles traveling from this warehouse to other warehouses is also equal to the total number of vehicles accessing this node.
[0115]
[0116] Access time constraints are set for the forward warehouses, as shown in equation (12). For any vehicle accessing a forward warehouse, the time it takes to leave the forward warehouse is equal to the time of accessing the forward warehouse plus the unloading time, where... For the number of orders corresponding to the forward warehouse loaded onto this vehicle, l t The unloading volume per unit time. As shown in equation (13), for two forward warehouses with a sequential access relationship, the arrival time of the latter warehouse is equal to the departure time of the former warehouse plus the travel time.
[0117]
[0118] Order constraints are set for the forward warehouses, as shown in equation (14). Any order can only be delivered by one vehicle. As shown in equation (15), orders for a forward warehouse can only be loaded when a vehicle visits the forward warehouse. Here, M is an infinite integer; when a vehicle visits a forward warehouse, i.e., When the value is 1, there is no limit to the amount of cargo that the vehicle can carry. When the value equals 0, the vehicle cannot load goods. As shown in equations (16) and (17) below, the decision variables... and intermediate variables and The relationship is as follows: Equation (18) shows that for any given front warehouse, the sum of the cargo loaded onto that node by all vehicles that have visited that node should equal its demand. Equation (19) shows that for any given front warehouse, the sum of the weight of the cargo loaded onto that node by all vehicles that have visited that node should equal the weight of its total demand.
[0119]
[0120] The constraints for vehicle-type configurations are as follows: (Equation 20) For any vehicle, the sum of the weights of all goods loaded onto it at the access nodes cannot exceed the vehicle's maximum load capacity. (Equation 21) For any vehicle, no sub-loop can be formed in the forward warehouse node. (Equation 22) For any electric vehicle, no electricity is consumed during unloading. (Equation 23) For two nodes accessed by an electric vehicle and having a sequential access relationship, the vehicle's electricity consumption when the latter node arrives is equal to the electricity consumption when the former node leaves, minus the electricity consumed during the journey. (Equation 24) For any node, its arrival electricity consumption must be greater than or equal to 0. (Equation 25) For fuel-powered vehicles, the constraints of restricted areas and restricted times must be observed.
[0121]
[0122] The path planning algorithm design is based on the traditional ALNS algorithm framework (Adaptive Large Neighborhood Search). Four destruction operators, namely, the random destruction operator, the worst destruction operator, the path destruction operator, and the similar destruction operator, and three repair operators, namely, the random repair operator, the greedy repair operator, and the maximum regret value repair operator, are selected for the iteration of the solution. At the same time, in order to make the algorithm accept inferior solutions with a certain probability and avoid falling into the local optimal solution, the Metropolis criterion of the simulated annealing algorithm is adopted in this embodiment. The idea of this criterion is that if the objective function value of the new solution is better than the current solution, the new solution can be accepted; otherwise, it is determined whether it is accepted in the form of an exponential probability. The acceptance probability is given by the following formula (26). Where Δf is the difference in the objective function between the new solution and the current solution, and T is the temperature. When T is larger, the acceptance probability is greater than when T is relatively smaller. In the algorithm, we can set the initial T to be ratio times the initial solution, where 0 < ratio < 1. At the same time, after the iteration reaches a certain number of times, in order to accelerate the convergence of the algorithm, the temperature T needs to be reduced, and the rate of temperature reduction is controlled by the parameter phi.
[0123]
[0124] Based on the C-SD-HFVRP-TW model under the front warehouse mode studied in this embodiment, the above algorithm framework is improved. First, when initializing the model, in order to better handle the strategies related to multiple vehicles and traffic restriction policies and improve the algorithm efficiency, this embodiment preprocesses the available vehicles for each front warehouse and the corresponding time periods according to the regions. In the preprocessing process, first, an empty hash table is initialized to store all eligible combinations; then, according to the time window limit of each front warehouse and the available time periods of each vehicle, it is determined which vehicles can be assigned to this front warehouse. For each combination of a front warehouse and an available vehicle, it is checked whether it meets the conditions, such as whether it can access this region within the minimum and maximum access times of the front warehouse. If a combination meets the conditions, it is added to the hash table. Finally, the hash table is traversed to output all eligible vehicle-front warehouse combinations, including the vehicles that can be used by each front warehouse and the corresponding time for using this vehicle. This algorithm scheme can effectively reduce the difficulty of subsequent calculations.
[0125] Whether during initialization or insertion, vehicles used in the current path must simultaneously satisfy constraints on vehicle type and available time period when accessing the warehouse. Secondly, considering that traditional ALNS algorithms generally do not allow further splitting of nodes during path repair, only allowing insertion of nodes that meet capacity constraints, this method may limit the local search capability of the repair operator, thus restricting the finding of the optimal solution. To address this issue, this embodiment allows the insertion of nodes that do not meet capacity constraints, and allows splitting of those nodes during insertion. However, while node splitting can increase search flexibility, as the number of orders for a node increases, node splitting may cause a rapid decrease in algorithm efficiency and a reduction in the effectiveness of the neighborhood. Therefore, θ is introduced. s and θ b Two parameters control the degree of node splitting: θ s and θ b All are decimals greater than 0 and less than 1, and θ s ≤θ b Both θ and t represent the percentage of order weight for which the cumulative weight satisfies the capacity constraint and can be split. Larger values result in fewer node splits and faster algorithm execution; smaller values result in more node splits and slower algorithm execution. However, when these values are large, situations may arise where the current node cannot be inserted into any path and there are no available vehicles, preventing the algorithm from finding a feasible solution. To address this situation, θ is needed. s and θ b Simultaneous action. When available vehicles exist and a new route can be opened, θ is used. b Reduce the number of node splits to improve algorithm efficiency; use θ when no vehicles are available. s Increase the number of node splits to ensure that the nodes can meet the capacity constraint. Also, when using θ... s and θ b It should also be noted that the optimal number of node splits may differ depending on the problem. Multiple trials can be conducted to find the best solution for the specific problem. Finally, this embodiment incorporates a time window-related strategy. During initial solution generation, the insertion constraint must not exceed ±20 of the time window to generate a higher-quality initial solution and avoid situations where no feasible solution exists. When repairing the path and inserting removed service points into the path, the time window constraint is relaxed to accelerate the algorithm's solution process, and a penalty function is introduced to reduce the possibility of time window violations, thereby improving the quality of the solution.
[0126] In its algorithm design, this embodiment overcomes the limitation of the traditional ALNS algorithm, which does not allow node splitting during path repair. It relaxes the capacity constraint when inserting operators, allowing node splitting during path repair, and sets relevant parameters to control the splitting ratio, thus improving the algorithm's search capability and flexibility. Simultaneously, to address the soft time window constraint in the problem, it improves the algorithm's performance by restricting the time window in the initial solution and relaxing it during path repair by introducing a penalty cost for violating the time window. Regarding the traffic restriction policy constraints on fuel-powered and electric vehicles, during the model initialization phase, it preprocesses the available vehicles and corresponding time periods for each pre-positioned warehouse according to region, improving the processing speed of relevant constraints and enhancing algorithm efficiency.
[0127] According to a third aspect of the present invention, an apparatus for constructing a path planning model is provided.
[0128] Figure 4 This is a schematic diagram of the main modules of a path planning model construction device according to an embodiment of the present invention; as shown Figure 4 As shown, a path planning model construction device 400 includes:
[0129] The first construction module 401 is used to construct model elements based on historical delivery data; wherein, historical delivery data includes delivery center data, forward warehouse data, and vehicle data;
[0130] The data configuration module 402 is used to set corresponding constraints and configure objective functions based on model elements; among which, the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints;
[0131] The second building module 403 is used to build a path planning model based on model elements, constraints, and objective functions.
[0132] Optionally, model elements include distribution centers, forward warehouses, and vehicles; the data configuration module 402 is also used for:
[0133] Set constraints on the number of vehicles for the distribution center model elements; set constraints on the number of visits, traffic balance, visit time, and order allocation for the forward warehouse model elements; and set constraints on cargo capacity, right-of-way for fuel vehicles, battery capacity for new energy vehicles, and sub-loop constraints for the vehicle model elements.
[0134] Optionally, the objective function is to minimize the total delivery cost; the total delivery cost includes fixed costs, energy consumption costs of fuel-powered refrigerated trucks, energy consumption costs of new energy refrigerated trucks, refrigeration costs, cargo damage costs, and time window penalty costs.
[0135] Optionally, the construction apparatus 400 also includes a cost configuration module, which is used for:
[0136] Determine the degree of breach of contract within a time window based on the actual and expected arrival times of vehicles in historical delivery data.
[0137] Configure cargo volume influencing factors based on vehicle cargo load data from historical delivery data;
[0138] Calculate the product of the cargo volume impact factor and the default degree within the time window, and then apply weights to the product to obtain the time window penalty cost.
[0139] It should be noted that the specific implementation details of the path planning model construction device in the embodiments of the present invention have been described in detail in the path planning model construction method above, so the details will not be repeated here.
[0140] According to a fourth aspect of the present invention, a path planning apparatus is provided.
[0141] Figure 5 This is a schematic diagram of the main modules of the path planning device according to an embodiment of the present invention, such as... Figure 5 As shown, a path planning device 500 includes:
[0142] The acquisition module 501 is used to acquire the delivery data corresponding to the order to be planned, and input the delivery data corresponding to the order to be planned into a pre-built route planning model; the route planning model is obtained by any of the methods in the first aspect of the present invention.
[0143] The solver module 502 is used to solve the path planning model based on a pre-configured path repair algorithm to obtain the path planning result;
[0144] Planning module 503 is used to perform route planning for orders to be planned based on the route planning results.
[0145] Optionally, the solver module 502 is also used for:
[0146] The delivery data corresponding to the planned orders is preprocessed to obtain target combination data; the target combination data includes the available vehicles and the usage time of each available vehicle for each forward warehouse.
[0147] Based on the target combination data and the pre-configured time window processing strategy, the initial solution is determined;
[0148] The initial solution is repaired based on a pre-configured node splitting strategy to obtain the optimal solution, which is then used as the path planning result.
[0149] Optionally, the planning device 500 also includes a display module, which is used for:
[0150] Call the map service interface and use the map service interface to visualize the vehicle delivery route based on the route planning results.
[0151] It should be noted that the specific implementation details of the path planning device in the embodiments of the present invention have been described in detail in the path planning method above, so the details will not be repeated here.
[0152] According to a fifth aspect of the present invention, an electronic device is provided, comprising:
[0153] One or more processors;
[0154] Storage device for storing one or more programs.
[0155] When one or more programs are executed by one or more processors, the one or more processors implement the methods provided by the first aspect and / or the second aspect of the embodiments of the present invention.
[0156] According to a sixth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the methods provided in the first aspect and / or the second aspect of the present invention.
[0157] According to a seventh aspect of the present invention, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods provided by the first aspect and / or the second aspect of the present invention.
[0158] Figure 6 An exemplary system architecture 600 is shown, which can be used to construct a path planning model according to embodiments of the present invention.
[0159] Figure 6 An exemplary system architecture 600 is shown that can be applied to the path methods or apparatus of embodiments of the present invention.
[0160] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0161] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0162] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0163] Server 605 can be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 601, 602, and 603 (for example only). The backend management server can analyze and process data such as received model training requests, and feed back the processing results (such as a path planning model - for example only) to the terminal devices.
[0164] It should be noted that the path planning model construction method provided in this embodiment of the invention is generally run by server 605, and correspondingly, the path planning model construction device is generally set in server 605.
[0165] It should be noted that the path planning method provided in the embodiments of the present invention is generally run by server 605, and correspondingly, the path planning device is generally set in server 605.
[0166] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0167] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device of the present invention. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0168] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0169] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0170] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is run by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0171] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more operable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually operate substantially in parallel, and they may sometimes operate in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0173] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor may include a first building module, a data configuration module, and a second building module. The names of these modules do not necessarily limit the module itself; for example, the first building module may be described as "a module for building model elements based on historical delivery data." Alternatively, a processor may include an acquisition module, a solution module, and a planning module, where the names of these modules do not necessarily limit the module itself; for example, the planning module may be described as "a module for performing route planning for orders to be planned based on route planning results."
[0174] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to implement the following method: constructing model elements based on historical delivery data; wherein the historical delivery data includes delivery center data, forward warehouse data, and vehicle data; setting corresponding constraints and configuring objective functions based on the model elements; wherein the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints; and constructing a path planning model based on the model elements, constraints, and objective function. Alternatively, the device implements the following method: obtaining delivery data corresponding to the order to be planned, inputting the delivery data corresponding to the order to be planned into a pre-constructed path planning model; the path planning model is obtained by any of the methods in the first aspect of the present invention; solving the path planning model based on a pre-configured path repair algorithm to obtain a path planning result; and performing path planning for the order to be planned based on the path planning result.
[0175] The computer program product provided in the embodiments of the present invention includes a computer program that, when executed by a processor, implements the method for constructing a path planning model in the first aspect of the present invention and / or the path planning method in the second aspect of the present invention.
[0176] According to the technical solution of the present invention, the following advantages or beneficial effects are achieved: Model elements are constructed based on historical delivery data; wherein, historical delivery data includes delivery center data, forward warehouse data, and vehicle data; corresponding constraints and objective functions are set based on the model elements; wherein, the constraints include order splitting constraints, delivery time window constraints, and vehicle restriction constraints; a path planning model is constructed based on the model elements, constraints, and objective function; this embodiment constructs rich model elements through historical delivery data and identifies the realities of large-volume orders requiring splitting, delivery time window requirements, and the mixed use of various vehicle types, integrating various real-world factors to improve the accuracy of model calculation results and enhance practical application effects. By obtaining the delivery data corresponding to the order to be planned, the delivery data corresponding to the order to be planned is input into the pre-constructed path planning model; the path planning model is obtained through any of the methods in the first aspect of the present invention; the path planning model is solved based on a pre-configured path repair algorithm to obtain the path planning result; path planning is performed on the order to be planned based on the path planning result; this makes the path planning result more in line with real-world needs and improves the user experience.
[0177] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
[0178] It should be noted that the acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
Claims
1. A method for constructing a path planning model, characterized in that, include: Model elements are constructed based on historical delivery data; wherein, the historical delivery data includes delivery center data, forward warehouse data, and vehicle data; Based on the model elements, set corresponding constraints and configure objective functions; wherein, the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints; A path planning model is constructed based on the model elements, constraints, and objective function.
2. The method according to claim 1, characterized in that, The model elements include distribution centers, forward warehouses, and vehicles; Based on the model elements, set corresponding constraints, including: Set vehicle quantity constraints for the distribution center model elements; For the front warehouse model elements, set access frequency constraints, traffic balance constraints, access time constraints, and order allocation constraints; for the vehicle model elements, set cargo capacity constraints, fuel vehicle right-of-way constraints, new energy vehicle battery constraints, and sub-loop constraints.
3. The method according to claim 1, characterized in that, The objective function is to minimize the total delivery cost; the total delivery cost includes fixed costs, energy consumption costs of fuel-powered refrigerated trucks, energy consumption costs of new energy refrigerated trucks, refrigeration costs, cargo damage costs, and time window penalty costs.
4. The method according to claim 3, characterized in that, The time window penalty cost is obtained through the following steps: Based on the actual arrival time and expected arrival time of the vehicle in the historical delivery data, the degree of breach of contract within the time window is determined; Configure cargo volume influencing factors based on vehicle cargo load data from the historical delivery data; Calculate the product of the cargo volume influencing factor and the default degree of the time window, and then calculate the weight of the product to obtain the penalty cost of the time window.
5. A path planning method, characterized in that, include: Obtain the delivery data corresponding to the order to be planned, and input the delivery data corresponding to the order to be planned into the pre-built route planning model; The path planning model is obtained by the method described in any one of claims 1 to 4; The path planning model is solved based on a pre-configured path repair algorithm to obtain the path planning result; Based on the path planning results, path planning is performed on the order to be planned.
6. The method according to claim 1, characterized in that, The path planning model is solved based on a pre-configured path repair algorithm to obtain path planning results, including: The delivery data corresponding to the orders to be planned is preprocessed to obtain target combination data; the target combination data includes the available vehicles and the usage time of each available vehicle for each forward warehouse. Based on the target combination data and the pre-configured time window processing strategy, an initial solution is determined; The initial solution is repaired based on a pre-configured node splitting strategy to obtain the optimal solution, which is then used as the path planning result.
7. The method according to claim 5, characterized in that, After solving the path planning model and obtaining the path planning results, the process also includes: Call the map service interface and use the map service interface to visualize the vehicle delivery route based on the route planning results.
8. A device for constructing a path planning model, characterized in that, include: The first construction module is used to construct model elements based on historical delivery data; wherein, the historical delivery data includes delivery center data, forward warehouse data, and vehicle data; The data configuration module is used to set corresponding constraints and configure objective functions based on the model elements; wherein, the constraints include order splitting constraints, delivery time window constraints, and vehicle traffic restriction constraints; The second construction module is used to construct a path planning model based on the model elements, constraints, and objective function.
9. A path planning device, characterized in that, include: The acquisition module is used to acquire the delivery data corresponding to the order to be planned and input the delivery data corresponding to the order to be planned into the pre-built route planning model; The path planning model is obtained by the method described in any one of claims 1 to 4; The solution module is used to solve the path planning model based on a pre-configured path repair algorithm to obtain the path planning result; The planning module is used to perform route planning for the order to be planned based on the route planning results.
10. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.