A mountain photovoltaic power station hierarchical optimization method based on GIS constraint and reinforcement learning
Patent Information
- Application Number
- CN202611209158.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-30
AI Technical Summary
相比平地,山地项目面临坡度、坡向、高程起伏、局部遮挡、地块破碎及生态红线、基本农田等多重空间约束,传统规划方法难以应对
[0333]与现有技术相比,本发明提供了一种基于 GIS 约束与强化学习的山地光伏电站分层优化方法,具备以下有益效果:
Smart Images

Figure CN123014554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic planning technology, specifically a hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning. Background Technology
[0002] With the development of new energy sources, the construction of photovoltaic power stations is gradually shifting to complex terrains such as mountains and hills. Compared with flat land, mountain projects face multiple spatial constraints such as slope, aspect, elevation fluctuations, local shading, fragmented land plots, ecological red lines, and basic farmland, which are difficult to address using traditional planning methods.
[0003] Existing technologies have significant limitations: First, relying on empirical rules to estimate capacity makes them unsuitable for complex terrains and control requirements; second, GIS screening only focuses on suitability evaluation and lacks a linkage mechanism with installed capacity, array layout, and economic evaluation; third, heuristic algorithms (such as genetic algorithms and particle swarm optimization) often focus on single-scale optimization (capacity, spacing, or tilt angle), lacking "macro-meso-micro" synergy, which can easily lead to local optima; and fourth, reinforcement learning methods, due to simplified environmental modeling, make it difficult to guarantee engineering compliance and interpretability.
[0004] In addition, existing technologies still have five major pain points: insufficient utilization of real solar resources, relying mainly on typical year or empirical data, ignoring the annual 8760-hour irradiance variation; fragmented results across multiple scales, lacking a unified data structure for macroscopic capacity, mesoscopic layout, and microscopic component pose, making bidirectional feedback impossible for adjustments; lack of hierarchical feedback mechanisms, resulting in no constraint transmission when optimization objectives conflict at different scales; insufficient verification of result credibility, making it difficult to trace data sources and algorithm validity; and inefficient scheduling of computing resources, with GPUs only used for a small number of neural network calculations, while a large number of simulation tasks are still processed serially by CPUs, resulting in low efficiency.
[0005] Therefore, it is urgent to construct a new intelligent optimization method that integrates GIS constraints and real hourly irradiance data, connects the entire process of macro-capacity planning, meso-regional layout, micro-single-board optimization and economic evaluation, establishes a multi-scale feedback mechanism, improves the result verification system, and optimizes CPU-GPU collaborative scheduling to enhance the accuracy of mountain photovoltaic power station planning, engineering applicability and operational efficiency. Summary of the Invention
[0006] 1. Technical problems to be solved
[0007] To address the shortcomings of existing technologies, this invention provides a hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning. This method offers advantages such as improving the spatial compliance of mountain photovoltaic power station site selection and layout; enhancing the accuracy of power generation estimation; improving optimization accuracy in complex mountainous scenarios; improving the ability to evaluate the economic viability of solutions; enhancing the interpretability of optimization results; increasing the credibility of experimental conclusions; improving software operating efficiency; enhancing software engineering maintainability; and reducing the cost of manual trial and error in mountain photovoltaic planning. These advantages solve the problems existing in the background technologies.
[0008] (II) Technical Solution
[0009] To achieve the above objectives, the present invention provides the following technical solution: a hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning, characterized by comprising the following steps:
[0010] S1: Based on GIS data, construct a model of suitable construction areas for mountain photovoltaic projects, and unify hard constraints such as ecological red lines, permanent basic farmland, water sources, nature reserves, forest land, grassland, wetlands, and rocky desertification with soft suitability conditions such as slope, aspect, and altitude into spatially continuous constructability scoring raster data.
[0011] S2: At the macro level, guided by constructability scoring, multiple candidate installed capacity schemes are generated using the mixed integer programming (MIP) algorithm. For each candidate scheme, economic indicators including annual power generation, total investment cost, NPV, IRR, and investment payback period are calculated, as well as the satisfaction of capacity constraints and land use constraints. The optimal macro capacity configuration is determined by the Pareto frontier screening and entropy weight TOPSIS integrated decision-making method.
[0012] S3: At the meso-level, it receives candidate regions, installed capacity and area constraints output from the macro-level, performs spatial clustering of modules, calculates the average slope, average aspect, average altitude, effective area and number of modules for each cluster region, and jointly optimizes the regional spacing, layout density, shading loss and land area, estimates the shading impact between and within regions, and outputs the actual construction area, annual power generation and land use efficiency after meso-level layout.
[0013] S4: At the micro level, it receives layout information, terrain information, and solar resource data output from the macro and meso levels. Taking a single photovoltaic module or a representative module sample as the optimization object, it constructs a state space that includes the current position of the module, local elevation, local slope, local aspect, current tilt angle, current azimuth angle, distance to neighboring modules, estimated shading impact, solar resource characteristics, and historical power generation revenue. It also defines an action space that includes local horizontal offset of module position, module tilt angle adjustment, module azimuth angle adjustment, fine-tuning of module spacing, and local arrangement density adjustment. It performs local pose adjustment through reinforcement learning algorithm and constructs a composite reward function with annual power generation gain, shading loss reduction, module spacing constraint penalty, slope or construction difficulty penalty, boundary constraint penalty, land area penalty, layout stability reward, and economic benefit gain. It outputs the optimized module pose parameters.
[0014] S5: Establish a macro-meso-micro feedback iteration mechanism to feed back the number of inefficient components, layout efficiency factors, land use changes and power generation changes found at the micro level to the macro or meso level, and readjust the capacity, area or regional layout until the number of inefficient components or power generation changes meet the convergence conditions, forming a closed-loop optimization.
[0015] S6: Based on the final adopted layout scheme, combined with hourly solar resource data, terrain correction factor, layout correction factor, shading correction factor, component efficiency, and system efficiency, calculate the final annual power generation; and comprehensively consider component cost, inverter cost, installation cost, land cost, mountain road cost, site leveling cost, collection line cost, operation and maintenance cost, electricity sales revenue, and subsidy revenue to calculate economic indicators including annual net income, NPV, IRR, and investment payback period.
[0016] S7: Perform ablation experiments and comparative experiments with alternative algorithms, including four default ablation experiment combinations: MIP, MIP+SA, MIP+PPO, and MIP+SA+PPO, and four comparative experiment combinations with alternative algorithms: NSGA-II, NSGA-II+PSO, NSGA-II+SAC, and NSGA-II+PSO+SAC. Output the annual power generation, NPV, annual net income, installed capacity, land area, operating time, hierarchical gain, and convergence process for each experiment, and perform result quality verification and visualization output.
[0017] Preferably, the specific implementation method for constructing the mountain photovoltaic suitable construction area model in step S1 is as follows:
[0018] 2.1 Ecological red lines, permanent basic farmland, water source areas, nature reserves, forest land, grassland, wetlands, and rocky desertification areas are defined as prohibited construction areas and are assigned the value of "not allowed to be built".
[0019] 2.2 Conditions such as slope, aspect, altitude, distance from road, and distance from power grid connection point are defined as spatial soft constraints. Different weights are assigned through multi-criteria decision analysis to generate spatially continuous constructability score raster data.
[0020] 2.3 Appropriately reduce the weight of soft-constrained areas to lower the score of restricted areas, thereby reducing the risk that subsequent solutions may fail to be implemented due to spatial violations.
[0021] Preferably, the specific implementation of the generation and decision-making of macroscopic layer capacity candidate schemes in step S2 includes:
[0022] 3.1 Generate multiple capacity candidate points, covering a capacity range from the minimum feasible capacity to the maximum available area;
[0023] 3.2 Calculate multiple indicators for each candidate site, including power generation, economic efficiency, and land use efficiency;
[0024] 3.3 Eliminate infeasible candidate sites that violate capacity constraints or land use constraints;
[0025] 3.4 Construct a multi-objective Pareto front, calculate the weights of different indicators using the entropy weight method, and select the comprehensive optimal capacity scheme using the TOPSIS method.
[0026] Preferably, the specific implementation method of optimizing the mesoscopic region layout in step S3 includes:
[0027] 4.1 Based on the location of the photovoltaic panels or candidate regions output from the macroscopic layer, the modules are spatially clustered to divide them into several clustering regions;
[0028] 4.2 Calculate the average slope, average aspect, average elevation, effective area, and number of components for each cluster region;
[0029] 4.3 Jointly optimize the spacing between regions, the density of the layout, the shading loss, and the land area to estimate the shading impact between and within regions;
[0030] 4.4 Calculate the actual station area, annual power generation, and land use efficiency after the meso-level layout, and pass the results to the micro-level.
[0031] Preferably, the specific implementation method of the micro-layer component pose optimization in step S4 includes:
[0032] 5.1 Construct the micro-level state space, including: the current position of the component, the region number, the local elevation, the local slope, the local aspect, the current tilt angle, the current azimuth angle, the distance to neighboring components, the estimated shading impact, the characteristics of solar resources, and the historical power generation revenue or power generation per unit component;
[0033] 5.2 Define the micro-level action space, including: local horizontal offset of component position, component tilt angle adjustment, component azimuth angle adjustment, component spacing fine adjustment, and local arrangement density adjustment;
[0034] 5.3 Construct a composite reward function, including: annual power generation gain, reduction of shading loss, penalty for component spacing constraints, penalty for slope or construction difficulty, penalty for exceeding boundaries, penalty for land area, reward for layout stability, and gain for economic benefits;
[0035] 5.4 A reinforcement learning algorithm is used to adjust the local pose of representative component samples and output the optimized component pose parameters.
[0036] Preferably, the specific implementation of the macro-meso-micro feedback iteration mechanism in step S5 includes:
[0037] 6.1 Macro-level output capacity, number of components, and candidate regions;
[0038] 6.2 The meso-level optimizes regional layout and spacing based on macro-level results;
[0039] 6.3 The micro-level optimizes component pose based on the meso-level results;
[0040] 6.4 The system statistically analyzes the number of inefficient components, layout efficiency factor, land use changes, and power generation changes;
[0041] 6.5 If the number of inefficient components or the change in power generation meets the convergence condition, the feedback iteration is terminated; otherwise, the layout problems found at the micro level are fed back to the macro or meso level, and the capacity, area or regional layout is readjusted until the convergence condition is met.
[0042] Preferably, the specific implementation method for calculating power generation and economic indicators in step S6 includes:
[0043] 7.1 Power generation calculation: The annual power generation is calculated by summing the installed capacity, equivalent full-load hours, hourly solar resources, terrain correction factor, layout correction factor, shading correction factor, module efficiency, system efficiency or performance ratio, tilt angle and azimuth angle correction.
[0044] 7.2 Economic Calculation: Comprehensive calculation of component cost, inverter cost, installation cost, land cost, mountain road cost, site leveling cost, collection line cost, operation and maintenance cost, electricity sales revenue, and subsidy revenue, and further calculation of annual net income, NPV, IRR and investment payback period;
[0045] 7.3 Introducing mountain engineering factors, such as construction difficulty and cost, makes the evaluation of the scheme closer to the actual project.
[0046] Preferably, the specific implementation of the ablation experiment and replacement algorithm in step S7 includes:
[0047] 8.1 The first category is the default ablation experiment, including: MIP, MIP+SA, MIP+PPO, MIP+SA+PPO, where MIP indicates that only the macro layer is enabled, MIP+SA indicates that both the macro and meso layers are enabled, MIP+PPO indicates that both the macro and micro layers are enabled, and MIP+SA+PPO indicates that all three layers are enabled.
[0048] 8.2 The second category is a comparative experiment of alternative algorithms, comprising: NSGA-II, NSGA-II+PSO, NSGA-II+SAC, and NSGA-II+PSO+SAC, wherein NSGA-II replaces macroscopic layer 21. In step S4, the state space of the reinforcement learning algorithm further includes the historical power generation revenue of the component or the power generation per unit component, which is used to improve the accuracy of local optimization under complex terrain.
[0049] Preferably, it also includes step S8: result quality verification and visualization output, specifically including:
[0050] 9.1 Verify the algorithm's activation status to ensure that the map and the algorithm's activation status are consistent;
[0051] 9.2 Verify the integrity of the convergence history to ensure that missing indicators are not mistakenly written as 0;
[0052] 9.3 Verify the consistency of drawings to ensure that the summary table, JSON, drawings, and reports are consistent;
[0053] 9.4 Diagnosing abnormally high gain at the micro-layer level to prevent over-optimization in local areas;
[0054] 9.5 Verify the fairness of the experiment to ensure fairness in land area and capacity among different experiments;
[0055] 9.6 Generate visualization charts, including: single experiment result file, batch summary CSV, power generation comparison chart, NPV comparison chart, annual net income comparison chart, execution time comparison chart, hierarchical gain chart, 8760-hour irradiance and power generation curve, topographic map, constraint chart, representative area array layout map, result consistency report, experiment fairness report, and performance profiling report.
[0056] Preferably, this project constructs a hierarchical optimization framework of "macro-planning—meso-level layout—micro-level reinforcement learning adjustment—unified physical evaluation—economic recalculation". Let the candidate photovoltaic power station scheme be S, with its installed capacity, annual power generation, land area, ecological suitability, and net present value as follows:
[0057] Installed capacity The unit is uniformly MW
[0058] Annual power generation The unit is uniformly MWh
[0059] land area The unit is uniformly set as
[0060] Ecological suitability Dimensionless
[0061] Net Present Value The unit is uniformly ten thousand yuan.
[0062] The overall process can be represented as:
[0063]
[0064] in: It represents real geographic data, DEM, slope, aspect, irradiance, non-buildable areas, suitability evaluation data, and economic parameters; These represent the macroscopic, mesoscopic, microscopic, and final unified physical evaluation schemes, respectively.
[0065] Macro-level optimization model
[0066] (1) Capacity Constraints: The macro-level is used to determine candidate construction areas and installed capacity for photovoltaic power plants. The installed capacity constraints are as follows:
[0067]
[0068] (2) Macro-level four-objective model, which considers four objectives at the macro level:
[0069] First, maximize annual power generation:
[0070]
[0071] Second, maximize net present value:
[0072]
[0073] Third, minimize the land area used:
[0074]
[0075] Fourth, maximize ecological suitability:
[0076]
[0077] Therefore, the macroscopic-level multi-objective optimization problem can be written as:
[0078]
[0079] In the formula: As a benefit-oriented indicator, It is a cost-based indicator.
[0080] (3) MIP and NSGA-II dual-path candidate generation: The macro level uses two comparison paths, MIP and NSGA-II. The two are not combined into one algorithm, but generate candidate scheme sets separately, and then use Pareto non-dominated screening and entropy weight TOPSIS for post-evaluation.
[0081] The MIP path is:
[0082]
[0083] The NSGA-II path is:
[0084]
[0085] in: and These represent the candidate solution sets generated by the two algorithms, respectively. and These represent the corresponding Pareto non-inferior solution sets.
[0086] Pareto Non-dominated Screening and Entropy Weight TOPSIS
[0087] (1) Pareto dominance relationship, for two candidate solutions and ,like No inferior to in all objectives And is strictly superior to at least one objective. Then it is called Dominate , denoted as:
[0088]
[0089] For benefit-oriented objectives, the governing condition is:
[0090]
[0091] For cost-based objectives, the control conditions are:
[0092]
[0093] And at least one objective satisfies the strict superiority condition. The Pareto front is defined as:
[0094]
[0095] (2) Indicator matrix: Construct an indicator matrix for candidate solutions in the Pareto front:
[0096]
[0097] In the formula: This represents the number of Pareto candidate solutions.
[0098] No. The index vectors for the candidate solutions are:
[0099]
[0100] (3) Indicator normalization: For benefit-type indicators, positive normalization is adopted.
[0101]
[0102] Inverse normalization is applied to cost-related indicators:
[0103]
[0104] In the formula: For the first The first scheme is in the The original values of each indicator This is the normalized index value.
[0105] (4) Entropy weight calculation
[0106] The proportion of the normalized index is:
[0107]
[0108] No. The information entropy of each indicator is:
[0109]
[0110] The coefficient of difference is:
[0111]
[0112] Entropy weight is:
[0113]
[0114] In the formula: For the number of indicators, here .
[0115] (5) TOPSIS proximity
[0116] The weighted normalized matrix is:
[0117]
[0118] The ideal solution is:
[0119]
[0120] The negative ideal solution is:
[0121]
[0122] plan The distance to the ideal solution is:
[0123]
[0124] plan The distance to the negative ideal solution is:
[0125]
[0126] TOPSIS proximity score:
[0127]
[0128] Ultimately, the candidate solution with the highest approximation was selected:
[0129] .
[0130] Mesoscopic Topographic Similarity Region Division Model
[0131] (1) Real terrain data sampling, and regional division and layout optimization are carried out in the candidate construction areas selected by the macro layer at the meso level. Each photovoltaic panel candidate site needs to sample terrain attributes from real geographic data, including DEM, slope, aspect, irradiance, and suitability.
[0132] No. The terrain attributes of the candidate points include:
[0133] altitude The unit is m
[0134] slope The unit is deg
[0135] Slope Unit: deg
[0136] Annual radiation The unit is
[0137] Construction suitability Dimensionless
[0138] (2) Terrain similarity feature vector
[0139] Construct the first Terrain similarity feature vectors of photovoltaic panel candidate points:
[0140]
[0141] In the formula: Indicates normalized spatial location; Indicates normalized altitude; Indicates the normalized slope; Indicates normalized irradiation resources; Indicates normalization suitability. Slope aspect usage. Expression is to avoid and A problem that is numerically far apart but directionally similar.
[0142] (3) Clustering of regions with similar terrain
[0143] Cluster the terrain feature vectors of all candidate photovoltaic panels:
[0144]
[0145] The set of meso-regions is obtained:
[0146]
[0147] In the formula: Indicates the first A region with similar terrain, Indicates the number of regions.
[0148] area The average slope is:
[0149]
[0150] area The average altitude is:
[0151]
[0152] area The average slope aspect is taken as a circular mean:
[0153]
[0154] The standard deviation of the regional slope is:
[0155]
[0156] The regional elevation standard deviation is:
[0157]
[0158] If the slope, aspect, and elevation statistics of all areas are completely identical, it indicates that the terrain similarity classification has not truly utilized spatial terrain differences, and a diagnosis should be triggered.
[0159] .
[0160] Mesoscopic boundary spacing optimization model
[0161] (1) Definition of regional boundary spacing: The regional spacing in the meso-level must be defined as the shortest distance between adjacent regional boundaries, rather than the distance between regional centers.
[0162] For the two regions and Their boundaries are respectively and The boundary distance between the two is defined as:
[0163]
[0164] in, and These are points on the boundaries of the two regions.
[0165] (2) Theoretical spacing and engineering recommended spacing
[0166] The theoretical boundary spacing range is:
[0167]
[0168] Engineering optimization adopts the recommended lower limit:
[0169]
[0170] (3) Optimization objective of meso-level spacing: The optimization of meso-level spacing aims primarily at increasing effective power generation, while also considering shading losses and land use. A comprehensive evaluation function can be constructed as follows:
[0171]
[0172] In the formula: This indicates the annual power generation of the meso-level layout; Indicates loss due to shading; Indicates the land area; Penalty weight.
[0173] If the difference in annual power generation between the two candidate intervals is less than the threshold In this case, the option with the smaller land area will be given priority:
[0174]
[0175] Otherwise, prioritize the option with higher power generation:
[0176] .
[0177] Micro-level reinforcement learning model
[0178] (1) Microscopic state space, with the microscopic layer taking a single photovoltaic panel as the optimization object. A solar panel in The state at that moment is:
[0179]
[0180] In the formula: Indicates position coordinates; Indicates the angle of inclination; Indicates azimuth; Indicates altitude; Indicates slope; Indicates slope aspect; Indicates the amount of radiation; Indicates suitability for construction; Indicates the local occlusion factor; This indicates the current power generation of the component.
[0181] (2) Microscopic single-step motion space, the first A solar panel in The single-step action at a given moment is:
[0182]
[0183] The range of a single step is:
[0184]
[0185] (3) Microscopic state update: The position and installation angle of the photovoltaic panel are updated according to the action:
[0186]
[0187] The range of a single-step movement is limited to each individual action, not the final cumulative change. (After...) After one training step, the cumulative change is:
[0188]
[0189] The final optimized state is as follows:
[0190]
[0191] Therefore, the final cumulative change can be greater than the range of a single step, but it must be accumulated from multiple valid single steps.
[0192] (4) Micro-level reward function: The micro-level reward function focuses on the improvement of actual physical power generation, while also considering shading loss, spacing constraints, local density, and action penalties.
[0193]
[0194] In the formula: Indicates the change in power generation resulting from the action; Indicates changes in shading loss; Indicates component spacing or local density penalty; This indicates that the action has exceeded the limits or is too drastic, and the penalty will be adjusted accordingly. Indicates the reward weight; This represents a very small constant that prevents division by zero.
[0195] PPO Area Training and Strategy Transfer
[0196] (1) Regional training sample ratio: PPO is trained according to the meso-region. For the first... each region We selected 10% of the photovoltaic panels as training samples:
[0197]
[0198] The number of training samples is:
[0199]
[0200] In the formula: This represents the minimum number of training samples required for each region.
[0201] (2) Region-specific strategy
[0202] Each region develops its own region-specific strategy:
[0203]
[0204] In the formula: represents the first... PPO strategy for each region.
[0205] Once training is complete, the strategy for this region will only be applied to photovoltaic panels within the same region that were not trained.
[0206]
[0207] The same set of action results must not be directly reused between different regions. For any two different regions and It should satisfy:
[0208] ,
[0209] If shared network parameters are used, regionally differentiated actions must be generated through regional state characteristics and regional normalization parameters; it is not possible to have all regions output completely identical actions.
[0210] (3) PPO objective function
[0211] Policy updates for PPO can employ a pruning objective function. Let the probability ratio between the old and new policies be:
[0212]
[0213] The advantage function is:
[0214]
[0215] The PPO trimming target is:
[0216]
[0217] In the formula: This represents the PPO trimming factor.
[0218] SAC Optimal Candidate Adoption Mechanism
[0219] SAC is an important comparison method for micro-levels. During SAC training, the results of the last episode should not be used alone, but the best valid candidates during the training process should be preserved.
[0220] Let the set of all legal candidates during SAC training be:
[0221]
[0222] Where: each legal candidate It must simultaneously satisfy the following conditions: "valid motion range, valid spacing constraints, valid shadow constraints, and valid physical generation".
[0223] The optimal candidate for SAC is:
[0224]
[0225] If the optimal candidate power generation is higher than the baseline power generation:
[0226]
[0227] Then the SAC candidate solution will be adopted:
[0228]
[0229] If the optimal candidate is not better than the baseline solution:
[0230]
[0231] The baseline scheme will be retained:
[0232]
[0233] SAC results must be output:
[0234] The candidate gain rate is:
[0235]
[0236] The candidate gain rate is:
[0237]
[0238] Adoption gain rate:
[0239] .
[0240] To ensure comparability between different experimental combinations, all combinations must use the same final physical evaluator before entering the formal ablation comparison.
[0241] The unified physics evaluator can be represented as:
[0242]
[0243] In the formula: ,
[0244]
[0245] Macro-only combinations must also be recalculated using a unified physical evaluator; macro-estimated values cannot be directly used as the final ablation comparison values. Macro-estimated values are only retained as diagnostic fields.
[0246]
[0247] Formal ablation comparisons can only use:
[0248]
[0249] Economic recalculation model
[0250] The final economics must be recalculated based on the annual power generation and land area after unified physical calculations.
[0251] Land use costs
[0252]
[0253] Therefore, the land use cost is:
[0254]
[0255] The total cost is:
[0256]
[0257] Annual return is:
[0258]
[0259] Net present value is:
[0260]
[0261] In the formula: Indicates the project lifespan, here ; Indicates the first Annual income; Indicates the first Annual maintenance costs.
[0262] The payback period can be expressed as the minimum number of years that satisfy the following formula. :
[0263]
[0264] If cash flow cannot cover total costs over the project's lifespan, the payback period is denoted as unrecoverable or incalculable.
[0265] pseudocode written expression
[0266] Overall process
[0267] Inputs: GIS constraint data, DEM data, irradiance data, land use data, non-buildable area data, ecological constraint data, economic parameters, installed capacity constraints, macro-optimization parameters, meso-layout parameters, and PPO / SAC reinforcement learning parameters.
[0268] Output: Visualized results including optimal construction area, installed capacity, regional layout scheme, component-level optimization scheme, final annual power generation, final land area, final installed capacity, and final economic indicators.
[0269] process:
[0270] Step 1: Read and preprocess GIS constraint data, and remove areas that cannot be built.
[0271] Step 2: Read DEM, slope, aspect and irradiance data to build the foundation of geographic resource data.
[0272] Step 3: Generate candidate regions at the macro level based on capacity constraints and construction constraints.
[0273] Step 4: Calculate the annual power generation, NPV, land area and ecological suitability of the candidate schemes using MIP and NSGA-II respectively.
[0274] Step 5: Perform Pareto non-inferiority screening on the candidate solutions.
[0275] Step 6: Use entropy-weighted TOPSIS to select the optimal compromise from the Pareto frontier.
[0276] Step 7: Input the macroscopic candidate regions into the mesoscopic layer and divide the construction areas according to the terrain similarity.
[0277] Step 8: Calculate the shortest distance between adjacent region boundaries and optimize the region spacing within the range.
[0278] Step 9: Calculate the shading loss and mesoscopic physical power generation based on the mesoscopic layout.
[0279] Step 10: Input the component layout into the micro layer, and use PPO or SAC to perform reinforcement learning to adjust the component position, tilt angle and azimuth angle.
[0280] Step 11: Save the optimal candidate scheme during the training process and compare its physical power generation with the benchmark scheme.
[0281] Step 12: If the power generation of the candidate scheme is higher than that of the baseline scheme, the candidate scheme is adopted; otherwise, the baseline scheme is retained.
[0282] Step 13: Recalculate the final annual power generation, land area, installed capacity, and economic efficiency of all experimental combinations using a unified physics calculator.
[0283] Step 14: Output the comparative experimental results, convergence curve, GIS constraint overlay map, and final optimization result map.
[0284] (1) Data reading and constraint preprocessing
[0285] Step 1: Read the GIS, DEM, irradiance, land use, ecological constraints, and non-buildable area data from the data folder.
[0286] Step 2: Perform coordinate system optimization, range clipping, raster alignment, missing value handling, and unit conversion on all spatial data.
[0287] Step 3: Overlay non-buildable areas, ecological red lines, slope restrictions, land use restrictions, and engineering construction constraints to generate a buildable area mask.
[0288] Step 4: Construct a unified geographic resource data foundation to provide data input for macro-site selection, meso-level zoning, and micro-level component adjustment.
[0289] (2) Macro level: Site selection and capacity planning
[0290] Step 1: Within the buildable area, generate candidate construction plans based on capacity constraints, with installed capacity ranging from 5MW to 100MW.
[0291] Step 2: Generate a macroscopic candidate scheme set using both MIP and NSGA-II algorithms.
[0292] Step 3: Calculate four target indicators for each candidate scheme: annual power generation, NPV, land area, and ecological suitability.
[0293] Step 4: Perform Pareto nondominance screening on the candidate schemes of MIP and NSGA-II respectively to obtain their respective Pareto fronts.
[0294] Step 5: Perform entropy-weighted TOPSIS decision-making on the Pareto frontier scheme to select the macroscopically optimal compromise scheme under the MIP path and the NSGA-II path.
[0295] Step 6: Output macro-level results, including candidate construction areas, installed capacity, annual power generation, NPV, land area, ecological suitability, reference tilt angle, and reference azimuth angle.
[0296] (3) Mesoscopic layer: Division and spacing optimization of topographically similar regions
[0297] Step 1: If the experimental combination uses the meso-level, then input the macro-candidate regions and component seed points into the meso-level.
[0298] Step 2: Sample real terrain attributes for each candidate component point, including elevation, slope, aspect, irradiance, and suitability.
[0299] Step 3: Construct terrain similarity feature vectors based on spatial location, altitude, slope, aspect, irradiance, and suitability.
[0300] Step 4: Cluster the component points based on terrain similarity features to form several terrain-similar regions.
[0301] Step 5: Calculate the boundaries, average slope, average aspect, average elevation, average irradiance, average suitability, and number of components for each region.
[0302] Step 6: Calculate the shortest distance between the boundaries of adjacent regions as the region spacing, without using the region center distance.
[0303] Step 7: Within the recommended spacing range of 0.5m to 10m, search in both increasing and decreasing directions starting from the initial spacing.
[0304] Step 8: Calculate the shading loss, effective power generation, and land area for each candidate spacing scheme.
[0305] Step 9: Prioritize the spacing scheme with higher power generation; if the difference in power generation is small, choose the scheme with smaller land area.
[0306] Step 10: Output mesoscopic results, including terrain similarity areas, area boundaries, optimized spacing, component layout, shading loss, land area, and annual mesoscopic physical power generation.
[0307] (4) Micro-level: PPO / SAC component-level reinforcement learning adjustment
[0308] Step 1: If the experimental combination enables the micro layer, construct the micro reinforcement learning environment based on the meso layout or macro component seed points.
[0309] Step 2: Use the reference tilt angle and reference azimuth angle given by the macro or meso layer as the initial installation angle of the component.
[0310] Step 3: Construct the component state space, which includes location, tilt angle, azimuth angle, altitude, slope, aspect, irradiance, suitability, shading factor, neighboring component relationship, and current power generation.
[0311] Step 4: Construct the component motion space. Single-step actions include x-direction displacement, y-direction displacement, tilt adjustment, and azimuth adjustment.
[0312] Step 5: Limit the range of a single step to the x-direction, y-direction, tilt angle, and azimuth angle, and perform hard clipping on each step.
[0313] Step 6: If PPO is used, select 10% of the components in each meso-region as training samples, train the region-specific policy, and apply the policy trained in that region to other components in the same region.
[0314] Step 7: If SAC is used, construct the actor, critic, target network and experience replay pool, and save the best candidate solution that satisfies the engineering constraints and physical evaluation constraints during training.
[0315] Step 8: PPO / SAC completes the training according to the set number of training rounds and steps per round.
[0316] Step 9: After training is completed, calculate the power generation of the baseline scheme, the power generation of the candidate scheme, and the power generation of the adopted scheme.
[0317] Step 10: If the power generation of the candidate scheme is higher than that of the baseline scheme, the candidate scheme is adopted; otherwise, the baseline scheme is retained, and the reason why the candidate is not adopted is recorded.
[0318] Step 11: Output micro-level results, including component position, tilt angle, azimuth angle, single-step action, cumulative adjustment, component power generation change, training log, and adoption strategy before and after optimization.
[0319] (5) Unify final physical calculation and economic recalculation
[0320] Step 1: Construct the final layout for each experimental combination. If there are valid micro-results, use the micro-optimized layout; if there are no micro-results but there are meso-results, use the meso-layout; if there are only macro-results, construct a macro-representative layout.
[0321] Step 2: All experimental combinations use the same final physics calculator to recalculate the final annual power generation, final land area, final installed capacity, and final economic efficiency.
[0322] Step 3: Macro-only combinations cannot directly use macro-estimated power generation for formal comparison; they must be recalculated using a unified physical calculator.
[0323] Step 4: Recalculate NPV, annual net income, total cost, land cost, and investment payback period based on the final annual power generation, final land area, and final installed capacity.
[0324] (6) Ablation, comparative experiments and quality verification
[0325] Step 1: Run the formal experimental combinations in sequence, including MIP, NSGA-II, MIP+PPO, MIP+SA+PPO, NSGA-II+SAC, and NSGA-II+PSO+SAC.
[0326] Step 2: Perform a uniform quality check on each experimental combination to check unit consistency, field integrity, macroscopic four-objective integrity, mesoscopic terrain zoning validity, mesoscopic boundary spacing legality, microscopic action boundaries, reinforcement learning training integrity, and final physical evaluation consistency.
[0327] Step 3: If the experimental combination passes the quality verification, it will be included in the formal ablation comparison; if there is a serious error, it will be marked as failed or diagnostic and will not be included in the formal ranking.
[0328] Step 4: Based on the unified physical evaluation results, compare the final annual power generation, NPV, land area, installed capacity, operating time and reinforcement learning gain of each experimental combination.
[0329] Step 5: Generate formal comparison results, including annual power generation comparison, NPV comparison, land area comparison, operating time comparison, micro-cumulative adjustment map, meso-regional layout map and final recommended scheme.
[0330] (7) Result Output
[0331] Step 1: Output the final recommended scheme and provide the final annual power generation, final NPV, final land area, final installed capacity, optimization contribution of each layer, and quality verification conclusion.
[0332] (III) Beneficial Effects
[0333] Compared with existing technologies, this invention provides a hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning, which has the following beneficial effects:
[0334] This hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning improves the spatial compliance of the site selection and layout of mountain photovoltaic power stations. The invention incorporates constraints such as ecological red lines, permanent basic farmland, water sources, nature reserves, forest land, grassland, wetlands, and rocky desertification into a unified spatial model through GIS constraint modeling. This allows for the elimination of prohibited construction areas in the early planning stage and appropriate weight reduction of restricted areas, thereby reducing the risk that subsequent plans cannot be implemented due to spatial violations.
[0335] Improving the accuracy of power generation estimation: This invention uses hourly solar resource data and combines it with factors such as slope, aspect, shading, layout efficiency, and component orientation to estimate power generation. Compared with methods that only use empirical full-hour power generation or static irradiance estimation, it can more accurately reflect the annual power generation changes in mountainous environments.
[0336] Improving optimization accuracy in complex mountainous scenarios: This invention breaks down photovoltaic power plant planning into three scales: macro-level capacity, meso-level region, and micro-level module. The macro-level addresses global capacity and candidate region selection, the meso-level addresses region clustering, spacing, and shading, and the micro-level addresses module pose and local terrain adaptation. This hierarchical mechanism reduces the complexity of direct global optimization while preserving the interactions between different scales.
[0337] Improved economic evaluation capability of the project: This invention not only calculates annual power generation, but also annual revenue, total investment, annual operation and maintenance costs, NPV, IRR and investment payback period. Furthermore, it can incorporate mountain engineering factors such as land cost, mountain road cost, support foundation cost and construction difficulty cost, making the project evaluation closer to the actual project.
[0338] Improve the interpretability of optimization results: This invention outputs hierarchical power generation, hierarchical gain waterfall plot, convergence curve, regional diagnostic plot, shading analysis plot, 8760-hour power generation curve and economic plot, enabling users to determine whether the benefits come from macro capacity, meso layout or micro pose adjustment, rather than just getting a final annual power generation figure.
[0339] To enhance the credibility of experimental conclusions, this invention includes ablation experiments and comparative experiments with alternative algorithms to verify the effects of macroscopic, mesoscopic, and microscopic layers, as well as different combinations of algorithms. Simultaneously, through result consistency verification, experimental fairness reporting, microscopic gain auditing, and map degradation detection, the risk of misjudgment caused by missing values, misleading maps, or inconsistent result definitions is reduced.
[0340] Improving software operating efficiency: This invention separates CPU-suitable tasks such as GIS, PVlib, and file I / O from GPU-suitable tasks such as reinforcement learning training and batch candidate evaluation by CPU / GPU division of labor, and reduces redundant calculations by caching solar resources, terrain features, and static constraints, thereby improving the operating efficiency of complex experiments such as NSGA-II+PSO+SAC.
[0341] Improving software engineering maintainability: This invention modularizes data modeling, algorithm optimization, experiment orchestration, result schema, visualization, performance profiling, and result verification, allowing for the replacement of macro, meso, or micro algorithms without disrupting the overall workflow. For example, NSGA-II can replace the macro layer, PSO can replace the meso layer, and SAC can replace the micro layer.
[0342] Reducing the cost of manual trial and error in mountain photovoltaic planning: Traditional solutions require repeated manual adjustments to capacity, area, spacing, tilt angle, and azimuth. This invention, through automated hierarchical optimization and batch testing, can quickly compare multiple solutions, reducing manual trial and error and improving planning efficiency. Attached Figure Description
[0343] Figure 1 This is a schematic diagram of the overall structure of a hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning proposed in this invention.
[0344] Figure 2 This is a summary comparison chart of 8760 hours of irradiance and power generation from multiple algorithms in an embodiment of the present invention;
[0345] Figure 3 This is a comparison chart of NPV in ablation experiments in this embodiment of the invention;
[0346] Figure 4 This is a comparison chart of annual net income from ablation experiments in embodiments of the present invention;
[0347] Figure 5 This is a dual-axis comparison chart of annual power generation and economic value in an embodiment of the present invention;
[0348] Figure 6 The above are statistical tables and graphs from embodiments of the present invention.
[0349] Figure 7This is a summary comparison chart of 8760 hours of irradiance and power generation from multiple algorithms in an embodiment of the present invention;
[0350] Figure 8 This is a comparison chart of NPV in ablation experiments in this embodiment of the invention;
[0351] Figure 9 This is a comparison chart of annual net income from ablation experiments in embodiments of the present invention;
[0352] Figure 10 The above are statistical tables and graphs from embodiments of the present invention.
[0353] Figure 11 This is a convergence curve diagram of MIP+SA+PPO in an embodiment of the present invention;
[0354] Figure 12 This is a convergence curve diagram of NSGA-II+PSO+SAC in an embodiment of the present invention. Figure 13 This is a schematic diagram of the MIP convergence process, SA convergence process, PPO reward convergence process, and PPO loss reduction process in an embodiment of the present invention. Detailed Implementation
[0355] 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 embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0356] Please see Figure 1 A hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning, characterized by the following steps:
[0357] S1: Based on GIS data, construct a model of suitable construction areas for mountain photovoltaic projects, and unify hard constraints such as ecological red lines, permanent basic farmland, water sources, nature reserves, forest land, grassland, wetlands, and rocky desertification with soft suitability conditions such as slope, aspect, and altitude into spatially continuous constructability scoring raster data.
[0358] S2: At the macro level, guided by constructability scoring, multiple candidate installed capacity schemes are generated using the mixed integer programming (MIP) algorithm. For each candidate scheme, economic indicators including annual power generation, total investment cost, NPV, IRR, and investment payback period are calculated, as well as the satisfaction of capacity constraints and land use constraints. The optimal macro capacity configuration is determined by the Pareto frontier screening and entropy weight TOPSIS integrated decision-making method.
[0359] S3: At the meso-level, it receives candidate regions, installed capacity and area constraints output from the macro-level, performs spatial clustering of modules, calculates the average slope, average aspect, average altitude, effective area and number of modules for each cluster region, and jointly optimizes the regional spacing, layout density, shading loss and land area, estimates the shading impact between and within regions, and outputs the actual construction area, annual power generation and land use efficiency after meso-level layout.
[0360] S4: At the micro level, it receives layout information, terrain information, and solar resource data output from the macro and meso levels. Taking a single photovoltaic module or a representative module sample as the optimization object, it constructs a state space that includes the current position of the module, local elevation, local slope, local aspect, current tilt angle, current azimuth angle, distance to neighboring modules, estimated shading impact, solar resource characteristics, and historical power generation revenue. It also defines an action space that includes local horizontal offset of module position, module tilt angle adjustment, module azimuth angle adjustment, fine-tuning of module spacing, and local arrangement density adjustment. It performs local pose adjustment through reinforcement learning algorithm and constructs a composite reward function with annual power generation gain, shading loss reduction, module spacing constraint penalty, slope or construction difficulty penalty, boundary constraint penalty, land area penalty, layout stability reward, and economic benefit gain. It outputs the optimized module pose parameters.
[0361] S5: Establish a macro-meso-micro feedback iteration mechanism to feed back the number of inefficient components, layout efficiency factors, land use changes and power generation changes found at the micro level to the macro or meso level, and readjust the capacity, area or regional layout until the number of inefficient components or power generation changes meet the convergence conditions, forming a closed-loop optimization.
[0362] S6: Based on the final adopted layout scheme, combined with hourly solar resource data, terrain correction factor, layout correction factor, shading correction factor, component efficiency, and system efficiency, calculate the final annual power generation; and comprehensively consider component cost, inverter cost, installation cost, land cost, mountain road cost, site leveling cost, collection line cost, operation and maintenance cost, electricity sales revenue, and subsidy revenue to calculate economic indicators including annual net income, NPV, IRR, and investment payback period.
[0363] S7: Perform ablation experiments and comparative experiments with alternative algorithms, including four default ablation experiment combinations: MIP, MIP+SA, MIP+PPO, and MIP+SA+PPO, and four comparative experiment combinations with alternative algorithms: NSGA-II, NSGA-II+PSO, NSGA-II+SAC, and NSGA-II+PSO+SAC. Output the annual power generation, NPV, annual net income, installed capacity, land area, operating time, hierarchical gain, and convergence process for each experiment, and perform result quality verification and visualization output.
[0364] Preferably, the specific implementation method for constructing the model of suitable construction areas for mountain photovoltaic power generation in step S1 is as follows:
[0365] 2.1 Ecological red lines, permanent basic farmland, water source areas, nature reserves, forest land, grassland, wetlands, and rocky desertification areas are defined as prohibited construction areas and are assigned the value of "not allowed to be built".
[0366] 2.2 Conditions such as slope, aspect, altitude, distance from road, and distance from power grid connection point are defined as spatial soft constraints. Different weights are assigned through multi-criteria decision analysis to generate spatially continuous constructability score raster data.
[0367] 2.3 Appropriately reduce the weight of soft-constrained areas to lower the score of restricted areas, thereby reducing the risk that subsequent solutions may fail to be implemented due to spatial violations.
[0368] Preferably, the specific implementation of the generation and decision-making of macroscopic layer capacity candidate schemes in step S2 includes:
[0369] 3.1 Generate multiple capacity candidate points, covering a capacity range from the minimum feasible capacity to the maximum available area;
[0370] 3.2 Calculate multiple indicators for each candidate site, including power generation, economic efficiency, and land use efficiency;
[0371] 3.3 Eliminate infeasible candidate sites that violate capacity constraints or land use constraints;
[0372] 3.4 Construct a multi-objective Pareto front, calculate the weights of different indicators using the entropy weight method, and select the comprehensive optimal capacity scheme using the TOPSIS method.
[0373] Preferably, the specific implementation methods for optimizing the layout of the mesoscopic region in step S3 include:
[0374] 4.1 Based on the location of the photovoltaic panels or candidate regions output from the macroscopic layer, the modules are spatially clustered to divide them into several clustering regions;
[0375] 4.2 Calculate the average slope, average aspect, average elevation, effective area, and number of components for each cluster region;
[0376] 4.3 Jointly optimize the spacing between regions, the density of the layout, the shading loss, and the land area to estimate the shading impact between and within regions;
[0377] 4.4 Calculate the actual station area, annual power generation, and land use efficiency after the meso-level layout, and pass the results to the micro-level.
[0378] Preferably, the specific implementation method of micro-layer component pose optimization in step S4 includes:
[0379] 5.1 Construct the micro-level state space, including: the current position of the component, the region number, the local elevation, the local slope, the local aspect, the current tilt angle, the current azimuth angle, the distance to neighboring components, the estimated shading impact, the characteristics of solar resources, and the historical power generation revenue or power generation per unit component;
[0380] 5.2 Define the micro-level action space, including: local horizontal offset of component position, component tilt angle adjustment, component azimuth angle adjustment, component spacing fine adjustment, and local arrangement density adjustment;
[0381] 5.3 Construct a composite reward function, including: annual power generation gain, reduction of shading loss, penalty for component spacing constraints, penalty for slope or construction difficulty, penalty for exceeding boundaries, penalty for land area, reward for layout stability, and gain for economic benefits;
[0382] 5.4 A reinforcement learning algorithm is used to adjust the local pose of representative component samples and output the optimized component pose parameters.
[0383] Preferably, the specific implementation methods of the macro-meta-micro feedback iteration mechanism in step S5 include:
[0384] 6.1 Macro-level output capacity, number of components, and candidate regions;
[0385] 6.2 The meso-level optimizes regional layout and spacing based on macro-level results;
[0386] 6.3 The micro-level optimizes component pose based on the meso-level results;
[0387] 6.4 The system statistically analyzes the number of inefficient components, layout efficiency factor, land use changes, and power generation changes;
[0388] 6.5 If the number of inefficient components or the change in power generation meets the convergence condition, the feedback iteration is terminated; otherwise, the layout problems found at the micro level are fed back to the macro or meso level, and the capacity, area or regional layout is readjusted until the convergence condition is met.
[0389] Preferably, the specific implementation method for calculating power generation and economic indicators in step S6 includes:
[0390] 7.1 Power generation calculation: The annual power generation is calculated by summing the installed capacity, equivalent full-load hours, hourly solar resources, terrain correction factor, layout correction factor, shading correction factor, module efficiency, system efficiency or performance ratio, tilt angle and azimuth angle correction.
[0391] 7.2 Economic Calculation: Comprehensive calculation of component cost, inverter cost, installation cost, land cost, mountain road cost, site leveling cost, collection line cost, operation and maintenance cost, electricity sales revenue, and subsidy revenue, and further calculation of annual net income, NPV, IRR and investment payback period;
[0392] 7.3 Introducing mountain engineering factors, such as construction difficulty and cost, makes the evaluation of the scheme closer to the actual project.
[0393] Preferably, the specific implementation of the ablation experiment and replacement algorithm in step S7 includes:
[0394] 8.1 The first category is the default ablation experiment, including: MIP, MIP+SA, MIP+PPO, MIP+SA+PPO, where MIP indicates that only the macro layer is enabled, MIP+SA indicates that both the macro and meso layers are enabled, MIP+PPO indicates that both the macro and micro layers are enabled, and MIP+SA+PPO indicates that all three layers are enabled.
[0395] 8.2 The second category is the comparative experiment of alternative algorithms, comprising: NSGA-II, NSGA-II+PSO, NSGA-II+SAC, NSGA-II+PSO+SAC, wherein NSGA-II replaces the macroscopic layer 21. In step S4, the state space of the reinforcement learning algorithm further includes the historical power generation revenue of the component or the power generation per unit component, in order to improve the accuracy of local optimization under complex terrain.
[0396] Preferably, it also includes step S8: result quality verification and visualization output, specifically including:
[0397] 9.1 Verify the algorithm's activation status to ensure that the map and the algorithm's activation status are consistent;
[0398] 9.2 Verify the integrity of the convergence history to ensure that missing indicators are not mistakenly written as 0;
[0399] 9.3 Verify the consistency of drawings to ensure that the summary table, JSON, drawings, and reports are consistent;
[0400] 9.4 Diagnosing abnormally high gain at the micro-layer level to prevent over-optimization in local areas;
[0401] 9.5 Verify the fairness of the experiment to ensure fairness in land area and capacity among different experiments;
[0402] 9.6 Generate visualization charts, including: single experiment result file, batch summary CSV, power generation comparison chart, NPV comparison chart, annual net income comparison chart, execution time comparison chart, hierarchical gain chart, 8760-hour irradiance and power generation curve, topographic map, constraint chart, representative area array layout map, result consistency report, experiment fairness report, and performance profiling report.
[0403] This invention differs from the prior art in the following ways:
[0404] 1. Unify the GIS hard and soft constraints into a model of suitable construction areas for mountain photovoltaic projects: not only identify whether construction is possible, but also further form a continuous data structure that can be used for capacity planning, regional layout and component optimization.
[0405] 2. Mandate or prioritize the use of real hourly solar resource data: Avoid completely replacing real hourly resources with random irradiance or simplified full-hour irradiance through solar resource data verification mechanisms.
[0406] 3. A three-level decomposition and optimization mechanism of macro-meso-micro is adopted: the macro layer is responsible for capacity and candidate areas, the meso layer is responsible for regional layout and shading, and the micro layer is responsible for component pose and local power generation revenue, thereby avoiding the problem that single-scale optimization is difficult to adapt to complex mountainous conditions.
[0407] 4. Establish a hierarchical feedback mechanism: Inefficient components, occlusion problems, layout efficiency and area requirements discovered at the micro level can be fed back to the meso or macro level, so that the planning results form a closed loop.
[0408] 5. Introduce reinforcement learning for component pose optimization in terrain perception: Use local terrain, slope, aspect, occlusion and component state as reinforcement learning state input, and use position, tilt angle and azimuth angle adjustment as action output to improve local optimization capability under complex terrain.
[0409] 6. Support for alternative algorithm comparison and ablation verification: Supports combinations of MIP / SA / PPO and NSGA-II / PSO / SAC within the same software framework to verify the contribution of different levels and different algorithms to the results.
[0410] 7. Establish a result quality verification mechanism: Diagnose the algorithm's activation status, convergence history, map validity, missing values, units, experimental fairness, micro-anomaly gains, and performance bottlenecks to avoid simply outputting the final result without a reliable explanation.
[0411] 8. Establish a CPU / GPU division of labor mechanism: Use the CPU for tasks such as GIS, PVlib, I / O, and map, and use the GPU for reinforcement learning, batch candidate evaluation, and tensor quantization reward calculation to reduce unnecessary data exchange between the CPU and GPU.
[0412] Example: Ablation and comparative experiments:
[0413] MIP, SA, PPO single-layer vs. three-layer enabled, see attached diagram. Figure 2 , 3 As shown in Figures 4, 5, and 6, the charts are as follows: Figure 7 As shown, under the condition of almost the same installed capacity, compared with the base value of the single-layer MIP scheme, the three-layer optimized MIP+SA+PPO scheme increases the annual power generation from 86.85 GWh to 89.86 GWh, an increase of 3.47%; NPV increases from -3.591 million yuan to 10.38 million yuan, an increase of 389.06%. At the same time, under the MIP+SA scheme, the NPV is -4.499 million yuan, which is 908,000 yuan less than the -3.591 million yuan of MIP. This is because the SA algorithm in the meso-level layer adjusts the regional spacing, which increases the total land area and thus the cost. It can also be seen that under the MIP+PPO optimization strategy, due to the addition of the PPO algorithm, the NPV changes from negative to positive, making the project feasible instead of infeasible; the annual net income increases from 38.47 million yuan to 40.07 million yuan, an increase of 4.16%.
[0414] NSGA-II, PSO, and SAC single-layer vs. three-layer configurations are enabled. See attached diagram. Figure 8 , 9 As shown in Figures 10 and 11.
[0415] In summary, this hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning improves the spatial compliance of site selection and layout of mountain photovoltaic power stations. This invention incorporates constraints such as ecological red lines, permanent basic farmland, water sources, nature reserves, forest land, grassland, wetlands, and rocky desertification into a unified spatial model through GIS constraint modeling. This allows for the elimination of prohibited construction areas in the early planning stage and appropriate weight reduction for restricted areas, thereby reducing the risk that subsequent plans cannot be implemented due to spatial violations.
[0416] Improving the accuracy of power generation estimation: This invention uses hourly solar resource data and combines it with factors such as slope, aspect, shading, layout efficiency, and component orientation to estimate power generation. Compared with methods that only use empirical full-hour power generation or static irradiance estimation, it can more accurately reflect the annual power generation changes in mountainous environments.
[0417] Improving optimization accuracy in complex mountainous scenarios: This invention breaks down photovoltaic power plant planning into three scales: macro-level capacity, meso-level region, and micro-level module. The macro-level addresses global capacity and candidate region selection, the meso-level addresses region clustering, spacing, and shading, and the micro-level addresses module pose and local terrain adaptation. This hierarchical mechanism reduces the complexity of direct global optimization while preserving the interactions between different scales.
[0418] Improved economic evaluation capability of the project: This invention not only calculates annual power generation, but also annual revenue, total investment, annual operation and maintenance costs, NPV, IRR and investment payback period. Furthermore, it can incorporate mountain engineering factors such as land cost, mountain road cost, support foundation cost and construction difficulty cost, making the project evaluation closer to the actual project.
[0419] Improve the interpretability of optimization results: This invention outputs hierarchical power generation, hierarchical gain waterfall plot, convergence curve, regional diagnostic plot, shading analysis plot, 8760-hour power generation curve and economic plot, enabling users to determine whether the benefits come from macro capacity, meso layout or micro pose adjustment, rather than just getting a final annual power generation figure.
[0420] To enhance the credibility of experimental conclusions, this invention includes ablation experiments and comparative experiments with alternative algorithms to verify the effects of macroscopic, mesoscopic, and microscopic layers, as well as different combinations of algorithms. Simultaneously, through result consistency verification, experimental fairness reporting, microscopic gain auditing, and map degradation detection, the risk of misjudgment caused by missing values, misleading maps, or inconsistent result definitions is reduced.
[0421] Improving software operating efficiency: This invention separates CPU-suitable tasks such as GIS, PVlib, and file I / O from GPU-suitable tasks such as reinforcement learning training and batch candidate evaluation by CPU / GPU division of labor, and reduces redundant calculations by caching solar resources, terrain features, and static constraints, thereby improving the operating efficiency of complex experiments such as NSGA-II+PSO+SAC.
[0422] Improving software engineering maintainability: This invention modularizes data modeling, algorithm optimization, experiment orchestration, result schema, visualization, performance profiling, and result verification, allowing for the replacement of macro, meso, or micro algorithms without disrupting the overall workflow. For example, NSGA-II can replace the macro layer, PSO can replace the meso layer, and SAC can replace the micro layer.
[0423] Reducing the cost of manual trial and error in mountain photovoltaic planning: Traditional solutions require repeated manual adjustments to capacity, area, spacing, tilt angle, and azimuth. This invention, through automated hierarchical optimization and batch testing, can quickly compare multiple solutions, reducing manual trial and error and improving planning efficiency.
[0424] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0425] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning, characterized in that, Includes the following steps: S1: Based on GIS data, construct a model of suitable construction areas for mountain photovoltaic projects, and unify hard constraints such as ecological red lines, permanent basic farmland, water sources, nature reserves, forest land, grassland, wetlands, and rocky desertification with soft suitability conditions such as slope, aspect, and altitude into spatially continuous constructability scoring raster data. S2: At the macro level, guided by constructability scoring, multiple candidate installed capacity schemes are generated using the mixed integer programming (MIP) algorithm. For each candidate scheme, economic indicators including annual power generation, total investment cost, NPV, IRR, and investment payback period are calculated, as well as the satisfaction of capacity constraints and land use constraints. The optimal macro capacity configuration is determined by the Pareto frontier screening and entropy weight TOPSIS integrated decision-making method. S3: At the meso-level, it receives candidate regions, installed capacity and area constraints output from the macro-level, performs spatial clustering of modules, calculates the average slope, average aspect, average altitude, effective area and number of modules for each cluster region, and jointly optimizes the regional spacing, layout density, shading loss and land area, estimates the shading impact between and within regions, and outputs the actual construction area, annual power generation and land use efficiency after meso-level layout. S4: At the micro level, it receives layout information, terrain information, and solar resource data output from the macro and meso levels. Taking a single photovoltaic module or a representative module sample as the optimization object, it constructs a state space that includes the current position of the module, local elevation, local slope, local aspect, current tilt angle, current azimuth angle, distance to neighboring modules, estimated shading impact, solar resource characteristics, and historical power generation revenue. It also defines an action space that includes local horizontal offset of module position, module tilt angle adjustment, module azimuth angle adjustment, fine-tuning of module spacing, and local arrangement density adjustment. It performs local pose adjustment through reinforcement learning algorithm and constructs a composite reward function with annual power generation gain, shading loss reduction, module spacing constraint penalty, slope or construction difficulty penalty, boundary constraint penalty, land area penalty, layout stability reward, and economic benefit gain. It outputs the optimized module pose parameters. S5: Establish a macro-meso-micro feedback iteration mechanism to feed back the number of inefficient components, layout efficiency factors, land use changes and power generation changes found at the micro level to the macro or meso level, and readjust the capacity, area or regional layout until the number of inefficient components or power generation changes meet the convergence conditions, forming a closed-loop optimization. S6: Based on the final adopted layout scheme, combined with hourly solar resource data, terrain correction factor, layout correction factor, shading correction factor, component efficiency, and system efficiency, calculate the final annual power generation; and comprehensively consider component cost, inverter cost, installation cost, land cost, mountain road cost, site leveling cost, collection line cost, operation and maintenance cost, electricity sales revenue, and subsidy revenue to calculate economic indicators including annual net income, NPV, IRR, and investment payback period. S7: Perform ablation experiments and comparative experiments with alternative algorithms, including four default ablation experiment combinations: MIP, MIP+SA, MIP+PPO, and MIP+SA+PPO, and four comparative experiment combinations with alternative algorithms: NSGA-II, NSGA-II+PSO, NSGA-II+SAC, and NSGA-II+PSO+SAC. Output the annual power generation, NPV, annual net income, installed capacity, land area, operating time, hierarchical gain, and convergence process for each experiment, and perform result quality verification and visualization output.
2. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation method for constructing the model of suitable mountain photovoltaic construction areas in step S1 is as follows: 2.1 Ecological red lines, permanent basic farmland, water source areas, nature reserves, forest land, grassland, wetlands, and rocky desertification areas are defined as prohibited construction areas and are assigned the value of "not allowed to be built". 2.2 Conditions such as slope, aspect, altitude, distance from road, and distance from power grid connection point are defined as spatial soft constraints. Different weights are assigned through multi-criteria decision analysis to generate spatially continuous constructability score raster data. 2.3 Appropriately reduce the weight of soft-constrained areas to lower the score of restricted areas, thereby reducing the risk that subsequent solutions may fail to be implemented due to spatial violations.
3. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation methods for generating and deciding on macroscopic layer capacity candidate schemes in step S2 include: 3.1 Generate multiple capacity candidate points, covering a capacity range from the minimum feasible capacity to the maximum available area; 3.2 Calculate multiple indicators for each candidate site, including power generation, economic efficiency, and land use efficiency; 3.3 Eliminate infeasible candidate sites that violate capacity constraints or land use constraints; 3.4 Construct a multi-objective Pareto front, calculate the weights of different indicators using the entropy weight method, and select the comprehensive optimal capacity scheme using the TOPSIS method.
4. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation methods for optimizing the layout of the mesoscopic region in step S3 include: 4.1 Based on the location of the photovoltaic panels or candidate regions output from the macroscopic layer, the modules are spatially clustered to divide them into several clustering regions; 4.2 Calculate the average slope, average aspect, average elevation, effective area, and number of components for each cluster region; 4.3 Jointly optimize the spacing between regions, the density of the layout, the shading loss, and the land area to estimate the shading impact between and within regions; 4.4 Calculate the actual station area, annual power generation, and land use efficiency after the meso-level layout, and pass the results to the micro-level.
5. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation methods for optimizing the pose of the micro-layer components in step S4 include: 5.1 Construct the micro-level state space, including: the current position of the component, the region number, the local elevation, the local slope, the local aspect, the current tilt angle, the current azimuth angle, the distance to neighboring components, the estimated shading impact, the characteristics of solar resources, and the historical power generation revenue or power generation per unit component; 5.2 Define the micro-level action space, including: local horizontal offset of component position, component tilt angle adjustment, component azimuth angle adjustment, component spacing fine adjustment, and local arrangement density adjustment; 5.3 Construct a composite reward function, including: annual power generation gain, reduction of shading loss, penalty for component spacing constraints, penalty for slope or construction difficulty, penalty for exceeding boundaries, penalty for land area, reward for layout stability, and gain for economic benefits; 5.4 A reinforcement learning algorithm is used to adjust the local pose of representative component samples and output the optimized component pose parameters.
6. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation methods of the macro-meta-micro feedback iteration mechanism in step S5 include: 6.1 Macro-level output capacity, number of components, and candidate regions; 6.2 The meso-level optimizes regional layout and spacing based on macro-level results; 6.3 The micro-level optimizes component pose based on the meso-level results; 6.4 The system statistically analyzes the number of inefficient components, layout efficiency factor, land use changes, and power generation changes; 6.5 If the number of inefficient components or the change in power generation meets the convergence condition, the feedback iteration is terminated; otherwise, the layout problems found at the micro level are fed back to the macro or meso level, and the capacity, area or regional layout is readjusted until the convergence condition is met.
7. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation methods for calculating power generation and economic indicators in step S6 include: 7.1 Power generation calculation: The annual power generation is calculated by summing the installed capacity, equivalent full-load hours, hourly solar resources, terrain correction factor, layout correction factor, shading correction factor, module efficiency, system efficiency or performance ratio, tilt angle and azimuth angle correction. 7.2 Economic Calculation: Comprehensive calculation of component cost, inverter cost, installation cost, land cost, mountain road cost, site leveling cost, collection line cost, operation and maintenance cost, electricity sales revenue, and subsidy revenue, and further calculation of annual net income, NPV, IRR and investment payback period; 7.3 Introducing mountain engineering factors, such as construction difficulty and cost, makes the evaluation of the scheme closer to the actual project.
8. The hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning according to claim 1, characterized in that: The specific implementation methods of the ablation experiment and replacement algorithm in step S7 include: 8.1 The first category is the default ablation experiment, including: MIP, MIP+SA, MIP+PPO, MIP+SA+PPO, where MIP indicates that only the macro layer is enabled, MIP+SA indicates that both the macro and meso layers are enabled, MIP+PPO indicates that both the macro and micro layers are enabled, and MIP+SA+PPO indicates that all three layers are enabled. 8.2 The second category is a comparative experiment of alternative algorithms, comprising: NSGA-II, NSGA-II+PSO, NSGA-II+SAC, and NSGA-II+PSO+SAC, wherein NSGA-II replaces macroscopic layer 21. In step S4, the state space of the reinforcement learning algorithm further includes the historical power generation revenue of the component or the power generation per unit component, which is used to improve the accuracy of local optimization under complex terrain.
9. A hierarchical optimization method for mountain photovoltaic power stations based on GIS constraints and reinforcement learning as described in claim 1, characterized in that: It also includes step S8: result quality verification and visualization output, which specifically includes: 9.1 Verify the algorithm's activation status to ensure that the map and the algorithm's activation status are consistent; 9.2 Verify the integrity of the convergence history to ensure that missing indicators are not mistakenly written as 0; 9.3 Verify the consistency of drawings to ensure that the summary table, JSON, drawings, and reports are consistent; 9.4 Diagnosing abnormally high gain at the micro-layer level to prevent over-optimization in local areas; 9.5 Verify the fairness of the experiment to ensure fairness in land area and capacity among different experiments; 9.6 Generate visualization charts, including: single experiment result file, batch summary CSV, power generation comparison chart, NPV comparison chart, annual net income comparison chart, execution time comparison chart, hierarchical gain chart, 8760-hour irradiance and power generation curve, topographic map, constraint chart, representative area array layout map, result consistency report, experiment fairness report, and performance profiling report.
