An Electric Vehicle Route Planning Method Supporting Different Charging Strategies
By introducing ant colony algorithm and variable neighborhood descent algorithm in electric vehicle path planning, combined with charging strategy optimization, the existing algorithm solves the problem of slow solving speed and easy to fall into local optimality when solving the path problem of electric vehicles with time windows, and realizes more efficient path planning.
Patent Information
- Application Number
- CN202311581067.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2043-11-24
AI Technical Summary
The existing algorithms solve the problem of electric vehicles with time windows slowly and easily fall into local optimality.
A method of electric vehicle path planning that supports different charging strategies is proposed, combining ant colony algorithm and variable neighborhood descent algorithm, constructing the initial solution through scanning algorithm, using pheromone matrix and heuristic information matrix for optimization, and applying charging adjustment strategies and partial charging strategies to improve algorithm efficiency.
It effectively improves the convergence speed and optimization ability of the algorithm, avoids the risk of falling into local optimality, is highly adaptable, and can better solve the path problem of electric vehicles with time windows.
Smart Images

Figure CN117824684B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle path planning, and particularly to an electric vehicle path planning method supporting different charging strategies. Background Art
[0002] At present, transportation is one of the three major carbon emission industries globally and is also a key target for carbon emission reduction. Using electric vehicles is an important way to reduce carbon emissions in the transportation field. Electric vehicles have advantages such as environmental protection, low cost, and low energy consumption. In the fields of public transportation and logistics, electric trucks are gradually becoming the first choice for logistics transportation. The electric vehicle path problem has attracted more and more researchers' attention. It is generally believed that reasonably planning the routes of electric vehicles can not only reduce carbon emissions but also improve vehicle utilization and reduce operating costs.
[0003] At present, the electric vehicle routing problem (EVRP) is an important variant of the vehicle routing problem (VRP). More and more researchers are focusing on this field. Since the customer's required delivery time is always within a certain range, studying the electric vehicle routing problem with time windows (EVRPTW) is more in line with the actual requirements. The solution algorithms for EVRPTW mainly include exact algorithms and heuristic algorithms, and high-quality problem-solving algorithms have not been fully explored. A series of relatively mature meta-heuristic algorithms have been well applied in the VRP field, but due to the differences in the problem characteristics and constraint conditions of EVRPTW, these algorithms cannot be directly used to solve EVRPTW. Moreover, EVRPTW is closely related to practical applications. The characteristics of large problem scale, many constraints, and real-time solution requirements in the practical application field make it difficult for traditional solution algorithms to achieve online real-time solution. Therefore, it is particularly important to expand the problem attributes of EVRPTW, construct a problem model, and design an efficient and real-time algorithm for solving EVRPTW.
[0004] The ant colony optimization algorithm belongs to the swarm intelligence algorithm and has various variants, and its inspiration comes from the foraging behavior of ants. The max-min ant system only uses the optimal ants to update pheromones and the value of pheromones has a boundary. It is one of the most successful variants among all ant colony algorithms. The max-min ant system has the advantages of simple implementation, good robustness, good optimization effect, and easy combination with other algorithms, and has many successful applications in VRP and EVRP problems. Since the max-min ant system initially performs blind search, the algorithm convergence speed is slow and if the sub-optimal solution is found at the beginning, the algorithm is likely to fall into a local optimum. Summary of the Invention
[0005] Aiming at the problems of slow solution speed and easy falling into local optimum of the existing algorithms when solving the electric vehicle routing problem with time windows, the present invention proposes an electric vehicle path planning method supporting different charging strategies.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] An electric vehicle path planning method supporting different charging strategies, comprising:
[0008] Step 1: Construct an initial solution S for the electric vehicle path problem by using a scanning algorithm 0 , where the initial solution S 0 consists of multiple paths, and each path represents the delivery sequence of an electric vehicle;
[0009] Step 2: Calculate the cost C of the initial solution S 0 using the objective function, initialize the pheromone matrix and the maximum and minimum values of the pheromone with C 0 , initialize the heuristic information matrix with the distance between two points, set the population size M and the maximum number of iterations I, and the global optimal solution 0
[0010] Step 3: Construct M artificial ants using the state probability transition rule of the ant colony algorithm, each ant represents a solution, and find the ant S with the minimum cost among the current ants ib ;
[0011] Step 4: Determine whether the iterative optimal ant meets the requirements of the threshold algorithm. If so, execute Step 5; if not, execute Step 6;
[0012] Step 5: Optimize and update the iterative optimal ant by applying the variable neighborhood descent algorithm;
[0013] Step 6: Adjust the position of the charging station by applying the charging adjustment strategy;
[0014] Step 7: Update the global optimal solution;
[0015] Step 8: Update the pheromone matrix;
[0016] Step 9: Determine whether it converges or reaches the set maximum number of iterations. If so, output the global optimal solution at this time; if not, return to Step 3 to continue the next search process.
[0017] Furthermore, the said Step 1 includes:
[0018] Sort all customer nodes in the given area by using the scanning algorithm, and divide the obtained order sequence into several paths. Each path does not violate the load constraint and the power constraint, but may violate the time window constraint.
[0019] Furthermore, the objective function for calculating the cost is expressed as:
[0020] F = c 1 F 1 + c2 F 2 +c 3 R3 + c 4 F 4
[0021] Among them, F represents the total cost of the corresponding solution, including: the fixed cost F of the vehicle 1 , the total driving distance cost F 2 , the energy cost R 3 and the time window penalty cost F 4 ; c 1 , c 2 , c 3 , c 4 are successively the preset weight values of F 1 , F 2 , F 3 , F 4 , and all are 1.
[0022] Furthermore, the vehicle fixed cost is a function of the number of vehicles used. Considering factors such as driver salary, vehicle acquisition cost, and vehicle insurance cost comprehensively, it is expressed as:
[0023] F 1 = x 0i
[0024] Among them, x 0i is a binary decision variable. x 0i = 1 indicates that a vehicle departs from the warehouse to node i, and x 0i = 0 indicates that no vehicle departs from the warehouse to node i. F 1 calculates the total number of vehicles put into use.
[0025] Furthermore, the driving distance cost depends on the total driving distance of all electric vehicles and is expressed as:
[0026]
[0027] Among them, d ij represents the distance between node i and node j, and F 2 calculates the total driving distance of all vehicles.
[0028] Furthermore, the energy cost is a function of the power consumption and is expressed as:
[0029]
[0030] Among them, h i represents the power consumption rate of the vehicle from node i to node j, which varies with the load of the vehicle and is expressed as:
[0031]
[0032] Among them, r is a preset constant, representing the power consumption rate of the vehicle on each arc when the vehicle is empty; u i represents the vehicle load when the current vehicle travels from node i to node j, and C is the maximum load capacity of the vehicle; F 3 calculates the power consumed during the travel of all vehicles.
[0033] Furthermore, the time window penalty is used to expand the search scope of the solution, which is expressed as:
[0034]
[0035] Among them, e i and l i respectively represent the earliest arrival time and the latest arrival time required by node i, and t i is the actual arrival time of the vehicle at node i. max(e i -t i , 0) calculates the waiting time for the vehicle to arrive early, and max(t i -l i , 0) calculates the late arrival time for the vehicle to arrive late.
[0036] Furthermore, in step 3, in order to improve the population diversity and search efficiency, a pseudo-random transfer rule is introduced; the pseudo-random transfer means that when an ant selects the next node, there is a certain probability to directly select the node with the largest transfer profile, and there is also a probability to select the node through the roulette selection method, which is expressed as:
[0037]
[0038] Among them, τ ij represents the pheromone concentration on arc (i, j), and τ ij represents the value of the heuristic information corresponding to arc (i, j). α and β are respectively the importance factor of the pheromone concentration and the heuristic information; q is a random variable uniformly distributed in the range [0, 1], and q 0 is the preset threshold of q; argmax(f) is a function used to find the node j that can generate the maximum value of f; Z is the random selection method based on roulette, and the probability calculation formula for each point is as follows:
[0039]
[0040] Among them, P ij represents the probability that the ant selects the candidate node j at node i, and C represents the customer nodes that have not been visited by the ant yet.
[0041] Further, before adding j to the path, evaluate the current battery level. If it is not possible to reach the customer node or there is no way to reach any charging station after reaching the customer node, first add the charging station and then add the customer node.
[0042] Further, step 4 specifically includes:
[0043] Calculate the difference between the iterative optimal ant and the global optimal ant according to the following formula:
[0044]
[0045] where F is the objective function, S ib represents the iterative optimal solution, and S gb represents the global optimal solution;
[0046] And determine whether the difference is less than a given threshold. If so, execute step 5; if not, execute step 6.
[0047] Further, step 5 includes:
[0048] Step 5.1: Define the neighborhood structure and initialize the parameters; the neighborhood structure includes 2-opt, two-point exchange, and single-point movement; among them, 2-opt flips the node sequence between two nodes, two-point exchange swaps the positions of the two selected nodes, and single-point movement moves the selected node to other positions;
[0049] Step 5.2: Search in the solution space using the current neighborhood structure;
[0050] Step 5.3: Determine whether to accept the neighborhood solution and change the used neighborhood structure;
[0051] Step 5.4: Determine whether all neighborhoods have been used and there is no improvement. If so, execute step 5.5; if not, return to step 5.2 to continue the next search process;
[0052] Step 5.5: Determine whether the current solution violates the battery constraint. If so, execute step 5.6; if not, execute step 5.7;
[0053] Step 5.6: Insert a charging station into the path that violates the battery constraint in the current solution, including: finding the position where the battery level cannot reach the next node, inserting a charging station at this position, and the inserted charging station satisfies two conditions: the remaining battery level of the vehicle can reach the charging station, and the vehicle can go to the next point and the next point can go to the nearest charging station or return to the distribution center after charging at the charging station; if there is no charging station that meets the conditions, move forward one position and repeat the above insertion process. If all positions cannot be inserted, split the path from the position where the battery level cannot reach the next node into two sub-paths and repeat the above process until all paths meet the battery constraint;
[0054] Step 5.7: Output the current solution.
[0055] Furthermore, different charging strategies include full charging strategy and partial charging strategy. The full charging strategy is used by default for planning. The full charging strategy means that when the electric vehicle arrives at the charging station, it always leaves after being fully charged. The partial charging strategy means that the electric vehicle charges as needed at the charging station. Among them, the required power in the partial charging strategy refers to the minimum power required to reach the next charging station or return to the distribution center. The application steps of the partial charging strategy are as follows: When the charging station is first added to the path, it is charged according to the full charging strategy. When a new charging station is added to the path, the charging amount of the previous charging station is adjusted, and the charging time and the arrival time of the subsequent nodes are updated accordingly.
[0056] Furthermore, in step 6, the charging station adjustment strategy is to try to find a better charging scheme by inserting or deleting charging stations in the path. For example, the route R is recorded as {0, a, 1, b, c, s2, d, 0}, where a, b, c are customers, and s1, s2 are charging stations, and PL is {7, 5, 2, 0}. The moving range of each station is calculated from PL. For example, when the station s2 is shifted, its moving range on the route is between 7 and 2. Secondly, calculate the moving cost of each charging station. The movement of the charging station is divided into two steps. The first step is to remove the charging station from the current route, and the second step is to insert a new charging station into the route without violating the power constraint. Therefore, the increased cost of each movement is the difference between CRn and CRo, where CRn is the cost of the new route after movement and CRo is the cost of the original route. Finally, select the charging station with the smallest cost increase for movement. According to the above rules, one or more charging stations can be moved to reduce the objective value of the solution.
[0057] Furthermore, when updating the pheromone, both the global optimal solution and the iterative optimal solution are used for updating. The frequency of using the global optimal solution for updating is variable and decreases with the increase of the number of iterations.
[0058] Compared with the prior art, the beneficial effects of the present invention are:
[0059] An electric vehicle path planning method supporting different charging strategies provided by the present invention combines the characteristics of electric vehicles and designs a method for ants to construct solutions and a partial charging strategy, so that the max-min ant system algorithm is more suitable for solving the electric vehicle path problem with time windows. And, the pheromone matrix is updated by selecting the iterative optimal solution or the global optimal solution according to the current number of iterations, which can avoid the algorithm falling into local optimality. At the same time, the variable neighborhood descent algorithm is applied to perform local search on the iterative optimal solution, thereby improving the convergence speed and optimization ability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1Schematic flowchart of a method for path planning of an electric vehicle supporting different charging strategies provided by an embodiment of the present invention;
[0061] Figure 2 Schematic flowchart of the variable neighborhood descent algorithm provided by an embodiment of the present invention. Detailed implementation manners
[0062] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0063] As shown in Figure 1 a method for path planning of an electric vehicle supporting different charging strategies includes:
[0064] S101: Sort all customer nodes in a given area based on a scanning algorithm, and divide the obtained order sequence into several paths. Each path must not violate the load constraint and the power constraint, but may violate the time window constraint.
[0065] Specifically, convert the given two-dimensional node coordinates (x, y) into polar coordinates with the distribution center as the origin, and sort them counterclockwise according to the angle size. Divide the sorted customer list according to the load constraint and the power constraint to form a path starting from the distribution center and ending at the distribution center. If the current customer node does not violate the power constraint, preferentially insert a charging station. If there is no insertable charging station node, then divide the customer node into a new path. If the previous customer node violates the load constraint, directly divide the customer node into a new path. The time window constraint is not considered throughout the process.
[0066] S102: Consider the comprehensive operating cost as the objective function, and initialize the corresponding parameters and set variables of the algorithm.
[0067] Specifically, comprehensively consider the fixed cost of the vehicle, the total driving distance cost, the energy cost, and the time window penalty cost, and construct a cost function for the vehicle path, expressed as:
[0068] F = c 1 F 1 + c 2 F 2 + c 3 F 3 + c 4 F 4
[0069] where F represents the total cost of the corresponding solution, including: the fixed cost F 1 , the total driving distance cost F 2 , the energy cost F 3 and the time window penalty cost F 4 . c 1 , c 2, c 3 , c 4 F 1 , F 2 , F 3 , F 4 The preset weight values of the vehicle are all 1. The fixed cost F of the vehicle 1 , total driving distance cost F 2 , energy cost F 3 and time window penalty cost F 4 The calculation formula is expressed as:
[0070] F 1 =x 0i
[0071]
[0072]
[0073]
[0074] Among them, x 0i is a binary decision variable, x 0i =1 means there is a vehicle departing from the warehouse to node i, x 0i =0 means no vehicle leaves the warehouse to go to node i, F 1 Count all vehicles in use. ij represents the distance between node i and node j, F 2 Calculate the total distance traveled by all vehicles. i represents the power consumption rate of the vehicle from node i to node j, which changes with the vehicle's load. 3 The electricity consumed by all vehicles in motion is calculated. i and l i They represent the earliest arrival time and the latest arrival time required by node i, respectively, i is the time when the vehicle actually arrives at node i, max(e i -t i , 0) calculate the waiting time of the vehicle arriving early, max(t i -l i , 0) Calculate the late arrival time of the vehicle.
[0075] Specifically, the pheromone matrix and the maximum and minimum values of pheromones are initialized based on the target value of the initial solution, and the heuristic information matrix is initialized using the distance between two points. The pheromone importance factors α and β are set to 1 and 2 respectively. The size of the ant colony M is set to 25, the maximum number of iterations I is set to 500, and the global optimal solution is
[0076] S103: Construct all the ants in the contemporary ant colony according to the pseudo-random state transition rule, and find the ant with the minimum corresponding target value in the ant colony as the iterative optimal ant. The pseudo-random transition means that when an ant selects the next node, there is a certain probability to directly select the node with the largest transition profile, and there is also a probability to select the node through the roulette selection method, which is expressed as:
[0077]
[0078] where τ ij represents the pheromone concentration on arc (i, j), τ ij represents the value of the heuristic information corresponding to arc (i, j), and α and β are the importance factor of the pheromone concentration and the heuristic information respectively. q is a random variable uniformly distributed in the range [0, 1], and q 0 is the preset threshold of q. argmax(f) is a function used to find the node j that can generate the maximum value of f. Z is the random selection method based on roulette, and the probability calculation formula for each point is expressed as follows:
[0079]
[0080] where P ij represents the probability that the ant selects the candidate node j at node i, and C represents the customer nodes that have not been visited by the ant. Before adding the candidate customer node j to the path, evaluate the current power. If it is not possible to go to the customer node or it is not possible to go to any charging station after going to the customer node, then add the charging station first and then add the customer node.
[0081] Specifically, if it is not possible to directly reach the candidate customer point or the power is not enough to return to the distribution center or reach any charging station after reaching the candidate customer point, it is considered that charging is required first before visiting. The charging station is selected to insert the node that satisfies the power constraint and has the least increase in cost after insertion. After inserting the charging, reselect the candidate node.
[0082] S104: Judge whether the iterative optimal solution can enter the local search stage.
[0083] Specifically, calculate the difference between the iterative optimal ant and the global optimal ant. If the difference is less than the given threshold, use the variable neighborhood descent algorithm for the next optimization. The above difference calculation formula is expressed as follows:
[0084]
[0085] where F is the objective function, S ib represents the iterative optimal solution, and S gb represents the global optimal solution. The given threshold decreases linearly with the number of iterations, that is, the more the number of iterations, the smaller the possibility of entering the local search stage.
[0086] S105: Perform local search on the iterative optimal solution based on the variable neighborhood descent algorithm.
[0087] Specifically, within the framework of the variable neighborhood descent algorithm, by continuously executing different neighborhood structures, a neighborhood solution with a smaller cost is searched for. Among them, the neighborhood structures include: 2-opt, swap (two-point exchange), and relocate (single-point movement). 2-opt flips the node order on the same path, swap exchanges the positions of two nodes, and relocate moves a point to another position.
[0088] S106: Adjust the positions of the charging stations in the path;
[0089] Specifically, in the embodiments of the present invention, an attempt is made to remove the current charging station and insert a new charging station at another position. For example, the R route is denoted as {0, a, 1, b, c, s2, d, 0}, where a, b, and c are customers, s1 and s2 are charging stations, and PL is {7, 5, 2, 0}. The moving range of each station is calculated from PL. For example, for the shift of station s2, its moving range on the route is between 7 and 2. Secondly, the moving cost of each charging station is calculated. The movement of the charging station is divided into two steps. The first step is to remove the charging station from the current route, and the second step is to insert a new charging station into the route without violating the power constraint. Therefore, the increased cost of each movement is the difference between CRn and CRo, where CRn is the cost of the new route after movement and CRo is the cost of the original route. Finally, the charging station with the smallest cost increase is selected for movement. According to the above rules, one or more charging stations can be moved to reduce the objective value of the solution.
[0090] S107: Update the global optimal solution;
[0091] Specifically, update the global optimal solution S of the ant colony gb ;
[0092] S108: Update the pheromone concentration and the maximum and minimum pheromone values;
[0093] Specifically, based on the current iteration number, select the iterative optimal solution or the global optimal solution to update the pheromone concentration at each position in the pheromone matrix; based on the objective value of the global optimal solution S gb update the maximum and minimum pheromone concentrations;
[0094] S109: Determine whether convergence has occurred or the set maximum number of iterations has been reached. If so, output the global optimal solution at this time; if not, return to S103 to continue the next search process.
[0095] Furthermore, different charging strategies include a full-charging strategy and a partial-charging strategy. The full-charging strategy is used by default for planning. The full-charging strategy means that the electric vehicle always leaves the charging station after being fully charged. The partial-charging strategy means that the electric vehicle charges as needed at the charging station. Among them, the required power in the partial-charging strategy refers to the minimum power required to reach the next charging station or return to the distribution center. The application steps of the partial-charging strategy are as follows: When the charging station is first added to the path, it is charged according to the full-charging strategy. When a new charging station is added to the path, the charging amount of the previous charging station is adjusted, and the charging time and the arrival time of the subsequent nodes are updated accordingly.
[0096] As an implementable method, the max-min ant algorithm is used for path planning. In order to accelerate the convergence of the algorithm and improve the optimization ability of the algorithm, a variable neighborhood descent method is introduced into the max-min ant algorithm. As Figure 2 shown, the specific steps are as follows:
[0097] S201: Neighborhood structure definition and parameter initialization;
[0098] Specifically, 2-opt, swap, and relocate are used, all following the principle of accepting the first optimization. Among them, 2-opt flips the node order on the same path, swap exchanges the positions of two points, and relocate moves a point to another position.
[0099] S202: Search in the solution space using the current neighborhood structure;
[0100] Specifically, the structure of the current solution is changed through the neighborhood structure, and the obtained neighborhood solution is evaluated. If it is smaller than the objective value of the current solution, the search ends.
[0101] S203: Determine whether to accept the neighborhood solution and change the used neighborhood structure;
[0102] Specifically, it is determined whether the objective value of the obtained neighborhood solution is less than the objective value of the current solution. If so, the current optimal solution is updated and the first neighborhood structure is returned to; if not, the next neighborhood structure is entered.
[0103] S204: Determine whether all neighborhoods have been used and there is no improvement. If so, execute S205; if not, return to S202 to continue the next search process.
[0104] S205: Determine whether the current solution violates the power constraint. If so, execute S206; if not, execute S207.
[0105] S206: Insert charging stations into the paths that violate the power constraint in the current solution. The specific process is as follows: Find the location where the power cannot reach the next node, and try to insert a charging station at this location. The inserted charging station needs to meet two conditions: the remaining power of the vehicle can reach the charging station, and the vehicle can go to the next point after charging at the charging station and the next point can go to the nearest charging station or return to the distribution center. If there is no charging station that meets the conditions, move forward one position and repeat the above insertion process. If the charging station cannot be inserted at all positions, split the path from the position where the power is not feasible into two sub-paths. Repeat the above process until all paths meet the power constraint.
[0106] S207: Output the current solution.
[0107] In summary, the electric vehicle path planning method provided by the present invention can effectively accelerate the algorithm convergence and improve the optimization ability of the algorithm. Among them, the introduction of some charging strategies is more in line with the actual needs, reduces the impact of charging time on the time window, and can ensure the normal progress of the distribution work and the cost control of the logistics company.
[0108] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An electric vehicle path planning method supporting different charging strategies, characterized in that, it includes: Step 1: Construct an initial solution S for the electric vehicle routing problem using a scanning algorithm 0 , where the initial solution S 0 consists of multiple paths, and each path represents the delivery sequence of an electric vehicle; Step 2: Calculate the initial solution S according to the objective function 0 The cost C 0 , and use C 0 to initialize the pheromone matrix and the maximum and minimum values of pheromone. Initialize the heuristic information matrix using the distance between two points, set the population size M and the maximum number of iterations I, and the global optimal solution The objective function is expressed as: F = c 1 F 1 + c 2 F 2 + c 3 F 3 + c 4 F 4 F 1 = x 0i Among them, F represents the total cost of the corresponding solution, and F 1 represents the fixed cost of the vehicle, and F 2 represents the total driving distance cost, and F 3 represents the energy cost, and F 4 represents the time window penalty cost; c 1 , c 2 , c 3 , c 4 are the preset weight values of F 1 , F 2 , F 3 , F 4 in sequence; x 0i is a binary decision variable, and x 0i = 1 indicates that a vehicle departs from the warehouse to node i, and x 0i = 0 indicates that no vehicle departs from the warehouse to node i; d ij represents the distance between node i and node j; N represents all nodes; h i represents the power consumption rate of the vehicle from node i to node j; r is a preset constant representing the power consumption rate of the vehicle when it is empty on each arc; u i represents the vehicle load when the current vehicle travels from node i to node j; C is the maximum load capacity of the vehicle; e i and l i represent the earliest arrival time and the latest arrival time required by node i respectively; t i is the actual arrival time of the vehicle at node i; max(e i - t i , 0) represents the waiting time for the vehicle to arrive early; max(t i - l i , 0) represents the late arrival time for the vehicle to arrive late; Step 3: Construct M artificial ants using the state probability transition rule of the ant colony algorithm. Each ant represents a solution, and find the ant S with the minimum cost among the current ants ib ; Step 4: Determine whether the iterative optimal ant meets the requirements of the threshold algorithm. If so, execute Step 5; if not, execute Step 6; Step 5: Apply the variable neighborhood descent algorithm to optimize and update the iterative optimal ant; The said Step 5 includes: Step 5.1: Neighborhood structure definition and parameter initialization; the neighborhood structure includes 2-opt, two-point exchange, and single-point movement; among them, 2-opt flips the node sequence between two nodes, two-point exchange swaps the positions of the selected two nodes, and single-point movement moves the selected node to other positions; Step 5.2: Search in the solution space using the current neighborhood structure; Step 5.3: Determine whether to accept the neighborhood solution and change the used neighborhood structure; Step 5.4: Determine whether all neighborhoods have been used and there is no improvement. If so, execute Step 5.5; if not, return to Step 5.2 to continue the next search process; Step 5.5: Determine whether the current solution violates the power constraint. If so, execute Step 5.6; if not, execute Step 5.7; Step 5.6: Insert a charging station into the path that violates the power constraint in the current solution, including: finding the position where the remaining power of the vehicle cannot reach the next node, inserting a charging station at this position, and the inserted charging station meets two conditions: the remaining power of the vehicle can reach the charging station, and the vehicle can go to the next point and the next point can go to the nearest charging station or return to the distribution center after charging at the charging station; if there is no charging station that meets the conditions, move forward one position and repeat the above insertion process. If all positions cannot be inserted, split the path from the position where the power cannot reach the next node into two sub-paths, and repeat the above process until all paths meet the power constraint; Step 5.7: Output the current solution; Step 6: Apply the charging adjustment strategy to adjust the position of the charging station; the charging adjustment strategy includes: calculating the moving cost of each charging station, selecting the charging station with the smallest cost increase for movement, and the movement of the charging station is divided into two steps. The first step is to remove the charging station from the current route, and the second step is to insert a new charging station into the route without violating the power constraint; Step 7: Update the global optimal solution; Step 8: Update the pheromone matrix; Step 9: Determine whether it converges or reaches the set maximum number of iterations. If so, output the global optimal solution at this time; if not, return to Step 3 to continue the next search process; The said different charging strategies include full charging strategy and partial charging strategy; the full charging strategy means that the electric vehicle is fully charged before leaving after arriving at the charging station; the partial charging strategy means that the electric vehicle charges as needed at the charging station, and the required power in the partial charging strategy refers to the minimum power required to reach the next charging station or return to the distribution center.
2. An electric vehicle path planning method supporting different charging strategies according to claim 1, characterized in that, the said Step 1 includes: Sort all customer nodes in the given area through the scanning algorithm, and divide the obtained order sequence into several paths, and each path does not violate the load constraint and the power constraint.
3. A path planning method for electric vehicles supporting different charging strategies according to claim 1, characterized in that, in step 3, artificial ants are constructed in the following manner: where τ ij represents the pheromone concentration on arc(i,j), η ij represents the value of the heuristic information corresponding to arc(i,j), and α and β are the importance factor of the pheromone concentration and the heuristic information respectively; q is a random variable uniformly distributed in the range of [0,1], q 0 is the preset threshold of q; argmax(f) is a function used to find the node j that can produce the maximum value of f; Z is a roulette-based random selection method, and the probability calculation formula for each node is as follows: Among them, P ij represents the probability that the ant selects candidate node j at node i, and C represents the customer nodes that have not been visited by the ant yet.
4. A path planning method for electric vehicles supporting different charging strategies according to claim 3, characterized in that, before adding j to the path, the current battery level is evaluated. If it is not possible to go to the customer node or if it is not possible to go to any charging station after going to the customer node, the charging station is added first, and then the customer node is added.
5. A path planning method for electric vehicles supporting different charging strategies according to claim 1, characterized in that, step 4 specifically includes: calculate the difference between the iterative optimal ant and the global optimal ant according to the following formula: where F is the objective function, S ib represents the iterative optimal solution, and S gb represents the global optimal solution; and determine whether the difference is less than a given threshold. If so, execute step 5; if not, execute step 6.
6. A path planning method for electric vehicles supporting different charging strategies according to claim 1, characterized in that, when updating the pheromone, both the global optimal solution and the iterative optimal solution are used for updating. The frequency of using the global optimal solution for updating is variable and decreases as the number of iterations increases.
Citation Information
Patent Citations
Method for optimizing vehicle path with road and time window based on ant colony algorithm
CN115470651A
Charging decision optimization method and device for electric vehicle, equipment and medium
CN116993031A