Electric freight vehicle charging station site selection and vehicle path optimization method

By combining bacterial foraging algorithm and K-medoids clustering algorithm, the site selection and vehicle path of electric vehicle charging stations are optimized, and the problem of low site selection efficiency in the existing methods is solved, and more efficient charging station site selection and path planning are achieved.

CN119558616AActive Publication Date: 2025-03-04HEFEI UNIV OF TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411770861.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-04
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The existing electric vehicle charging station site selection and path planning methods have problems such as randomness in the initial cluster center selection, resulting in a long solution time of algorithms, which affects site selection efficiency.

Method used

An improved quantum ant colony algorithm combining bacteria foraging algorithm and K-medoids clustering algorithm is adopted to generate an initial clustering center cluster through the bacteria foraging algorithm, and iterative updates are used to optimize the location selection of the charging station. At the same time, quantum ant colony algorithm is used to optimize vehicle paths to improve the efficiency of path planning.

Benefits of technology

It improves the efficiency of charging station site selection and path planning, reduces the algorithm solution time, obtains a more reasonable charging station site selection location and vehicle path, and reduces transportation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558616A_ABST
    Figure CN119558616A_ABST
Patent Text Reader

Abstract

The invention discloses an electric freight vehicle charging station site selection and vehicle path optimization method, and the method comprises the steps: determining a charging station site selection and path planning model and an optimization target in a charging station site selection and path planning process, and employing an improved quantum ant colony algorithm combining a bacterial foraging algorithm and a K-medios clustering algorithm; and the charging station site selection and the vehicle path are optimized. The method can provide an optimal site selection scheme and an optimized vehicle distribution path in the site selection and distribution process of the electric freight vehicle charging station in a short time, thereby reducing the site selection and vehicle distribution cost in the site selection and distribution process of the electric freight vehicle charging station, optimizing the construction position of the charging station, solving the vehicle distribution cost, and improving the efficiency of the electric freight vehicle charging station. The problems of enterprise cost waste and low economic benefit caused by improper site selection scheme and vehicle distribution path arrangement in the site selection and distribution process of the electric freight vehicle charging station can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent transportation systems, and in particular relates to a method for selecting a charging station for an electric freight vehicle and optimizing a vehicle path. Background Art

[0002] The site selection and route planning scheme for electric vehicle charging stations refers to selecting the appropriate number of charging station location coordinates and planning the electric vehicle routes on the premise of meeting customer needs in order to minimize the charging station site selection cost and vehicle transportation cost. Whether the charging station site selection and vehicle route planning are reasonable is directly related to the distribution efficiency, transportation cost and customer service level of the entire electric vehicle system, and will have an important impact on the operation of electric vehicle companies.

[0003] Existing methods, such as "Site Selection and Layout of Electric Vehicle Charging Stations Based on K-Means Algorithm", use the K-Means clustering algorithm to select the location of the charging pile cluster center. The algorithm measures the similarity between candidate customer point samples based on Euclidean distance. First, the initial cluster center is selected through clustering. After multiple iterations, a new data generated in its cluster category is relatively closer to the cluster center of the current category. The new data is re-used as the cluster center, that is, as one of the candidate points for charging station construction. After each clustering, the k-means algorithm may encounter such a situation that the generated cluster center is inconsistent with the candidate charging station coordinate data we require, which affects the efficiency and rationality of the charging station site selection. Therefore, the improvement we made is to use the k-medoids clustering algorithm. After selecting the initial cluster center, each iteration randomly selects a cluster center and a new candidate charging station, redistributes them, generates a new cluster center set, and then redistributes customers. The improvement of the K-mediods clustering algorithm optimizes the situation in which the loyalty to the original data is low when solving the site selection problem through clustering algorithm in the past. The site selection decision is made under the premise of focusing on the original provided candidate charging station coordinate points, which has a favorable impact on the site selection results.

[0004] For example, in the study of multi-level charging station site selection and service capability based on electric vehicle big data, Sun Jian et al. obtained the potential charging demand of electric vehicles based on the improved k-means clustering algorithm and conducted the initial site selection of charging stations; then, they built a multi-level charging station site selection model for electric vehicles, analyzed the charging demand, and solved and selected the charging station site based on the taboo search algorithm. The method of using the clustering algorithm to select sites and perform site selection optimization multiple times has certain applications in the site selection of electric vehicle charging stations, but since the initial cluster center of the k clustering algorithm is randomly selected, this will prolong the algorithm solution time and affect the efficiency of site selection. Summary of the invention

[0005] The purpose of the present invention is to provide a method for site selection and vehicle path optimization of an electric freight vehicle charging station in order to solve the above-mentioned problems.

