An electric heavy truck battery swap station planning method and device and a readable storage medium
By simulating heavy-duty truck trips to generate a battery swapping demand dataset, and combining clustering and a greedy algorithm prioritizing coverage frequency to optimize the number of batteries, the problem of inaccurate demand point positioning and fragmented site configuration in existing battery swapping station planning has been solved, thereby improving the operational efficiency and cost-effectiveness of electric heavy-duty trucks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TRANSPORT PLANNING & RES INST MINIST OF TRANSPORT
- Filing Date
- 2025-10-29
- Publication Date
- 2026-07-03
AI Technical Summary
Existing battery swapping station planning methods fail to dynamically simulate electricity consumption based on the actual travel characteristics of heavy-duty trucks, resulting in inaccurate demand point positioning, a disconnect between site selection and capacity configuration, and a lack of systematic solution evaluation, which affects the operational efficiency and cost-effectiveness of electric heavy-duty trucks.
Based on preset heavy truck travel data, a freight process is simulated to generate a battery swapping demand dataset. Site coverage is determined through clustering and nearest neighbor search. The number of batteries is optimized by combining the time distribution of battery swapping requests. A greedy algorithm is used to select sites to retain. A simulation model is constructed to evaluate the scheme.
It has enabled the scientific evaluation of the planning of electric heavy-duty truck battery swapping stations, improved operational efficiency, reduced battery resource waste, and optimized the matching of station layout with actual needs.
Smart Images

