Pumped storage station rapid general selection method and equipment based on hierarchical clustering and parallel computing and storage medium
By quickly screening out the site selection of pumped storage power stations that meet the conditions based on hierarchical clustering and parallel computing, the problem of low site selection efficiency in the existing technology is solved, and efficient and accurate site selection results are achieved.
Patent Information
- Application Number
- CN202510355165.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-03-25
AI Technical Summary
In the prior art, the site selection efficiency of pumped storage power stations is not high, and the analysis time is too long, making it difficult to meet the overall planning needs of large-scale areas.
The method based on hierarchical clustering and parallel calculation is adopted, and the digital elevation model data is obtained for pre-processing, hierarchical clustering is performed, and multi-process parallel calculation is performed based on the pre-established reservoir target constraints to quickly filter out the site selection of the power stations that meet the conditions.
It improves site selection efficiency, reduces the probability of missed selection, provides a scientific site selection basis, and meets the overall planning needs of pumped storage power plants in a large area.
Smart Images

Figure CN119863043A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of pumped storage planning site selection, and in particular to a method, device and storage medium for rapid general selection of pumped storage power station sites based on hierarchical clustering and parallel computing. Background Art
[0002] As a component of the new power system based on new energy, pumped storage plays a vital role in the development of new energy. The site selection of power stations is an important preliminary work of pumped storage projects. Traditional power station site selection mainly relies on manual field surveys and data analysis, which takes a lot of time and energy. This site selection method is not only labor-intensive and wastes manpower and material resources, but also has a limited scope of analysis, which makes it difficult to meet the overall planning needs of pumped storage power stations in large areas.
[0003] With the continuous deepening of the research on the site selection of pumped-storage power stations by scholars at home and abroad, the research on the efficiency of site selection and the scientific nature of site selection has flourished. These research directions are mainly manifested in: the site selection scheme is becoming more multidimensional, the evaluation indicators are becoming more abundant, and the adopted technologies are becoming more diverse. As the digital site selection scheme is gradually improved, more and more pumped-storage projects have begun to change the site selection method of power stations. However, in actual application scenarios, the site selection range of pumped-storage power stations is relatively wide. Although the digital site selection method has improved the efficiency compared with the traditional manual site selection, it still has the problem of too long analysis time in actual applications, and the site selection efficiency needs to be continuously optimized. Therefore, in view of the problem that the site selection efficiency of existing research is not high in actual applications, the present invention proposes a method for rapid general selection of pumped-storage power station sites based on hierarchical clustering and parallel computing.
[0004] In view of this, it is necessary to propose a method, device and storage medium for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing to solve or at least alleviate the above defects. Summary of the invention
[0005] The main purpose of the present invention is to provide a method, device and storage medium for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing, so as to solve the technical problems in the prior art that the site selection efficiency of pumped storage power stations is low, the analysis time is too long, and the site selection efficiency needs to be continuously optimized.
[0006] To achieve the above object, the present invention provides a method for rapid general selection of pumped storage power station sites based on hierarchical clustering and parallel computing, comprising the following steps: S1, acquiring digital elevation model data of a target point selection area, and preprocessing the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set; S2, performing hierarchical clustering processing on the candidate point information to obtain a candidate point classification result data set; S3, performing multi-process parallel calculation on the candidate point classification result data set according to the pre-established reservoir target constraint condition to obtain a final candidate point set that meets the reservoir target constraint condition.
[0007] Preferably, the step S1 specifically includes the following steps: S11, extracting contour data according to a preset contour interval and the digital elevation model data, and extracting river network data according to a water system flow threshold and the digital elevation model data; S12, obtaining the river network segments in the river network data, traversing all the river network segments, and then extracting the midpoint of each river network segment and putting it into the candidate point data set P; wherein, , represents the i-th candidate point, and n represents the number of candidate points; S13, calculating the elevation of each candidate point in the candidate point data set P, and collecting the elevations of all candidate points to obtain a candidate point elevation data set.
[0008] Preferably, the step S2 specifically includes the following steps: S21, traversing the candidate point data set , calculate the candidate point dataset The distance between each candidate point in is obtained to obtain the distance matrix E; the expression of the distance matrix E is: ; in, ; represents the distance between the i-th cluster and the j-th cluster, is the Euclidean distance, when i=j, , candidate point dataset Each candidate point in is a separate cluster; S22, searching for two clusters with the closest distance according to the distance matrix E, and merging the two clusters if the distance between the two clusters with the closest distance is less than a distance threshold, otherwise not merging; S23, update the distance matrix E; S24, repeat steps S22-S23 until the distances between all clusters are greater than or equal to the distance threshold, and obtain the candidate point classification result data set ;in, , represents the jth cluster, , express The tth candidate point in , m represents the number of clusters, and z represents the number of candidate points in the cluster.
[0009] Preferably, the reservoir target constraint condition in step S3 is: in, To constrain the dam length, is the dam height constraint, is the storage capacity constraint, is the length of the reservoir dam line of the i-th candidate point, is the reservoir dam height of the i-th candidate point, is the reservoir capacity of the i-th candidate point, The maximum dam length allowed by the project, The maximum reservoir dam height allowed by the project, It is the minimum reservoir capacity allowed by the project.
[0010] Preferably, the step S3 specifically includes the following steps: S31, start multiple processes based on the preset number of sub-processes U ;in, , Represents the tth child process; S32, traverse the candidate point classification result dataset , the candidate point classification result dataset The clusters in are sequentially assigned to idle subprocesses for multi-process parallel calculation to obtain the final set of candidate points that meet the reservoir target constraints; one cluster is a task. When the number of tasks is greater than the number of subprocesses U, all subprocesses are in working state, and unassigned tasks will only be assigned when the subprocess state becomes idle.
[0011] Preferably, in step S32, the candidate point classification result data set The clusters in are successively assigned to idle subprocesses for multi-process parallel calculation to obtain the final candidate point set that meets the reservoir target constraint conditions; among them, for the subprocess In , perform the following steps: S321, traverse the collection , according to the candidate points Elevation , Maximum reservoir dam height , filter the contour data according to the elevation, and obtain the filtered contour set ,in, represents the fth contour line, g represents the number of contour lines in the set, express The elevation of satisfy ; S322, obtaining candidate points The coordinates of the plane point And get candidate points The river network segment where the candidate points are calculated And the straight line intersecting with the river network segment; S323, obtaining the required line segment located on the straight line And solve the required line segment The coordinates of the two endpoints; S324, based on the preset rotation angle , calculate the total number of rotations c ; S325, traverse c Second, for the required line segment Perform rotation at different angles to determine whether the currently calculated candidate point has a reservoir dam line that meets the reservoir target constraint conditions; specifically, the following steps are included: S3251, calculate the slope of the straight line after the uth rotation angle , and solve for the required line segment The coordinates of the two endpoints at this angle; S3252, generate a line feature layer according to the coordinates of the two endpoints, and use the intersection analysis tool of arcpy to extract the intersection points with the contour lines to obtain the reservoir dam line; in the intersection layer attribute table, filter out single-point type geometric elements and retain multi-point type geometric elements; S3253, calculating the length of each reservoir dam line, and obtaining a dam line set whose reservoir dam line length satisfies the dam length constraint; S3254: Sort the reservoir dam lines according to the elevation of their endpoints from high to low, select the dam line B with the highest elevation, and compare it with the contour line where its endpoints are located. Get the closed polygon formed by the dam line B with the highest elevation and the contour lines ; S3255, based on closed polygon and digital elevation model data to determine reservoir capacity ; S3256, if the reservoir capacity , then return to step S325 and perform the next rotation angle; otherwise, if the currently calculated candidate point has a reservoir dam line that meets the reservoir target constraint condition, traverse End, the candidate point Put it into the final candidate point set P'', the subprocess Changes to idle state.
[0012] Preferably, the equation of the straight line in step S322 is specifically expressed as: When k exists, ; When k does not exist, ; where k is the slope, y is the dependent variable, and x is the independent variable.
[0013] Preferably, the step S323 specifically includes the following steps: The required line segment The length is set to 2 , the solution process of the two endpoint coordinates is as follows: When k exists, the distance formula between two points is used to solve the coordinates of the two end points of the line segment, that is: The coordinates of the two end points of the line segment are obtained by deriving the formula ( , )、( , )for: ; When k does not exist, the coordinates of the two end points of the line segment are ( , )、( , ).
[0014] The present invention also provides a pumped storage power station site rapid general selection device based on hierarchical clustering and parallel computing, comprising: A preprocessing unit, used to obtain digital elevation model data of the target point selection area, and preprocess the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set; A hierarchical clustering processing unit, used to perform hierarchical clustering processing on the candidate point information to obtain a candidate point classification result data set; The parallel computing unit is used to perform multi-process parallel computing on the candidate point classification result data set according to the pre-established reservoir target constraint condition to obtain a final candidate point set that meets the reservoir target constraint condition.
[0015] The present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for rapid general election of pumped storage power station sites based on hierarchical clustering and parallel computing as described above.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method, device and storage medium for rapid general selection of pumped storage power station sites based on hierarchical clustering and parallel computing. The method obtains digital elevation model data of a target site selection area and pre-processes the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set, hierarchical clustering is performed on the candidate point information to obtain a candidate point classification result data set, and multi-process parallel computing is performed on the candidate point classification result data set according to pre-established reservoir target constraints to obtain a final candidate point set that meets the reservoir target constraints.
[0017] The present invention considers spatial autocorrelation and site selection efficiency, clusters the midpoints of river network segments based on the hierarchical clustering method, and uses multi-process parallel technology to regard each cluster as a point-finding task, which is assigned to an idle subprocess. Through the preset reservoir target constraint conditions, the power stations that meet the conditions are quickly selected. Compared with the traditional manual site selection, the present invention, as a digital method of selecting power stations, not only improves the efficiency of site selection in actual application scenarios, but also reduces the probability of wrong selection and missed selection, providing a scientific basis for the planning of pumped storage power stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0019] Figure 1 is a schematic diagram of a flow chart in one embodiment of the present invention; Figure 2 Schematic diagram of the site selection results of the target selection area in one embodiment of the present invention.
[0020] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] In the present invention, the descriptions of "right part", "middle part", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "right part" and "middle part" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0024] Please refer to the attached Figure 1 to Figure 2 In one embodiment of the present invention, a method for rapid general selection of pumped storage power station sites based on hierarchical clustering and parallel computing comprises the following steps: S1, acquiring digital elevation model data of a target point selection area, and preprocessing the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set; Specifically, digital elevation model data is DEM (Digital Elevation Model) data, which is a digital expression of the terrain surface morphology and contains a large amount of rich geographic information. DEM data plays an important role in digital site selection. Preferably, the arcpy site package is used to call ArcGIS analysis tools to pre-process the DEM data to obtain candidate point information.
[0025] S2, performing hierarchical clustering processing on the candidate point information to obtain a candidate point classification result data set; It is worth noting that this application classifies candidate points based on a hierarchical clustering method. Starting from the first law of geography that similar things are more related, this application believes that in general, similar candidate points on the same river or adjacent rivers have similar attributes. Therefore, when there are candidate power station points that meet the construction conditions within a certain distance, other candidate points within the range are regarded as homogeneous power stations, and no redundant analysis and calculation are performed. Therefore, this application adds a distance threshold D constraint when clustering.
[0026] S3, performing multi-process parallel calculation on the candidate point classification result data set according to the pre-established reservoir target constraint condition to obtain a final candidate point set that meets the reservoir target constraint condition.
[0027] In order to improve the efficiency of power station site selection, a general election is quickly conducted in the entire area of interest to form digital assets. This application maximizes the use of computer resources and adopts parallel accelerated calculation for clustering results. By controlling multiple subprocesses, clusters to be calculated are allocated to each idle subprocess. When the number of clusters to be calculated is greater than the number of idle subprocesses, the unallocated clusters continue to be allocated when the subprocess status becomes idle. Each subprocess analyzes and calculates the candidate points in the cluster based on the reservoir target constraints, thereby screening the candidate points that meet the conditions to obtain the final candidate point set.
[0028] In this application, by considering spatial autocorrelation and site selection efficiency, the midpoints of the river network segments are clustered based on the hierarchical clustering method, and each cluster is regarded as a point-finding task by using multi-process parallel technology, and is assigned to an idle sub-process. Through the preset reservoir target constraint conditions, qualified power stations are quickly selected. Compared with traditional manual site selection, this invention, as a digital method of selecting power stations, not only improves the efficiency of site selection in actual application scenarios, but also reduces the probability of wrong selection and missed selection, providing a scientific basis for the planning of pumped storage power stations.
[0029] As a preferred implementation, step S1 specifically includes the following steps: S11, extracting contour data according to the preset contour interval and the digital elevation model data, and extracting river network data according to the water system flow threshold and the digital elevation model data; according to the preset contour interval and water system flow threshold, using arcpy's contour analysis tool and hydrological analysis tool (including filling, flow direction, flow, conditional function, river chain, river classification, river vectorization, etc.) to respectively extract contour data and river network data of the target point selection area.
[0030] S12, obtaining the river network segments in the river network data, traversing all the river network segments, and then extracting the midpoint of each river network segment and putting it into the candidate point data set P; wherein, , represents the i-th candidate point, and n represents the number of candidate points; S13, calculating the elevation of each candidate point in the candidate point dataset P, and collecting the elevations of all candidate points to obtain a candidate point elevation dataset. Specifically, the elevation of each candidate point can be calculated using the arcpy value extraction point tool.
[0031] As a preferred implementation, step S2 specifically includes the following steps: S21, traversing the candidate point data set , calculate the candidate point dataset The distance between each candidate point in is obtained to obtain the distance matrix E; the expression of the distance matrix E is: ; in, ; represents the distance between the i-th cluster and the j-th cluster, is the Euclidean distance, when i=j, , candidate point dataset Each candidate point in is a separate cluster; S22, searching for two clusters with the closest distance according to the distance matrix E, and merging the two clusters if the distance between the two clusters is less than a distance threshold, otherwise not merging; S23, updating the distance matrix E; in order to make the distance between data points within a cluster less than the distance threshold D constraint, the inter-cluster distance calculation method adopts the full chain method, that is, the distance threshold D between any two points between two clusters.
[0032] S24, repeat steps S22-S23 until the distances between all clusters are greater than or equal to the distance threshold, and obtain the candidate point classification result data set ;in, , represents the jth cluster, , express The tth candidate point in , m represents the number of clusters, and z represents the number of candidate points in the cluster.
[0033] Furthermore, the reservoir target constraint condition in step S3 is: in, To constrain the dam length, is the dam height constraint, is the storage capacity constraint, is the length of the reservoir dam line of the i-th candidate point, is the reservoir dam height of the i-th candidate point, is the reservoir capacity of the i-th candidate point, The maximum dam length allowed by the project, The maximum reservoir dam height allowed by the project, It is the minimum reservoir capacity allowed by the project.
[0034] As a preferred implementation, step S3 specifically includes the following steps: S31, start multiple processes based on the preset number of sub-processes U ;in, , Represents the tth child process; S32, traverse the candidate point classification result dataset , the candidate point classification result dataset The clusters in are sequentially assigned to idle subprocesses for multi-process parallel calculation to obtain the final set of candidate points that meet the reservoir target constraints; one cluster is a task. When the number of tasks is greater than the number of subprocesses U, all subprocesses are in working state, and unassigned tasks will only be assigned when the subprocess state becomes idle.
[0035] As a preferred implementation, in step S32, the candidate point classification result data set The clusters in are successively assigned to idle subprocesses for multi-process parallel calculation to obtain the final candidate point set that meets the reservoir target constraint conditions; among them, for the subprocess In , perform the following steps: S321, traverse the collection , according to the candidate points Elevation , Maximum reservoir dam height , filter the contour data according to the elevation, and obtain the filtered contour set ,in, represents the fth contour line, g represents the number of contour lines in the set, express The elevation of satisfy ; Under this condition, the subsequent calculated reservoir dam height will satisfy the dam height constraint in the reservoir target constraint condition.
[0036] S322, obtaining candidate points The coordinates of the plane point And get candidate points The river network segment where the candidate points are calculated And the straight line intersecting with the river network segment; Furthermore, the equation of the straight line in step S322 is specifically expressed as: When k exists, ; When k does not exist, ; where k is the slope, y is the dependent variable, and x is the independent variable.
[0037] S323, obtaining the required line segment located on the straight line And solve the required line segment The coordinates of the two endpoints; It should be noted that in order to obtain the line segments required for subsequent intersection analysis , this application will solve the required line segment based on the straight line equation The coordinates of the two endpoints of the candidate point The required line segment The midpoint of the required line segment When there is only one intersection point with the contour line, it is possible to make the required line segment Intersect with the contour lines to find the intersection points, so the required line segments Set the length to 2 , the required line segment The coordinates of the two endpoints are solved as follows: When k exists, the distance formula between two points is used to solve the coordinates of the two end points of the line segment, that is: The coordinates of the two end points of the line segment are obtained by deriving the formula ( , )、( , )for: ; When k does not exist, the coordinates of the two end points of the line segment are ( , )、( , ).
[0038] S324, based on the preset rotation angle , calculate the total number of rotations c; In actual reservoir construction projects, the reservoir dam line can be rotated at multiple angles to find the maximum reservoir dam line formed with the mountain under the premise of ensuring water retaining conditions. , calculate the total number of rotations c.
[0039] Among them, floor means rounding down. Candidate point The slope of the river network segment, It is the angle (radian) between the river network segment and the positive direction of the x-axis of the rectangular coordinate system.
[0040] S325, traverse c times, for the required line segment Perform rotation at different angles to determine whether the currently calculated candidate point has a reservoir dam line that meets the reservoir target constraint conditions; specifically, the following steps are included: S3251, calculate the slope of the straight line after the uth rotation angle , and solve for the required line segment The coordinates of the two endpoints at this angle; Specifically, the u-th time can be calculated according to the following formula ( ) The slope of the straight line after rotation angle , and find the required line segment according to step S323 The coordinates of the two endpoints.
[0041] ; where A is the angle (radians) after the line is rotated, and Z represents a set of integers. In other cases, Does not exist.
[0042] S3252, generate a line feature layer based on the coordinates of the two endpoints, and use arcpy's intersection analysis tool to extract the intersection points with the contour lines to obtain the reservoir dam line; in the intersection layer attribute table, filter out single-point type geometric elements and retain multi-point type geometric elements; it should be noted that the line between each intersection point pair is the reservoir dam line.
[0043] It should be noted that in the intersection layer attribute table, there may be two types of geometry: "single point" and "multi-point". Since only "multi-point" geometric elements can generate a closed polygon between the reservoir dam line and the contour line, it is necessary to filter out the "single point" geometric elements. In addition, the same contour line may have more than two intersection points. For this abnormal situation, the embodiment of the present application uses the two intersection points closest to the river as the endpoints of the reservoir dam line. Assume , are the two end points of the reservoir dam line formed by the intersection of the fth contour line and the line element, then ,and Located on the reservoir dam line.
[0044] S3253, calculate the length of each reservoir dam line, and obtain the dam line set whose reservoir dam line length meets the dam length constraint; calculate the distance between the two end points of each reservoir dam line (i.e., the reservoir dam line length) according to the Euclidean distance formula, and obtain the dam line set whose reservoir dam line length meets the dam length constraint.
[0045] S3254: Sort the reservoir dam lines according to the elevation of their endpoints from high to low, select the dam line B with the highest elevation, and compare it with the contour line where its endpoints are located. Get the closed polygon formed by the dam line B with the highest elevation and the contour lines ; Considering that the reservoir capacity decreases as the contour line elevation decreases, that is, when the reservoir capacity enclosed by the contour line with the largest elevation value and the dam line does not meet the capacity constraint, the contour line with a smaller elevation value also does not meet the constraint. Therefore, in order to avoid unnecessary calculations, the embodiment of the present application sorts the reservoir dam lines from high to low according to the elevation of the endpoints of the reservoir dam lines, and selects the dam line B with the largest elevation. In addition, the arcpy feature conversion tool can be used to convert the dam line B with the largest elevation to the contour line where its endpoints are located. As a tool input parameter, a closed polygon surrounded by the reservoir dam line and contour lines can be generated. (Reservoir surface).
[0046] S3255, based on closed polygon and digital elevation model data to determine reservoir capacity ; Specifically, based on closed polygons DEM data, obtained using arcpy's Extract by Mask tool The terrain grid data within the range is then compared with the plane elevation ( The elevation value) uses arcpy's surface volume tool to calculate the reservoir capacity .
[0047] S3256, if the reservoir capacity , then return to step S325 and perform the next rotation angle; otherwise, if the currently calculated candidate point has a reservoir dam line that meets the reservoir target constraint condition, traverse End, the candidate point Put it into the final candidate point set P'', the subprocess Changes to idle state.
[0048] In order to further illustrate the technical solution of the present application, the present application also provides a specific embodiment for those skilled in the art to understand, and uses 30-meter DEM data of a certain research area in Sichuan Province for specific description, as follows: Since the calculation process of this application involves parameters such as length and area, the data in the embodiment adopts the projection coordinate system (CGCS2000) for step description. The coordinates of the circumscribed rectangle of the region are (646032.171753, 3225012.113918, 687402.224616, 3262461.666722), the area of the region is 1505.49 square kilometers, the minimum elevation of the region is 2901 meters, and the maximum elevation is 4942 meters. The hardware environment developed has a CPU of 16 cores or above.
[0049] In this embodiment, the contour line interval used is 30 meters and the water system flow threshold is 300. The extracted contour layer attribute table contains 3739 records and the water system layer attribute table contains 2692 records.
[0050] Candidate point dataset extracted from the river network data generated in step S11 .
[0051] Candidate point elevation dataset obtained by extracting values from points using arcpy .
[0052] The distance threshold D=500 meters used in this embodiment clusters the candidate points into 1292 clusters, namely .
[0053] In this embodiment, =600m, =100 meters, =5 million cubic meters, α=15°, number of sub-processes U=15.
[0054] There are 15 sub-processes started in this embodiment, namely .
[0055] Traversal , assign each cluster to different subprocesses. There are candidate points that satisfy the constraints, so the cluster is selected The following is an example of an embodiment.
[0056] Traversal . Candidate points in the current cluster Satisfy the reservoir target constraint, so the following steps are performed by Calculation is used to further illustrate the present application scheme. =3883, so the contour lines with elevation range in the interval [3883,3983] are filtered to obtain the contour line set .
[0057] In this embodiment, the candidate points The plane coordinates are (684008.728937, 3261368.698813), and the equation of the line is: In this embodiment, the candidate points The river segment ID is 5, and the slope of the river segment is calculated. , c=12, .
[0058] Traverse 12 times. Take the result of the first traversal to explain the subsequent steps. Calculate, , slope The coordinates of the two end points of the line segment are (684603.423877, 3261448.309916) and (683414.033997, 3261289.08771) respectively. In this embodiment, the plane coordinates are uniformly reserved to 6 significant digits after the decimal point.
[0059] Generate a line feature layer based on the coordinates of the two endpoints, and use arcpy's intersection analysis tool to extract the intersection points with the contour lines to obtain the intersection point layer. The layer attribute table contains 5 records, all of which belong to the "multi-point" geometry type.
[0060] The reservoir dam lines are sorted from high to low according to the elevation of their end points. At this time, the dam line with the highest elevation is 357.55 meters long and the dam height is 97 meters.
[0061] Use arcpy's feature-to-face tool to convert the reservoir dam line to the contour line where it is located. (elevation value is 3980 meters) as the tool input parameter to generate the reservoir surface .
[0062] Use arcpy's Extract by Mask tool to obtain The terrain grid data within the range is used to calculate the reservoir capacity based on the terrain grid data and plane elevation using arcpy's surface volume tool. Ten thousand cubic meters.
[0063] , satisfying the storage capacity constraint in the reservoir target constraint condition, traversing , End, will Put it into the final candidate point set P'', and the current subprocess becomes idle.
[0064] In this embodiment, a total of 209 candidate points that meet the reservoir target constraint conditions are calculated, and the time taken is 726.25 seconds.
[0065] Furthermore, in order to more clearly highlight the advantages of the present invention in site selection efficiency, this embodiment uses the control variable method to conduct two groups of comparative experiments on the two variables of classification and parallelization. As shown in Table 1, the experimental results show that compared with the unclassified and non-parallel site selection method, the method for rapid general selection of pumped storage sites based on hierarchical clustering and parallel computing proposed in the present invention improves the site selection efficiency to a certain extent.
[0066] Table 1 Comparison of time spent on different calculation methods The present invention also provides a pumped storage power station site rapid general selection device based on hierarchical clustering and parallel computing, comprising: A preprocessing unit, used to obtain digital elevation model data of the target point selection area, and preprocess the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set; A hierarchical clustering processing unit, used to perform hierarchical clustering processing on the candidate point information to obtain a candidate point classification result data set; The parallel computing unit is used to perform multi-process parallel computing on the candidate point classification result data set according to the pre-established reservoir target constraint condition to obtain a final candidate point set that meets the reservoir target constraint condition.
[0067] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for rapid general election of pumped storage power station sites based on hierarchical clustering and parallel computing are implemented as described above. It can be understood that when executed by the processor, the method for rapid general election of pumped storage power station sites based on hierarchical clustering and parallel computing is implemented, so all embodiments of the above method are applicable to the storage medium, and can achieve the same or similar beneficial effects.
[0068] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the protection scope of the present invention.
Claims
1. A method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing, characterized in that: The following steps are involved: S1, acquiring digital elevation model data of a target point selection area, and preprocessing the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set; S2, performing hierarchical clustering processing on the candidate point information to obtain a candidate point classification result data set; S3, performing multi-process parallel calculation on the candidate point classification result data set according to the pre-established reservoir target constraint condition to obtain a final candidate point set that meets the reservoir target constraint condition.
2. The method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 1 is characterized in that: The step S1 specifically includes the following steps: S11, extracting contour data according to a preset contour interval and the digital elevation model data, and extracting river network data according to a water system flow threshold and the digital elevation model data; S12, obtaining the river network segments in the river network data, traversing all the river network segments, and then extracting the midpoint of each river network segment and putting it into the candidate point data set P; wherein, , represents the i-th candidate point, and n represents the number of candidate points; S13, calculating the elevation of each candidate point in the candidate point data set P, and collecting the elevations of all candidate points to obtain a candidate point elevation data set.
3. The method for rapid general selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 2 is characterized in that: The step S2 specifically includes the following steps: S21, traversing the candidate point data set , calculate the candidate point dataset The distance between each candidate point in is obtained to obtain the distance matrix E; wherein the expression of the distance matrix E is: ; in, ; Indicates i Cluster and j The distance between clusters, is the Euclidean distance, when i=j, , candidate point dataset Each candidate point in is a separate cluster; S22, searching for two clusters with the closest distance according to the distance matrix E, and merging the two clusters if the distance between the two clusters is less than a distance threshold, otherwise not merging; S23, update the distance matrix E; S24, repeat steps S22-S23 until the distances between all clusters are greater than or equal to the distance threshold, and obtain the candidate point classification result data set ;in, , Indicates j Clusters, , express Middle t candidate points, m represents the number of clusters, and z represents the number of candidate points in a cluster.
4. The method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 3 is characterized in that: The reservoir target constraint condition in step S3 is: in, To constrain the dam length, is the dam height constraint, is the storage capacity constraint, For the i The length of the reservoir dam line at each candidate point, For the i The reservoir dam height of the candidate site, For the i The reservoir capacity of each candidate point, The maximum dam length allowed by the project, The maximum reservoir dam height allowed by the project, It is the minimum reservoir capacity allowed by the project.
5. The method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 4 is characterized in that: The step S3 specifically comprises the following steps: S31, start multiple processes based on the preset number of sub-processes U ;in, , Represents the tth child process; S32, traverse the candidate point classification result dataset , the candidate point classification result dataset The clusters in are sequentially assigned to idle subprocesses for multi-process parallel calculation to obtain the final set of candidate points that meet the reservoir target constraints; one cluster is a task. When the number of tasks is greater than the number of subprocesses U, all subprocesses are in working state, and unassigned tasks will only be assigned when the subprocess state becomes idle.
6. The method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 5 is characterized in that: In step S32, the candidate point classification result data set The clusters in are successively assigned to idle subprocesses for multi-process parallel calculation to obtain the final candidate point set that meets the reservoir target constraint conditions; among them, for the subprocess In , perform the following steps: S321, traverse the collection , according to the candidate points Elevation , Maximum reservoir dam height , filter the contour data according to the elevation, and obtain the filtered contour set ,in, represents the fth contour line, g represents the number of contour lines in the set, express The elevation of satisfy ; S322, obtaining candidate points The coordinates of the plane point And get candidate points The river network segment where the candidate points are calculated And the straight line intersecting with the river network segment; S323, obtaining the required line segment located on the straight line And solve the required line segment The coordinates of the two endpoints; S324, based on the preset rotation angle , calculate the total number of rotations c ; S325, traverse c Second, for the required line segment Perform rotation at different angles to determine whether the currently calculated candidate point has a reservoir dam line that meets the reservoir target constraint conditions; specifically, the following steps are included: S3251, calculate the slope of the straight line after the uth rotation angle , and solve for the required line segment The coordinates of the two endpoints at this angle; S3252, generate a line feature layer according to the coordinates of the two endpoints, and use the intersection analysis tool of arcpy to extract the intersection points with the contour lines to obtain the reservoir dam line; in the intersection layer attribute table, filter out single-point type geometric elements and retain multi-point type geometric elements; S3253, calculating the length of each reservoir dam line, and obtaining a dam line set whose reservoir dam line length satisfies the dam length constraint; S3254: Sort the reservoir dam lines according to the elevation of their endpoints from high to low, select the dam line B with the highest elevation, and compare it with the contour line where its endpoints are located. Get the closed polygon formed by the dam line B with the highest elevation and the contour lines ; S3255, based on closed polygon and digital elevation model data to determine reservoir capacity ; S3256, if the reservoir capacity , then return to step S325 and perform the next rotation angle; otherwise, if the currently calculated candidate point has a reservoir dam line that meets the reservoir target constraint condition, traverse End, the candidate point Put it into the final candidate point set P'', the subprocess Changes to idle state.
7. The method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 6 is characterized in that: The equation of the straight line in step S322 is specifically expressed as: When k exists, ; When k does not exist, ;in, k is the slope, y is the dependent variable, and x is the independent variable.
8. The method for rapid selection of pumped storage power station sites based on hierarchical clustering and parallel computing according to claim 6 is characterized in that: The step S323 specifically includes the following steps: The required line segment The length is set to 2 , the solution process of the two endpoint coordinates is as follows: When k exists, the distance formula between two points is used to solve the coordinates of the two end points of the line segment, that is: The coordinates of the two end points of the line segment are obtained by deriving the formula ( , )、( , )for: ; When k does not exist, the coordinates of the two end points of the line segment are ( , )、( , ).
9. A rapid general selection device for pumped storage power station sites based on hierarchical clustering and parallel computing, characterized in that: include: A preprocessing unit, used to obtain digital elevation model data of the target point selection area, and preprocess the digital elevation model data to obtain candidate point information; wherein the candidate point information includes a candidate point data set and a candidate point elevation data set; A hierarchical clustering processing unit, used to perform hierarchical clustering processing on the candidate point information to obtain a candidate point classification result data set; The parallel computing unit is used to perform multi-process parallel computing on the candidate point classification result data set according to the pre-established reservoir target constraint condition to obtain a final candidate point set that meets the reservoir target constraint condition.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for rapid general selection of pumped storage power station sites based on hierarchical clustering and parallel computing as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Target position point determination method, device and equipment, and storage medium
CN110493333A
Position data division method and device, computer equipment and storage medium
CN112948512A
Storage power station site selection method and system based on artificial intelligence
CN113487246A
Reservoir dam site resource identification method based on terrain space data processing technology
CN114202097A
Excavation and filling large-scale parallel computing algorithm method based on three-dimensional model
CN115130190A
Cited By
Pumped storage power station site selection method based on digital elevation model
CN122454094A
A pumped storage power station site selection method based on digital elevation model
CN122454094B