[0006] The present invention achieves the above-mentioned purpose through the following technical solutions: A method for selecting a charging station for electric freight vehicles and optimizing vehicle routing comprises the following steps: S1: Establish a mathematical model for the site selection and distribution process of electric freight vehicle charging stations, and solve the mathematical model based on the minimization of two logistics costs: the construction cost of electric vehicle charging stations and the vehicle transportation cost, to obtain a set of candidate charging station site locations and minimized paths; S2: Randomly select from candidate charging station locations The charging stations generate initial cluster centers. Based on the preset conditions of the initial cluster centers and the minimum total distance from the customer point to the nearest cluster center, the first cluster center cluster is obtained through the bacterial foraging algorithm, and the first cluster center cluster is iteratively updated through the K-mediods clustering algorithm to obtain the first cluster center cluster with the minimum total distance as the best cluster center cluster. The best cluster center is used as the location of the charging station. S3: Optimizing the minimization path based on the location of the charging station and the quantum ant colony algorithm, including the following steps: S31: Initialize the pheromone matrix and related variables. The pheromone matrix is ​​used to store the pheromone concentration between each pair of nodes. Before each visit to the customer / return to the distribution center, determine whether the power is sufficient. If the power is insufficient, visit the best charging station location obtained in step S2 for charging. S32: Calculate the accessible customer set. If the accessible customer set is empty, return to the distribution center. If the accessible customer set is not empty, calculate the access probability of each customer according to the quantum computing rules. S33: Select the next visiting customer based on the visiting probability of each customer and according to the roulette rule, return to the distribution center after completing the delivery service, and obtain the pheromone matrix; S34: The pheromone matrix is ​​iteratively updated based on the continuously updated quantum revolving gate to obtain the optimal value of the minimized path.

[0007] As a further optimization scheme of the present invention, the mathematical model in step S1 is as follows: (1) In formula (1), represents the set of customer demand points, with the subscript , represents the set of all vertices, , represents the set of electric vehicles, with the subscript , Distribution Center , the subscript is , represents the candidate charging station set, with the subscript , Indicates Car from Click to point; (2) In formula (2), Indicated in The decision variable of whether to build a charging station; (3) (4) In formula (4), Indicates electric vehicle The loading capacity, Indicates electric vehicle leave The maximum amount of goods that can be left at the time of ordering. , express The demand for a point; (5) (6) (7) In formula (7), Indicates electric vehicle arrive The remaining power at the time of clicking, Indicates electric vehicle leave The remaining power at the time of clicking, Indicates the battery capacity of electric vehicles, express and The distance between two points; (8) (9) In formula (9), Indicates the consumption coefficient of battery power; (10) (11) (12) (13) (14) In formula (14), represents the cost of violating the time window, represents the opportunity cost per hour of waiting caused by the vehicle arriving at the customer's location earlier than the earliest service time, Indicates customer point Earliest service time, Indicates The vehicle arrives at the node time, represents the penalty cost per unit time caused by the vehicle arriving later than the latest service time, Indicates The car leaves the node time, Indicates customer point Latest service time; (15) (16) (17) In formula (17), Minimize represents the minimum value solution, Indicates The construction cost of each candidate charging station, Indicates Car slave node To Node unit transportation cost.

[0008] As a further optimization scheme of the present invention, in step S2, the process of obtaining the minimum value of the total distance from the client to the nearest cluster center based on the bacterial foraging algorithm specifically includes the following steps: S201: Generate initial cluster center cluster: randomly select from several candidate charging station locations Initial charging stations are used as the initial cluster center clusters; S202: Initializing the bacterial population: calculating the distance from the customer point to all initial cluster centers, traversing the customer point set, and assigning the current customer point to the initial cluster center according to the principle of the shortest distance to form an initial charging station cluster; S203: Bacterial chemotaxis cycle: Each initial cluster center performs Nc chemotaxis cycles, and each cycle includes two steps: flipping and swimming. The flipping operation is to make the current cluster center generate a random direction for flipping on each of its feature vectors. This process generates a random vector through formula (18), which represents the direction of the bacteria after flipping; (18) in, represents the number of cluster centers, refers to the rounding function, The function is used to generate a random number matrix. Represents the dimension, normalized by formula (19), and calculates a random direction selected after flipping ,in, is the transpose symbol; (19) S204: Bacterial swimming: Determine the direction of movement and convert random vectors Normalize it to make it a unit vector , through formula (20), the current cluster center moves one step in the flipped direction, changes the position of the bacteria, and completes a swimming, where is a constant, indicating a fixed step size for each swim; (20) S205: Bacteria sorting: After the chemotaxis operation cycle is completed, the virtual cluster center is obtained, and the fitness value is calculated. The fitness value is the total distance from all customer points to the nearest virtual cluster center, and the fitness values ​​are sorted from small to large; S206: nearest processing: by calculating the distance from the virtual cluster center to each candidate charging station, the virtual cluster center is made to correspond to the coordinates of the candidate charging station closest to it one by one; S207: Deduplication: Check whether the candidate charging stations are repeatedly allocated. If the charging stations are repeatedly allocated, a new candidate charging station is randomly selected for allocation through a mapping method. After the virtual cluster center is allocated to the candidate charging station, a first cluster center set is generated.

