Dual-stage carbon-reduction and emission-reduction unmanned vehicle path planning method
Through the two-stage cycle path planning method, combined with genetic algorithms and hybrid A* search algorithm, the problems of carbon emissions and energy management in vehicle path planning are solved, real-time and efficiency are improved, and the use of renewable energy is promoted.
Patent Information
- Application Number
- CN202411048244.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-26
AI Technical Summary
The prior art ignores carbon emissions problems in vehicle path planning, and it is difficult to adjust paths in real time in complex traffic environments to reduce energy consumption and carbon emissions, especially in the energy management and charging station layout of electric autonomous vehicles.
Adopting a dual-stage cycle unmanned vehicle path planning method, using improved genetic algorithms and hybrid A* search algorithms, combining vehicle parameters, demand point information and historical traffic information, the path is optimized in real time to reduce power consumption and carbon emissions and optimize energy Use and charge arrangement.
Real-time path adjustment in complex traffic environments has been achieved, power consumption and carbon emissions have been reduced, transportation efficiency and energy utilization efficiency have been improved, and renewable energy use and the proportion of green electricity has been promoted.
Smart Images

Figure CN119026770A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving, and in particular to a fully real-time carbon-reducing unmanned vehicle transportation algorithm based on an improved genetic algorithm and a hybrid A* search algorithm. Background Art
[0002] Against the backdrop of increasing awareness of environmental protection, reducing carbon emissions has become a common challenge faced by the world. As one of the main sources of carbon emissions, transportation urgently needs to be optimized through scientific and technological means to reduce its impact on the environment. In existing technologies, vehicle path planning is mainly based on algorithms with the shortest time or distance. Although these methods can provide fast driving paths, they often ignore the carbon emissions during driving. In addition, existing technologies still have certain limitations in dealing with real-time traffic conditions, road condition changes, and the impact of driving behavior. These factors may cause the driving path to be far from optimal, thereby increasing unnecessary carbon emissions. Driven by the Internet economy, China's logistics industry has grown significantly, generating more than 10.3 trillion yuan in 2019. However, many problems remain unresolved. China's logistics efficiency is lower than that of developed countries. For example, China's total logistics cost in 2019 was 14.6 trillion yuan, accounting for 14.7% of GDP, while the corresponding ratio in developed countries was 8-9%. On the other hand, logistics-related carbon emissions account for 18.9% of China's total carbon emissions. Therefore, it is extremely important to develop a vehicle driving path optimization method that can reduce carbon emissions.
[0003] The rapid development of autonomous driving technology has brought unprecedented opportunities for change to the transportation industry. Autonomous vehicles, with their high-precision positioning, powerful computing power and complex perception systems, can achieve safer and more efficient driving. However, as the number of autonomous vehicles increases, how to effectively manage these vehicles to optimize routes, reduce congestion, reduce energy consumption and carbon emissions has become a new challenge. At present, although autonomous driving technology has made significant progress, it still faces several key issues in practical applications. First, how to adjust route planning in real time in a complex traffic environment, especially with many demand points, each with its own pick-up time, to maintain transportation efficiency and reduce energy and electricity consumption, thereby reducing carbon emissions. Second, energy management of electric autonomous vehicles, especially considering the layout of charging stations and the availability of charging piles, how to optimize driving routes to reduce charging time and waiting time while ensuring timely completion of tasks. In addition, how to effectively consider carbon emissions when autonomous vehicles are planning their routes, not just pursuing the optimization of time or distance, but minimizing environmental impact, is crucial to achieving a sustainable transportation system. However, there is no algorithm that can solve the above problems end-to-end, especially to deal with complex traffic and excessive power consumption caused by weather in real time. Summary of the invention
[0004] In view of the current problems of lack of electric vehicles to reduce power consumption and use of thermal power and thus carbon emissions, the problem of not encouraging the use of renewable energy, the inability to optimize multiple objectives of energy costs (electricity costs) and environmental costs (carbon emissions), and the inability to adjust routes in real time according to traffic conditions, the present invention provides a completely real-time two-stage cycle unmanned vehicle path planning method, which can solve logistics and transportation problems, and can also be used in any other path planning that requires multiple target points and multiple vehicles.
[0005] To achieve the above objectives, the present invention adopts the following technical solution, which includes 2 stages and 5 steps in total:
[0006] (1a) Obtain various vehicle parameters, demand point information, charging station information and historical traffic information in the scene, construct an optimization problem based on the above parameters and information, use the improved nearest neighbor algorithm to construct the initial population of the genetic algorithm, and set the initial value of the number of iterations M = 1 and the maximum number of iterations N = 500.
[0007] (1b) executing an evolution cycle of a genetic algorithm, wherein the genetic algorithm comprises the following specific steps:
[0008] 1) Calculate the fitness of each chromosome in the current population.
[0009] 2) The roulette wheel strategy is used to perform selection operations according to individual fitness and select chromosomes for reproduction.
[0010] 3) Dynamically determine and apply adaptive crossover and mutation probabilities, perform crossover and mutation operations on selected chromosomes, generate offspring with new genetic information, and form a new population.
[0011] (1c) Determine whether the current number of iterations has reached the preset maximum number of iterations. If it has not reached the maximum number of iterations, the number of iterations M = M + 1, and return to step (1b) to continue execution. If it has reached the maximum number of iterations, proceed to step (2d).
[0012] (2d) The method enters the second stage. According to the maximum number of iterations in step (1c), the individual with the highest fitness and historical path information are selected. Based on the current planning target point, the Hybrid A* algorithm is used to search from the current vehicle position to the target point to generate a feasible and specific path.
[0013] (2e) If the time or power consumption of the vehicle exceeds the set threshold, re-enter step (1a) to update the parameters. If the demand point information changes, re-enter step (1a) to update the parameters. If it does not exceed the set threshold and the total task is not completed, wait for one minute and re-enter step (2d) to search. If the total task is completed, the algorithm ends.
[0014] Furthermore, in step (1a) we should initialize the problem parameters using the following steps:
[0015] a Get the initial vehicle preparation cost C f =c f ∑ k∈K y k Calculate the vehicle fixed cost, c f represents the fixed cost of using a single unmanned vehicle, y k Indicates whether the kth vehicle is used.
[0016] b Obtain vehicle charging cost C r =c r ∑ k∈K ∑ i∈F B ik θ ik , c r represents the electricity price, B ik ,θ ik They respectively represent how much power the k-th unmanned vehicle charges at the i-th charging station and whether it charges at the i-th charging station.
[0017] c Obtain environmental cost C e =c c ∑ k∈K ∑ i∈F μηB ik θ ik +c fg (∈-γ)∑ k∈K ∑ i∈F B ik θ ik , including carbon emission costs and penalty costs for green electricity trading c c is the carbon price, i.e. the cost per unit of carbon dioxide emissions. μ is the proportion of electricity generated by thermal power plants, indicating how much electricity in the grid is generated by thermal power plants. η is the carbon dioxide emission coefficient of thermal power plant electricity generation, i.e. the amount of carbon dioxide generated per unit of electricity. c fg is the unit penalty price that needs to be paid for failing to reach the green power quota. ∈ is the green power quota coefficient of the driverless car, which indicates how much of the power required by the driverless car should come from renewable energy.
[0018] d Initialize the genetic algorithm population through the nearest neighbor algorithm, and determine the population size based on the constructed optimization problem. The default setting is 1000.
[0019] eSimulates sending an unmanned vehicle from all available unmanned vehicles and randomly visiting a demand point
[0020] f Select the demand point that is closest to the previous demand point node and has not been visited, and insert it into the current vehicle path.
[0021] g Repeat step f until the maximum capacity limit of the current unmanned vehicle is reached, and save the current path. If there is a demand point that has not been visited, return to step e to send a new unmanned vehicle, otherwise the population is initialized and step (1a) ends.
[0022] Further, step (1b) needs to be performed, and step (1b) needs to include the following steps:
[0023] a Calculate individual fitness through formula (1)
[0024]
[0025] p i represents the demand of node i. ijk If the driverless car k moves from node i to node j, then x ijk is 1, otherwise x ijk is 0. k .end: indicates the time when the unmanned vehicle k returns to the distribution center, t max Indicates the maximum working time of the driverless car in a day.
[0026] b According to the fitness of each individual, a roulette wheel is constructed, that is, a piecewise function, and the size of the area occupied by each individual on the roulette wheel is proportional to its individual fitness.
[0027] c generates a random number r in the interval [0,1], determines which area of the roulette wheel r falls into, and selects the corresponding individual for reproduction. This step is repeated until a sufficient number of individuals are selected for the reproduction of the next generation of the population. By default, the number of individuals selected for the next generation is half of the population.
[0028] d Calculate the probability of hybridization and mutation of each individual selected by c through formula (2)
[0029]
[0030] Where P c is the hybridization probability, P m is the probability of mutation, f max is the maximum fitness in the population, f avg is the average fitness in the population, f cis the larger fitness of the two crossover individuals, f c is the fitness of the mutant chromosome.
[0031] eFor each individual selected by c, generate a random number r in the interval [0,1]. If r is less than the P of this individual, c , a mutation operation is performed to randomly select the value of a certain point of this individual, randomly change the value of this point to a legal value, and add the new individual to the population.
[0032] f For each individual selected by c, generate a random number r in the interval [0,1]. If r is less than the P of this individual m , a hybridization operation is performed, another individual in the population is randomly selected, a part of the fragment of this individual is spliced into the current hybrid individual, repeated numbers are removed, and the new individual is added to the population.
[0033] Further, it is necessary to perform the judgment process of step (1c) to check whether the current number of iterations reaches the preset maximum number of iterations. If it does not reach the maximum number of iterations, the number of iterations M = M + 1, and return to step (1b) to continue execution. If it reaches the maximum number of iterations, proceed to step (2d).
[0034] Further, after step (1c) is completed, if the maximum number of iterations is reached, the executed step (2d) is to select the target point and perform the Hybrid A* search including the following steps:
[0035] a Select the individual with the largest individual fitness in the population after step (1c) as the actual route of the vehicle.
[0036] b. Based on the optimal path obtained in step a, select the first unreached target point in the optimal path as the search end point of HybridA*
[0037] c The current vehicle position is used as the search starting point of Hybrid A*
[0038] d. Calculate the cost of each feasible point around the vehicle. Each time, the point with the smallest cost is selected for expansion. The cost G(n) is calculated using formula (3). Step d is executed repeatedly until the end point is reached, and the Hybrid A* search ends.
[0039] G(n)=G(parent)+ΔE+ΔT (3)
[0040] Where ΔE is the increased power consumption due to node expansion, and ΔT is the increased travel time due to node expansion.
[0041] e obtains the final path, which can navigate directly from the current vehicle position to the target point, and can calculate the real-time estimated power consumption and time.
[0042] Further, the estimated power consumption and time are calculated according to step (2d) to carry out step (2e), including:
[0043] a Calculate the expected power consumption E to the current target point based on the optimal path selected in step (2d) expect and expected time T expect , and set the power consumption threshold E of the current remaining path threshold =α e *E expect , set the threshold T of the current remaining path time threshold =α t *T expect
[0044] b. The real-time estimated power consumption and time searched by the Hybrid A* algorithm in step (2e) is recorded as E realtime and T realtime
[0045] If E realtime >E threshold or T realtime >T threshold Then return to step (1a) to update the parameters and restructure the problem.
[0046] d. Check whether the demand point information has changed. If so, return to step (1a) to update the parameters and rebuild the problem.
[0047] eThe program pauses for one minute.
[0048] f Check whether all demand points are met. If not, return to step (2d) to perform real-time path planning again. If all demand points are met, the method ends.
[0049] The present invention adopts the above technical solution, and the beneficial effects that can be achieved include:
[0050] 1. Reduce power consumption, thermal power usage, carbon emissions, transportation time, energy consumption, etc. in complex multi-autonomous vehicle planning problems, and use as much clean energy as possible.
[0051] 2. Improve the real-time and flexibility of route planning, so that unmanned vehicles can respond immediately to emergencies such as traffic congestion, changes in road conditions or changes in customer demand, thereby reducing waiting time and detours, and improving overall transportation efficiency and energy utilization efficiency.
[0052] 3. Promote the development of intelligent transportation systems. The implementation of this invention provides a new solution for the application of autonomous driving technology in the field of logistics and transportation.
[0053] 4. Strengthen the proportion of green electricity use. By considering the ratio of thermal power and green electricity in charging piles and optimizing charging arrangements, we will encourage the use of more renewable energy, thereby reducing carbon emissions while promoting the optimization of energy structure and environmental protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of a two-stage carbon-reducing and emission-reducing unmanned vehicle path planning method of the present invention;
[0055] Figure 2 Schematic diagram of the population initialization in step (1a) of the present invention;
[0056] Figure 3 A schematic diagram of the crossover operation of the genetic algorithm in step (1b) of the present invention;
[0057] Figure 4 Schematic diagram of the improved Hybrid A* algorithm in step (2d) of the present invention; DETAILED DESCRIPTION
[0058] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0059] The following is a description of a specific implementation method of a two-stage carbon reduction and emission reduction unmanned vehicle path planning method provided in an embodiment of the present application in conjunction with the accompanying drawings. Figure 1 As shown, the method includes 2 stages and 5 steps:
[0060] (1a) Collect information, construct optimization problems and parameters, and set initialization parameters
[0061] (1b) Execute the iterative cycle of the genetic algorithm
[0062] (1c) Check whether the current number of iterations has reached the preset maximum number of iterations
[0063] (2d) Actually perform the transportation task and use the improved Hybrid A* algorithm to plan the specific path.
[0064] (2e) Check whether the real-time second-stage search results are abnormal, check whether there are changes in customer needs, and check whether the transportation task is completed. If completed, the algorithm ends.
[0065] The following will further standardize the letter expressions and specific meanings of the problem parameters and variables described in Section 1.
[0066] First, get the most critical sets, which mainly include three types of points and one type of vehicle set:
[0067] O: indicates the starting point, garage, and vehicle departure center. During the specific implementation process, please ensure that there is only one such point.
[0068] V: represents the set of demand points
[0069] F: indicates charging station
[0070] K: stands for unmanned electric vehicle
[0071] The parameters that need to be prepared in advance are those that are constant in the genetic algorithm and are hyperparameters. Hyperparameters include:
[0072] c r : Electricity Price
[0073] c c : Carbon price
[0074] c f : Electric vehicle fixed costs
[0075] C d : Driving cost per unit mile
[0076] c fg : Unit penalty price for green electricity
[0077] wtC: waiting cost per unit time
[0078] lpc: late penalty per unit time
[0079] [s i , e i ]: The time window accepted by customer i, i∈V
[0080] μ: Thermoelectric ratio
[0081] η: CO2 emission coefficient of thermal power generation
[0082] ε: Green electricity quota coefficient for electric vehicles
[0083] γ: The ratio of wind power and photovoltaic power generation
[0084] Q: What is the battery capacity of an electric vehicle?
[0085] W: Maximum load capacity of electric vehicles
[0086] s: speed of the electric car
[0087] δ: Energy consumption per unit mileage of electric vehicles
[0088] r: Charging speed of electric vehicles
[0089] d i ,: the distance from node i to node j, i, j∈N
[0090] p i : Demand of customer i, i∈V
[0091] ts i : Service time of node i, i∈N
[0092] t max : Maximum working time of electric vehicles in a day
[0093] t ij : The driving time from node i to node j, i, j∈N, note that here t ij =d ij / s, and assume that the vehicle moves at a constant speed during transportation to reduce the complexity of optimization.
[0094] The following are the variables that need to be optimized during optimization:
[0095] y k : If electric car k is used, then y k is 1, otherwise y k is 0
[0096] x ijk :If electric car k moves from node i to node j, then x iik is 1, otherwise x ijk is 0
[0097] θ ik : If electric vehicle k is charged at charging station i, then θ ik is 1, otherwise θ ik is 0
[0098] B ik : Charging capacity of vehicle k at charging station i, i∈F, k∈K
[0099] w ik a: The load of electric vehicle k arriving at node i, i∈N, k∈K
[0100] w ik d: the load of electric vehicle k leaving node i, i∈N, k∈K
[0101] t wi : Waiting time at node i, i∈N
[0102] t ri : Charging time at node i, i∈F
[0103] t ik .a: The time it takes for electric car k to arrive at node i, i∈V∪F, k∈K
[0104] t ik .d: The time when electric car k leaves node i, i∈V∪F, k∈K
[0105] t k .end: The time it takes for electric vehicle k to return to the distribution center, k∈K
[0106] q ik : Battery state of charge (SoC) of electric vehicle k at node i, i∈N, k∈K
[0107] After setting the parameters and variables, it is necessary to calculate the specific objective function of the optimization parameters. The objective function mainly consists of three parts. Obtain the initial preparation cost C of the vehicle f =c f ∑ k∈K y k Calculate the vehicle fixed cost, c f represents the fixed cost of using a single unmanned vehicle, y k Indicates whether the kth vehicle is used. Get the vehicle charging cost C r =c r ∑ k∈K ∑ i∈F B ik θ ik , c r represents the electricity price, B ik ,θ ik Respectively represent how much the k-th unmanned vehicle charges at the i-th charging station and whether it charges at the i-th charging station. Obtain the environmental cost C e =c c ∑ k∈K ∑i ∈F μηB ik θ ik +c fg (∈-γ)∑ k∈K ∑ i∈F B ik θ ik , including carbon emission costs and penalty costs for green electricity trading c c is the carbon price, i.e. the cost per unit of carbon dioxide emissions. μ is the proportion of electricity generated by thermal power plants, indicating how much electricity in the grid is generated by thermal power plants. η is the carbon dioxide emission coefficient of thermal power plant electricity generation, i.e. the amount of carbon dioxide generated per unit of electricity. fg is the unit penalty price required for failing to reach the green power quota. ∈ is the green power quota coefficient of the driverless car, indicating how much of the power required by the driverless car should come from renewable energy. Here, the time penalty is added according to the tolerance of the actual arrival time. C t =wtc∑ i∈V max(ei -t ik.a ,0)+lpc∑ i∈V max(t ik.a -l i , 0), k∈K is used to penalize time-sensitive planning tasks. However, in reality, most planning tasks are not so time-sensitive, and vehicles can arrive at any time during the day. Finally, the overall objective function O=C is calculated. f +C r +C e Or O=C f +C r +C e +C t .
[0108] Of course, there are some basic constraints that satisfy the one-stage optimization problem. Constraint (1) ensures that each customer node must be visited and only visited once. Constraint (2) ensures that the load of the electric vehicle must not exceed its maximum capacity during the delivery task. Constraint (3) ensures that when the electric vehicle arrives at a node, it must unload the goods before going to the next node. Constraint (4) calculates the waiting time for the electric vehicle to arrive at the node in advance. Constraint (5) calculates the charging time of the electric vehicle at the charging station. Constraint (6) indicates that the time to leave the node includes the arrival time, waiting time, service time and charging time. Constraint (7) indicates that the time for the electric vehicle to arrive at the next node is composed of the time it leaves the previous node and the driving time between the two nodes. Constraints (8) and (9) indicate the energy consumption relationship between the two nodes, and that the electric vehicle should be fully charged when it departs from the distribution center and the charging station.
[0109]
[0110] The above constraints will play a key role in initializing the population and executing the evolution part of the genetic algorithm. In steps (1a) e, f, and g, the initialization of the population requires storing each individual in a list in the Python language. The Python language list has the characteristics of convenient growth and deletion. Figure 2 As shown, the specific operation of initializing the population, that is, the specific implementation of steps (1a) e, f, and g, will be described in detail below.
[0111] The implementation method of initializing the population object is to initialize the entire population as a list object PO in the Python language. The length of this list is 0 at the beginning of the algorithm.
[0112] The implementation method of initializing a new individual is to initialize the individual into a list object CL in Python language, and then randomly select a vehicle to start from the starting station. Set all the remaining stations to the same probability for randomness, randomly select a station, and use the CL.append(index) method to add the index index corresponding to this station to the current individual list. If the total power consumption of the vehicle when adding a certain demand is greater than Q, immediately add the index corresponding to the garage closest to the previous demand point of the vehicle. If the vehicle exceeds the maximum load W of the vehicle when adding a certain demand, immediately add the index corresponding to the garage to the current individual list. In specific implementation, the index of the garage, which is the starting point, is generally set to 0. And all demand points are numbered according to the determined logic. For example, they can be numbered in order according to the distance from the garage. Until all demand points are met, the initialization of the current individual is completed. Combined with the constraints (1)-(9) listed above, determine whether the current CL individual is legal. If legal, use the PO.append(CL) method to add the current individual CL to the population list object PO.
[0113] Continuously initialize individuals to form new and different CLs, and judge the legality. If legal, add them to the population object PO. When the length of PO is greater than or equal to 1000 or the population size you set, the population initialization ends.
[0114] The specific implementation method of step (1b) is described in detail below:
[0115] a Calculate individual fitness through formula (1)
[0116]
[0117] b. Based on the fitness of each individual, construct a roulette wheel, that is, a piecewise function. The size of the area occupied by each individual on the roulette wheel is proportional to its individual fitness. We need to calculate the total fitness of the entire population, and then assign each individual an interval on the roulette wheel, the size of the interval is proportional to its fitness. When actually implementing it in Python, create a floating-point variable current_position and initialize it to 0, create an empty list wheel to store the segments of the roulette wheel, and calculate the interval ratio of the individual on the roulette wheel based on the ratio of individual fitness to total fitness ftness / total_fitness. Add the calculated interval ratio to current_position, so that current_position is updated to the end position of the interval of the current individual. Add the individual and its corresponding interval end position as a tuple to the whee1 list.
[0118] c generates a random number r in the interval [0, 1], determines which area of the roulette wheel r falls into, and selects the corresponding individual for reproduction. This step is repeated until a sufficient number of individuals are selected for the next generation of population reproduction. By default, the number of individuals selected for the next generation is half of the population.
[0119] d Calculate the probability of hybridization and mutation of each individual selected by c through formula (2)
[0120]
[0121] Where P c is the hybridization probability, P m is the probability of mutation, f max is the maximum fitness in the population, f avg is the average fitness in the population, f c is the larger fitness of the two crossover individuals, f c is the fitness of the mutant chromosome.
[0122] eFor each individual selected by c, generate a random number r in the interval [0, 1]. If r is less than the P of this individual, c , a mutation operation is performed to randomly select the value of a certain point of this individual, randomly change the value of this point to a legal value, and add the new individual to the population.
[0123] f For each individual selected by c, generate a random number r in the interval [0, 1]. If r is less than the P of this individual, m , then a hybrid operation is performed. Figure 3 As shown, hybridization is to randomly select another individual in the population, select a part of each other's individual fragments and splice them into the current hybrid individual, remove the repeated numbers, and use the constraints constructed in step (1a) to make judgments, and then add the new individual to the population. Note that what is removed here must be the repeated demand points of the current hybrid individual to ensure the maximum individual difference.
[0124] After completing step (1b), it is necessary to proceed to step (1c) to check whether the current number of iterations has reached the preset maximum number of iterations. If it has not reached the maximum number of iterations, the number of iterations M = M + 1, and the process returns to step (1b) to continue. If it has reached the maximum number of iterations, the process proceeds to step (2d) of the second stage.
[0125] According to the maximum number of iterations in step (1c), the individual with the highest fitness and historical path information are selected. Based on the current planning target point, the Hybrid A* algorithm is used to search from the current vehicle position to the target point to generate a feasible specific path. In the specific implementation process, it is necessary to first determine the current planning target point P. This point may be any one of O, V, and F, and is the first point in the path selected according to the individual with the highest fitness that has not been visited by the current vehicle.
[0126] Then set the current vehicle position as the starting point of the Hybrid A* algorithm search, plan the target point P as the end point of the Hybrid A* algorithm search, and search for a path that the unmanned vehicle can actually execute. The previously output solution, that is, the individual with the highest fitness, will have an estimated power consumption E expect =δd ij However, in the actual transportation process, various unexpected situations may occur, which may lead to a sharp increase in power consumption. In the actual second-stage search, a more detailed evaluation is required based on the specific road conditions. Each time the Hybrid A* algorithm has an actual value, in order to reduce power consumption and carbon emissions, we will choose the road with the lowest power consumption under detailed evaluation.
[0127]
[0128] The above is the calculation of power consumption and time consumption. E is power consumption (kWh). d is the driving distance (km). s is the vehicle speed (km / h). l is the vehicle load (tons). k 1 , k 2 and k 3 It is a coefficient determined by the vehicle model and road conditions. d is the driving distance from one node to another, in kilometers. Note that the distance here is the actual distance searched by Hybrid A*, not the straight-line distance. v is the average speed of the vehicle, in kilometers per hour.
[0129] G(n)=G(parent)+ΔE+ΔT
[0130] The above formula is a method to calculate the actual value of the search algorithm. G(n) is the actual cost of node n. G(parent) is the actual cost of the parent node of node n. ΔE is the power consumption increment from the parent node to node n, which can be calculated using the power consumption formula. ΔT is the time increment from the parent node to node n, which can be calculated based on the actual driving distance and speed.
[0131] H(n)=k 4 ·EuclideanDistance(n,goal)
[0132] The above is the calculation of the heuristic value of the search algorithm. The heuristic cost is an estimate that reflects the expected power consumption from the current node to the target node. H(n) is the heuristic cost from node n to the target node, EuclideanDistance(n, goal) is the Euclidean distance from node n to the target node, and k4 is a coefficient that is adjusted according to the average power consumption of the vehicle.
[0133] In the specific implementation of the second stage step (2d)d, if Figure 4 As shown, the following steps need to be completed:
[0134] <1>Use Python's heapq object to initialize a priority queue to manage node exploration. The priority queue is sorted according to the total cost of the node F(n) = G(n) + H(n). Start from the current vehicle position and put this point into the priority queue as the starting point. At this time, G(n) = 0 and H(n) is sorted according to k 4 .EuclideanDistance(n,P) is used to calculate.
[0135] <2> Take out the value with the smallest total cost F(n) from the priority queue object, and put the surrounding points that may be expanded and conform to the kinematic planning into the priority queue object. Whenever a new node is added, reorder the priority queue according to the new actual cost G(n) and heuristic estimate H(n).
[0136] <3>Evaluate whether there is a lower cost path to reach the node already in the queue, if so, update the path and cost of the node.
[0137] <4> Check whether the end point has been reached. If so, the search ends. Otherwise, jump to step <2> to continue searching.
[0138] Next, the estimated power consumption and time are calculated according to step (2d) and step (2e) is performed, including:
[0139] a Calculate the expected power consumption E to the current target point based on the optimal path selected in step (2d) expect and expected time T expect , and set the power consumption threshold E of the current remaining path threshold =α e *E expect , set the threshold T of the current remaining path time threshold =α t *T expect
[0140] b. The real-time estimated power consumption and time searched by the Hybrid A* algorithm in step (2e) is recorded as E realtimeand T realtime
[0141] If E realtime >E threshold or T realtime >T threshold Then return to step (1a) to update the parameters and restructure the problem.
[0142] d. Check whether the demand point information has changed. If so, return to step (1a) to update the parameters and rebuild the problem. In the specific implementation process, the observer mode is used for design, and there will be a separate microservice process to monitor whether the demand point information has changed significantly. If so, the interceptor set here will take effect.
[0143] The e program pauses for one minute. In the specific implementation process, the sleep function of Python is used.
[0144] f Check whether all demand points are met. If not, return to step (2d) to perform real-time path planning again. If all demand points are met, the method ends.
[0145] Although the present invention has been fully described herein through general description and specific embodiments, some technical modifications or optimizations may be made on the basis of the present invention. For professionals and technicians in this field, these adjustments are easy to understand and implement. Therefore, based on the spirit of the present invention, these appropriate technical modifications or optimizations also belong to the scope of protection that the present invention is expected to obtain.
Claims
1. A two-stage carbon-reducing and emission-reducing unmanned vehicle path planning method, characterized in that: It consists of two stages, 1 and 2, including the following steps: (1a) Obtain various vehicle parameters, demand point information, charging station information and historical traffic information in the scene, construct an optimization problem based on the above parameters and information, use the improved nearest neighbor algorithm to construct the initial population of the genetic algorithm, and set the initial value of the number of iterations M = 1 and the maximum number of iterations N = 500. (1b) executing an evolution cycle of a genetic algorithm, wherein the genetic algorithm comprises the following specific steps: 1) Calculate the fitness of each chromosome in the current population. 2) The roulette wheel strategy is used to perform selection operations according to individual fitness and select chromosomes for reproduction. 3) Dynamically determine and apply adaptive crossover and mutation probabilities, perform crossover and mutation operations on selected chromosomes, generate offspring with new genetic information, and form a new population. (1c) Determine whether the current number of iterations has reached the preset maximum number of iterations. If it has not reached the maximum number of iterations, the number of iterations M = M + 1, and return to step (1b) to continue execution. If it has reached the maximum number of iterations, proceed to step (2d). (2d) The method enters the second stage. According to the maximum number of iterations in step (1c), the individual with the highest fitness and historical path information are selected. Based on the current planning target point, the Hybrid A* algorithm is used to search from the current vehicle position to the target point to generate a feasible and specific path. (2e) If the time or power consumption of the vehicle exceeds the set threshold, re-enter step (1a) to update the parameters. If the demand point information changes, re-enter step (1a) to update the parameters. If it does not exceed the set threshold and the total task is not completed, wait for one minute and re-enter step (2d) to search. If the total task is completed, the algorithm ends.
2. A two-stage carbon-reducing and emission-reducing unmanned vehicle path planning method according to claim 1, characterized in that: The step (1a) of obtaining scene parameters and information to construct an optimization problem includes the following steps: a Get the initial vehicle preparation cost C f =c f ∑ k∈K y k Calculate the vehicle fixed cost, c f represents the fixed cost of using a single unmanned vehicle, y k Indicates whether the kth vehicle is used. b Obtain vehicle charging cost C r =c r ∑ k∈K ∑ i∈F B ik θ ik , c r represents the electricity price, B ik ,θ ik They respectively represent how much power the k-th unmanned vehicle charges at the i-th charging station and whether it charges at the i-th charging station. c Obtain environmental cost C e =c c ∑ k∈K ∑ i∈F μηB ik θ ik +c fg (∈-γ)∑ k∈K ∑ i∈F B ik θ ik , including carbon emission costs and penalty costs for green electricity trading c c is the carbon price, i.e. the cost per unit of carbon dioxide emissions. μ is the proportion of electricity generated by thermal power plants, indicating how much electricity in the grid is generated by thermal power plants. η is the carbon dioxide emission coefficient of thermal power plant electricity generation, i.e. the amount of carbon dioxide generated per unit of electricity. c fg is the unit penalty price that needs to be paid for failing to reach the green power quota. ∈ is the green power quota coefficient of the driverless car, which indicates how much of the power required by the driverless car should come from renewable energy. d Initialize the genetic algorithm population through the nearest neighbor algorithm, and determine the population size based on the constructed optimization problem. The default setting is 1000. eSimulates sending an unmanned vehicle from all available unmanned vehicles and randomly visiting a demand point. f Select the demand point that is closest to the previous demand point node and has not been visited, and insert it into the current vehicle path. g Repeat step f until the maximum capacity limit of the current unmanned vehicle is reached, and save the current path. If there is a demand point that has not been visited, return to step e to send a new unmanned vehicle, otherwise the population is initialized and step (1a) ends.
3. A two-stage carbon-reducing and emission-reducing unmanned vehicle path planning method according to claim 1, characterized in that: The execution of the genetic algorithm evolution cycle in step (1b) comprises the following steps: a Calculate individual fitness through formula (1) p i represents the demand of node i. ijk If the driverless car k moves from node i to node j, then x ijk is 1, otherwise x ijk is 0. k .end: indicates the time when the unmanned vehicle k returns to the distribution center, t max Indicates the maximum working time of the driverless car in a day. b According to the fitness of each individual, a roulette wheel is constructed, that is, a piecewise function, and the size of the area occupied by each individual on the roulette wheel is proportional to its individual fitness. c generates a random number r in the interval [0,1], determines which area of the roulette wheel r falls into, and selects the corresponding individual for reproduction. This step is repeated until a sufficient number of individuals are selected for the next generation of population reproduction. By default, the number of individuals selected for the next generation is half of the population. d Calculate the probability of hybridization and mutation of each individual selected by c through formula (2) Where P c is the hybridization probability, P m is the probability of mutation, f max is the maximum fitness in the population, f avg is the average fitness in the population, f c is the larger fitness of the two crossover individuals, f c is the fitness of the mutant chromosome. eFor each individual selected by c, generate a random number r in the interval [0,1]. If r is less than the P of this individual, c , a mutation operation is performed to randomly select the value of a certain point of this individual, randomly change the value of this point to a legal value, and add the new individual to the population. f For each individual selected by c, generate a random number r in the interval [0,1]. If r is less than the P of this individual m , a hybridization operation is performed, another individual in the population is randomly selected, a part of the fragment of this individual is spliced into the current hybrid individual, repeated numbers are removed, and the new individual is added to the population.
4. A two-stage carbon-reducing and low-emission unmanned vehicle path planning method according to claim 1, characterized in that: The step (2d) of selecting a target point and performing a Hybrid A* search includes the following steps: a Select the individual with the largest individual fitness in the population after step (1c) as the actual route of the vehicle. b. Based on the optimal path obtained in step a, select the first unreached target point in the optimal path as the search end point of Hybrid A*. cThe current vehicle position is used as the search starting point of Hybrid A*. d. Calculate the cost of each feasible point around the vehicle. Each time, the point with the smallest cost is selected for expansion. The cost G(n) is calculated using formula (3). Step d is executed repeatedly until the end point is reached, and the Hybrid A* search ends. G(n)=G(parent)+ΔE+ΔT (3) Where ΔE is the increased power consumption due to node expansion, and ΔT is the increased travel time due to node expansion. e obtains the final path, which can navigate directly from the current vehicle position to the target point, and can calculate the real-time estimated power consumption and time.
5. A two-stage carbon-reducing and emission-reducing unmanned vehicle path planning method according to claim 1, characterized in that: The step (2e) of selecting a target point and performing a Hybrid A* search includes the following steps: a Calculate the expected power consumption E to the current target point based on the optimal path selected in step (2d) expect and expected time T expect , and set the power consumption threshold E of the current remaining path threshold =α e *E expect , set the threshold T of the current remaining path time threshold =α t *T expect . b. The real-time estimated power consumption and time searched by the Hybrid A* algorithm in step (2e) is recorded as E realtime and T realtime . If E realtime >E threshold or T realtime >T threshold Then return to step (1a) to update the parameters and restructure the problem. d. Check whether the demand point information has changed. If so, return to step (1a) to update the parameters and rebuild the problem. eThe program pauses for one minute. f Check whether all demand points are met. If not, return to step (2d) to perform real-time path planning again. If all demand points are met, the method ends.