Figure CN121526037B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy vehicle infrastructure planning, and more specifically, to a method, apparatus, and readable storage medium for planning electric heavy-duty truck battery swapping stations. Background Technology
[0002] With the rapid development of the new energy heavy-duty truck industry, battery swapping stations, as the core infrastructure for energy replenishment of electric heavy-duty trucks, directly impact the operational efficiency and feasibility of electric heavy-duty truck substitution due to their rational planning. Existing battery swapping station planning methods largely rely on experience-based site selection or simple demand aggregation, resulting in three significant problems: First, the analysis of battery swapping demand is crude, failing to dynamically simulate electricity consumption based on the actual travel characteristics of heavy-duty trucks, leading to inaccurate demand point location; second, site selection and capacity configuration are disconnected, simply setting up sites based on spatial density or traffic flow without considering the temporal distribution characteristics of battery swapping requests, easily resulting in wasted battery resources or supply shortages; third, there is a lack of a systematic scheme evaluation mechanism, making it difficult to quantify the substitution capability and overall cost-effectiveness of battery swapping stations for fuel-powered heavy-duty trucks. These problems lead to a disconnect between battery swapping station layout and actual operational needs, hindering the large-scale promotion of electric heavy-duty trucks. Summary of the Invention
[0003] The purpose of this invention is to provide a method, apparatus, and readable storage medium for planning electric heavy-duty truck battery swapping stations. In a first aspect, embodiments of this invention provide a method for planning electric heavy-duty truck battery swapping stations, comprising: simulating the freight transport process of electric heavy-duty trucks based on preset heavy-duty truck travel data; outputting a battery swapping demand dataset for the freight transport process through a preset battery swapping demand triggering mechanism; clustering the battery swapping demand points in the battery swapping demand dataset and combining it with service area information within the study area to generate an initial candidate station dataset; based on the battery swapping demand dataset and the initial candidate station dataset, determining the demand coverage of each candidate station through nearest neighbor search, and filtering out stations with demand coverage below a set threshold to obtain the filtered candidate stations; Based on the time distribution of battery swapping requests received by the selected candidate sites, the number of batteries at each site is determined using a sliding window algorithm. Candidate sites with only single-cell batteries are eliminated, and a greedy algorithm based on coverage frequency priority is used to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, thus obtaining the final set of planned battery swapping stations. A battery swapping station simulation model is constructed to simulate the battery swapping process of electric heavy trucks at the battery swapping stations in the final set of planned battery swapping stations, and at least one of the following evaluation indicators is output: electric heavy truck replacement rate, planning cost, and battery swapping loss time, thus completing the evaluation of the battery swapping station planning scheme.
[0004] Secondly, embodiments of the present invention provide an electric heavy-duty truck battery swapping station planning device, comprising: an estimation module, used to simulate the freight transport process of electric heavy-duty trucks based on preset heavy-duty truck travel data, and output a battery swapping demand dataset of the freight transport process through a preset battery swapping demand triggering mechanism; a planning module, used to cluster the battery swapping demand points in the battery swapping demand dataset, and combine it with service area information within the study area to generate an initial candidate site dataset; based on the battery swapping demand dataset and the initial candidate site dataset, determining the demand coverage of each candidate site through nearest neighbor search, and filtering out sites with demand coverage below a set threshold to obtain the filtered candidate sites; Based on the time distribution of battery swapping requests received at the selected candidate sites, a sliding window algorithm is used to determine the number of batteries at each site. A filtering module is used to eliminate candidate sites with only single-cell batteries and employs a greedy algorithm based on coverage frequency priority to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, thus obtaining the final set of planned battery swapping stations. An evaluation module is used to construct a battery swapping station simulation model to simulate the battery swapping process of electric heavy-duty trucks at the stations in the final planned set, and output at least one evaluation index among electric heavy-duty truck replacement rate, planning cost, and battery swapping loss time, thereby completing the evaluation of the battery swapping station planning scheme.
[0005] Thirdly, embodiments of the present invention provide a readable storage medium, the readable storage medium including a computer program, wherein the computer program, when running, controls the computer device where the readable storage medium is located to execute the method described in the first aspect.
[0006] Compared with existing technologies, the beneficial effects provided by this invention include: This invention discloses a method, device, and readable storage medium for planning electric heavy-duty truck battery swapping stations. It simulates the freight transport process based on preset heavy-duty truck travel data and generates a battery swapping demand dataset through a battery swapping demand triggering mechanism; it clusters demand points and combines them with service area information to form initial candidate sites; it calculates the demand coverage of each site through nearest neighbor search and filters sites with insufficient coverage; it determines the number of batteries based on the battery swapping request time distribution using a sliding window algorithm; after eliminating single-battery sites, it uses a greedy algorithm prioritizing coverage frequency to select remaining sites to cover the remaining demand, forming the final planning set; finally, it outputs evaluation indicators including replacement rate, planning cost, and battery swapping loss time through a simulation model, achieving a scientific evaluation of the planning scheme. Attached Figure Description
[0007] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a flowchart illustrating the steps of the electric heavy-duty truck battery swapping station planning method provided in an embodiment of the present invention.
[0009] Figure 2 This is a schematic block diagram illustrating the multi-stage planning of an electric heavy-duty truck battery swapping station provided in an embodiment of the present invention;
[0010] Figure 3 This is a flowchart illustrating the battery swapping demand estimation process in this invention.
[0011] Figure 4 This is a flowchart illustrating the simulation process of the battery swapping station in this invention;
[0012] Figure 5 This is a schematic block diagram of the structure of the electric heavy-duty truck battery swapping station planning device provided in an embodiment of the present invention;
[0013] Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0015] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. In order to solve the technical problems in the aforementioned background art, Figure 1 This is a flowchart illustrating the electric heavy-duty truck battery swapping station planning method provided in this embodiment. The following is a detailed description of the electric heavy-duty truck battery swapping station planning method.
[0016] Step S201: Based on preset heavy-duty truck trip data, simulate the freight transportation process of electric heavy-duty trucks, and output the battery swapping demand dataset of the freight transportation process through a preset battery swapping demand triggering mechanism; Step S202: Cluster the battery swapping demand points in the battery swapping demand dataset, and combine it with service area information within the study area to generate an initial candidate site dataset; Step S203: Based on the battery swapping demand dataset and the initial candidate site dataset, determine the demand coverage of each candidate site through nearest neighbor search, and filter out sites with demand coverage below a set threshold to obtain the filtered candidate sites; Step S204: Based on the filtered candidate sites... The time distribution of battery swapping requests received at selected sites is analyzed, and the number of batteries at each site is determined using a sliding window algorithm. In step S205, candidate sites with only single-cell batteries are eliminated, and a greedy algorithm based on coverage frequency priority is used to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, resulting in the final set of planned battery swapping stations. In step S206, a battery swapping station simulation model is constructed to simulate the battery swapping process of electric heavy-duty trucks at the stations in the final planned set, outputting at least one evaluation index among electric heavy-duty truck replacement rate, planning cost, and battery swapping loss time, thus completing the evaluation of the battery swapping station planning scheme.
[0017] In this embodiment of the invention, for example, the server first receives a dataset of trips for diesel heavy-duty trucks within a certain region. This dataset contains a large number of daily trip records for vehicles, with each record including vehicle number, trip start and end locations, travel distance, and dwell time. For example, vehicle 001's first trip starts at the center of region A and ends at the edge of region B, a distance of 120 kilometers, with a dwell time of 40 minutes; vehicle 002's trip starts at the industrial zone of region C and ends at the port of region D, a distance of 180 kilometers, with a dwell time of 50 minutes, etc. The server simulates the freight process based on the performance parameters of the electric heavy-duty trucks (such as driving range and minimum battery threshold), calculating the battery consumption for each heavy-duty truck in the order of the trips: when the remaining battery power after a trip is lower than the battery power required for the next trip and less than the minimum threshold, a battery swapping request is triggered. The server records the location (trip end point) and time (trip end time) of this request point and restores the heavy-duty truck to a fully charged state to continue simulating subsequent trips. After traversing all trips, the server outputs a dataset containing multiple battery swapping request points, each point accompanied by spatiotemporal coordinate information.
[0018] After estimating the battery swapping demand, the server performs spatial clustering on the demand points in the battery swapping demand dataset, merging nearby demand points into clusters to generate candidate demand points. Simultaneously, the server acquires service area information within the study area, including the location and available area of each service area. The candidate demand points and service area data are integrated to generate an initial candidate site dataset, which includes both clustered demand points and service area locations with available infrastructure. Based on the battery swapping demand dataset and the initial candidate site dataset, the server determines the demand coverage of each candidate site using a nearest neighbor search algorithm. Specifically, for each battery swapping demand point, the server finds the nearest site among the candidate sites and determines whether that site is within the driving range of heavy trucks (i.e., the remaining battery power can support the distance from the demand point to the site). The number of demand points covered by each site is counted as the demand coverage. After setting a coverage threshold, sites with coverage below the threshold are filtered out, resulting in a preliminary set of candidate sites. For example, a candidate site was eliminated because it was located in a remote area and only covered 2 demand points, which was less than the threshold of 5; while another site located in a transportation hub covered 25 demand points and was retained.
[0019] The server further analyzes the time distribution of battery swapping requests received by the selected candidate sites and uses a sliding window algorithm to determine the number of batteries required for each site. For each site, the server counts the number of battery swapping requests within different time periods, sets a fixed-length time window (e.g., 60 minutes), and slides the window (in 5-minute increments), recording the maximum number of requests within the window as the required number of batteries for that site. For example, if a site receives 12 battery swapping requests during the morning peak period (8:00-9:00), the server sets the number of batteries for that site to 12 to meet peak demand.
[0020] After configuring the number of batteries, the server removes single-battery sites with n batteries. At this point, some battery swapping demand points may become uncovered due to loss of coverage. The server counts the coverage frequency of the removed candidate sites (i.e., the number of demand points originally covered), sorts them from highest to lowest coverage frequency, and uses a greedy algorithm to prioritize retaining sites with high coverage frequency to cover uncovered demand points. For example, if the removed site M covers 10 demand points, 6 of which are uncovered, the server prioritizes retaining site M; it then selects site N with the second highest coverage frequency to cover the remaining 4 uncovered demand points, until all demand points are covered, resulting in the final set of planned battery swapping stations.
[0021] Finally, the server constructs a battery swapping station simulation model to simulate the battery swapping process of electric heavy-duty trucks in the final planned set of battery swapping stations, and outputs evaluation indicators. In the replacement rate calculation, the server tracks the trip completion status of each heavy-duty truck: if the total time spent by the heavy-duty truck in the battery swapping process (detour time + waiting time + battery swapping time) does not exceed the sum of the dwell times of the two trip segments, then it is determined that the trip can be replaced by an electric heavy-duty truck. After statistical analysis of all trips, the replacement rate is found to be 92%. In terms of planning costs, the server calculates the construction cost (infrastructure construction cost + battery cost) and operating costs (electricity cost, labor cost, etc.) of a single station, and sums up the costs of all stations to obtain the total cost. For example, the construction cost of a single station is 3.6 million yuan (3 million yuan for infrastructure construction + 600,000 yuan for 12 batteries), the total construction cost of 135 stations is 486 million yuan, the average annual operating cost is about 5 million yuan per station, and the total annual average cost is 1.176 billion yuan. The battery swapping loss time is calculated by summing up the detour time, waiting time, and delay time of a single heavy truck to obtain the average annual loss time for the entire road network. For example, if a single heavy truck takes 10 minutes to detour and waits for 5 minutes, the average annual loss time for the entire road network is approximately 7,500 hours. The server uses the above evaluation indicators to complete a comprehensive assessment of the battery swapping station planning scheme.
[0022] In this embodiment of the invention, the preset battery swapping demand triggering mechanism can be implemented through the following example: When the remaining mileage after the trip ends is less than the mileage of the next order or less than or equal to the minimum remaining mileage limit, a battery swapping demand is triggered; the remaining mileage is determined by the formula: Calculated; where, This indicates the heavy truck at time t. The remaining battery power; Indicates from Time's up The distance traveled by the heavy truck at all times; It is the energy conversion coefficient.
[0023] In this embodiment of the invention, for example, when the server executes the battery swapping demand triggering mechanism, it first receives the travel data of heavy trucks within the region. Each travel record includes the vehicle identifier, continuous travel sequence, and distance and time information for each segment of the journey. Taking 100 heavy trucks of a logistics company as an example, the server establishes an independent battery tracking model for each vehicle and initializes the performance parameters of the electric heavy trucks: the energy conversion coefficient is set to 0.92, which comprehensively considers the impact of factors such as vehicle load changes, road slope, and air conditioning use on energy consumption; the minimum remaining mileage limit is set to 50 kilometers, corresponding to a 20% safety threshold for battery charge; and the full-charge range of the standard battery pack is configured to be 250 kilometers.
[0024] For a single heavy-duty truck's continuous journeys, the server processes each segment of the journey sequentially according to time. Taking the heavy-duty truck with vehicle ID TK-073 as an example, its daily journey sequence includes 5 consecutive transport tasks: the first segment is from the logistics park to the processing plant, a distance of 180 kilometers, with a departure time of 6:00; the second segment is from the processing plant to the distribution center, a distance of 120 kilometers, with a planned departure time of 9:30; the third segment is from the distribution center to the port, a distance of 90 kilometers, with a planned departure time of 13:00; there are also two return trips. The server establishes a battery level curve for this vehicle, initially setting the state to full charge, i.e., a remaining driving range of 250 kilometers.
[0025] During the first leg of the journey, the server calculates the actual energy consumption based on the distance traveled: after adjusting for the energy conversion coefficient, the actual range consumed for a 180km journey is approximately 195.65km (180 ÷ 0.92 ≈ 195.65km). At the end of the journey, the server automatically calculates the remaining mileage: 250km (initial) - 195.65km (consumed) = 54.35km. At this point, the system triggers a dual-judgment mechanism: first, it compares the remaining mileage with the minimum remaining limit of 50km, which is higher; then, it compares the next leg of the journey with the distance of 120km, which is less. Since the next leg cannot be completed using the current remaining battery power, the server determines that a battery swap is needed. A battery swap request is generated at the end of the journey (factory parking lot), the request time is recorded as 9:15 (the actual end time of the journey), and the vehicle status is reset to full charge to continue simulating subsequent journeys.
[0026] When processing the second leg of the journey, the server also performs energy consumption calculations: the actual energy consumption for a 120km journey is 120÷0.92≈130.43km, and the remaining mileage is 250-130.43=119.57km. At this point, two checks are performed: compared to the minimum requirement of 50km, 119.57km meets the requirement; compared to the next 90km leg of the journey, the remaining mileage still has a surplus. The server determines that there is no need to trigger a battery swap and uses the remaining 119.57km as the initial energy value for the third leg of the journey.
[0027] After the third leg of the journey, the server calculated the remaining mileage to be approximately 119.57 - 90 ÷ 0.92 ≈ 119.57 - 97.83 = 21.74 kilometers. At this point, the minimum remaining mileage limit was triggered: 21.74 kilometers is less than the 50-kilometer safety threshold, and the server immediately initiated a battery swap request. The system recorded this request as occurring in the port logistics area at 15:40 and reset the vehicle's battery to full charge. The server continued to track the vehicle's subsequent journey until all transportation tasks for the day were completed, generating a total of three battery swap request records, each corresponding to a different transportation node.
[0028] When processing all heavy-duty truck trip data in batches, the server employs a parallel computing architecture, with each computing node responsible for simulating the energy consumption of 20 heavy-duty trucks. For records triggering battery swapping requests, the system automatically associates the trip's end coordinates, actual arrival time, and planned departure time for the next trip segment, forming battery swapping request points with spatiotemporal attributes. When the remaining mileage for a certain trip simultaneously meets both the conditions of "less than the distance to the next trip segment" and "less than the minimum remaining mileage limit," the server prioritizes triggering battery swapping based on the minimum remaining mileage limit and marks the request record with a double trigger flag. These request points will be given higher weight in subsequent site planning. By traversing all heavy-duty truck trip sequences, the server ultimately generates a dataset containing 4200 battery swapping request points, each with complete attributes such as vehicle identification, trigger condition type, spatiotemporal coordinates, and battery status.
[0029] In this embodiment of the invention, the step of clustering the battery swapping demand points in the battery swapping demand dataset and combining it with service area information within the study area to generate an initial candidate site dataset can be implemented through the following example: The DBSCAN density clustering algorithm is used to cluster the battery swapping demand points. Based on a preset neighborhood radius and a minimum number of points, demand points with similar geographical distances are merged into clusters, and the cluster center is taken as a candidate demand point. The latitude and longitude coordinates of service area information within the study area are obtained to construct a service area dataset. The candidate demand points and service area locations are combined to generate an initial candidate site dataset, which includes site serial numbers and latitude and longitude coordinates.
[0030] In this embodiment of the invention, for example, after generating the battery swapping demand dataset, the server begins the process of clustering battery swapping demand points and constructing initial candidate sites. First, the server reads 5000 battery swapping demand points from the dataset. Each point contains latitude and longitude coordinates (e.g., demand point P001 coordinates (X1, Y1), P002 coordinates (X2, Y2), etc., with coordinate values represented in a unified regional coordinate system in kilometers). The server initializes the DBSCAN density clustering algorithm parameters: a preset neighborhood radius Eps = 1 kilometer (i.e., demand points with a geographical distance of less than or equal to 1 kilometer are considered within the neighborhood), and a minimum number of points MinPts = 5 (i.e., points containing at least 5 demand points within their neighborhood are considered core points), to ensure that the clusters have sufficient demand density and avoid isolated points forming invalid clusters. The server sequentially traverses each battery swapping demand point, calculating its geographical distance to all other points (converted from the Euclidean distance formula based on planar coordinates to actual kilometers). For demand point P105, the server detected 8 demand points (P101-P104, P106-P109) within its neighborhood (distance ≤ 1 km), which is greater than MinPts = 5, and thus it is determined to be a core point. Then, starting from P105, it recursively searches for density-reachable points (i.e., points ≤ 1 km from the core point, or indirectly reachable through other core points), merging these 23 demand points within 1 km of each other into cluster C01. For demand point P302, there are only 2 demand points in its neighborhood, which is less than MinPts, so it is marked as a noise point and does not participate in clustering. After traversing all demand points, the server identified 42 clusters (excluding 150 noise points). For each cluster, the coordinates of its geometric center point were calculated as candidate demand points. Taking cluster C01 as an example, which contains 23 demand points, its center point coordinates were obtained by averaging the x and y coordinates of all points ((X1+X2+...+X23) / 23, (Y1+Y2+...+Y23) / 23), denoted as candidate demand point CR01. After clustering, the server obtained service area information within the study area through a traffic database interface. This database contains basic data on all highway and national road service areas within the area. The server filtered out service areas that met the heavy truck parking criteria (such as service areas with large vehicle parking spaces and expandable areas ≥2000 square meters), resulting in 35 valid service areas, which were then used to construct a service area dataset. Each service area record contains a unique serial number (e.g., S01-S35) and latitude and longitude coordinates. For example, service area S01 coordinates (A1, B1) (located next to the logistics channel in the northwest of the area), S02 coordinates (A2, B2) (located at the highway hub in the southeast of the area), etc. The coordinate values use the same coordinate system as the battery swapping demand points. The server integrates the data of 42 candidate demand points (CR01-CR42) with 35 service areas (S01-S35) to generate an initial candidate site dataset.The dataset uses a unified numbering system: candidate demand points are prefixed with "CR" (e.g., CR01 to CR42), and service area numbers are prefixed with "S" (e.g., S01 to S35). Each station entry contains a unique number and its corresponding latitude and longitude coordinates (e.g., CR01: (Xc01, Yc01), S01: (A1, B1)). The server performs deduplication verification on the data: if a candidate demand point coincides with the coordinates of a service area (distance ≤ 0.5 km), the service area station is retained (because the service area has existing infrastructure), and duplicate candidate demand points are removed, resulting in 75 unique initial candidate stations, forming a complete initial candidate station dataset, which is then stored.
[0031] In this embodiment of the invention, the step of determining the demand coverage of each candidate site based on the battery swapping demand dataset and the initial candidate site dataset through nearest neighbor search, and filtering out sites with demand coverage below a set threshold to obtain the filtered candidate sites can be implemented through the following example.
[0032] The geographical coordinates of all battery swapping demand points are extracted from the battery swapping demand dataset to form a set of battery swapping demand points; the geographical coordinates of all candidate sites are extracted from the initial candidate site dataset to form an initial candidate site set; a KD tree is constructed based on the initial candidate site set, the construction process including: determining the spatial segmentation dimension according to the current tree depth, segmenting by the horizontal coordinate when the depth is even, and segmenting by the vertical coordinate when the depth is odd; under each segmentation dimension, the site coordinates on that dimension are sorted by size, and the coordinate value of the middle position is selected as the segmentation point to divide the initial candidate site set into two sub-regions; the above segmentation steps are recursively executed for each sub-region until the number of sites in the sub-region does not exceed 1, at which point the recursion stops; for each battery swapping demand in the set of battery swapping demand points... For each point, a nearest neighbor search is performed in the KD tree to find the candidate station with the closest straight-line distance to the demand point, which is called the nearest candidate station. It is then determined whether the nearest candidate station covers the demand point: if the remaining battery power of the heavy truck at the demand point can support its journey to the nearest candidate station (i.e., the straight-line distance between the demand point and the nearest candidate station is less than or equal to the remaining mileage of the heavy truck at the demand point), then the nearest candidate station is determined to cover the demand point. The number of battery swapping demand points covered by each candidate station in the initial candidate station set is counted as the demand coverage of that station. A demand coverage threshold is set, and candidate stations with demand coverage below the threshold are removed from the initial candidate station set, with the remaining stations forming the filtered candidate stations.
[0033] In this embodiment of the invention, for example, after generating the battery swapping demand dataset, the server initiates the battery swapping demand point clustering and initial candidate site construction process. First, it reads 5000 battery swapping demand points from the dataset. Each point contains planar coordinates (unit: kilometers) in a unified regional coordinate system, such as demand point P001 coordinates (12.3, 45.6), P002 coordinates (12.4, 45.7), etc. The server initializes the DBSCAN density clustering algorithm parameters: neighborhood radius Eps = 1 kilometer (points with a geographical distance ≤ 1 kilometer are considered within the neighborhood), minimum number of points MinPts = 5 (at least 5 points within the neighborhood are needed to form a core point), ensuring that the clusters are supported by actual demand. The server sequentially traverses each demand point and calculates the Euclidean distance (converted to kilometers) to other points. Taking demand point P105 (coordinates (15.8, 38.2)) as an example, the server detects that there are 8 demand points (P101-P104, P106-P109) in its neighborhood (distance ≤ 1 km), which exceeds MinPts=5, and is determined to be a core point; then, it recursively searches for density reachable points (distance ≤ 1 km from the core point or indirectly reachable through other core points), and merges the 23 demand points within 1 km of each other into cluster C01. For demand point P302 (coordinates (22.1, 50.3)), there are only 2 demand points in its neighborhood, which is less than MinPts, and it is marked as a noise point and does not participate in clustering. After traversing all points, the server generates 42 clusters (excluding 150 noise points). For each cluster, the geometric center point is calculated as a candidate demand point: the average coordinates of the 23 points in cluster C01 are used to obtain the center point CR01 ((15.8+15.7+...+16.0) / 23, (38.2+38.3+...+38.1) / 23). Next, the server obtains service area information for the study area through a traffic database interface, filters service areas that meet the heavy truck parking criteria (must have large vehicle parking spaces and an expandable area ≥2000 square meters), obtaining 35 valid service areas, and constructs a service area dataset. Each service area includes a serial number (S01-S35) and latitude and longitude coordinates, such as S01 (14.2, 37.5) (located in the northwest logistics corridor of the region) and S02 (18.9, 41.2) (southeast highway hub). The coordinates use the same coordinate system as the demand points. The server combines 42 candidate demand points (CR01-CR42) with 35 service areas (S01-S35) to generate an initial candidate site dataset. The dataset uses unique identifiers of "CR + serial number" (candidate demand point) and "S + serial number" (service area), such as CR01 (15.85, 38.22) and S01 (14.2, 37.5).The server performs deduplication verification: it calculates the distance between candidate demand points and service areas. If the distance between CR05 (16.3, 39.1) and S08 (16.28, 39.09) is 0.2 km (≤0.5 km), the locations are considered to overlap. Service area S08 is retained (due to its available infrastructure), and CR05 is removed. This results in 75 unique sites, forming an initial candidate site dataset containing site numbers and latitude / longitude coordinates, which is then stored.
[0034] In this embodiment of the invention, the determination of the number of batteries at each site based on the time distribution of battery swapping requests received by the selected candidate sites using a sliding window algorithm can be implemented through the following example: Based on the battery swapping demand dataset and the selected candidate sites, battery swapping demands are allocated to the nearest selected candidate sites according to the nearest neighbor principle; for each selected candidate site, the number of battery swapping requests received is counted, and the battery swapping requests received by that site are arranged in chronological order of vehicle arrival time; based on a preset sliding window, the window is traversed with a fixed time step, and all battery swapping requests arranged in chronological order are traversed, the number of battery swapping requests received by that site within each window is counted, and the maximum number of requests is recorded; the maximum number of requests is used as the number of batteries at that selected candidate site.
[0035] In this embodiment of the invention, for example, after obtaining the filtered set of candidate sites (including 30 sites such as S01, CR03, and S05), the server initiates the battery swap request allocation and battery quantity calculation process. First, the geographical coordinates and remaining driving range of 4800 battery swap demand points are extracted from the battery swap demand dataset (e.g., demand point P201 coordinates (12.5, 45.8), remaining range 60 km; P202 coordinates (12.6, 45.9), remaining range 55 km, etc.). Combined with the coordinates of the filtered candidate sites (e.g., S01 coordinates (12.4, 45.7), CR03 coordinates (13.1, 46.2)), the demand is allocated according to the nearest neighbor principle: the straight-line distance between each demand point and all filtered sites is calculated, and the site that is closest to the point and already covers the point is selected (based on the previous coverage judgment result). For example, demand point P201 is 0.3 km away from S01 (less than the remaining mileage of 60 km) and 0.8 km away from CR03, so it is assigned to S01; demand point P202 is 0.4 km away from S01 and is also assigned to S01. After traversing all demand points, S01 is assigned 120 battery swapping demand points, CR03 is assigned 80, S05 is assigned 95, and the remaining sites are assigned between 50 and 110. For each filtered site, the server extracts the arrival time of the assigned battery swapping requests (i.e., the planned time for the vehicle to arrive at the site, such as the arrival times of the battery swapping requests for S01 being 6:10, 6:25, 7:05, ..., 21:40), sorts them in chronological order, and forms an ordered time list (the list for S01 is [6:10, 6:25, 7:05, 7:15, 8:00, ..., 21:40], a total of 120 time points). The server initializes the sliding window parameters as follows: window size is set to 60 minutes (covering requests within 1 hour), and time step is set to 15 minutes (the window slides once every 15 minutes). Taking S01 as an example, starting from the first request time of 6:10, the first window is 6:10-7:10, counting the number of requests within the window: including 6:10, 6:25, and 7:05, a total of 3 times; after sliding for 15 minutes, the second window is 6:25-7:25, including 6:25, 7:05, and 7:15, a total of 3 times; continuing to slide to the window 10:00-11:00, counting 10:05, 10:15, 10:20, 10:30, and 1... There were 8 requests at 0:40, 10:45, 10:50, and 11:00. From 14:30 to 15:30, 13 requests were recorded at 14:30, 14:35, 14:40, 14:45, 14:50, 14:55, 15:00, 15:05, 15:10, 15:15, 15:20, 15:25, and 15:30. Continuing to the last window from 20:40 to 21:40, 2 requests were recorded. After traversing all windows, the maximum number of requests for S01 was recorded as 13.The server performs the above operations on all filtered sites: In the ordered time list of CR03, 8 requests were counted during the window from 9:30 to 10:30 (maximum), and in the window of S05 from 16:00 to 17:00 (maximum), 11 requests were counted. Finally, the server sets the maximum number of requests for each site to its number of batteries: S01 has 13 batteries, CR03 has 8 batteries, S05 has 11 batteries, and the remaining sites have between 5 and 15 batteries, forming a filtered candidate site dataset containing site number, coordinates, and battery count.
[0036] In this embodiment of the invention, the process of eliminating candidate sites with a single battery and using a greedy algorithm based on coverage frequency priority to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, thus obtaining the final set of battery swapping station plans, can be implemented through the following example. From the selected candidate sites, single-battery sites with n batteries are removed, and multi-battery sites with more than n batteries are retained. The number of battery swapping demand points that each removed single-battery site could originally cover is counted, and this number is used as the coverage frequency. The removed single-battery sites are sorted from high to low according to the coverage frequency. The set of currently uncovered battery swapping demand points is determined, which consists of battery swapping demand points that cannot be covered by the multi-battery sites alone. The removed single-battery sites are selected in order of sorting, and the site with the largest number of uncovered battery swapping demand points is retained first. The demand points covered by the retained site are removed from the set of uncovered battery swapping demand points. The above site selection steps are repeated until the set of uncovered battery swapping demand points is empty or there are no more removed single-battery sites to choose from. The retained single-battery sites are merged with the multi-battery sites to form the final battery swapping station planning set.
[0037] In this embodiment of the invention, for example, the set number of batteries n can be 1. Based on this, after the server completes the battery quantity configuration of the candidate sites after screening (including 30 sites, of which 25 are multi-battery sites (battery quantity ≥ 2) and 5 are single-battery sites (battery quantity = 1)), it starts the single-battery site elimination and coverage optimization process. First, the server extracts the battery quantity field from the screened candidate sites and identifies the single-battery sites: service area site S12 (battery quantity 1), candidate demand point CR15 (battery quantity 1), service area site S18 (battery quantity 1), candidate demand point CR22 (battery quantity 1), and service area site S25 (battery quantity 1). The server removes these 5 single-battery sites from the screened set, retaining the remaining 25 multi-battery sites (such as S01 (battery 13), CR03 (battery 8), S05 (battery 11), etc.), forming a temporary multi-battery site set. Next, the server counts the coverage frequency (i.e., the number of battery swapping demand points originally covered) of the 5 removed single-battery sites: The server extracts the list of demand points originally covered by each single-battery site from the battery swapping demand allocation record. S12 originally covered 15 demand points (e.g., P301-P315), CR15 covered 12 (P401-P412), S18 covered 8 (P501-P508), CR22 covered 5 (P601-P605), and S25 covered 3 (P701-P703). The server uses the coverage frequency as the sorting criterion, ranking the candidate sites for removal from highest to lowest: S12 (15), CR15 (12), S18 (8), CR22 (5), S25 (3). Subsequently, the server determines the set of uncovered battery swapping demand points: For all demand points originally covered by the candidate sites for removal (15+12+8+5+3=43), the server checks whether they can be covered by a temporary multi-battery site set. Specifically, the straight-line distance between each demand point and the nearest multi-battery station is calculated and compared with the remaining driving range of the heavy truck at that demand point. For example, demand point P301 (coordinates (14.2, 47.5)) originally covered by S12 has a straight-line distance of 0.6 kilometers to the nearest multi-battery station S05 (coordinates (14.0, 47.0)), while the remaining driving range at P301 is 55 kilometers (0.6 ≤ 55, covered). However, demand point P302 (coordinates (14.5, 47.8)) is 1.8 kilometers away from the nearest multi-battery station CR03 (coordinates (13.1, 46.2)), and its remaining driving range is only 1.5 kilometers (1.8 > 1.5, not covered), so it is determined to be uncovered.After traversing all 43 demand points, the server identified 28 uncovered demand points (10 out of the 15 originally covered by S12 were uncovered, 8 out of the 12 covered by CR15, 5 out of the 8 covered by S18, 3 out of the 5 covered by CR22, and 2 out of the 3 covered by S25), forming a set of uncovered demand points U={P302,P305,...,P703} (a total of 28 points). The server selected the single-cell sites to be removed in order of sorting: first, it selected S12 with the highest coverage frequency, extracted its original 15 covered demand points, compared them with the uncovered set U, and found that 10 demand points (such as P302, P305, P308, etc.) belonged to U. The server determined that S12 could cover 10 demand points in U, kept it as a candidate site, and removed these 10 points from U. At this time, U had 18 demand points remaining. Next, select CR15, which is ranked second. Of the 12 demand points it originally covered, 8 (such as P402, P404, P407, etc.) are still in U. The server keeps CR15 and removes these 8 points, leaving 10 points in U. Next, select S18. Of the 8 demand points it originally covered, 5 (such as P501, P503, P506, etc.) are in U. Keep S18 and remove 5 points, leaving 5 points in U. Then select CR22. Of the 5 demand points it originally covered, 3 (such as P601, P602, P604) are in U. Keep CR22 and remove 3 points, leaving 2 points in U. Finally, select S25. Of the 3 demand points it originally covered, 2 (P701, P703) are in U. Keep S25 and remove these 2 points, leaving U empty. The server will merge the five single-battery sites (S12, CR15, S18, CR22, S25) with the 25 multi-battery sites to form a final set of 30 battery swapping stations. Each site includes a serial number, latitude and longitude coordinates, and the number of batteries (e.g., S12 has 1 battery, S01 has 13 batteries, etc.). This set will be stored for subsequent scheme evaluation.
[0038] In this embodiment of the invention, the construction of a battery swapping station simulation model to simulate the battery swapping process of electric heavy trucks at the battery swapping stations in the final battery swapping station planning set can be implemented through the following examples. Based on the battery swapping demand dataset and the final battery swapping station planning set, a battery swapping demand allocation dataset is generated. This dataset includes the vehicle number, trip number, arrival time at the corresponding battery swapping station determined based on preset allocation rules, detour time from the demand point to the station, and the current and next order dwell times for each battery swapping demand. Using this dataset as input to the battery swapping station simulation model, for each station in the final planning set, the battery swapping requests allocated to that station in the dataset are traversed chronologically. For each request, the following steps are performed: extracting the arrival time, detour time, current and next order dwell times from the dataset; obtaining a list of the earliest available battery times for the station at the arrival time; and determining that the station is idle and the queuing time is 0 if the arrival time is greater than or equal to the minimum available time in the earliest available battery times list, and initiating the battery swapping operation. The time interval is the preset battery swapping operation duration. If the arrival time is less than the minimum available time in the earliest available battery time list, the battery swapping station is considered busy, the queuing time is the difference between the minimum available time in the earliest available battery time list and the arrival time, and the battery swapping operation time is the preset battery swapping operation duration. The sum of the detour time, queuing time, and battery swapping operation time is the total battery swapping time. If the total battery swapping time does not exceed the sum of the current order's dwell time and the next order's dwell time, the battery swapping is considered successful, and the battery swapping request is recorded as a valid demand. Otherwise, the battery swapping is considered a failure, and it is recorded as an unmet demand. If the battery swapping is successful, the earliest available battery time list is updated: the earliest available time of the battery corresponding to the minimum available time in the earliest available battery time list is updated to the sum of the arrival time, queuing time, battery swapping operation time, and preset battery charging time. The preset battery charging time is calculated based on the electric heavy truck's range and battery charging speed. Based on the success and failure determination results of all battery swapping requests, the number of successful battery swaps and the number of unmet demands are counted.
[0039] In an embodiment of the invention, for example, after obtaining the final battery swapping station planning set (containing 30 stations, such as S01, CR03, S12, etc., where S01 has 13 batteries, CR03 has 8 batteries, and S12 has 1 battery), the server starts the construction of the battery swapping station simulation model and the simulation of the battery swapping process. First, a battery swapping demand allocation dataset is generated: the vehicle numbers (such as TK-073, TK-105, etc.) and trip numbers (such as trip 3, trip 5, etc.) of 4800 battery swapping demand points are extracted from the battery swapping demand dataset. Combined with the latitude and longitude coordinates of each station in the final battery swapping station planning set, the corresponding station is determined according to the nearest neighbor allocation result (for example, the battery swapping demand of trip 3 of TK-073 is allocated to S01, and the trip 5 of TK-105 is allocated to CR03). For each demand point, the detour time is calculated (the travel time from the battery swap demand point to the corresponding station, based on an average driving speed of 60km / h, a straight-line distance of 0.5km corresponds to a detour time of 0.5 minutes, and 1km corresponds to 1 minute). For example, the demand point of TK-073 trip 3 is 0.8km away from S01 in a straight line, and the detour time is 0.8 minutes ≈ 1 minute. The current order dwell time of the vehicle (e.g., the dwell time after TK-073 trip 3 ends is 40 minutes) and the next order dwell time (the dwell time before the start of the next trip is 30 minutes) are extracted, and the sum of the two is 70 minutes. The server integrates the above information to generate a battery swap demand allocation dataset. Each record contains: vehicle number (TK-073), trip number (3), corresponding station (S01), arrival time (6:10, the planned time for the vehicle to arrive at S01), detour time (1 minute), current order dwell time (40 minutes), and next order dwell time (30 minutes). The server inputs this dataset into the battery swapping station simulation model and iterates through the assigned battery swapping requests for each final station (such as S01, CR03, etc.) in chronological order. Taking S01 as an example, it is assigned 120 battery swapping requests, sorted by arrival time as 6:10 (TK-073 trip 3), 6:25 (TK-105 trip 2), 7:05 (TK-088 trip 4), ..., 21:40 (TK-023 trip 6). The server initializes the earliest available battery time list for S01: all 13 batteries are initially fully charged, and the earliest available time is 0 (indicating initial idle time), denoted as T=[0,0,0,0,0,0,0,0,0,0,0,0,0] (unit: minutes, converted to the current day's time, e.g., 0 corresponds to 0:00). For the first battery swap request (TK-073 trip 3, arrival time 6:10, i.e. 6×60+10=370 minutes): Extract parameters: arrival time 370 minutes, detour time 1 minute, current order dwell time 40 minutes (2400 seconds=40 minutes), next order dwell time 30 minutes (1800 seconds=30 minutes), the sum of the two is 70 minutes (4200 seconds=70 minutes).Obtain the earliest available battery time list T, with the minimum available time being 0 (i.e., 0:00). If the arrival time is 370 minutes or more and the minimum available time is 0, S01 is determined to be idle, the queuing time is 0, and the battery swapping operation time is preset to 15 minutes (industry standard battery swapping time). The total battery swapping time = detour time (1 minute) + queuing time (0) + battery swapping operation time (15 minutes) = 16 minutes. Compare this with the sum of the current and next order dwell times of 70 minutes. If 16 ≤ 70, the battery swapping is determined to be successful and recorded as a valid request. Update the earliest available battery time list: Select the battery corresponding to the minimum available time 0 from T. Its new available time = arrival time (370 minutes) + queuing time (0) + battery swapping operation time (15 minutes) + preset battery charging time (based on a range of 150km and a charging speed of 30km / h, charging time = 150 ÷ 30 = 5 hours = 300 minutes), i.e., 370 + 0 + 15 + 300 = 685 minutes (11:25). After the update, T = [685,0,0,0,0,0,0,0,0,0,0,0,0]. For the second battery swap request (TK-105 trip 2, arrival time 6:25 = 385 minutes): arrival time 385 minutes, detour time 0.6 minutes ≈ 1 minute, current stop 35 minutes, next stop 25 minutes, total 60 minutes. The minimum available time for T is 0 (12 batteries remaining are idle), indicating idle time, waiting time 0, battery swap operation time 15 minutes. Total time = 1 + 0 + 15 = 16 minutes ≤ 60 minutes, battery swap successful. Update T: Select the battery corresponding to the minimum available time 0, new available time = 385 + 0 + 15 + 300 = 695 minutes (11:35), T updated to [685,695,0,0,0,0,0,0,0,0,0,0,0,0]. For the 14th battery swap request (TK-088 trip 4, arrival time 10:00 = 600 minutes): Arrival time 600 minutes, detour time 1.2 minutes ≈ 1 minute, current stop 30 minutes, next stop 20 minutes, total 50 minutes. The minimum available time for battery T is 685 minutes (first battery available time 11:25). Since the arrival time 600 minutes < 685 minutes, S01 is considered busy, and the queuing time = 685 - 600 = 85 minutes. The battery swap operation time is 15 minutes, total time = 1 + 85 + 15 = 101 minutes. Comparing this to the total stop time of 50 minutes, 101 > 50, the battery swap is considered a failure, recorded as an unmet requirement, and the battery available time list is not updated.After iterating through the 120 battery swap requests for S01, the server statistics show: 112 battery swaps were successful, and 8 requests were unsuccessful; of the 80 requests for CR03, 75 were successful and 5 failed; of the 15 requests for S12 (because there is only one battery, the battery available time list is initially [T=[0]]), the first request arrived at 7:30 = 450 minutes, and after a successful swap, the battery available time = 450 + 0 + 15 + 300 = 765 minutes (12:45), and the second request arrived at 8:00 = 480 minutes. If the clock time is less than 765 minutes, the waiting time is 765-480=285 minutes, and the total time is 1+285+15=301 minutes, which is greater than the sum of the current and next dwell times (45 minutes), then the process fails. Ultimately, S12 succeeded once and failed 14 times. The server performed the above simulation on all 30 final sites, summarizing the success and failure results of all battery swapping requests: out of 4800 battery swapping requests, 4520 were successful, and 280 failed to meet the requirements. This provides data support for subsequent calculations of evaluation indicators such as replacement rate and battery swapping loss time.
[0040] In this embodiment of the invention, the electric heavy-duty truck replacement rate is calculated using the following formula: ;in, This represents the quantified heavy-duty truck replacement rate. This represents the total number of strokes for heavy truck k. Indicates the k-stroke of a heavy truck state, Indicates itinerary The state;
[0041] The planning cost is calculated using the following formula: ;
[0042] ;
[0043] ;
[0044] ;
[0045] in, For planning costs, For operation and maintenance costs, To fix construction costs, Let M be the set of candidate sites, and M be the location decision variable. The total number of battery swapping stations to be built. Let m be the number of batteries at site m. The discount rate is... The service life of the battery swapping station. For battery purchase costs, This refers to the basic construction investment amount for the battery swapping station. The land area of the battery swapping station. The land acquisition fee per unit area For the purchase cost of power distribution and battery swapping facilities, To reduce the monitoring costs of power distribution and battery swapping systems, For the construction costs of other auxiliary infrastructure within the battery swapping station, The average cost of charging each battery. For network loss rate, For the operation and maintenance costs of the battery, For the daily wage of staff, Monthly inspection fee for the battery;
[0046] The battery swapping loss time is calculated using the following formula: ;
[0047] ;
[0048] ;
[0049] ;
[0050] in, For the time it takes for heavy trucks to take detours, For queuing time, To delay time, To assign decision variables, This represents all battery swapping demands in the battery swapping demand dataset D.
[0051] In this embodiment of the invention, for example, after completing the battery swapping process simulation, the server calculates three evaluation indicators—electric heavy-duty truck replacement rate, planning cost, and battery swapping loss time—based on the number of successful battery swaps (4520 times) and the number of unmet demands (280 times) output by the battery swapping station simulation model, combined with the basic parameters of 30 final planned stations. Electric heavy-duty truck replacement rate calculation: The server counts a total of 4800 battery swapping requests (i.e., the total number of trips requiring battery swapping for electric heavy-duty trucks), of which 4520 are valid demands with successful battery swaps. The replacement rate is determined by the ratio of successful battery swapping demands to the total number of battery swapping requests, i.e., 4520 successful demands divided by 4800 total demands, yielding a replacement rate of approximately 94.17%. Planning cost calculation: Construction cost: The server reads the battery configuration data of the 30 stations (e.g., S01 is equipped with 13 batteries, CR03 with 8 batteries, and S12 with 1 battery), summing up to a total of 280 batteries. The basic construction cost per station is calculated at 3 million yuan (including land acquisition, power distribution facilities, and auxiliary infrastructure). The total basic construction cost for 30 stations is 30 × 300 = 90 million yuan. The battery procurement cost is calculated at 50,000 yuan per battery, and the total cost for 280 batteries is 280 × 5 = 14 million yuan. The total construction cost is 90 million + 14 million = 104 million yuan. Operating costs: The average annual operating cost per station includes labor wages (2 million yuan), battery maintenance costs (1.5 million yuan), and electricity costs (1.5 million yuan), totaling 5 million yuan per year. The annual operating cost for 30 stations is 30 × 500 = 150 million yuan. The planned total cost is the sum of the construction cost and the operating cost, i.e., 104 million + 150 million = 254 million yuan per year. Battery swapping loss time calculation: Detour time: Among the 4520 successful battery swapping requests, the average detour time per request was 1 minute (based on a straight-line distance of 0.5-1.2 km and a driving speed of 60 km / h), with a total detour time of 4520 × 1 = 4520 minutes, approximately 75.3 hours. Queuing time: 10% of the successful requests involved queuing (such as the 85-minute wait case at the S01 site), with an average waiting time of 5 minutes per request, resulting in a total waiting time of 4520 × 10% × 5 = 2260 minutes, approximately 37.7 hours. Delay time: Among the 280 unmet requests, the average delay time due to battery swapping failures was 30 minutes per request (including route replanning and waiting time for backup batteries), with a total delay time of 280 × 30 = 8400 minutes, approximately 140 hours. Adding these three factors together, the total battery swapping loss time is 75.3 + 37.7 + 140 = 253 hours. The server's final output evaluation report shows that the electric heavy-duty truck replacement rate is 94.17%, the total annual planned cost is 254 million yuan, the total battery swapping loss time is 253 hours, and a comprehensive evaluation of the battery swapping station planning scheme has been completed.
[0052] To more clearly describe the solutions provided in the embodiments of the present invention, a more detailed implementation method is provided below. The main ideas of the present invention include important stages such as battery swapping demand estimation, site layout and capacity planning, site selection and adjustment, and solution evaluation. A specific multi-stage planning method for battery swapping stations based on the spatiotemporal coverage of battery swapping demand is attached. Figure 2 As shown below, each stage will be explained in detail.
[0053] Phase 1: Battery Swapping Demand Estimation: In the battery swapping mode, to further reduce transportation risks, improve transportation efficiency, and ensure the smooth completion of transportation tasks, heavy-duty truck drivers will comprehensively assess the remaining mileage, the order mileage, and the minimum remaining mileage limit before responding to a freight order. Only when the remaining mileage is greater than both the order mileage and the minimum remaining mileage can the driver respond to the order request. This invention sets the minimum remaining battery level of the vehicle at 30%, meaning that when the remaining battery level of the heavy-duty truck undergoing battery swapping drops to 30%, it must be recharged.
[0054] To more intuitively analyze battery power consumption, this invention expresses battery power as a corresponding driving range. The vehicle's remaining battery power is then converted into remaining driving range. The basic formula for calculating the remaining battery power of a battery-swapping heavy-duty truck is as follows: In the formula, Indicates in heavy trucks The remaining battery power; Indicates from Time's up The distance traveled by the heavy truck at all times; It is the energy conversion coefficient, used to quantify the power loss caused by factors such as braking, road bumps, headwind resistance, and changes in road slope during vehicle operation. It takes a value between 0.9 and 1.
[0055] In the electric heavy-duty truck battery swapping demand estimation model, the model input is the electric heavy-duty truck trip dataset T, and the format of the heavy-duty truck trip dataset is as follows: This includes vehicle number, trip number, trip start and end locations, trip start and end times, trip distance, trip time, stop start and end times, and stop duration. The remaining battery power of each vehicle after each trip is evaluated to determine if a battery swapping requirement exists. This process is then iterated through all trips to obtain all battery swapping demand information, ultimately outputting a battery swapping demand dataset. The preset model outputs a battery swapping demand dataset in the following format: Where k is the heavy truck number, k=1,2,…,n; This is the trip number for heavy truck k. ; These represent the endpoint (latitude and longitude), end time, distance, and duration of the trip for heavy truck k at each destination i. A detailed flowchart for estimating battery swapping demand is attached. Figure 3 As shown, the detailed steps are as follows:
[0056] Step 1: Input the heavy truck trip dataset. Step 2: Initialize vehicle serial numbers. k=1 indicates starting to process the first heavy truck. Step 3: Process the vehicle. Analyze vehicle k.
[0057] Step 4: Initialize the line number and battery level. i=1, This indicates the start of the first stroke of the heavy truck k. This represents the battery level of heavy truck k at the start of the i-th trip. The driving range of the heavy-duty truck (distance traveled on a full charge) is taken as 150km, referencing current mainstream electric heavy-duty truck models. Step 5: Process the trip. Analyze the i-th trip, after which the heavy-duty truck arrives at the stop point. Check if trip i is the vehicle's last trip; if so, proceed to step 8 to end the analysis of that vehicle; otherwise, continue to step 6. Step 6: Calculate the remaining battery power after the trip ends. Calculate the remaining battery power of the heavy-duty truck after the current trip i ends. . This represents the battery level of heavy truck k at the start of the i-th trip. This represents the remaining battery power of heavy truck k after trip i ends. This represents the distance of the i-th trip. Step 7: Determine if a battery swapping requirement has been generated. If... or This generates a battery swapping demand. The current trip information is obtained and added to the battery swapping demand dataset D. At the battery swapping station, the heavy truck will be restored to full charge, i = i + 1. Otherwise, if no battery swapping demand is generated, i = i + 1. Return to step 5 to continue processing the next trip. Step 8: Determine if the vehicle is the last one. End the analysis of the current vehicle, check if vehicle k is the last one. If so, proceed to step 9; otherwise, k = k + 1, return to step 3 to continue processing the next vehicle. Step 9: Process ends. The battery swapping demand estimation process for all electric heavy trucks is complete, output the battery swapping demand dataset D, and the algorithm terminates.
[0058] Phase Two: Site Layout and Capacity Planning: Site layout and capacity planning is the core of multi-phase planning for battery swapping stations. Through demand-driven site selection and dynamic capacity design, it achieves a scientific allocation of site locations and service capabilities. The specific implementation steps are as follows: 1. Candidate Site Generation: This invention combines the battery swapping demand points of electric heavy-duty trucks with service areas within the study area as candidate sites for battery swapping stations. Specifically, based on the spatiotemporal distribution data of battery swapping demand points output from Phase One, the DBSCAN density clustering algorithm (this invention combines the characteristics of the battery swapping demand dataset, setting the neighborhood radius Eps and the minimum number of points MinPts to Eps=1km and MinPts=3 respectively) is used to merge geographically close demand points into a cluster, and the cluster center is taken as a candidate demand point. Output battery swapping demand point dataset: ;
[0059] Where d represents the index of the required point in the dataset. , This indicates the number of heavy-duty truck battery swapping demand points after clustering. This represents the latitude and longitude coordinates of point d.
[0060] Secondly, service area information for the research area needs to be obtained from the Gaode Map Open Platform to construct a service area dataset for the research area: ;
[0061] Where s represents the index of the service area in the dataset. , Indicates the number of service areas within the study area. This represents the latitude and longitude coordinates of service area s.
[0062] Dataset of battery swapping demand points after joint clustering and research area service area dataset A preliminary dataset of candidate battery swapping stations was obtained. ;
[0063] Where f represents the initial sequence number of the candidate sites in the dataset. , The number of initial candidate sites. This represents the latitude and longitude coordinates of the initial candidate site f.
[0064] 2. Nearest Neighbor Search and Site Selection Based on KD-Tree: In determining the final candidate locations for battery swapping stations, it is necessary to comprehensively consider the economic efficiency of station construction and overall planning requirements. The number of battery swapping demand points that a site can cover is considered as the site demand coverage index, denoted as... Whether battery swapping demand points can be covered by existing stations depends on whether the remaining battery power of heavy trucks when they generate a battery swapping demand is sufficient to support their journey to the station. Regarding demand coverage... Lower-performing sites should be removed. The following are the specific implementation steps:
[0065] Step 1: Construct a KD-tree. Obtain the set of demand points from the battery swapping demand dataset D. Each of the demand points It is a two-dimensional coordinate vector , This represents the total demand for battery swapping. (From the initial set of candidate sites) Obtain the initial set of candidate sites Each of the stations It is a two-dimensional coordinate vector , This represents the total number of candidate sites. The coordinates of the sites in the initial candidate site set are used. Constructing a KD-tree : The KD-tree is constructed by recursively partitioning the space. Each time, a dimension is selected as the splitting dimension, and the median of that dimension is used as a node to divide the dataset into two parts. The specific recursive partitioning steps include selecting the splitting dimension, selecting the split points, and dividing the dataset into sub-regions. Let the current layer depth be d, then the splitting dimension k is determined based on the depth. That is, when k=0, the segmentation is based on the x-coordinate; when k=1, the segmentation is based on the y-coordinate. The candidate site set F is sorted according to the segmentation dimension k, and the median is selected as the segmentation point for the current node. ;in, This represents the coordinate value of the k-th dimension. Based on the dividing point... Divide set F into two sub-regions: ; For the region and Recursively construct subtrees until the number of stations in a subregion is less than or equal to 1, at which point the recursion terminates.
[0066] Step 2: Nearest Neighbor Query. For each set of battery swapping demand points... In KD tree Perform a nearest neighbor search to find the closest site. : ;in, This is the Euclidean distance between the demand point and the alternative site.
[0067] Step 3: Coverage condition determination. The heavy truck can only be considered to cover the demand point if its remaining battery power is sufficient to allow it to travel to the battery swapping station. ;in, Indicate demand points The remaining battery power at the location.
[0068] Step 4: Site Filtering. Analyze each site. Based on demand coverage, sites with demand coverage below a set threshold will be excluded: ; ;in, Indicates site The number of demand points that can be covered This represents the updated set of candidate sites after removing sites that do not meet the coverage requirements.
[0069] 3. Site Capacity Design Based on Sliding Window Method: After determining the final locations of candidate sites, it is necessary to further plan and design the number of batteries at each site to generate complete candidate site information including the location and capacity of the battery swapping stations. To ensure that heavy trucks can complete battery swapping operations within one hour, this invention uses the sliding window method, designing the number of batteries at each site to be the maximum number of battery swapping requests that the site can receive within one hour. Firstly, based on the battery swapping demand dataset D and the final set of candidate sites... First, the battery swapping needs of heavy-duty trucks are redistributed to the nearest stations based on the nearest proximity principle; second, the number of battery swapping requests collected for each station m is counted. And these battery swap requests will be processed according to the arrival time of their corresponding vehicles. The requests are arranged in order of priority; finally, for each site, the maximum number of battery swapping requests received within one hour is counted using the sliding window method, and this value is used as the number of batteries at that site. The final dataset obtained for battery swapping demand allocation and final candidate site dataset The steps of the capacity design algorithm based on the sliding window method are as follows:
[0070] Step 1: Initialize parameters. Initialize the maximum request count. Set the size of the sliding window This indicates that the heavy truck can have its battery swapped within 60 minutes. The window starts at [position]. The window ends at [time]. .
[0071] Step 2: Window Sliding. Adjust the start time of the sliding window to... The end time has been adjusted to This ensures that the time frame of the window covers battery swapping requests from the start position to the end position.
[0072] Step 3: Initialize the battery swap request count in the current window. This prepares for request statistics for the current time window.
[0073] Step 4: Iterate through the requested locations. Starting from the current window's start time... Begin by iterating through all battery swap request locations that fall within the window range. For each request time... ,like If successful, the current window's request count will be incremented. Otherwise, stop the request statistics in the current window.
[0074] Step 5: Update the maximum request count. If If true, then update the maximum count to... Otherwise, keep constant.
[0075] Step 6: Determine if all windows have been traversed. If... ,renew and window end time ,in If the step size is the sliding window size, return to step 2 to continue processing the next window; otherwise, continue to step 7.
[0076] Step 7: Termination and Output. The algorithm terminates when all windows have been traversed, meaning the start time of the current window exceeds the time of the last battery swap request in the dataset. The final output is the number of batteries at each station, i.e., the maximum request count. .
[0077] After using the sliding window method for capacity design, a dataset of candidate sites was obtained. ,in .
[0078] Phase Three: Site Selection and Adjustment: To improve the economic efficiency and operational effectiveness of battery swapping stations, single-battery stations with only one battery are typically eliminated in the planning process to avoid resource waste and inefficient investment of manpower and financial resources. However, the multi-stage planning model for intercity battery swapping facilities for heavy-duty trucks constructed in this invention aims to maximize the coverage of battery swapping demand. If single-battery stations are completely eliminated and only multi-battery stations are retained... Subsequently, some demand points may be unable to be served due to a lack of accessible sites. To balance cost-effectiveness and coverage, during the site layout refinement phase, sites that were previously excluded (single-cell sites) need to be re-evaluated. Some sites will be selectively retained and reintegrated into the planning system. Through reasonable selection and reuse, service gaps can be effectively filled and the overall planning efficiency improved.
[0079] This invention employs a frequency-based greedy algorithm to selectively retain sites. Specifically, the process involves: first, counting the number of demand points that each removed candidate site could originally cover, and then sorting them by frequency from highest to lowest. Next, sites are selected and retained sequentially according to this sorting, prioritizing coverage of demand points that currently have no reachable sites. Selection stops when all demand points have been covered, achieving maximum coverage with the fewest retained sites. The specific steps for site selection are as follows:
[0080] Variable definition: The variables in the frequency-first selection method based on the greedy algorithm are defined as follows: A collection of battery swapping demand points. , This represents the i-th demand point; The set of single-battery sites that were removed. , This represents the j-th station; Demand Points The remaining battery power at the location; Demand Points With the site The Euclidean distance between them; Site The set of needs that can be covered ; Site The coverage frequency, that is, the number of demand points that it could originally cover; The set of demand points that are not currently covered. ; The final set of sites retained. .
[0081] Step 1: Initialization. Determine the set of currently uncovered demand points. And empty site retention collection . ; ;
[0082] Step 2: Coverage Frequency Statistics and Sorting. Calculate the coverage frequency for each site. Coverage frequency: ; and in accordance with Sort the sites from highest to lowest, and generate a sorted list of sites. .
[0083] Step 3: Greedy selection of sites. Iterate through the sorted list of sites. For each site Determine whether it can cover the set of currently uncovered demand points. That is, to check: If satisfied, then Add to the reserved set : Remove covered points from the set of uncovered demand points and update the set of uncovered demand points. : ;
[0084] Step 4: Termination Condition. When the set of requirements is not covered. Empty, that is At this point, all requirements have been covered, stop site selection, and output the final set of retained sites. After refining the site layout using a frequency-first selection method based on a greedy algorithm, multiple battery sites were combined. and the site after retention To obtain the final set of battery swapping stations :
[0085] Phase Four: Solution Evaluation: Based on the spatiotemporal distribution of battery swapping demand and the final planning results of battery swapping stations, this invention constructs a simulation model of battery swapping stations to simulate the queuing and battery swapping process of heavy trucks upon arrival. By simulating the queuing dynamics and battery swapping operations of heavy trucks at the station, the service capacity of the station in responding to battery swapping requests and changes in battery status are analyzed. Key indicators such as queuing waiting time and battery swapping completion time are output as the basis for judging whether the battery swapping is successful. Simultaneously, the effectiveness of the battery swapping station layout is evaluated in conjunction with planning evaluation indicators.
[0086] 1. Station Queuing System Analysis: After a heavy-duty truck arrives at a battery swapping station, it must complete the following steps in sequence: entering the station, queuing, unloading empty batteries, loading full batteries, and leaving the swapping station. The battery swapping operation is completed by automated equipment, including removing the old battery, sending it to the charging compartment for charging, and simultaneously retrieving a full battery from the storage area and loading it onto the vehicle. After completing the battery swap, the vehicle leaves, and the next vehicle enters the swapping station in sequence. When there are too many vehicles requesting battery swaps within a certain period, and the station has limited available batteries or swapping stations, vehicles may wait in the queuing lane. The battery swapping station can be considered a queuing system, with the heavy-duty trucks arriving at the station as the service recipients. The system consists of automated battery swapping devices, battery reserves, and charging compartments. The system's operation includes an input process, a queuing process, a service process, a resource recovery process, and an output process.
[0087] Procedure 1: Input Procedure. Using... Represents the candidate site dataset, where For station number, For battery swapping station The number of batteries, Here are the latitude and longitude coordinates of the station location. The calculation of the heavy truck's arrival time at the battery swapping station is as follows: ; ;in, , , , These represent the time, travel time, travel distance, and average speed of the heavy truck k at the battery swapping station m after the end of trip i, respectively. Based on the location where battery swapping demand arises and the location of the battery swapping station The latitude and longitude coordinates are obtained by calculating the great circle distance using the formula.
[0088] Process 2: Queuing Process. Assuming sufficient automatic battery swapping units at the station, whether a vehicle needs to queue upon arrival depends on the station's battery status, represented by a binary variable. This indicates the battery status of the battery swapping station. The battery status of a battery swapping station can be divided into two types: idle and busy. Vehicles do not need to queue; during busy periods Vehicles need to queue and wait. The battery status of the battery swapping station is determined by both the arrival time of the heavy truck and the earliest available time of the battery. ;in, This is a list of the earliest available battery times for battery swapping station m. , This represents the earliest available time of battery j within battery swapping station m. Based on the battery status at the battery swapping station, the queuing time for electric heavy-duty trucks upon arrival at the station is calculated as follows: ;in, This indicates the queuing time for heavy truck k to arrive at battery swapping station m after the end of trip i and wait for battery swapping.
[0089] Process 3: Service Process. The automatic battery swapping system operates on a first-come, first-served basis. The battery swapping service completion time for electric heavy-duty trucks is the time the vehicle arrives at the swapping station plus the queuing time and battery swapping operation time, calculated as follows: in, This indicates the time when the heavy truck k finishes its battery swap at the battery swap station m after the trip i is completed. (Parameter) Regarding battery swapping operation time, the operation time of mainstream automatic battery swapping devices has been significantly reduced to 3 to 5 minutes. Therefore, setting... .
[0090] Process 4: Resource Recovery Process. The disassembled old batteries are transferred to the charging compartment for charging. After charging, they are returned to battery storage to ensure future service needs. The earliest available battery time list is initialized during the initial system phase. All batteries are in a fully charged, idle state. When a vehicle accepts a battery swap service, the battery with the earliest available time in the battery storage compartment is selected. It can be expressed by the following formula: When a battery is removed for battery swapping, the old battery in the battery storage compartment will replace it, and the old battery will immediately begin the charging process. If the battery... Removed for use in vehicles If the battery is swapped, the earliest usable time of the battery will be updated as follows: ;in, Indicates the battery swapping station's m-cell capacity. The earliest available time, This indicates the battery charging speed.
[0091] Process 5: System Output Process. During the system output phase, the heavy-duty trucks that have completed the battery swap leave the swapping station to continue their freight transport duties. The release of the swapping station provides service space for subsequent vehicles, and the queued vehicles move forward in sequence, marking the end of a complete service cycle.
[0092] 2. Battery Swapping Station Simulation Model: The input to the battery swapping station simulation model is the allocation result of battery swapping demand. Vehicle numbers and trip numbers of the battery swapping demands are extracted from the battery swapping demand dataset D obtained from the battery swapping demand estimation model, and the arrival times of the matching electric heavy-duty trucks at the battery swapping station are supplemented. Irrelevant fields are removed. A battery swapping demand allocation dataset is generated from the combined site dataset M. ,in To calculate the number of battery swapping requests collected by battery swapping station m, the battery swapping requests for each station will be calculated based on the vehicle arrival time. The order of events is as follows. The construction of the battery swapping station simulation model simulates the battery swapping behavior of heavy trucks at the station. For each battery swapping demand, vehicle queuing time and battery swapping completion time are added, providing a data foundation for subsequent judgments on whether battery swapping demands can be met and for analyzing the substitutability of electric heavy trucks. The format of the heavy truck battery swapping station simulation dataset output by the preset model is as follows: The output data includes basic information about the battery swapping station and simulation results for heavy-duty truck battery swapping. The specific algorithm flow of the battery swapping station simulation model is attached. Figure 4 As shown, the specific steps are as follows: Step 1: Input the battery swapping demand allocation dataset A. Step 2: Initialize the site sequence number. This indicates that processing of the first site has begun. Step 3: Process the site. Analyze site m. Step 4: Initialize the battery swapping request sequence number and the earliest available time list of the site's batteries. , This indicates that the first battery swapping request at station m has begun to be processed. Step 5: Process the request. Analyze the s-th request and obtain the vehicle's arrival time at the station. and the earliest available time of the site battery Step 6: Determine if the vehicles need to queue. If If the station is idle, heavy trucks can directly swap batteries, at which point the queuing time will be reduced. Calculate the end time of battery swapping Otherwise, the station will be busy, and heavy trucks will need to wait in line for their batteries to be fully charged; the waiting time will be calculated. The end of the battery swap Queuing time and the end time of battery swapping Add the corresponding battery swapping demand row to the battery swapping station simulation dataset S. Step 7: Update the list of earliest available battery times for the site. Step 8: Determine if the battery swap request is the last one. If yes, proceed to Step 9 to end the processing of this request; otherwise... Return to step 5 to continue processing the next request. Step 9: Determine if this is the last site. If yes, proceed to step 10 to end processing for that site; otherwise... Return to step 3 to continue processing the next station. Step 10: Process ends. The simulation process for all battery swapping stations is complete, the battery swapping station simulation dataset S is output, and the algorithm terminates.
[0093] 3. Determining the Success or Failure of Battery Swapping: For the output battery swapping station simulation dataset S, it is necessary to determine the queuing time. and the end time of battery swapping The analysis is performed to determine whether the heavy truck successfully completed the battery swap, based on the following criteria: During freight transport, heavy trucks requiring battery swapping will detour to a battery swapping station after their current trip, utilizing the stop time to recharge. After swapping, they will return to their original stop location to prepare for the next trip. Considering the time-sensitive nature of orders, this invention assumes that delays caused by battery swapping will not affect order execution. However, to avoid delays in subsequent orders, the delay of the next trip must not exceed its stop time. Therefore, heavy trucks can utilize the stop time of the current trip and the next trip to complete the entire battery swapping process. If the total time spent detouring to the battery swapping station, completing the swap, and returning does not exceed the sum of the two stop times, the battery swap is considered successful, and the current demand is met. Simultaneously, the delay time of the freight order can be calculated. ;in This indicates the order delay caused by heavy truck k going to battery swapping station m after trip i.
[0094] 4. Evaluation of Battery Swapping Station Planning: To comprehensively evaluate the planning effect of battery swapping stations, this invention takes into account key factors such as the completion rate of freight trip orders, economy and timeliness, and selects the battery swapping heavy truck replacement rate, total planning cost and battery swapping loss time as core evaluation indicators to systematically analyze the planning status of battery swapping stations.
[0095] Indicator 1: Battery Swapping Heavy Truck Replacement Rate. Based on the simulation results of battery swapping stations, the success of battery swapping in freight transportation can be determined, thereby inferring whether the trip was executed smoothly. To quantify trip completion, this invention introduces the "replacement rate indicator," defined as: under a given battery swapping station plan, the percentage of freight trips completed by electric heavy trucks after replacing diesel heavy trucks out of the original total number of freight trips, used to measure the substitution effect of electric heavy trucks on diesel heavy trucks. A heavy truck k's freight trip within a day is divided into three components: the initial trip before the generation of battery swapping demand, the battery swapping event after the generation of battery swapping demand, and the trip after the battery swapping event, denoted as trips respectively. Battery swapping incident and itinerary .journey All were successfully completed; battery swapping incident Whether it can be completed depends on the assessment of whether the battery swapping demand can be met after simulation at the battery swapping station, and whether all battery swapping events before that can be completed; journey Whether or not the battery swapping project can be completed is affected by whether or not previous battery swapping events were completed. If the previous battery swapping events cannot be fully completed, then all subsequent ones... None of these steps could be completed. The above process is a typical event model based on sequence dependency, where the success or failure of subsequent events depends on the state of preceding events. This invention will utilize this event model based on sequence dependency to calculate the battery swapping rate for heavy-duty trucks. (Travel) Battery swapping incident and itinerary The states are represented as follows: ; ; ;in, Indicates the k-stroke of a heavy truck The state indicates a certainty of success; Indicates a battery swapping event The state when it is successful. ,otherwise ; Indicates itinerary The state when it is successful. ,otherwise Regarding battery swapping incidents Whether a user's battery swapping demand can be met depends on conditions beyond the event model based on sequence dependencies. Specifically, it depends on whether the remaining battery power at the end of their journey is sufficient to reach a battery swapping station; that is, whether the demand is covered by a station. If not, the demand cannot be met. Whether a battery swapping demand can be met is considered an independent event. ;in, Indicates a battery swapping event Can the demand for battery swapping be met? If so, then... ,otherwise Battery swapping incident status depending on Whether the battery swapping demand at the location can be met, and Can all previous battery swapping events be completed? ;journey status depending on The status of all previous battery swapping events: Where ∏ represents the product of all relevant event states. The overall state judgment and replacement rate calculation are as follows: First, the initial state of all trips and battery swapping events in the heavy truck k freight is set to 1 (default success), i.e. Next, starting with the first itinerary. The system begins to assess its status when a battery swapping event occurs. At that time, according to Determine the state; for All subsequent itineraries ,according to The status is determined. Finally, in the event model based on sequence dependencies, the electric heavy-duty truck substitution rate is defined as the proportion of trips successfully completed. The calculation formula is as follows: ;in, This represents the quantified heavy-duty truck replacement rate. This represents the total number of strokes for heavy truck k.
[0096] Indicator 2: Total Planned Cost. The planned cost of a battery swapping station consists of the station's fixed construction costs and construction and operation costs: ;in, This represents the average total annual cost after comprehensively considering the fixed construction costs and operation and maintenance costs of the battery swapping station; This indicates the fixed construction cost of the battery swapping station; This represents the operation and maintenance cost of the battery swapping station. The formula for calculating fixed construction costs is as follows: ; ;in, Let m be the decision variable. If a station is built at candidate site m, then ,otherwise M represents the set of candidate sites. ; The total number of battery swapping stations to be built. This indicates the number of batteries at station m; This indicates a discount rate of 0.05. This indicates that the battery swapping station has a service life of 20 years. This indicates that the battery purchase cost is 50,000 yuan. The basic construction investment for the battery swapping station is 3 million yuan. This indicates that the land area of the battery swapping station is 1000 square meters. This indicates that the land acquisition fee per unit area is 0.03 million yuan / square meter. The purchase cost of the power distribution and battery swapping facilities is 1.5 million yuan. The cost of monitoring the power distribution and battery swapping system is 800,000 yuan. The cost of other auxiliary infrastructure within the battery swapping station is 500,000 yuan. The formula for calculating operation and maintenance costs is as follows: ;in, This indicates that the average charging cost per battery is 50 yuan per day. This indicates a network loss rate of 0.1%. The battery's operating and maintenance cost is stated as 20 yuan per day. This indicates that the daily wage for staff is 200 yuan / day. The monthly battery testing fee is 500 yuan.
[0097] Indicator 3: Battery Swapping Loss Time. During intercity heavy-duty truck transportation, when vehicles require battery swapping due to insufficient power, they will proceed to the nearest battery swapping station for service and continue fulfilling subsequent freight orders after the swap. The additional time costs that heavy-duty trucks may incur due to battery swapping mainly include the time required to detour to the battery swapping station, the time spent queuing at the station, and the delay in the next order caused by the swap. (Battery swapping station planning results in detour time for heavy-duty trucks.) Queueing time and delay time The calculation formula is as follows:
[0098] ;
[0099] ;
[0100] ;
[0101] in, Let m be the decision variable. If the heavy truck k arrives at the battery swapping station m after the end of trip i, then Otherwise, it is 0. This indicates that the analysis object is all battery swapping demands in the battery swapping demand dataset D. Finally, based on the above indicators, the evaluation of the battery swapping station layout planning scheme is completed.
[0102] Please refer to the following: Figure 5 , Figure 5An electric heavy-duty truck battery swapping station planning device 110 provided in this embodiment of the invention includes: an estimation module 1101, used to simulate the freight transport process of electric heavy-duty trucks based on preset heavy-duty truck travel data, and output a battery swapping demand dataset of the freight transport process through a preset battery swapping demand triggering mechanism; a planning module 1102, used to cluster the battery swapping demand points in the battery swapping demand dataset, and generate an initial candidate site dataset by combining service area information within the study area; based on the battery swapping demand dataset and the initial candidate site dataset, the demand coverage of each candidate site is determined by nearest neighbor search, and sites with demand coverage below a set threshold are filtered out to obtain the filtered candidate sites; Based on the time distribution of battery swapping requests received at the selected candidate sites, the number of batteries at each site is determined using a sliding window algorithm. The filtering module 1103 is used to eliminate candidate sites with only single batteries and employs a greedy algorithm based on coverage frequency priority to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, thus obtaining the final set of planned battery swapping stations. The evaluation module 1104 is used to construct a battery swapping station simulation model to simulate the battery swapping process of electric heavy trucks at the stations in the final planned set, and output at least one evaluation index among electric heavy truck replacement rate, planning cost, and battery swapping loss time, thereby completing the evaluation of the battery swapping station planning scheme.
[0103] It should be noted that the implementation principle of the aforementioned electric heavy-duty truck battery swapping station planning device 110 can refer to the implementation principle of the aforementioned electric heavy-duty truck battery swapping station planning method, and will not be repeated here.
[0104] This invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned electric heavy-duty truck battery swapping station planning device 110. Figure 6 As shown, Figure 6 This is a structural block diagram of a computer device 100 provided in an embodiment of the present invention. The computer device 100 includes an electric heavy-duty truck battery swapping station planning device 110, a memory 111, a processor 112, and a communication unit 113.
[0105] To enable data transmission or interaction, the memory 111, processor 112, and communication unit 113 are electrically connected to each other directly or indirectly. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The electric heavy-duty truck battery swapping station planning device 110 includes at least one software function module that can be stored in the memory 111 or embedded in the operating system (OS) of the computer device 100 in the form of software or firmware. The processor 112 is used to execute the electric heavy-duty truck battery swapping station planning device 110 stored in the memory 111, such as the software function modules and computer programs included in the electric heavy-duty truck battery swapping station planning device 110.
[0106] This invention provides a readable storage medium, which includes a computer program. When the computer program runs, it controls the computer device where the readable storage medium is located to execute the aforementioned electric heavy-duty truck battery swapping station planning device 110.
[0107] For illustrative purposes, the foregoing description has been made with reference to specific embodiments. However, the foregoing illustrative discussions are not intended to be exhaustive or to limit the present disclosure to the precise forms disclosed. Numerous modifications and variations are possible in accordance with the foregoing teachings. These embodiments were chosen and described in order to best illustrate the principles of the present disclosure and its practical application, thereby enabling those skilled in the art to best utilize the disclosure and to employ various embodiments with different modifications to suit a particular intended application.
Claims
1. An electric heavy-duty truck battery swap station planning method, characterized in that, include: Based on preset heavy truck travel data, the freight transportation process of electric heavy trucks is simulated, and the battery swapping demand dataset of the freight transportation process is output through a preset battery swapping demand triggering mechanism. Cluster the battery swapping demand points in the battery swapping demand dataset and combine them with service area information within the study area to generate an initial candidate site dataset. Based on the battery swapping demand dataset and the initial candidate site dataset, the demand coverage of each candidate site is determined by nearest neighbor search, and sites with demand coverage below a set threshold are filtered out to obtain the filtered candidate sites. Based on the time distribution of battery swapping requests received by the selected candidate sites, the number of batteries at each site is determined using a sliding window algorithm. Candidate sites with only one battery are eliminated, and a greedy algorithm based on coverage frequency priority is used to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, thus obtaining the final set of battery swapping station plans. A simulation model of a battery swapping station is constructed to simulate the battery swapping process of electric heavy trucks in the battery swapping stations in the final battery swapping station planning set. The model outputs at least one evaluation index among electric heavy truck replacement rate, planning cost and battery swapping loss time, and completes the evaluation of the battery swapping station planning scheme. The preset battery swapping demand triggering mechanism includes: When the remaining driving range after the trip ends is less than the mileage of the next order or less than or equal to the minimum remaining mileage limit, a battery swapping requirement is triggered. The remaining range is calculated by the formula: = 100 - (0.1 * (0.5 * 0.5 + 0.5 * 0.5 in, This indicates the heavy truck at time t. The remaining battery power; Indicates from Time's up The distance traveled by the heavy truck at all times; It is the energy conversion coefficient; The construction of the battery swapping station simulation model, which simulates the battery swapping process of electric heavy-duty trucks at the battery swapping stations in the final battery swapping station planning set, includes: Based on the battery swapping demand dataset and the final battery swapping station planning set, a battery swapping demand allocation dataset is generated. The battery swapping demand allocation dataset includes the vehicle number, trip number, arrival time of the corresponding battery swapping station determined based on preset allocation rules, detour time from the battery swapping demand point to the corresponding battery swapping station, and the current order dwell time and the next order dwell time corresponding to the battery swapping demand. Using the battery swapping demand allocation dataset as input to the battery swapping station simulation model, for each battery swapping station in the final battery swapping station planning set, the battery swapping requests allocated to the battery swapping station in the battery swapping demand allocation dataset are traversed in chronological order, and the following is executed for each battery swapping request: Extract the arrival time, detour time, current order dwell time, and next order dwell time of the current battery swapping request from the battery swapping demand allocation dataset; Obtain the list of earliest battery availability times for the battery swapping station at the arrival time; If the arrival time is greater than or equal to the minimum available time in the earliest available battery time list, the battery swapping station is determined to be idle, the queuing time is 0, and the battery swapping operation time is the preset battery swapping operation duration; if the arrival time is less than the minimum available time in the earliest available battery time list, the battery swapping station is determined to be busy, the queuing time is the difference between the minimum available time in the earliest available battery time list and the arrival time, and the battery swapping operation time is the preset battery swapping operation duration. The total battery swapping time is the sum of the detour time, queuing time, and battery swapping operation time. If the total battery swapping time does not exceed the sum of the current order dwell time and the next order dwell time, the battery swapping is considered successful and the battery swapping request is recorded as a valid demand; otherwise, the battery swapping is considered a failure and is recorded as an unmet demand. If the battery swap is successful, update the earliest available battery time list: update the earliest available time of the battery corresponding to the smallest available time in the earliest available battery time list to the sum of arrival time, queuing waiting time, battery swap operation time and preset battery charging time. The preset battery charging time is calculated based on the electric heavy truck's range and battery charging speed. Based on the success and failure results of all battery swap requests, the number of successful battery swaps and the number of unmet requests are counted.
2. The method according to claim 1, characterized in that, The process of clustering the battery swapping demand points in the battery swapping demand dataset and combining this with service area information within the study area to generate an initial candidate site dataset includes: The DBSCAN density clustering algorithm is used to cluster battery swapping demand points. Based on the preset neighborhood radius and minimum number of points, demand points with similar geographical distances are merged into clusters, and the cluster center point is taken as the candidate demand point. Obtain the latitude and longitude coordinates of service area information within the study area and construct a service area dataset; By combining the candidate demand points with the service area locations, an initial candidate site dataset is generated, which includes the site number and latitude and longitude coordinates.
3. The method according to claim 1, characterized in that, Based on the battery swapping demand dataset and the initial candidate site dataset, the demand coverage of each candidate site is determined through nearest neighbor search, and sites with demand coverage below a set threshold are filtered out to obtain the filtered candidate sites, including: Extract the geographic coordinates of all battery swapping demand points from the battery swapping demand dataset to form a set of battery swapping demand points; extract the geographic coordinates of all candidate sites from the initial candidate site dataset to form an initial candidate site set; Based on the initial candidate site set, a KD tree is constructed. The construction process includes: determining the spatial segmentation dimension according to the current tree layer depth; segmenting by horizontal coordinate when the depth is even and by vertical coordinate when the depth is odd; sorting the site coordinates in each segmentation dimension by size, selecting the coordinate value of the middle position as the segmentation point, and dividing the initial candidate site set into two sub-regions; recursively performing the above segmentation steps for each sub-region until the number of sites in the sub-region does not exceed 1, at which point the recursion stops. For each battery swapping demand point in the set of demand points, a nearest neighbor search is performed in the KD tree to find the candidate site that is closest to the demand point in a straight line, which is called the nearest candidate site; Determine whether the nearest alternative station covers the demand point: If the remaining battery power of the heavy truck at the demand point can support it to travel to the nearest alternative station, that is, the straight-line distance between the demand point and the nearest alternative station is less than or equal to the remaining driving range of the heavy truck at the demand point, then it is determined that the nearest alternative station covers the demand point. The number of battery swapping demand points covered by each candidate site in the initial candidate site set is counted as the demand coverage of that site; Set a demand coverage threshold, and remove candidate sites with demand coverage below the demand coverage threshold from the initial candidate site set. The remaining sites constitute the filtered candidate sites.
4. The method according to claim 1, characterized in that, The determination of the number of batteries at each site based on the time distribution of battery swapping requests received by the selected candidate sites, using a sliding window algorithm, includes: Based on the battery swapping demand dataset and the selected candidate sites, the battery swapping demand is allocated to the nearest selected candidate site according to the nearest neighbor principle; For each selected candidate site, the number of battery swapping requests received is counted, and the battery swapping requests received by that site are arranged in order of the time the vehicles arrive at the site. Based on a preset sliding window, the window is slid at a fixed time step to traverse all battery swapping requests arranged in chronological order, count the number of battery swapping requests received by the site in each window, and record the maximum number of requests. The maximum number of requests is used as the number of batteries for the candidate sites after filtering.
5. The method according to claim 1, characterized in that, The process involves eliminating candidate sites with only single-cell batteries, and then using a greedy algorithm based on coverage frequency priority to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, resulting in the final battery swapping station planning set, including: From the selected candidate sites, single-battery sites with n batteries are removed, and multi-battery sites with more than n batteries are retained. The number of battery swapping demand points that each removed single-battery site could originally cover was counted, and this number was used as the coverage frequency. The removed single-battery sites were then sorted from high to low according to the coverage frequency. Determine the set of battery swapping demand points that are currently not covered, wherein the set of battery swapping demand points that are not covered by the multi-battery station alone; Select the single-battery sites to be eliminated in order of sorting, prioritize retaining the sites that can cover the largest number of the uncovered battery swapping demand points, and remove the demand points covered by the retained sites from the set of uncovered battery swapping demand points. Repeat the above site selection steps until the set of uncovered battery swapping demand points is empty or there are no more single-battery sites to choose from. The retained single-battery sites are merged with the multi-battery sites to form the final set of battery swapping station plans.
6. The method according to claim 1, characterized in that, The electric heavy-duty truck replacement rate is calculated using the following formula: ; in, This represents the quantified heavy-duty truck replacement rate. This represents the total number of strokes for heavy truck k. Indicates the k-stroke of a heavy truck state, Indicates itinerary The state; The planning cost is calculated using the following formula: ; ; ; ; in, For planning costs, For operation and maintenance costs, To fix construction costs, Let M be the set of candidate sites, and M be the location decision variable. The total number of battery swapping stations to be built. Let m be the number of batteries at site m. The discount rate is... The service life of the battery swapping station. For battery purchase costs, This refers to the basic construction investment amount for the battery swapping station. The land area of the battery swapping station. The land acquisition fee per unit area For the purchase cost of power distribution and battery swapping facilities, To reduce the monitoring costs of power distribution and battery swapping systems, For the construction costs of other auxiliary infrastructure within the battery swapping station, The average cost of charging each battery. For network loss rate, For the operation and maintenance costs of the battery, For the daily wage of staff, Monthly inspection fee for the battery; The battery swapping loss time is calculated using the following formula: ; ; ; ; in, For the time it takes for heavy trucks to take detours, For queuing time, To delay time, To assign decision variables, This represents all battery swapping demands in the battery swapping demand dataset D.
7. A planning device for an electric heavy-duty truck battery swapping station, characterized in that, include: The estimation module is used to simulate the freight transportation process of electric heavy trucks based on preset heavy truck travel data, and output the battery swapping demand dataset of the freight transportation process through a preset battery swapping demand triggering mechanism. The planning module is used to cluster the battery swapping demand points in the battery swapping demand dataset and generate an initial candidate site dataset by combining it with service area information within the study area. Based on the battery swapping demand dataset and the initial candidate site dataset, the demand coverage of each candidate site is determined by nearest neighbor search, and sites with demand coverage below a set threshold are filtered out to obtain the filtered candidate sites. Based on the time distribution of battery swapping requests received by the filtered candidate sites, the number of batteries at each site is determined by a sliding window algorithm. The filtering module is used to eliminate candidate sites with a single battery, and to use a greedy algorithm based on coverage frequency priority to determine the sites to be retained from the eliminated candidate sites to cover the uncovered battery swapping demand points, thus obtaining the final battery swapping station planning set. The evaluation module is used to build a simulation model of the battery swapping station, simulate the battery swapping process of electric heavy trucks in the battery swapping stations in the final battery swapping station planning set, and output at least one evaluation index among electric heavy truck replacement rate, planning cost and battery swapping loss time, so as to complete the evaluation of the battery swapping station planning scheme. The preset battery swapping demand triggering mechanism includes: A battery swap is triggered when the remaining driving range after the trip is less than the next order's mileage or less than or equal to the minimum remaining mileage limit; the remaining driving range is determined by the formula: Calculated; where, This indicates the heavy truck at time t. The remaining battery power; Indicates from Time's up The distance traveled by the heavy truck at all times; It is the energy conversion coefficient; The evaluation module is specifically used for: Based on the battery swapping demand dataset and the final battery swapping station planning set, a battery swapping demand allocation dataset is generated. This dataset includes the vehicle number, trip number, arrival time at the corresponding battery swapping station determined based on preset allocation rules, detour time from the demand point to the station, and the current and next order dwell times for each battery swapping demand. Using this dataset as input to the battery swapping station simulation model, for each station in the final planning set, the battery swapping requests allocated to that station in the dataset are traversed chronologically. For each request, the following steps are performed: extracting the arrival time, detour time, current and next order dwell times from the dataset; obtaining a list of the earliest available battery times for the station at the arrival time; and determining that the station is idle and the queuing time is 0 if the arrival time is greater than or equal to the minimum available time in the earliest available battery times list, and initiating the battery swapping operation. The time interval is the preset battery swapping operation duration. If the arrival time is less than the minimum available time in the earliest available battery time list, the battery swapping station is considered busy, the queuing time is the difference between the minimum available time in the earliest available battery time list and the arrival time, and the battery swapping operation time is the preset battery swapping operation duration. The sum of the detour time, queuing time, and battery swapping operation time is the total battery swapping time. If the total battery swapping time does not exceed the sum of the current order's dwell time and the next order's dwell time, the battery swapping is considered successful, and the battery swapping request is recorded as a valid demand. Otherwise, the battery swapping is considered a failure, and it is recorded as an unmet demand. If the battery swapping is successful, the earliest available battery time list is updated: the earliest available time of the battery corresponding to the minimum available time in the earliest available battery time list is updated to the sum of the arrival time, queuing time, battery swapping operation time, and preset battery charging time. The preset battery charging time is calculated based on the electric heavy truck's range and battery charging speed. Based on the success and failure determination results of all battery swapping requests, the number of successful battery swaps and the number of unmet demands are counted.
8. A readable storage medium, characterized in that, The readable storage medium includes a computer program, which, when executed, controls the computer device on which the readable storage medium is located to perform the method described in any one of claims 1-6.