[0009] As a further optimization solution of the present invention, in step S2, the step of obtaining the cluster center set with the smallest total distance as the optimal cluster center set specifically includes: S208: k-medoids initialization: using the first cluster center set as the initial cluster center set of the k-medoids algorithm; S209: Customer allocation: by calculating the distance from the customer point to each first cluster center, the current customer point is allocated to the first cluster center with the smallest distance; S210: k-medoids iterative optimization: perform kIter iterations, randomly select a first cluster center and a new candidate charging station in each iteration, redistribute them, and generate a new set of cluster centers; S211: Update the first cluster center: calculate the total distance from all the first cluster centers to their assigned customer points, which is used to evaluate the clustering effect. By comparing the total distance assigned by the first cluster center and the total distance newly assigned, it is decided whether to accept the new cluster center. If the total distance newly assigned is smaller, update the first cluster center set. S212: When the preset number of iterations is reached, the set of first cluster centers with the smallest total distance is output as the optimal set of cluster centers, that is, the charging station site selection result is obtained.

[0010] As a further optimization solution of the present invention, in step S32, the step of calculating the access probability of each customer according to the quantum computing rule specifically includes: S32a: Initialize the quantum ant colony, for A colony of independent individuals ,set up For this population The iteration An independent individual, this individual is at the node The pheromone is defined as formula (21); (twenty one) In the formula, Indicated in In the iteration, The pheromone state of each node, , Represents the total number of nodes, including distribution centers, charging stations, and customer points, at the initial moment ,initialization ,in is the probability amplitude corresponding to 0, is the probability amplitude corresponding to 1, and They represent the probability of the quantum bit being in the "0" state and the "1" state respectively, and the sum of the squares of the two is 1. >0) is the quantum bit heuristic factor, which is a dynamically changing parameter that indicates the relative importance of the node quantum state probability amplitude. stands for pheromone volatile factor; S32b: Calculate the transition probability using formula (22) ; (twenty two) In formula (22), Represents edge , Represents edge The pheromone concentration on represents the heuristic information of the qubit, Represents edge The quantum bit heuristic information on represents the heuristic factor of pheromone, Heuristic factor representing heuristic information, Indicates the time when the vehicle arrives at the customer point. Indicates the maximum value of the customer time window limit. Indicates the minimum value of the customer time window limit, Represents edge The heuristic information on is calculated by formula (23); (twenty three) Obtained by formula (24); (twenty four) In formula (24), Indicates The probability that the quantum state of a qubit collapses to |0>.

[0011] As a further optimization solution of the present invention, step S34 specifically includes the following steps: S34a: Iterate 1 to aIter times. In each iteration, each ant completes the current delivery task, that is, after running a loop, calculate the fitness value. If the current iteration value is greater than the existing optimal value, update the optimal value, otherwise jump to the next step; S34b: The quantum revolving door is updated, and after the update is completed, the ant colony pheromone and ant colony information strength are updated; S34c: In each iteration, the fitness of each ant's circuit is calculated and optimized according to the fitness. If the maximum number of iterations is reached, the algorithm is exited and the optimal value is output; otherwise, , and then output the optimal value.

[0012] As a further optimization solution of the present invention, step S34b specifically includes: The quantum rotating gate is as follows: (25) When the quantum ant After each individual completes its traversal path, the quantum pheromone will be updated with the adjustment of the quantum rotating gate. The specific update is achieved through formula (26); (26) In formula (26), is a probability amplitude matrix, represents the rotation angle; The quantum rotation gate of step S34b is updated by equation (27): the mutation operator is implemented by quantum NOT gate to perform mutation processing, and a mutation probability is given in the quantum ant colony algorithm. , each ant is randomly assigned a random number between (0,1) ,if , then the current element is inverted, and its best position in memory remains unchanged. Representing quantum states and The phase angle between (27) The pheromone is updated through formula (28); (28) In formula (28), Indicates that the ants are on the edge The total amount of pheromones released, It is An ant is standing by The total amount of pheromone released, It is The total amount of pheromone in iterations; Updated by formula (29), It is The total distance traveled by the ants, is a constant, indicating the pheromone importance factor, represents the quantum probability amplitude, if the k th ant traverses d ij Indicates that it satisfies An ant passes by conditions; (29) Update the ant colony information strength through formula (30): is the initial qubit heuristic factor, is the current iteration number; (30).

[0013] The beneficial effects of the present invention are: The beneficial effects of the present invention are: (1) The present invention improves the efficiency of the algorithm by adding a heuristic algorithm to generate an initial solution for charging stations, that is, by introducing a bacterial foraging algorithm to select a certain number of initial stations from the candidate charging stations, and then substituting them into the k-medoids clustering algorithm to obtain the final location selection result of the charging station; (2) After obtaining the location selection results of the charging station, the present invention collaboratively optimizes the path planning problem. As a conventional method for solving the optimal path, the ant colony algorithm is efficient and flexible. The quantum ant colony algorithm uses the probability amplitude of quantum bits to represent the position of ants in the solution space, which enables it to explore multiple potential solutions at the same time, thereby improving the algorithm's global search capability. This parallel search mechanism helps the algorithm to jump out of the local optimal solution and is more likely to find the global optimal solution. In addition, the quantum ant colony also has an advantage in the convergence speed of the solution. Through quantum rotating gates and quantum mutation operations, it can adjust the search strategy more quickly, thereby accelerating the convergence speed of the algorithm; (3) In the process of optimizing the site selection and route planning of electric vehicle charging stations, the present invention uses the quantum ant colony algorithm to solve the route planning problem, aiming to improve the quality of the solution and obtain better results. Moreover, in the actual economic environment, reasonable charging station site selection results and vehicle route plans can improve economic benefits, reduce costs, and enhance corporate competitiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is the flow chart of site selection optimization and path optimization of the present invention. DETAILED DESCRIPTION

