A dynamic vehicle routing full-link problem analysis and model solving method
By constructing a universal integer programming mathematical model and dynamic solution mechanism for dynamic vehicle paths, combined with dynamic actual data, the problem of poor solution quality in the existing dynamic VRP scheduling methods is solved, and more efficient dynamic vehicle path solution is achieved.
Patent Information
- Application Number
- CN202211627730.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-12-16
AI Technical Summary
The existing dynamic VRP scheduling methods only use one type of solution algorithm, resulting in poorer solutions when facing dynamic data changes.
A method for analysis and model solving of dynamic vehicle paths is proposed. By constructing a universal integer programming mathematical model suitable for dynamic vehicle paths, combined with dynamic actual data, an alternating mechanism between data update and dynamic solution of dynamic vehicle path problems is formed. Use the periodic calculation analysis algorithm library to intelligently select algorithms for solving.
It realizes more accurate description and continuous dynamic solution of dynamic vehicle path problems, improving the quality of understanding and solution efficiency.
Smart Images

Figure CN116227817B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of operations optimization and real-time dynamic scheduling, and in particular to a method for analyzing and solving a dynamic vehicle path full-link problem. Background Art
[0002] Dynamic VRP (Vehicle Routing Problem), also known as real-time VRP, takes into account changes in information such as customers and road conditions. It has a large number of practical applications in logistics distribution, such as real-time food delivery by takeout companies, dynamic pick-up and drop-off services, real-time allocation of ambulances, real-time taxi-hailing services, etc.
[0003] The existing dynamic VRP scheduling method can only solve the real-time dynamics by dividing DVRP into a series of periodic discrete static sub-problems. It does not take into account the unified allocation of original car factories and external vehicles, and there is no actual mathematical model. The existing dynamic VRP scheduling method solution algorithm is based on the use of swarm intelligence optimization, evolutionary algorithm, and neighborhood optimization alone. In this way, when facing dynamic data changes, the quality of the solution is often poor. Summary of the invention
[0004] In view of this, the purpose of the present invention is to propose a dynamic vehicle path full-link problem analysis and model solving method to solve the technical problem that the existing dynamic VRP scheduling method only uses one type of solution algorithm, resulting in poor solution quality when facing dynamic data changes.
[0005] The technical means adopted by the present invention are as follows:
[0006] A method for analyzing and solving a dynamic vehicle path full-link problem includes the following steps:
[0007] S1: Construct a general integer programming mathematical model suitable for dynamic vehicle routing;
[0008] S2: integrating dynamic actual data, wherein the dynamic actual data includes real-time travel time information and order data information;
[0009] S3: forming an alternating mechanism of data updating and dynamic solving of the dynamic vehicle routing problem according to the mathematical model and the dynamic actual data, and obtaining a new instance of the dynamic vehicle routing problem;
[0010] S4: According to the alternating mechanism of data updating and dynamic solution of the dynamic vehicle routing problem, a periodic calculation and analysis algorithm library of the dynamic vehicle routing problem is constructed, and according to the new instance of the dynamic vehicle routing problem, an algorithm is selected from the algorithm library to solve the target problem and obtain an actual vehicle scheduling plan.
[0011] Furthermore, S1 specifically includes:
[0012] S11: Based on the abstract characteristics of the problem, a mechanism modeling based on the point-arc relationship in graph theory is performed to divide all points into customer points and parking points, ensuring that each customer point can be served and can only be served once, and that the vehicles departing from each parking point return to the same initial parking point;
[0013] S12: Perform visualization operations on the original case data, analyze the imported data with appropriate statistical analysis methods, and provide a data visualization page and a current time solution to facilitate user observation of the data.
[0014] Furthermore, S2 specifically includes:
[0015] S21: Update the current vehicle position according to the current time and the solution of the previous cycle, and complete the data update process in combination with the current dynamic order data;
[0016] S22: Calculate the current time based on the solution given each time, and update the vehicle status information such as vehicle position, remaining load, time window, etc.; plus the dynamic order data at this time, a new instance of the dynamic vehicle routing problem is formed.
[0017] Furthermore, S3 specifically includes:
[0018] S31: Decompose the dynamic vehicle problem periodically, combine the road conditions and order data of each stage with the current vehicle location to complete the data update. After the monitoring data is updated, it is directly integrated and solved again to form a dynamic solution mechanism.
[0019] S32: Iteratively solving the current problem, updating the current data, and solving the problem again forms a solution mechanism for the dynamic vehicle routing problem.
[0020] Furthermore, S4 specifically includes: obtaining different solutions in each iterative solution and selecting a suitable algorithm from an algorithm library, wherein the algorithms in the algorithm library include adaptive large neighborhood search, variable neighborhood search, large neighborhood search and ant colony algorithm.
[0021] Furthermore, the workflow of the adaptive large neighborhood search algorithm is:
[0022] Initialize the calling probability of all destruction / repair operators, solve the time, and update the vehicle dynamic information, real-time road conditions, and changes in customer demand. Determine the solution structure based on model constraints;
[0023] Use the greedy insertion heuristic to obtain the initial solution x;
[0024] Generate a random number and select the destruction operator to be called; choose one of the following three deletion heuristics as the destruction operator: random deletion heuristic, worst deletion heuristic, and similar deletion heuristic;
[0025] Use the destruction operator to destroy the initial solution, generate the solution x' and the removed customer point set C;
[0026] Generate a random number and select the repair operator to be used; select one of the following three deletion heuristics as the repair operator: greedy insertion heuristic, random repair heuristic, and regretful insertion heuristic;
[0027] Use this heuristic to reinsert the customer point set C into the solution x', generating the solution x_new;
[0028] Determine whether the new solution x_new meets the simulated annealing criteria. If so, x_new covers the value of x; if not, x_new is discarded.
[0029] If the new solution x_new meets the simulated annealing criteria, determine whether the target value of x_new is better than the historical optimal solution x_best;
[0030] Update the cumulative fitness of the destruction / repair operators used and the calling probability of all operators through the difference between the target values of x_new and x in this iteration;
[0031] If the number of iterations or the calculation time is reached, output x_best; otherwise, repeat the previous step.
[0032] Furthermore, the workflow of the variable neighborhood search algorithm is:
[0033] Initialize the neighborhood of each layer, the number of neighbors is denoted as M, denoted as Nk (k=1,2,3,…,M), and arrange these neighborhoods from small to large;
[0034] Update vehicle dynamic information, real-time road conditions, and changes in customer demand; determine the solution structure based on model constraints;
[0035] Define the initial solution x;
[0036] Use the current solution to search from the first layer until it falls into the local optimal solution x';
[0037] If x' is due to x, update x with x' and reset k to 1; otherwise, go to the next level of search (k=k+1);
[0038] If k is not less than M, go to the step of updating vehicle information;
[0039] Output the final solution x.
[0040] Furthermore, the working process of the large neighborhood search algorithm is as follows:
[0041] Initialize the call probabilities and solution times of all destruction / reparation operators.
[0042] Update the vehicle dynamic information, real-time road conditions, and changes in customer demands; determine the structure of the solution according to the model constraints.
[0043] Use the greedy insertion heuristic to obtain the initial solution x.
[0044] Use the similar deletion heuristic as the destruction operator to destroy the current solution, generate the solution x' and the set C of removed customer points.
[0045] Use the greedy insertion heuristic to re-insert the set C of customer points into the solution x', generating the solution x_new.
[0046] Judge whether the new solution x_new is better than x. If so, let x_new overwrite the value of x; if not, discard x_new.
[0047] If the new solution x_new is better than x_best, judge whether the objective value of x_new is better than the historical optimal solution x_best.
[0048] If the iteration number or operation time is reached, output x_best; otherwise, repeat the above steps.
[0049] Furthermore, the working process of the ant colony algorithm is as follows:
[0050] Initialize the relevant parameters and determine the structure of the solution according to the model constraints.
[0051] Construct the solution space: Randomly place each ant at a different starting point. Calculate the next city to be visited by each ant k (k = 1, 2, 3... m) according to the distance between two points and the accumulated pheromone amount until all ants have visited all cities.
[0052] Update the pheromone: Calculate the path length Lk (k = 1, 2,..., m) passed by each ant, and record the optimal solution (shortest path) in the current iteration; at the same time, update the pheromone concentration on the connecting paths of each city.
[0053] Judge whether to terminate. If iter < itermax, let iter = iter + 1, clear the record table of the paths passed by the ants, and return to the step of constructing the solution space; otherwise, terminate the calculation and output the optimal solution.
[0054] Furthermore, the related parameters include ant colony size u, pheromone importance factor α, heuristic function importance factor β, pheromone volatility factor ρ, total pheromone release Q, maximum number of iterations itermax, real-time road conditions, and changes in customer demand.
[0055] Compared with the prior art, the present invention has the following advantages:
[0056] 1. The universal integer programming mathematical model of dynamic vehicle routing provided by the present invention realizes the modeling integration of real vehicle information, order information and road network information by combining with dynamic actual data, and more accurately describes the actual situation of the existing dynamic vehicle routing problem.
[0057] 2. The alternating mechanism of data updating and dynamic solving provided by the present invention realizes continuous dynamic solving of dynamic vehicle routing problems by combining with dynamic actual data and the previous scheduling solution, and dynamically updates the solution as the actual situation changes.
[0058] 3. The periodic calculation and analysis algorithm library of the vehicle path provided by the present invention realizes the intelligent selection of the corresponding excellent algorithm according to the current data status through the data model set at this time, thereby improving the solution efficiency and quality.
[0059] Based on the above reasons, the present invention can be widely promoted in the fields of operations optimization and real-time dynamic scheduling technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0061] Figure 1 This is a framework diagram of the method of the present invention.
[0062] Figure 2 It is a customer point display diagram of the present invention.
[0063] Figure 3 This is a two-cycle dynamic decision cycle diagram of the present invention.
[0064] Figure 4 This is the overall flow chart of the algorithm library of the present invention. DETAILED DESCRIPTION
[0065] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0066] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0067] like Figure 1-4 As shown in the figure, the present invention provides a dynamic vehicle path full-link problem analysis and model solving method, a universal model dynamic intelligent solution, and the software system structure designed for it is divided into four parts: data uploading, data analysis, algorithm selection and report downloading, as shown in the attached figure. Figure 1 As shown, the method comprises the following steps:
[0068] S1: Construct a universal integer programming mathematical model for dynamic vehicle routing;
[0069] The integer programming model of the dynamic vehicle routing problem is based on mechanism modeling and can be applied to most types of dynamic vehicle problems. In the static vehicle routing problem, the relevant information (customers, vehicles, customer requests, scheduling and other related information, etc.) before optimizing the logistics distribution path is known and fixed; while in the dynamic vehicle routing optimization problem, much of the information is uncertain and unpredictable, and some of the information may be fuzzy and random. When planning the path, the vehicle path should be adjusted and optimized in real time according to the real-time information. In the dynamic vehicle routing problem, the number and location of some customer points and the demand for goods at each customer point are known, and some of the information is unknown and unpredictable, and some of the information may be random and fuzzy. How to design a reasonable distribution route so that the vehicle starts from the distribution center, visits the customer points in an orderly manner, and meets the relevant constraints (weight, volume, time window, etc.), and at the same time responds to new orders received during the vehicle service process, that is, new customer points, and finally returns to the distribution center, is the main research content of the vehicle routing problem. The purpose of the vehicle routing problem is to reduce the number of vehicles used, reduce the distribution distance, reduce the distribution time, improve logistics efficiency, save transportation costs, etc.
[0070] According to the abstract characteristics of the problem, the mechanism modeling is carried out based on the point-arc relationship in graph theory: all points are divided into customer points and parking lot points. Vehicles need to serve all customer orders. Each customer order can only be served by one vehicle, and the vehicle service start time must be within the customer order time window. If the vehicle arrives at the customer location earlier than the start time of the time window, the vehicle must stop and wait; if the vehicle arrives at the customer location later than the end time of the time window, the customer cannot be served. At the same time, all vehicles are of the same type, that is, the vehicle capacity is the same, and the cargo volume of the vehicle during the service process cannot exceed the maximum capacity of the vehicle. All vehicles start from the same parking lot, and the parking lot also has a time window. All vehicles must complete the delivery of all goods within this time window.
[0071] Visualize the original example data, as shown in the attached Figure 2 As shown, the imported data is analyzed with appropriate statistical analysis methods, summarized, understood and digested, in order to maximize the development of data functions and give full play to the role of data. At the same time, a data visualization page is provided to facilitate users to observe the data and understand the characteristics of the data.
[0072] The universal integer programming mathematical model applicable to dynamic vehicle routing is:
[0073]
[0074]
[0075] in: To gather the vehicles staying at the initial parking lot, For external vehicle collection, is a set of points (including vehicle points and customer points), Point collection for customers, is the initial parking point, is a set of arcs, For vehicle index, For external vehicles k point, is the point index, for i , j The distance between two points, Order for customers i need, For vehicles k Current load, is the vehicle capacity, is a decision variable that determines whether arc (i, j) is passed by vehicle k.
[0076] The process of establishing the universal integer programming mathematical model for dynamic vehicle routing is as follows:
[0077] In this model, the whole is modeled based on graph theory. The set V of all points in the graph can be divided into the customer point set N, the initial parking lot set O, and the external parking lot set O. k The external vehicles start from their respective locations and return to the initial parking lot; the vehicles in the initial parking lot return to the initial parking lot after serving the customers, just like the traditional VRP.
[0078] Decision variables Indicates whether arc ij is served by vehicle k, where vehicles include not only vehicles at the original depot but also vehicles that are performing delivery tasks. Distance from two points A linear combination of (Formula 1 is recorded as the objective function of the model: total mileage)
[0079]
[0080] To ensure that each customer point is served exactly once, we establish constraints on the out-degree and in-degree of each customer point in the graph theory model.
[0081]
[0082]
[0083] To simulate the process of loading / pickup, we compare the load arriving at each customer point with the load leaving this customer point. The load of each customer point is equal to the total out-degree weighted by the load. Total penetration weighted by load The difference.
[0084]
[0085] All vehicles have the same total capacity, Q. Vehicles in the parking lot naturally have no load, and the current load of external vehicle k is the total load of customers who have picked up goods before. Based on the above two points, the total load constraint is established as
[0086]
[0087]
[0088] For each external depot point, there is only one car. From the perspective of graph theory, the in-degree of the point is 0 and the out-degree is 1.
[0089] .
[0090] As long as there are enough vehicles starting from the parking lot, the in-degree can be greater than 0; since both the initial parking lot and the external parking lot vehicles need to return to the initial parking lot, the out-degree of the initial parking lot is equal to the number of external vehicles plus the in-degree of the initial parking lot.
[0091]
[0092] S2: Collect real-time travel time information and order information;
[0093] Since the dynamic vehicle routing problem model is based on mechanism modeling, the use of real-time data here can better ensure that the obtained solution is more robust, that is, the ability of the solution to maintain its stability under the influence of certain interference factors. There are a lot of uncertainties in the distribution of vehicles: such as congestion, bad weather, vehicle failure, changes in customer information, etc., which will directly affect the changes in the driving time or speed of the distribution vehicle, leading to waiting or even changing the route, and then increasing the scheduling cost of the vehicle. These uncertainties make the optimization scheduling complicated, but once the information is clearly known, the dynamic vehicle scheduling problem can be converted into a static vehicle scheduling problem for solution. In this software, the real-time data update of customers not only considers the decrease or increase in the demand of the original customers, but also considers the demand of new customers. Under the premise of meeting the vehicle load, how to add new customers to the existing path, if the path does not currently exist, it is necessary to re-arrange new vehicle services. For the case of a decrease in the demand of the original customer, the local route does not need to be adjusted. If the demand becomes 0, skip this customer. For the case of an increase in the demand of the original customer, if the vehicle load exceeds the vehicle load, select the last customer served on this sub-path as the new customer demand until the vehicle load limit is met. This algorithm library introduces the concept of external distribution center and sets the customer point where the vehicle is located as the external distribution center.
[0094] According to the current time and the solution of the previous cycle, the current vehicle position is updated and the location of the external distribution center is calculated. Combined with the current dynamic order data, the data update process is completed. After the data is updated, the information is clear. At this time, the dynamic vehicle routing problem can be temporarily converted to a static vehicle routing problem to solve. At the end of the previous cycle, the algorithm is given a maximum allowable calculation time. During this time period, the algorithm performs new vehicle routing scheduling based on the data updated in real time at the end of the previous cycle, and obtains a new vehicle routing planning scheme, that is, a new solution. After this maximum allowable calculation time, the new vehicle routing planning begins to execute until the end of the next cycle. The schematic diagram of the dynamic decision cycle is shown in the attached figure. Figure 3 shown.
[0095] According to the solution given each time, the vehicle position, remaining load, time window, customer demand changes, external distribution center and other status information are updated at the current time, and the dynamic order data at this time is added to form a new instance of the dynamic vehicle routing problem. On this basis, the algorithm re-optimizes the vehicle routing planning to achieve the comprehensive routing planning goals of minimum delivery distance, minimum delivery time, highest logistics efficiency and lowest transportation cost.
[0096] S3: Form a periodic dynamic vehicle path data update and dynamic solution mechanism based on mathematical models and dynamic actual data;
[0097] The dynamic vehicle problem is virtually periodically decomposed, and the road conditions and order data of each stage are combined with the current vehicle location to complete the data update. The algorithm planning solution flow chart is as follows Figure 4 As shown in the figure, the user first uploads the data on the front end, and then the back end determines the status of the original data. The front end then analyzes the original data, provides a visual data analysis page, and allows the user to select a suitable intelligent optimization algorithm based on the results of the data analysis. Some parameters in the algorithm can be adjusted by the user, and finally the back end calculates the specific vehicle path planning solution. At the end of the previous virtual cycle, a new problem instance is constructed based on the vehicle status information and customer demand changes updated at the end of the virtual cycle. Then, within a limited minimum time, the algorithm re-optimizes the vehicle path based on the real-time data to obtain a new vehicle path planning. Afterwards, the vehicle starts to execute according to the new vehicle path planning scheme until the end of the next virtual cycle.
[0098] This iterative and periodic solution of the current dynamic vehicle problem, updating the real-time data, and solving the problem again to re-optimize the vehicle path planning constitutes the solution mechanism for the dynamic vehicle path problem in this software. The dynamic vehicle path planning scheme for each virtual cycle will be presented to the user in a visual interface, which includes the vehicle driving path for each virtual cycle, that is, the dynamic vehicle path planning scheme.
[0099] S4: Complete the construction of the periodic calculation and analysis algorithm library for dynamic vehicle routing;
[0100] The algorithm library includes many heuristic / meta-heuristic algorithms suitable for solving vehicle routing problems. Different solutions can be obtained in each iterative solution according to user preferences.
[0101] Adaptive Large Neighborhood Search (ALNS):
[0102] Step 1: Initialize the calling probability of all damage / repair operators and calculate the solution time. Update vehicle dynamic information, real-time road conditions, and changes in customer demand. Determine the solution structure based on model constraints.
[0103] Step 2: Use the greedy insertion heuristic to obtain the initial solution x.
[0104] Step 3: Generate a random number and select the destruction operator to be called. Select one of the following three deletion heuristics as the destruction operator: random deletion heuristic, worst deletion heuristic, and similar deletion heuristic.
[0105] Step 4: Use the destruction operator to destroy the initial solution and generate the solution x' and the set of removed customer points C
[0106] Step 5: Generate a random number and select the repair operator to be used. Select one of the following three deletion heuristics as the repair operator: greedy insertion heuristic, random repair heuristic, and regretful insertion heuristic.
[0107] Step 6: Use the heuristic to reinsert the customer point set C into the solution x' to generate the solution x_new.
[0108] Step 7: Determine whether the new solution x_new satisfies the simulated annealing criterion. If so, x_new covers the value of x; if not, x_new is discarded.
[0109] Step 8: If the new solution x_new meets the simulated annealing criterion, determine whether the target value of x_new is better than the historical optimal solution x_best.
[0110] Step 9: Update the cumulative fitness of the destruction / repair operators used and the calling probability of all operators through the gap between the target values of x_new and x in this iteration.
[0111] Step 10: If the number of iterations or the calculation time is reached, output x_best; otherwise, repeat steps 3-9.
[0112] Variable Neighborhood Search (VNS):
[0113] Step 1: Initialize the neighborhood of each layer (the number of neighborhoods is recorded as M), recorded as Nk (k=1,2,3,…,M), and arrange these neighborhoods from small to large;
[0114] Step 2: Update vehicle dynamic information, real-time road conditions, and changes in customer demand. Determine the solution structure based on model constraints.
[0115] Step 3: Define the initial solution x.
[0116] Step 4: Use the current solution to search from the first layer until it reaches the local optimal solution x'.
[0117] Step 5: If x' is greater than x, update x with x' and reset k to 1; otherwise, go to the next level of search (k=k+1).
[0118] Step 6: If k is not less than M, go to step 2;
[0119] Step 7: Output the final solution x.
[0120] Large Neighborhood Search (LNS):
[0121] Step 1: Initialize the calling probabilities of all destruction / repair operators and calculate the time.
[0122] Step 2: Update vehicle dynamic information, real-time road conditions, and changes in customer demand. Determine the solution structure based on model constraints.
[0123] Step 3: Use the greedy insertion heuristic to obtain the initial solution x.
[0124] Step 4: Use the similar deletion heuristic as the destruction operator to destroy the current solution and generate the solution x' and the set C of removed customer points.
[0125] Step 5: Use the greedy insertion heuristic to reinsert the customer point set C into the solution x' to generate the solution x_new.
[0126] Step 6: If the new solution x_new is better than x, then x_new covers the value of x; if not, discard x_new.
[0127] Step 7: If the new solution x_new is better than x_best, determine whether the target value of x_new is better than the historical optimal solution x_best.
[0128] Step 8. If the number of iterations or the calculation time is reached, output x_best; otherwise, repeat steps 4-6.
[0129] Genetic Algorithm (GA):
[0130] Step 1: Set the evolutionary generation counter iter=0, set the maximum evolutionary generation itermax, and randomly generate M individuals as the initial population P(0)
[0131] Step 2: Update vehicle dynamic information, real-time road conditions, and changes in customer demand. Determine the solution structure based on model constraints.
[0132] Step 3: Individual evaluation: Calculate the fitness of each individual in the population P(t).
[0133] Step 4: Selection operation: Use the random selection operator to act on the group.
[0134] Step 5: Generate random numbers and select the crossover operator to be called. Select one of the following three deletion heuristics as the crossover operator: random crossover heuristic, single point crossover, and uniform crossover.
[0135] Step 6: Crossover operation: Apply the crossover operator to the selected individuals.
[0136] Step 7: Generate a random number and select a mutation operator to be called. Select one of the following three deletion heuristics as the mutation operator: inversion mutation, bit mutation, and inversion swap mutation.
[0137] Step 8: Mutation operation: Apply the mutation operator to the selected individual.
[0138] Step 9: After the above genetic operations, the population P(t) undergoes selection, crossover, and mutation operations to obtain the next-generation population P(t + 1).
[0139] Step 10: Termination condition judgment: If iter = itermax, then output the individual with the maximum fitness obtained during the evolutionary process as the optimal solution and terminate the calculation.
[0140] Ant Colony Optimization (ACO):
[0141] Step 1: Initialize relevant parameters, such as the ant colony size u, the pheromone importance factor α, the heuristic function importance factor β, the pheromone evaporation factor ρ, the total pheromone release Q, the maximum number of iterations itermax. And the real-time road conditions, as well as the changes in customer demands. Determine the structure of the solution according to the model constraints.
[0142] Step 2: Construct the solution space: Randomly place each ant at a different starting point. Calculate the next city to be visited by each ant k (k = 1, 2, 3…m) based on the distance between two points and the accumulated pheromone until all ants have visited all cities.
[0143] Step 3: Update the pheromone: Calculate the path length Lk (k = 1, 2,…, m) passed by each ant, and record the optimal solution (the shortest path) in the current iteration. At the same time, update the pheromone concentration on the connection paths of each city.
[0144] Step 4: Judge whether to terminate. If iter < itermax, then set iter = iter + 1, clear the record table of the paths passed by the ants, and return to Step 2; otherwise, terminate the calculation and output the optimal solution.
[0145] In the above embodiments of the present invention, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0148] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing and solving the full-link problem of dynamic vehicle routing, characterized in that: The steps include: S1: Construct a general integer programming mathematical model suitable for dynamic vehicle routing; The general integer programming mathematical model applicable to dynamic vehicle routing is: in: To gather the vehicles staying at the initial parking lot, For external vehicle collection, is a set of points, Point collection for customers, O is the initial parking point, is a set of arcs, For vehicle index, For external vehicles k point, is the point index, for i , j The distance between two points, Order for customers i need, For vehicles k Current load, is the vehicle capacity, is the decision variable, determining whether arc (i, j) is passed by vehicle k; The process of establishing a universal integer programming mathematical model for dynamic vehicle routing is as follows: The mathematical model of universal integer programming for dynamic vehicle routing is based on graph theory. The set V of all points in the graph is divided into customer point set N, initial parking lot set O, and external parking lot set O. k ; External vehicles depart from their respective locations and return to the initial parking lot; After the initial vehicle serves the customer, it returns to the initial parking lot; Decision variables Indicates whether arc ij is served by vehicle k, including vehicles in the original parking lot and vehicles performing transportation tasks; the objective function of the model: the total mileage formula is as follows: The constraints of the model are established based on the out-degree and in-degree of each customer point in graph theory: In order to simulate the loading / pickup process, the load arriving at each customer point is compared with the load leaving this customer point. The load at each customer point q i Equal to the total out-degree weighted by load Total penetration weighted by load The difference between The total capacity of all vehicles is the same, which is Q; the current load of the external vehicle k is the total load of the customer points that have picked up the goods before ; The total load constraint is: For each external parking lot point, the in-degree of the external parking lot point is 0 and the out-degree is 1; The out-degree of the initial parking lot is equal to the number of external vehicles plus the in-degree of the initial parking lot: S2: integrating dynamic actual data, wherein the dynamic actual data includes real-time travel time information and order data information, to obtain a new instance of the dynamic vehicle routing problem; S3: forming an alternating mechanism of data updating and dynamic solution of the dynamic vehicle routing problem according to the mathematical model and the dynamic actual data; S4: According to the alternating mechanism of data updating and dynamic solution of the dynamic vehicle routing problem, a periodic calculation and analysis algorithm library of the dynamic vehicle routing problem is constructed, and according to the new instance of the dynamic vehicle routing problem, an algorithm is selected from the algorithm library to solve the target problem and obtain an actual vehicle scheduling plan.
2. The dynamic vehicle path full-link problem analysis and model solving method according to claim 1 is characterized in that: S1 specifically includes: S11: Based on the abstract characteristics of the problem, a mechanism modeling based on the point-arc relationship in graph theory is performed to divide all points into customer points and parking points, ensuring that each customer point can be served and can only be served once, and that the vehicles departing from each parking point return to the same initial parking point; S12: Perform visualization operations on the original case data, analyze the imported data with appropriate statistical analysis methods, and provide a data visualization page and a current time solution to facilitate user observation of the data.
3. The dynamic vehicle path full-link problem analysis and model solving method according to claim 1 is characterized in that: S2 specifically includes: S21: Update the current vehicle position according to the current time and the solution of the previous cycle, and complete the data update process in combination with the current dynamic order data; S22: Calculate the current time based on the solution given each time and update the vehicle status information, which includes the vehicle position, remaining load, and time window; plus the dynamic order data at this time, a new instance of the dynamic vehicle routing problem is formed.
4. The dynamic vehicle path full-link problem analysis and model solving method according to claim 1 is characterized in that: S3 specifically includes: S31: Periodically decompose the dynamic vehicle problem, combine the road conditions and order data of each stage with the current vehicle location to complete the data update, and directly integrate and solve again after monitoring the data update to form a dynamic solution mechanism; S32: Iteratively solving the current problem, updating the current data, and solving the problem again forms a solution mechanism for the dynamic vehicle routing problem.
5. The dynamic vehicle path full-link problem analysis and model solving method according to claim 1 is characterized in that: S4 specifically includes: obtaining different solutions in each iterative solution and selecting a suitable algorithm from an algorithm library, wherein the algorithms in the algorithm library include an adaptive large neighborhood search algorithm, a variable neighborhood search algorithm, a large neighborhood search algorithm, an ant colony algorithm, and a genetic algorithm.
6. The dynamic vehicle path full-link problem analysis and model solving method according to claim 5 is characterized in that: The workflow of the adaptive large neighborhood search algorithm is: Initialize the calling probability of all destruction / repair operators, solve the time, and update the vehicle dynamic information, real-time road conditions, and changes in customer demand. Determine the solution structure based on model constraints; Use the greedy insertion heuristic to obtain the initial solution x; Generate a random number and select the destruction operator to be called; Choose one of the following three deletion heuristics as the destruction operator: random deletion heuristic, worst deletion heuristic, and similar deletion heuristic; Using the destruction operator to destroy the initial solution, generating a solution x' and a set C of removed customer points; Generate random numbers and select the repair operator to be used; Choose one of the following three deletion heuristics as the repair operator: greedy insertion heuristic, random repair heuristic, and regretful insertion heuristic; Use the repair operator to reinsert the customer point set C into the solution x' to generate a solution x_new; Determine whether the new solution x_new meets the simulated annealing criteria. If so, x_new covers the value of x; if not, x_new is discarded. If the new solution x_new meets the simulated annealing criteria, determine whether the target value of x_new is better than the historical optimal solution x_best; Update the cumulative fitness of the destruction / repair operators used and the calling probability of all operators through the difference between the target values of x_new and x in this iteration; If the number of iterations or the calculation time is reached, output x_best; Otherwise, repeat the previous step.
7. The dynamic vehicle path full-link problem analysis and model solving method according to claim 5 is characterized in that: The workflow of the variable neighborhood search algorithm is: Initialize the neighborhood of each layer, the number of neighbors is denoted as M, denoted as Nk (k=1,2,3,…,M), and arrange these neighborhoods from small to large; Update vehicle dynamic information, real-time road conditions, and changes in customer demand; determine the solution structure based on model constraints; Define the initial solution x; Use the current solution to search from the first layer until it falls into the local optimal solution x'; If x' is due to x, update x with x' and reset k to 1; otherwise, go to the next level of search (k=k+1); If k is not less than M, go to the step of updating vehicle information; Output the final solution x.
8. The dynamic vehicle path full-link problem analysis and model solving method according to claim 5 is characterized in that: The workflow of the large neighborhood search algorithm is: Initialize the calling probability of all destruction / repair operators and solve the time; Update vehicle dynamic information, real-time road conditions, and changes in customer demand; determine the solution structure based on model constraints; Use the greedy insertion heuristic to obtain the initial solution x; Use similar deletion heuristic as the destruction operator to destroy the current solution, generate solution x' and the set C of removed customer points; Use the greedy insertion heuristic to reinsert the customer point set C into the solution x' to generate the solution x_new; If the new solution x_new is better than x, then x_new covers the value of x; if not, discard x_new; If the new solution x_new is better than x_best, determine whether the target value of x_new is better than the historical optimal solution x_best; If the number of iterations or computing time is reached, output x_best; otherwise, repeat the above steps.
9. The dynamic vehicle path full-link problem analysis and model solving method according to claim 5 is characterized in that: The workflow of the ant colony algorithm is as follows: Initialize relevant parameters and determine the solution structure based on model constraints; Constructing the solution space: Randomly place each ant at a different starting point, and calculate the next city to be visited by each ant k (k=1,2,3…m) according to the distance between the two points and the accumulated pheromone, until all ants have visited all cities; Update pheromone: Calculate the path length Lk (k = 1, 2, …, m) that each ant has passed, and record the optimal solution in the current iteration; at the same time, update the pheromone concentration on the connection paths of each city. Judge whether to terminate. If iter < itermax, then set iter = iter + 1, clear the record table of the paths passed by the ants, and return to the step of constructing the solution space; otherwise, terminate the calculation and output the optimal solution.
10. The dynamic vehicle path full-link problem analysis and model solving method according to claim 9 is characterized in that: The relevant parameters include the ant colony size u, the pheromone importance factor α, the heuristic function importance factor β, the pheromone evaporation factor ρ, the total pheromone release amount Q, the maximum number of iterations itermax, the real-time road conditions, and the changes in customer demands.
Citation Information
Patent Citations
Multi-vehicle task allocation and path optimization simulation platform and implementation method thereof
CN114580695A