[0015] The present application is further described in detail below in conjunction with the accompanying drawings. It is necessary to point out here that the following specific implementation methods are only used to further illustrate the present application and cannot be understood as limiting the scope of protection of the present application. Technical personnel in this field can make some non-essential improvements and adjustments to the present application based on the above application content. Example

[0016] like Figure 1 As shown in the figure, a charging station site selection and vehicle path optimization method for the site selection and distribution process of electric freight vehicle charging stations is proposed. Firstly, a mathematical model of the construction cost of the site selection location of the electric freight vehicle charging station and the vehicle transportation and distribution cost is established, and the solution is obtained by optimizing the site selection location and minimizing the path cost; a set of candidate charging station site selection locations and minimized paths is obtained; secondly, an improved quantum ant colony algorithm combining the K-mediods clustering algorithm and the bacterial foraging algorithm is designed to reasonably optimize the charging station site selection and vehicle paths in the distribution process of electric freight vehicles.

[0017] The mathematical model of the site selection and distribution process of the electric freight vehicle charging station is as follows: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) In the formula, the meaning of each symbol is shown in Table 1. Formula (1) means that each customer is served and only served once; Formula (2) means that only when a battery swap station is established can vehicles pass through this point to receive battery swap services; Formula (3) means to ensure flow balance, that is, the number of times each vehicle enters a certain point is the same as the number of times it leaves a certain point; Formula (4) represents the relationship between the vehicle loading capacity and the demand of the demand point it passes through. If , then the vehicle leaves The maximum amount of cargo remaining at a point is at most the amount of cargo that the vehicle leaves The maximum amount of remaining goods can be reduced by point demand, otherwise the constraint is relaxed; Formula (5) represents the vehicle from The maximum loading capacity when starting from point is ; Formula (6) indicates that the maximum amount of remaining cargo for each vehicle when it leaves the demand point is greater than or equal to 0, ensuring that the total amount of cargo delivered by the vehicle does not exceed the maximum loading capacity; Formula (7) indicates the relationship between the electric vehicle's power and the driving distance. Arrived after 12:00 point, then the electric car has just arrived The remaining power at the point where the electric vehicle leaves The remaining power minus and The distance between them; Formula (8) indicates that the electric vehicle is fully charged when it leaves the distribution center; Formula (9) indicates that the electric vehicle is fully charged when it leaves the built charging station. represents the consumption coefficient of battery power; Formula (10) indicates that the power of the electric vehicle does not change when it passes through the customer point; Formula (11) indicates that the electric vehicle has sufficient power to reach any point on the route; Formula (12) indicates that the electric vehicle can only change the battery twice at the same exchange station; Formula (13) indicates that the decision variable is a variable of 0 or 1; Formula (14) represents the cost of violating the time window; Formula (15) is the cost of violating the time window; The decision variable of whether to build a charging station; Formula (16) is Is the vehicle from Click to The decision variables of the point; Formula (17) represents the minimization of the logistics cost of electric vehicle charging station construction cost, vehicle transportation cost, and time window violation cost.

[0018] Table 1 Symbol definition table ; The specific steps of the charging station location selection and vehicle path optimization method for the electric freight vehicle charging station location selection and distribution process by combining the improved quantum ant colony algorithm with the K-mediods clustering algorithm and the bacterial foraging algorithm are as follows: Charging station location optimization part combining bacterial foraging algorithm and K-mediods clustering algorithm: Step 1: Generate the initial cluster center cluster: Select from 20 candidate charging station locations Initial charging stations are used as the initial cluster center clusters. Specifically, they are randomly selected from the candidate charging stations. charging stations and obtain the initial solution of the charging stations.

[0019] Step 2, initialize the bacterial population: give the current bacteria ( Assign a set of cluster center coordinates between 1 and s to form an initial cluster center cluster and calculate the first Specifically, the distance from the customer point to all initial cluster centers is calculated first, the customer point set is traversed, and the current customer point is assigned to the initial cluster center according to the principle of the shortest distance to form an initial charging station cluster.

[0020] Step 3: Bacterial chemotaxis cycle: Each bacterium (initial cluster center) performs Nc chemotaxis cycles. Each cycle includes two steps: flipping and swimming. The flipping operation is to make the current cluster center generate a random direction for flipping on each of its feature vectors. This process generates a random vector through formula (18), which represents the direction of the bacteria after flipping. (18) in, represents the number of cluster centers, refers to the rounding function, The function is used to generate a random number matrix. Represents the dimension, normalized by formula (19), and calculates a random direction selected after flipping ,in, is the transpose symbol; (19) Step 4. Bacterial swimming: Determine the swimming direction and convert the random vector Normalize it to make it a unit vector , through formula (20), the bacteria move one step in the flipped direction, changing the position of the bacteria and completing one swimming. is a constant, indicating the fixed step size of each swim; (20) Step 5, bacterial sorting: After the chemotaxis operation cycle is completed, the virtual cluster center is obtained and the fitness value is calculated. The fitness value is the total distance from all customer points to the nearest virtual cluster center. The fitness values ​​are sorted from small to large.

[0021] Step 6, nearest processing: by calculating the distance from the virtual cluster center to each candidate charging station, the virtual cluster center is made to correspond one-to-one with the coordinates of the candidate charging station closest to it. The purpose of this step is that since the initial cluster center coordinates will be offset after the chemotaxis operation of the bacterial foraging algorithm and will no longer coincide with the initial charging station coordinates, the nearest processing step is performed to reselect the charging station according to the principle of the closest distance.

[0022] Step 7, deduplication: Check whether the candidate charging stations are repeatedly allocated. If the charging stations are repeatedly allocated, a new candidate charging station is randomly selected for allocation through the mapping method. After the virtual cluster center is allocated to the candidate charging station, the first cluster center set is generated.

[0023] Step 8, k-medoids initialization: use the first cluster center set as the initial cluster center set of the k-medoids algorithm.

[0024] Step 9, customer allocation: By calculating the distance from the customer point to each first cluster center, the current customer point is assigned to the first cluster center with the smallest distance.

[0025] Step 10, k-medoids iterative optimization: Perform kIter iterations. In each iteration, randomly select a first cluster center and a new candidate charging station, redistribute them, and generate a new set of cluster centers.

[0026] Step 11, Update the first cluster center: Calculate the total distance from all cluster centers to their assigned customer points to evaluate the clustering effect. By comparing the total distance assigned by the first cluster center and the total distance assigned newly, decide whether to accept the new cluster center position. If the total distance assigned newly is smaller, update the first cluster center set.

[0027] Step 12: When the preset number of iterations is reached, the set of the first cluster centers with the smallest total distance is output as the optimal cluster center set, that is, the charging station location selection result is obtained.

[0028] Quantum ant colony algorithm path optimization part: Step 1. Initialize the pheromone matrix and related variables. The pheromone matrix is ​​used to store the pheromone concentration between each pair of nodes. The related variables include pheromone factor, heuristic factor, pheromone volatility coefficient, ant colony size, and ant colony iteration number.

[0029] Step 2. Calculate the set of serviceable customer points: Determine the set of next customers that the current customer point can access by calculating capacity constraints and time windows.

[0030] Step 3, determine the next plan of the vehicle: if the set of serviceable customer points is empty and the vehicle has enough power, the vehicle will be returned to the distribution center; if the power is insufficient, the vehicle will go to the nearest charging station to charge and then return to the distribution center. If the set of serviceable customer points is not empty, the next service customer point is selected through the following steps: The probability of selecting client nodes is considered by the calculation of the concept of quantum ant colony. First, the meaning and basic principles of quantum ant colony algorithm are introduced. Quantum Ant Colony Algorithm (QACA) is an intelligent optimization algorithm that combines the efficient parallelism of quantum computing with the positive feedback and strong robustness of ant colony algorithm. It effectively improves the global search capability and search speed of the algorithm by introducing quantum bits, quantum logic gates and Grover quantum algorithm into ant colony algorithm.

[0031] The basic principle of the quantum ant colony algorithm is to use the characteristics of quantum computing to enhance the search ability of the ant colony algorithm. In the ant colony algorithm, ants search for the optimal solution by moving in the solution space and leaving pheromones. In the quantum ant colony algorithm, the superposition state and quantum entanglement of quantum bits allow the algorithm to explore multiple possible solutions at the same time, thereby improving the search efficiency. In addition, the quantum revolving gate in the quantum algorithm can be used to simulate the movement of ants in the solution space, and the Grover algorithm can accelerate the search process and help the algorithm converge to the optimal solution faster.

[0032] (1) Initialize the quantum ant colony, for A colony of independent individuals ,set up For this population The iteration An independent individual, this individual is at the node The pheromone is defined as formula (21); (twenty one) In the formula, , the initial moment ,initialization .

[0033] In the quantum ant colony algorithm, the initialization of pheromones usually involves the representation of quantum states. Indicated in In the iteration, The pheromone state of a node. This state consists of two parts: and , which together form a complete description of a quantum bit, where represents the total number of nodes in the problem, including distribution centers, charging stations, and customer points. At the initial moment, each node and All are set to , which means that the quantum state of each node is a superposition state with equal probability, that is, the probability of each node being selected is the same, so there are a total of In the context of the ant colony algorithm, each node can be regarded as a decision point, and the superposition state of the quantum bit can be used to represent the probability of choosing two different paths at that node. The "0" state and the "1" state here can be interpreted as two different path choices. is the probability amplitude corresponding to 0, is the probability amplitude corresponding to 1, and The probability of the quantum bit being in the "0" state and the "1" state, respectively, is 1, which represents the pheromone concentration corresponding to these two paths in the quantum ant colony algorithm, that is, In the iteration, The probability that a node chooses two different paths.

[0034] (2) Calculate the transition probability using formula (22) .

[0035] (twenty two) In formula (22), Represents edge , Represents edge The pheromone concentration on represents the heuristic information of the qubit, Represents edge The quantum bit heuristic information on represents the heuristic factor of pheromone, The heuristic factor represents the heuristic information. The larger its value, the more likely the ants are to choose a shorter path. Indicates the time when the vehicle arrives at the customer point. Indicates the maximum value of the customer time window limit. Indicates the minimum value of the customer time window limit, Represents edge The heuristic information on is calculated by formula (23): (twenty three) Calculated by formula (24). Indicates The probability that the quantum state of the qubits collapses to |0>, where In terms of The smaller the The bigger it is, >0) is the quantum bit heuristic factor, which indicates the relative importance of the node quantum state probability amplitude. The larger its value, the more the ants tend to choose nodes with more quantum information. In order to make the algorithm gradually reduce its dependence on quantum heuristic information and increase its trust in the discovered good paths as the search in the solution space deepens, Designed as dynamically changing parameters; (twenty four) (3) After calculating the access probability of each accessible customer, the next customer node to be visited is selected using a roulette wheel method, and then the battery is judged to be sufficient. If the battery is sufficient, it will go to the next customer node; if the battery is insufficient, it will return to the nearest charging station to charge before going to the next customer node. When all customer nodes have been visited, that is, the delivery task is completed, it returns to the distribution center.

[0036] Step 4, iterate 1 to aIter times. In each iteration, each ant completes the current delivery task, that is, after running a loop, calculate the fitness value. If the current iteration value is greater than the existing optimal value, update the optimal value, otherwise jump to the next step.

[0037] Step 5. The quantum revolving door is updated. After the update is completed, the ant colony pheromone and ant colony information strength are updated. The quantum revolving door is as follows: (25) The core of the quantum ant colony algorithm lies in the control mechanism of the quantum revolving door, which directly affects the update process of quantum pheromones. After each individual completes its traversal path, the quantum pheromone will be updated with the adjustment of the quantum revolving gate. The specific update is achieved through formula (26).

[0038] (26) In formula (26), is a probability amplitude matrix, represents the rotation angle. The optimization ability and convergence speed of the algorithm are affected by the rotation angle. impact.

[0039] (1) Specifically in this scheme, the quantum rotation gate is updated by equation (27): the mutation operator is implemented by using a quantum NOT gate to perform mutation processing, and a mutation probability is given in the quantum ant colony algorithm. , each ant is randomly assigned a random number between (0,1) ,if , then the current element is inverted (0 becomes 1, 1 becomes 0), and its own optimal position in memory remains unchanged. Representing quantum states and The phase angle between: (27) (2) Update of pheromone: pheromone is updated as follows: (28) In formula (28), represents the pheromone volatile factor, Indicates that the ants are on the edge The total amount of pheromones released, It is The total amount of pheromone in iterations, It is An ant is standing by The total amount of pheromone released, Updated by formula (29). is a constant, usually called the pheromone importance factor, which determines the degree of influence of pheromones on the path chosen by ants. It is The total distance traveled by the ants. The concept of quantum probability amplitude is introduced to improve the pheromone update mechanism. When ants are building paths, the quantum pheromones on the paths they pass through will gradually accumulate, forming positive feedback, while the quantum pheromones on the paths that the ants have not passed through will gradually decrease. This positive feedback mechanism will cause the difference in quantum pheromones on different paths to continue to increase, thereby increasing the risk of the algorithm falling into a local optimal solution. In order to avoid this situation, the present invention proposes a quantum pheromone update strategy that can balance the distribution of pheromones and prevent excessive accumulation of pheromones on a certain edge, thereby effectively avoiding the problem of the algorithm falling into a local optimal solution. In formula (29), if the k th ant traverses(i,j) Indicates that it satisfies An ant passes by conditions.

[0040] (29) (3) The information strength of the ant colony is updated by formula (30), is the initial qubit heuristic factor, is the current iteration number; (30).

[0041] Step 6, fitness calculation process, in each iteration, the fitness of each ant's circuit is calculated, and the fitness value is saved. If the maximum number of iterations is reached, the algorithm is exited and the result is output; otherwise, , and then output the result.

[0042] Step 7. Output the optimal value as the optimization solution.

[0043] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A method for site selection and vehicle path optimization of electric freight vehicle charging stations, characterized in that: The following steps are involved: S1: Establish a mathematical model for the site selection and distribution process of electric freight vehicle charging stations, and solve the mathematical model based on the minimization of two logistics costs: the construction cost of electric vehicle charging stations and the vehicle transportation cost, to obtain a set of candidate charging station site locations and minimized paths; S2: Randomly select from candidate charging station locations The charging stations generate initial cluster centers. Based on the preset conditions of the initial cluster centers and the minimum total distance from the customer point to the nearest cluster center, the first cluster center cluster is obtained through the bacterial foraging algorithm, and the first cluster center cluster is iteratively updated through the K-mediods clustering algorithm to obtain the first cluster center cluster with the minimum total distance as the best cluster center cluster. The best cluster center is used as the location of the charging station. S3: Optimizing the minimization path based on the location of the charging station and the quantum ant colony algorithm, including the following steps: S31: Initialize the pheromone matrix and related variables. The pheromone matrix is ​​used to store the pheromone concentration between each pair of nodes. Before each visit to the customer / return to the distribution center, determine whether the power is sufficient. If the power is insufficient, visit the best charging station location obtained in step S2 for charging. S32: Calculate the accessible customer set. If the accessible customer set is empty, return to the distribution center. If the accessible customer set is not empty, calculate the access probability of each customer according to the quantum computing rules. S33: Select the next visiting customer based on the visiting probability of each customer and according to the roulette rule, return to the distribution center after completing the delivery service, and obtain the pheromone matrix; S34: The pheromone matrix is ​​iteratively updated based on the continuously updated quantum revolving gate to obtain the optimal value of the minimized path.

2. The method for site selection and vehicle path optimization of an electric freight vehicle charging station according to claim 1, characterized in that: The mathematical model described in step S1 is as follows: (1) In formula (1), represents the set of customer demand points, with the subscript , represents the set of all vertices, , represents the set of electric vehicles, with the subscript , Distribution Center , the subscript is , represents the candidate charging station set, with the subscript , Indicates Car from Click to point; (2) In formula (2), Indicated in The decision variable of whether to build a charging station; (3) (4) In formula (4), Indicates electric vehicle The loading capacity, Indicates electric vehicle leave The maximum amount of goods that can be left at the time of ordering. , express The demand for a point; (5) (6) (7) In formula (7), Indicates electric vehicle arrive The remaining power at the time of clicking, Indicates electric vehicle leave The remaining power at the time of clicking, Indicates the battery capacity of electric vehicles, express and The distance between two points; (8) (9) In formula (9), Indicates the consumption coefficient of battery power; (10) (11) (12) (13) (14) In formula (14), represents the cost of violating the time window, represents the opportunity cost per hour of waiting caused by the vehicle arriving at the customer's location earlier than the earliest service time, Indicates customer point Earliest service time, Indicates Vehicle arrives at the node time, represents the penalty cost per unit time caused by the vehicle arriving later than the latest service time, Indicates The car leaves the node time, Indicates customer point Latest service time; (15) (16) (17) In formula (17), Minimize represents the minimum value solution, Indicates The construction cost of each candidate charging station, Indicates Car slave node To Node unit transportation cost.

3. The method for site selection and vehicle path optimization of an electric freight vehicle charging station according to claim 1, characterized in that: In step S2, the process of obtaining the minimum value of the total distance from the client to the nearest cluster center based on the bacterial foraging algorithm specifically includes the following steps: S201: Generate initial cluster center cluster: randomly select from several candidate charging station locations Initial charging stations are used as the initial cluster center clusters; S202: Initializing the bacterial population: calculating the distance from the customer point to all initial cluster centers, traversing the customer point set, and assigning the current customer point to the initial cluster center according to the principle of the shortest distance to form an initial charging station cluster; S203: Bacterial chemotaxis cycle: Each initial cluster center performs Nc chemotaxis cycles, and each cycle includes two steps: flipping and swimming. The flipping operation is to make the current cluster center generate a random direction for flipping on each of its feature vectors. This process generates a random vector through formula (18), which represents the direction of the bacteria after flipping; (18) in, represents the number of cluster centers, refers to the rounding function, The function is used to generate a random number matrix. Represents the dimension, normalized by formula (19), and calculates a random direction selected after flipping , is the transpose symbol; (19) S204: Bacterial swimming: Determine the direction of movement and convert random vectors Normalize it to make it a unit vector , through formula (20), the current cluster center moves one step in the flipped direction, changes the position of the bacteria, and completes a swimming, where is a constant, indicating a fixed step size for each swim; (20) S205: Bacteria sorting: After the chemotaxis operation cycle is completed, the virtual cluster center is obtained, and the fitness value is calculated. The fitness value is the total distance from all customer points to the nearest virtual cluster center, and the fitness values ​​are sorted from small to large; S206: nearest processing: by calculating the distance from the virtual cluster center to each candidate charging station, the virtual cluster center is made to correspond to the coordinates of the candidate charging station closest to it one by one; S207: Deduplication: Check whether the candidate charging stations are repeatedly allocated. If the charging stations are repeatedly allocated, a new candidate charging station is randomly selected for allocation through a mapping method. After the virtual cluster center is allocated to the candidate charging station, a first cluster center set is generated.

4. The method for selecting a charging station for electric freight vehicles and optimizing vehicle routing according to claim 3, characterized in that: In step S2, the step of obtaining the cluster center set with the smallest total distance as the best cluster center set specifically includes: S208: k-medoids initialization: using the first cluster center set as the initial cluster center set of the k-medoids algorithm; S209: Customer allocation: by calculating the distance from the customer point to each first cluster center, the current customer point is allocated to the first cluster center with the smallest distance; S210: k-medoids iterative optimization: perform kIter iterations, randomly select a first cluster center and a new candidate charging station in each iteration, redistribute them, and generate a new set of cluster centers; S211: Update the first cluster center: calculate the total distance from all the first cluster centers to their assigned customer points, which is used to evaluate the clustering effect. By comparing the total distance assigned by the first cluster center and the total distance newly assigned, it is decided whether to accept the new cluster center. If the total distance newly assigned is smaller, update the first cluster center set. S212: When the preset number of iterations is reached, the set of first cluster centers with the smallest total distance is output as the optimal set of cluster centers, that is, the charging station site selection result is obtained.

5. The method for site selection and vehicle path optimization of an electric freight vehicle charging station according to claim 1, characterized in that: In step S32, the step of calculating the access probability of each customer according to the quantum computing rule specifically includes: S32a: Initialize the quantum ant colony, for A colony of independent individuals ,set up For this population The iteration An independent individual, this individual is at the node The pheromone is defined as formula (21); (21) In the formula, Indicated in In the iteration, The pheromone state of each node, , Represents the total number of nodes, including distribution centers, charging stations, and customer points, at the initial moment ,initialization ,in is the probability amplitude corresponding to 0, is the probability amplitude corresponding to 1, and They represent the probability of the quantum bit being in the "0" state and the "1" state respectively, and the sum of the squares of the two is 1. >0) is the quantum bit heuristic factor, which is a dynamically changing parameter that indicates the relative importance of the node quantum state probability amplitude. stands for pheromone volatile factor; S32b: Calculate the transition probability using formula (22) ; (22) In formula (22), Represents edge , Represents edge The pheromone concentration on represents the heuristic information of the qubit, Represents edge The quantum bit heuristic information on represents the heuristic factor of pheromone, Heuristic factor representing heuristic information, Indicates the time when the vehicle arrives at the customer point. Indicates the maximum value of the customer time window limit. Indicates the minimum value of the customer time window limit. Represents edge The heuristic information on is calculated by formula (23); (23) Obtained by formula (24); (24) In formula (24), Indicates The probability that the quantum state of a qubit collapses to |0>.

6. The method for site selection and vehicle path optimization of an electric freight vehicle charging station according to claim 5, characterized in that: Step S34 specifically includes the following steps: S34a: Iterate 1 to aIter times. In each iteration, each ant completes the current delivery task, that is, after running a loop, calculate the fitness value. If the current iteration value is greater than the existing optimal value, update the optimal value, otherwise jump to the next step; S34b: The quantum revolving door is updated, and after the update is completed, the ant colony pheromone and ant colony information strength are updated; S34c: In each iteration, the fitness of each ant's circuit is calculated and optimized according to the fitness. If the maximum number of iterations is reached, the algorithm is exited and the optimal value is output; otherwise, , and then output the optimal value.

7. The method for selecting a charging station for electric freight vehicles and optimizing vehicle routing according to claim 6, characterized in that: Step S34b specifically include: The quantum rotating gate is as follows: (25) When the quantum ant After each individual completes its traversal path, the quantum pheromone will be updated with the adjustment of the quantum rotating gate. The specific update is achieved through formula (26); (26) In formula (26), is a probability amplitude matrix, represents the rotation angle; The quantum rotation gate of step S34b is updated by equation (27): the mutation operator is implemented by quantum NOT gate to perform mutation processing, and a mutation probability is given in the quantum ant colony algorithm. , each ant is randomly assigned a random number between (0,1) ,if , then the current element is inverted, and its best position in memory remains unchanged. Representing quantum states and The phase angle between (27) The pheromone is updated through formula (28); (28) In formula (28), Indicates that the ants are on the edge The total amount of pheromones released, It is An ant is standing by The total amount of pheromone released, It is The total amount of pheromone in iterations; Updated by formula (29), It is The total distance traveled by the ants, is a constant, indicating the pheromone importance factor, represents the quantum probability amplitude, if the k th ant traverses ij Indicates that it satisfies An ant passes by conditions; (29) Update the ant colony information strength through formula (30): is the initial qubit heuristic factor, is the current iteration number; (30)。

Citation Information

Patent Citations

  • Ant colony-clustering algorithm-based self-adaptive dynamic path planning method of robot

    CN109164810A

  • Hydropower station scheduling method and system based on particle swarm-bacterial foraging

    CN109635999A

  • Vehicle and cargo matching and path optimization method

    CN118333508A

  • Improved quantum ant colony algorithm-based spark platform task scheduling method

    WO2021179462A1

  • Effective area-based multi-objective optimal design method

    WO2022170719A1