Hierarchical photovoltaic power station site selection and wiring collaborative optimization method based on graph neural network
By constructing a weighted directed graph and introducing a graph neural network acceleration module, a hierarchical photovoltaic power plant site selection and wiring collaborative optimization method is proposed. This method solves the problems of large computational load and slow solution speed in the layout decision of large-scale photovoltaic power plants, and achieves fast and accurate layout optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2025-12-23
- Publication Date
- 2026-07-24
AI Technical Summary
In the site layout decision-making of large-scale photovoltaic power plants, traditional optimization methods involve large computational loads and insufficient structural utilization, resulting in slow solution speeds and difficulty in achieving rapid solutions while ensuring optimality.
A hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks is adopted. By constructing a weighted directed graph, the main problem and sub-problems are solved iteratively using the Benders decomposition strategy. A graph neural network acceleration module is introduced to learn the topology and solution results, predict the importance of candidate nodes and connection priorities, perform local cost distribution, and finally verify the optimality and feasibility.
It significantly improves the solution efficiency of photovoltaic power plant layout optimization, reduces the number of iterations and computational overhead, maintains the accuracy and engineering feasibility of the optimal solution, and is suitable for the layout optimization of large-scale power plants.
Smart Images

Figure CN121744564B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy system planning and operations optimization, specifically to a hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks. Background Technology
[0002] With the development of large-scale renewable energy grid connection, especially the construction of photovoltaic power plants of 100 MW and above, site layout decisions (including the location of module arrays, combiner boxes and inverters, as well as cable routing and service road layout) have become key issues affecting project investment and power generation efficiency. Accurate solutions to these problems are typically formalized as integrated site selection and wiring problems, using integer programming combined with decomposition techniques as the primary solution method. Although these methods can theoretically yield exact solutions, in large-scale engineering examples, the number of subproblems is enormous and their structures are similar, leading to huge computational loads, severe duplication of calculations, and slow convergence. Furthermore, traditional optimizers struggle to effectively utilize the structural characteristics of subproblems, failing to achieve fast solutions while maintaining optimality. Based on these issues, there is an urgent need for an intelligent optimization framework that can identify and utilize the structural characteristics of the problem, significantly improving solution speed while maintaining the accuracy of integer programming, to meet the layout optimization needs of large-scale photovoltaic power plants. Summary of the Invention
[0003] This invention provides a hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks, in order to solve the problems of large computational load of sub-problems, insufficient structural utilization, and slow convergence speed in existing photovoltaic power plant layout optimization methods.
[0004] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks, comprising: S1, construct a weighted directed graph for the photovoltaic power plant area to uniformly describe the spatial location, electrical coupling and economic cost between photovoltaic modules, combiner boxes, inverters and service channels, and establish an objective function based on the weighted directed graph with the goal of minimizing construction cost, and configure constraints for the objective function; S2, the global layout problem of the objective function is divided into a main problem and sub-problems, and the main problem and sub-problems are solved iteratively using a hierarchical solution strategy of Benders decomposition to obtain the solution results of the sub-problems; wherein, the main problem is used to determine the construction of service channels, inverter site selection and combiner box selection, and the sub-problems are used to optimize the connection scheme from photovoltaic modules to combiner boxes and the connection scheme from combiner boxes to inverters; S3, the graph neural network acceleration module is used to learn the topology and solution results of the sub-problem to predict the importance of candidate nodes, connection priority and local cost distribution, so as to obtain the photovoltaic power plant layout candidate scheme. S4. Perform optimality and feasibility verification on the candidate layout schemes of the photovoltaic power station, and make local corrections when the verification fails, and output the optimized layout scheme of the photovoltaic power station after the verification passes.
[0005] Based on the above technical solution, the present invention can be further improved as follows.
[0006] Furthermore, in S1, the weighted directed graph has attributes and is constructed by defining the topological relationships of the discretized photovoltaic power plant area. The weighted directed graph is represented as follows: ; In the formula, This is the weighted directed graph; Let be a set of nodes, representing the possible locations of photovoltaic modules, combiner boxes, and inverters, and , , and These represent the candidate sets for photovoltaic module nodes, combiner box nodes, and inverter nodes, respectively. Let be the set of edges, representing feasible cable connection paths between nodes, and , and These are the sets of feasible connections from photovoltaic modules to combiner boxes and the sets of feasible connections from combiner boxes to inverters, respectively. The set of edge weights represents the cost, distance, or impedance of a connection. The attributes of the weighted directed graph include node attributes and edge attributes; The node attributes are represented as follows: ; In the formula, , For nodes The node vector, , For nodes x and y coordinates For nodes Rated power, For nodes capacity, For nodes Unit cost of equipment For nodes Type encoding; The edge attribute is represented as follows: ; In the formula, , , For nodes With nodes The edge vectors between them For nodes With nodes Manhattan distance between them For nodes With nodes The equivalent resistance of the lines between them. For nodes With nodes The unit cost of cables between them.
[0007] Further, in S1, the step of establishing the objective function includes: defining decision variables based on the weighted directed graph; and constructing the objective function based on the decision variables; wherein, The decision variables include: ; ; ; ; ; In the formula, , , ; To characterize photovoltaic module nodes Is it connected to the combiner box node? Binary decision variables, To characterize the combiner box node Is it connected to the inverter node? Binary decision variables, To characterize the combiner box node Do you want to select type? The binary decision variables of the combiner box, To characterize inverter nodes Whether or not to install an inverter is a binary decision variable. For characterization service channel A binary decision variable regarding whether or not to construct; The objective function is expressed as: In the formula, The unit cost of the cable between the photovoltaic module and the combiner box. For photovoltaic module nodes Combiner box node Manhattan distance between them The unit cost of the cable between the combiner box and the inverter. For combiner box nodes With inverter node Manhattan distance between them For type The purchase cost of the combiner box, For inverter nodes Inverter purchase cost, For service channels The unit construction cost For the service channel candidate set.
[0008] Furthermore, in S1, the constraints on the objective function include: In the formula, For photovoltaic module nodes The power of the photovoltaic modules, For type The capacity of the combiner box, This is a set of junction box types.
[0009] Furthermore, in S2, the main problem is represented as: In the formula, The main problem decision variables, and , The main problem is to minimize the upper-level cost of the system while satisfying global connectivity and capacity constraints. Let be the optimal response function for the subproblem; where the global connectivity and capacity constraints are expressed as: The subproblem is represented as: In the formula, Let be the decision variables for the subproblem, and , For the subproblem in the decision variables of the main problem Minimize the lower-level cost of the system under given conditions; The constraints satisfied by the sub-problems include: In the formula, For photovoltaic module nodes The power of the photovoltaic modules, For type The capacity of the combiner box, This is a set of junction box types.
[0010] Furthermore, in S2, the main problem and the subproblems are iteratively solved using a hierarchical solution strategy based on Benders decomposition, specifically including: S21, Solve the main problem using the currently generated set of cutting planes to obtain a temporary solution to the main problem. ; S22, temporarily solve the main problem. Substitute the subproblems of each block into the subproblems to find the optimal value for each block's subproblems. and its dual variables ; S23, based on the optimal value of the subproblems of each block. and its dual variables Construct a new cutting plane, and represent it as follows: In the formula, Let be the optimal response function for the subproblem. The total number of blocks, Variables for the main problem decision; S24. Define the objective value of the main problem as a lower bound. The overall objective value of the feedback from the sub-problems is defined as the upper bound. And calculate the relative error ; If the new cutting plane generated in S23 is returned to the S21 loop for the next iteration, then... If convergence is achieved, the iterative solution is terminated, and the solution result of the subproblem is output; where, Preset tolerance, relative error The calculation formula is: .
[0011] Furthermore, in S3, the graph neural network acceleration module includes: The input layer is used to receive the solution results of the subproblem, transform them into a weighted directed graph of the subproblem, and transform the node and edge attributes in the weighted directed graph of the subproblem into computable feature vectors. The connection layer performs graph convolution operations on the feature vectors obtained from the input layer to achieve feature propagation and topological information fusion between nodes, thereby obtaining the implicit representation of the nodes; wherein, the first... The feature update rule for the layer is: In the formula, For nodes In the The feature vector of the layer, It is a non-linear activation function. For nodes The set of neighboring nodes, For nodes With nodes The boundary rights between them and The first in the connection layer The trainable parameters of the layer, For nodes In the The feature vector of the layer, For nodes In the The feature vector of the layer; The message aggregation layer is used to aggregate the implicit representations of all nodes obtained from the connection layer to obtain a global feature embedding; wherein, the aggregation operation is expressed as: In the formula, For the global feature embedding, and These are the aggregate weighting coefficients. The total number of nodes. For nodes The feature vector of the last layer of the connection layer; Output layer, used for embedding global features based on the message aggregation layer. Achieve three types of task output: First type of output: , representing a node The probability of becoming a key location; Second type of output: , indicating edge The probability of being selected as a wiring path; Third type of output: , which represents the approximate optimal cost estimate of the subproblem.
[0012] Furthermore, in S3, the loss function used by the graph neural network acceleration module to learn the topological structure and solution results of the sub-problem is: ; In the formula, For the total loss, and These are the node and edge labels corresponding to the optimal solution. , and These are the weighting coefficients. The probability of being a critical location. Let be the probability of the wiring path. This represents the target cost of the subproblem.
[0013] Furthermore, in S4, the feasibility verification includes constraints on the uniqueness of photovoltaic module connections, the capacity of the combiner box, the connectivity between the combiner box and the inverter, and the road accessibility. If any constraint is violated, a local correction is triggered. The optimality verification is achieved through a relative optimality error index. The optimality verification is then considered to have failed, and a local correction is initiated; where, To preset the error threshold, The relative optimality error index is: ; In the formula, The objective function value obtained from the graph neural network algorithm. This is the baseline optimal value obtained by the Benders algorithm.
[0014] Furthermore, the core strategy of the local correction is as follows: under the condition of maintaining optimality, the local constraints are relaxed into a continuous domain, a continuous approximate solution is obtained, and then a feasible integer solution is obtained by discretization through directional branching.
[0015] The beneficial effects of this invention are as follows: The hierarchical photovoltaic power station site selection and wiring collaborative optimization method based on graph neural network introduces graph neural network acceleration model into the Benders decomposition framework to learn and predict the topological structure and solution rules of sub-problems, realize the rapid generation of approximate cutting planes and the initial solution guidance of the main problem, thereby significantly improving the solution efficiency while maintaining the accuracy of the optimal solution; Compared with conventional decomposition methods, the main innovations and advantages of this invention include: (1) Using attributed graph representation to structure the layout problem, providing a unified input for subsequent deep learning models; (2) Designing and training a dedicated graph neural network to predict the candidate equipment positions and priority connections and local optimal cost estimation in sub-problems; (3) Embedding graph neural network prediction into the Benders decomposition process, reducing the number of iterations and accelerating convergence through probability screening and cutting plane sorting; (4) Establishing a verification and correction mechanism based on feasibility testing and upper and lower bound differences, ensuring or restoring the engineering feasibility and numerical close to the global optimum of the solution within a finite number of steps; The method of this invention is applicable to large-scale power station examples and has good generalization and engineering applicability. Attached Figure Description
[0016] Figure 1 This is a flowchart of the hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to the present invention; Figure 2 This is a schematic diagram of the layout of a photovoltaic power station; Figure 3 Decompose the flowchart for Benders; Figure 4 This is a diagram of a graph neural network architecture. Figure 5 The convergence curve of the training iteration of the graph neural network; Figure 6 Output a diagram showing the cable routing and connection path results. Detailed Implementation
[0017] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0018] like Figure 1 As shown, the hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks includes: S1, construct a weighted directed graph for the photovoltaic power plant area to uniformly describe the spatial location, electrical coupling and economic cost between photovoltaic modules, combiner boxes, inverters and service channels, and establish an objective function based on the weighted directed graph with the goal of minimizing construction cost, and configure constraints for the objective function; S2, the global layout problem of the objective function is divided into a main problem and sub-problems, and the main problem and sub-problems are solved iteratively using a hierarchical solution strategy of Benders decomposition to obtain the solution results of the sub-problems; wherein, the main problem is used to determine the construction of service channels, inverter site selection and combiner box selection, and the sub-problems are used to optimize the connection scheme from photovoltaic modules to combiner boxes and the connection scheme from combiner boxes to inverters; S3, the graph neural network acceleration module is used to learn the topology and solution results of the sub-problem to predict the importance of candidate nodes, connection priority and local cost distribution, so as to obtain the photovoltaic power plant layout candidate scheme. S4. Perform optimality and feasibility verification on the candidate layout schemes of the photovoltaic power station, and make local corrections when the verification fails, and output the optimized layout scheme of the photovoltaic power station after the verification passes.
[0019] This invention presents a hierarchical photovoltaic (PV) power plant site selection and wiring collaborative optimization method based on graph neural networks. First, it abstracts the spatial entities of the PV power plant, such as PV modules, combiner boxes, inverters, and service channels, into a weighted graph model with attributes, establishing an integer programming model (i.e., objective function) with the goal of minimizing construction costs, systematically characterizing the coupling relationship between site selection and wiring. Then, a hierarchical solution strategy based on Benders decomposition is adopted, dividing the global layout problem into a main problem and multiple sub-problems that can be solved in parallel, and obtaining the global optimal solution through cutting plane iteration. On this basis, a graph neural network (GNN) acceleration module is introduced to learn the topology and historical solution results of the sub-problems, used to predict the importance of candidate nodes, connection priorities, and local cost distribution, thereby accelerating the selection of sub-problem variables and the construction of initial solutions. Finally, through constraint consistency checks, optimality error assessment, and local re-optimization mechanisms, the calculation results are ensured to meet engineering feasibility and numerical stability requirements.
[0020] This embodiment uses 50 sets of examples as a basis, randomly selecting 40 sets as the training set for the graph neural network, 9 sets as the validation set, and 1 set as a test example to illustrate the model's generalization ability and engineering adaptability. Figure 2 As shown, the test instance includes 654 photovoltaic modules, and the site is divided into 6 blocks. There are 27 horizontal candidate service channels and 35 vertical candidate service channels within the site, corresponding to a service channel set size of 27×35. Each block has 14 preset candidate combiner box locations (nodes) (a total of 84 candidate locations for the entire site), and each block has 1 inverter candidate location (a total of 6 for the entire site).
[0021] The following is a detailed explanation of each step.
[0022] S1, Layout Modeling This invention first establishes a graph theory-based layout modeling method for the spatial structure and electrical connections of photovoltaic power plants. This method provides a unified description of the spatial locations, electrical couplings, and economic costs among photovoltaic modules, combiner boxes, inverters, and channels. This model offers a standardized mathematical expression and data structure for subsequent decomposition and solution, as well as for the graph neural network acceleration module.
[0023] 11. Overall structure of the model.
[0024] After discretizing the photovoltaic power plant area, its topological relationship is defined as a weighted directed graph with attributes: ; In the formula, This is the weighted directed graph; This is a set of nodes, representing the possible locations of photovoltaic modules, combiner boxes, and inverters; Let be the set of edges, representing feasible cable connection paths between nodes; It is a set of edge weights, representing the cost, distance, or impedance of a connection.
[0025] Node set It consists of the following three mutually exclusive subsets: ; In the formula, For the candidate set of photovoltaic module nodes; This is the candidate set for junction box nodes; This is the candidate set of inverter nodes.
[0026] edge set It contains two types of edges: ; In the formula, A set of feasible connections from photovoltaic modules to combiner boxes; This is a set of feasible connections from the combiner box to the inverter; each side represents the cable routing or service channel connection relationship.
[0027] 12. Node and edge attribute definition.
[0028] To accurately describe the geometry and electrical characteristics of the field area, this invention defines attribute vectors for each node and edge.
[0029] (1) Node attributes: ; In the formula, , For nodes The node vector, , For nodes x and y coordinates For nodes Rated power, For nodes capacity, For nodes Unit cost of equipment For nodes Type encoding (e.g.: Indicates photovoltaic modules, Indicates junction box, (This refers to an inverter).
[0030] (2) Edge attributes: ; In the formula, , ; For nodes With nodes The edge vector between them; For nodes With nodes The Manhattan distance between them, and ; For nodes With nodes The equivalent resistance of the lines between them. For nodes With nodes Unit cost of cables between nodes. With nodes Edge weight of the line connecting them The overall cost of the connection is calculated by weighting the above physical and economic parameters.
[0031] 13. Definition of decision variables.
[0032] To describe the connections and location decisions of each device, the following binary decision variables are introduced based on a weighted directed graph: ; ; ; ; ; In the formula, , , ; To characterize photovoltaic module nodes Is it connected to the combiner box node? Binary decision variables, To characterize the combiner box node Is it connected to the inverter node? Binary decision variables, To characterize the combiner box node Do you want to select type? The binary decision variables of the combiner box, To characterize inverter nodes Whether or not to install an inverter is a binary decision variable. For characterization service channel Whether or not to construct is a binary decision variable.
[0033] 14. Objective function.
[0034] Taking into account equipment purchase costs, cable costs, service channel construction costs, and installation costs, this invention aims to minimize the total system construction cost, and constructs the following objective function based on decision variables: In the formula, In this embodiment, the unit cost of the cable between the photovoltaic module and the combiner box is... ; For photovoltaic module nodes Combiner box node Manhattan distance between them; In this embodiment, the unit cost of the cable between the combiner box and the inverter is considered. ; For combiner box nodes With inverter node Manhattan distance between them; For type The cost of purchasing the junction box; For inverter nodes Regarding the inverter purchase cost, in this embodiment, the costs corresponding to the two inverter capacities of 6KW and 8KW are respectively... =94.476, =110.222; For service channels The unit construction cost, and , Indicates the length of the service channel; This is the candidate set for service channels. The number of inverters is equal to the number of blocks, and their cost is a fixed value that can be ignored during calculation.
[0035] 15. Constraints.
[0036] To ensure engineering feasibility, the following constraints are introduced in this invention: (1) Uniqueness constraint for photovoltaic module connection: Each photovoltaic module must be connected to one and only one combiner box, which is expressed as: (2) Combiner box capacity constraint (type is) The capacity of the combiner box is The input power of the combiner box must not exceed its model capacity, which is expressed as: (3) Combiner box-inverter constraint: Each combiner box must be connected to a certain inverter, which is expressed as: (4) Inverter uniqueness constraint: Ensure that only one inverter is installed in each block, which is expressed as: (5) Service accessibility constraint: Inverters can only be deployed in the service access coverage area where they are accessible, as shown in: In the formula, For photovoltaic module nodes The power of the photovoltaic modules, For type The capacity of the combiner box, This is a set of junction box types.
[0037] S2, Decomposition and Solution For the high-dimensional nonlinear mixed-integer optimization model established in S1, this invention adopts a hierarchical decomposition solution strategy, dividing the overall problem into a main problem and several sub-problems to reduce computational complexity and support parallel computing. This strategy achieves coordinated optimization of spatial decision-making and electrical connections through a hierarchical structure, effectively balancing global optimality and solution efficiency.
[0038] 21. Problem stratification and variable division.
[0039] (1) Upper-level main problem: determines the macro layout, including global structural variables such as inverter location, service channel construction, and combiner box selection; (2) Sub-problems: Under the upper-level decision conditions given by the main problem, optimize the connection schemes from photovoltaic modules to combiner boxes and from combiner boxes to inverters in each region.
[0040] Therefore, the decision variables are divided as follows: Main problem decision variables: ; Sub-problem decision variables: ; The decision results of the upper level determine the feasible solution space of the lower level, while the subproblems are solved by finding local optimal solutions under the condition of fixed upper level variables.
[0041] 22. Modeling the main problem.
[0042] The main problem objective is to minimize the upper-layer costs (device location and service channel construction costs) of the system while satisfying overall connectivity and capacity constraints, and also considering the expected value of the lower-layer response. Its mathematical expression is: In the formula, The main problem is to minimize the upper-layer cost of the system while satisfying global connectivity and capacity constraints; Let be the optimal response function for the subproblem, which characterizes the local wiring cost under this higher-level decision; wherein, the global connectivity and capacity constraints are expressed as: 23. Sub-problem modeling.
[0043] The upper-level variables determined by the main problem Under these conditions, the subproblem is responsible for optimizing the connection scheme between the photovoltaic modules and the combiner box, as well as from the combiner box to the inverter. Its objective function can be rewritten as: In the formula, For the subproblem in the decision variables of the main problem Minimize the lower-level cost of the system under given conditions.
[0044] The constraints satisfied by the sub-problems include: In the formula, For photovoltaic module nodes The power of the photovoltaic modules, For type The capacity of the combiner box, This is a set of junction box types.
[0045] The subproblems in each block are independent of each other and can be solved in parallel in a multi-core environment.
[0046] 24. Benders decomposition iterative framework.
[0047] This invention employs a master-slave iterative framework based on the Benders decomposition concept. It achieves rapid convergence of the overall problem by progressively generating cutting planes to approximate the optimal response at lower levels. The Benders decomposition solution process is as follows: S21, Solving the main problem: Solve the main problem using the currently generated set of cutting planes to obtain a temporary solution to the main problem. ; S22, Parallel solution of subproblems: Temporarily solve the main problem... Substitute the subproblems of each block into the equations, and solve the optimal values of the subproblems of each block in parallel. and its dual variables ; S23, Cutting plane generation: Based on the optimal values of the subproblems of each block. and its dual variables Construct a new cutting plane, and represent it as follows: In the formula, Let be the optimal response function for the subproblem. The total number of blocks, The main problem decision variables are used; if a subproblem is infeasible, a feasibility cutting plane is generated to exclude the solution to the main problem. S24, Upper and Lower Bound Update: Define the main problem objective value as the lower bound. The overall objective value of the feedback from the sub-problems is defined as the upper bound. And calculate the relative error : ; If the new cutting plane generated in S23 is returned to the S21 loop for the next iteration, then... If convergence is achieved, the iterative solution is terminated, and the solution result of the subproblem is output; where, The preset tolerance is typically set to 0.005.
[0048] Figure 3 The Benders decomposition process is described. In the test case, both the main problem and subproblems are solved by the solver Gurobi 10.0, with a maximum of 50 iterations and a convergence threshold. After parallel solution, the total running time is 1446.00s, and the relative optimality error is 0.85%. The final total construction cost of the system is approximately 136172.85. All connection schemes have been verified to meet the constraints of electrical capacity and channel reachability.
[0049] S3, Graph Neural Network (GNN) Learning To further improve the solution efficiency of the Benders master-slave decomposition algorithm in large-scale photovoltaic layout optimization, this invention introduces a graph neural network acceleration module into the traditional Benders decomposition framework. This module learns the topological characteristics and solution results of each subproblem in historical instances, predicting the edge probability and subproblem cost, thereby significantly reducing solution time and variable dimensionality while maintaining optimal solution accuracy. Figure 4 As shown, the graph neural network acceleration module consists of four main layers: input layer, connection layer, message aggregation layer, and output layer.
[0050] 31. Input layer.
[0051] The input layer receives the solutions to the subproblems derived from S2 decomposition and transforms them into a standardized graph structure representation. The subproblems of each block are represented as a weighted directed graph of the subproblems. , For blocks Weighted directed graph of subproblems Representing blocks The input layer is responsible for transforming the node and edge attributes in the weighted directed graph of the subproblem into a computable high-dimensional vector representation (i.e., feature vector). For any node... Its input feature vector is defined as: ; For either side Its input feature vector is defined as: ; Node feature vectors are used to characterize spatial coordinates, capacity, and economic features, while edge feature vectors represent distance, resistance, and cable cost. The input layer maps the original physical quantities to the latent space through linear transformations and normalization operations to facilitate subsequent feature propagation.
[0052] 32. Connecting layer.
[0053] The connection layer uses graph convolution operations to achieve feature propagation and topology information fusion between nodes, enabling the network to capture potential coupling relationships between photovoltaic modules. For any node In its first The feature update rule for the layer is: In the formula, For nodes In the The feature vector of the layer, It is a non-linear activation function. For nodes The set of neighboring nodes, For nodes With nodes The boundary rights between them and The first in the connection layer The trainable parameters of the layer, For nodes In the The feature vector of the layer, For nodes In the The feature vectors of the layers. Through multi-level propagation and normalization operations in the connecting layers, the model can establish a mapping relationship between local connectivity and global electrical characteristics, and extract structured knowledge for layout optimization.
[0054] 33. Message aggregation layer.
[0055] After node features have passed through multiple layers of propagation, the message aggregation layer is used to integrate the implicit representations of all nodes. Its aggregation operation is defined as follows: In the formula, For the global feature embedding, and In this embodiment, the aggregation weighting coefficients are used. , The total number of nodes. For nodes The feature vector of the last layer of the connection layer.
[0056] 34. Output layer.
[0057] The output layer is based on the global feature embedding obtained from the message aggregation layer. Achieve three types of task output: First type of output: , representing a node The probability of becoming a critical location (combiner box or inverter); Second type of output: , indicating edge The probability of being selected as a wiring path; Third type of output: , indicating block The approximate optimal cost estimate for the subproblem.
[0058] 35. Loss function design.
[0059] To balance the accuracy of both structure prediction and cost estimation, a weighted composite loss is defined for the graph neural network acceleration module: ; In the formula, Total loss; and These are the node and edge labels corresponding to the optimal solution; The probability of being a critical location. Let be the probability of the wiring path. Represents a block The target cost of the sub-problems. , and In this embodiment, the weighting coefficient is used. , , The network minimizes Iterative training is performed until the validation set error converges. Training employs the Adam optimizer and a learning rate decay mechanism, and introduces an early stopping criterion to prevent overfitting. Specifically, the learning rate is set to... The training batch size is 64. After each iteration, the learning rate is dynamically adjusted based on the validation set error. Training is stopped early if the validation loss does not decrease after 20 consecutive iterations. After training, the GNN model can be embedded as an intelligent selection and acceleration module in the Benders decomposition solution framework to guide subproblem variable pruning, initial solution generation, and cutting plane priority control, thereby significantly reducing solution time and improving convergence stability.
[0060] S4, Optimality Verification and System Implementation This step is used to verify the feasibility, optimality, and convergence stability of the obtained layout results after the graph neural network-assisted decomposition algorithm has completed the solution.
[0061] 41. Feasibility verification.
[0062] Candidate schemes generated with the assistance of GNN Constraint consistency verification is performed. The verification includes constraints on the uniqueness of photovoltaic module connections, combiner box capacity, combiner box and inverter connectivity, and service channel accessibility. Any violation of these constraints will trigger a local correction.
[0063] 42. Optimality error and error quantification.
[0064] To evaluate the impact of GNN acceleration strategies on solution accuracy and to quantify the difference between candidate solutions and the global optimum, this invention defines a relative optimality error index: ; In the formula, The objective function value obtained from the graph neural network algorithm. This is the baseline optimal value obtained by the Benders algorithm.
[0065] like If the optimality verification fails, a local correction is initiated; if This is considered to meet the accuracy requirements; among them, To preset the error threshold, It is usually taken as 1%.
[0066] 43. Local correction and re-optimization mechanism.
[0067] When a candidate solution fails the feasibility or optimality verification, this invention initiates a local correction mechanism. This mechanism aims to restore the feasibility or improve the optimality of the solution with minimal computational cost, rather than resolving the entire problem. The core strategy of this mechanism is: while maintaining optimality, relax the local constraints into a continuous domain, solve for continuous approximate solutions, and then obtain feasible integer solutions through directional branching back to discretization. In practice, this method can restore feasibility and approximate the global optimum within a finite number of steps.
[0068] 44. Convergence determination and stability guarantee.
[0069] A double-bounded convergence criterion is used in the decomposition-prediction-correction loop: if the first... Upper and lower bounds of the next iteration , satisfy: ; And the change in the target over several consecutive iterations: ; in, For a small threshold, it is generally taken as... If the algorithm converges, it is determined that the graph neural network training iteration convergence curve is as follows: Figure 5 As shown. Theoretically, with the accumulation of cutting planes and the implementation of local corrections, the algorithm can converge to the optimal solution within the set tolerance range in a finite number of steps.
[0070] 45. Output the results.
[0071] After completing the graph neural network-accelerated decomposition and optimality verification, the system will output an optimized photovoltaic power plant layout scheme that satisfies all engineering constraints. This scheme includes the site selection of each device (combiner box, inverter, service road), the cable routing scheme between devices, and an overall construction cost analysis. In this embodiment, the output of the cable routing and connection path results is as follows: Figure 6 As shown.
[0072] In the test case, the overall solution performance of the system was significantly improved after introducing the graph neural network acceleration module. Experimental results show that the total runtime of the optimization framework was reduced from 1446.00s to 1041.74s, an improvement of approximately 27.9%, and the final total optimization cost was $137,246.79, with a difference of less than 0.8% compared to the unaccelerated baseline. Furthermore, while maintaining the accuracy of the global optimum, the relative optimum error was only 0.64%. This verifies that the proposed method achieves good solution acceleration and engineering feasibility while ensuring solution accuracy.
[0073] This invention significantly improves the solution speed and convergence stability of the decomposition algorithm while maintaining the accuracy of the optimal solution in integer programming models. By learning and predicting the structural features of subproblems through graph neural networks, dynamic guidance is achieved for variable selection and cutting plane generation, greatly reducing the number of iterations and computational overhead. Compared with traditional decomposition algorithms, this method maintains global optimality while exhibiting higher computational efficiency and numerical robustness. It is suitable for the refined layout design and planning of large-scale grid-connected photovoltaic power plants and can provide a verifiable and transferable efficient solution framework for engineering-level optimization.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks, characterized in that, include: S1, construct a weighted directed graph for the photovoltaic power plant area to uniformly describe the spatial location, electrical coupling and economic cost between photovoltaic modules, combiner boxes, inverters and service channels, and establish an objective function based on the weighted directed graph with the goal of minimizing construction cost, and configure constraints for the objective function; S2, the global layout problem of the objective function is divided into a main problem and sub-problems, and the main problem and sub-problems are solved iteratively using a hierarchical solution strategy of Benders decomposition to obtain the solution results of the sub-problems; wherein, the main problem is used to determine the construction of service channels, inverter site selection and combiner box selection, and the sub-problems are used to optimize the connection scheme from photovoltaic modules to combiner boxes and the connection scheme from combiner boxes to inverters; S3, the graph neural network acceleration module is used to learn the topology and solution results of the sub-problem to predict the importance of candidate nodes, connection priority and local cost distribution, so as to obtain the photovoltaic power plant layout candidate scheme. S4, perform optimality and feasibility verification on the candidate layout schemes of the photovoltaic power station, and make local corrections when the verification fails, and output the optimized layout scheme of the photovoltaic power station after the verification passes. In S3, the graph neural network acceleration module includes: The input layer is used to receive the solution results of the subproblem, transform them into a weighted directed graph of the subproblem, and transform the node and edge attributes in the weighted directed graph of the subproblem into computable feature vectors. The connection layer performs graph convolution operations on the feature vectors obtained from the input layer to achieve feature propagation and topological information fusion between nodes, thereby obtaining the implicit representation of the nodes; wherein, the first... The feature update rule for the layer is: In the formula, For nodes In the The feature vector of the layer, It is a non-linear activation function. For nodes The set of neighboring nodes, For nodes With nodes The boundary rights between them and The first in the connection layer The trainable parameters of the layer, For nodes In the The feature vector of the layer, For nodes In the The feature vector of the layer; The message aggregation layer is used to aggregate the implicit representations of all nodes obtained from the connection layer to obtain a global feature embedding; wherein, the aggregation operation is expressed as: In the formula, For the global feature embedding, and These are the aggregate weighting coefficients. The total number of nodes. For nodes The feature vector of the last layer of the connection layer; Output layer, used for embedding global features based on the message aggregation layer. Achieve three types of task output: First type of output: , representing a node The probability of becoming a key location; Second type of output: , indicating edge The probability of being selected as a wiring path; Third type of output: , which represents the approximate optimal cost estimate of the subproblem.
2. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 1, characterized in that, In S1, the weighted directed graph has attributes and is constructed by defining the topological relationships of the discretized photovoltaic power plant area. The weighted directed graph is represented as follows: ; In the formula, This is the weighted directed graph; Let be a set of nodes, representing the possible locations of photovoltaic modules, combiner boxes, and inverters, and , , and These represent the candidate sets for photovoltaic module nodes, combiner box nodes, and inverter nodes, respectively. Let be the set of edges, representing feasible cable connection paths between nodes, and , and These are the sets of feasible connections from photovoltaic modules to combiner boxes and the sets of feasible connections from combiner boxes to inverters, respectively. The set of edge weights represents the cost, distance, or impedance of a connection. The attributes of the weighted directed graph include node attributes and edge attributes; The node attributes are represented as follows: ; In the formula, , For nodes The node vector, , For nodes x and y coordinates For nodes Rated power, For nodes capacity, For nodes Unit cost of equipment For nodes Type encoding; The edge attribute is represented as follows: ; In the formula, , , For nodes With nodes The edge vectors between them For nodes With nodes Manhattan distance between them For nodes With nodes The equivalent resistance of the lines between them. For nodes With nodes The unit cost of cables between them.
3. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 1, characterized in that, In step S1, the step of establishing the objective function includes: defining decision variables based on the weighted directed graph; and constructing the objective function based on the decision variables; wherein, The decision variables include: ; ; ; ; ; In the formula, , , ; To characterize photovoltaic module nodes Is it connected to the combiner box node? Binary decision variables, To characterize the combiner box node Is it connected to the inverter node? Binary decision variables, To characterize the combiner box node Do you want to select type? The binary decision variables of the combiner box, To characterize inverter nodes Whether or not to install an inverter is a binary decision variable. For characterization service channel A binary decision variable regarding whether or not to construct; , and These represent the candidate sets for photovoltaic module nodes, combiner box nodes, and inverter nodes, respectively. The objective function is expressed as: In the formula, The unit cost of the cable between the photovoltaic module and the combiner box. For photovoltaic module nodes Combiner box node Manhattan distance between them The unit cost of the cable between the combiner box and the inverter. For combiner box nodes With inverter node Manhattan distance between them For type The purchase cost of the combiner box, For inverter nodes Inverter purchase cost, For service channels The unit construction cost For the service channel candidate set; and These are the sets of feasible connections from the photovoltaic modules to the combiner box and the sets of feasible connections from the combiner box to the inverter, respectively. This is a set of junction box types.
4. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 3, characterized in that, In S1, the constraints of the objective function include: In the formula, For photovoltaic module nodes The power of the photovoltaic modules, For type The capacity of the combiner box, This is a set of junction box types.
5. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 3, characterized in that, In S2, the main problem is represented as: In the formula, The main problem decision variables, and , The main problem is to minimize the upper-level cost of the system while satisfying global connectivity and capacity constraints. Let be the optimal response function for the subproblem; where the global connectivity and capacity constraints are expressed as: The subproblem is represented as: In the formula, Let be the decision variables for the subproblem, and , For the subproblem in the decision variables of the main problem Minimize the lower-level cost of the system under given conditions; The constraints satisfied by the sub-problems include: In the formula, For photovoltaic module nodes The power of the photovoltaic modules, For type The capacity of the combiner box, This is a set of junction box types.
6. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 1, characterized in that, In S2, the main problem and the subproblems are iteratively solved using a hierarchical solution strategy based on Benders decomposition, specifically including: S21, Solve the main problem using the currently generated set of cutting planes to obtain a temporary solution to the main problem. ; S22, temporarily solve the main problem. Substitute the subproblems of each block into the subproblems to find the optimal value for each block's subproblems. and its dual variables ; S23, based on the optimal value of the subproblems of each block. and its dual variables Construct a new cutting plane, and represent it as follows: In the formula, Let be the optimal response function for the subproblem. The total number of blocks, Variables for the main problem decision; S24. Define the objective value of the main problem as a lower bound. The overall objective value of the feedback from the sub-problems is defined as the upper bound. And calculate the relative error ; If the new cutting plane generated in S23 is returned to the S21 loop for the next iteration, then... If convergence is achieved, the iterative solution is terminated, and the solution result of the subproblem is output; where, Preset tolerance, relative error The calculation formula is: 。 7. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 1, characterized in that, In S3, the loss function used by the graph neural network acceleration module to learn the topological structure and solution results of the sub-problem is: ; In the formula, For the total loss, and These are the node and edge labels corresponding to the optimal solution. , and These are the weighting coefficients. The probability of being a critical location. Let be the probability of the wiring path. This represents the target cost of the subproblem.
8. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 1, characterized in that, In S4, the feasibility verification includes constraints on the uniqueness of photovoltaic module connection, the capacity of combiner box, the connectivity between combiner box and inverter, and the accessibility of road. If any constraint is violated, a local correction is triggered. The optimality verification is achieved through a relative optimality error index. If the optimality verification fails, a local correction is initiated; where, To preset the error threshold, The relative optimality error index is: ; In the formula, The objective function value obtained from the graph neural network algorithm. This is the baseline optimal value obtained by the Benders algorithm.
9. The hierarchical photovoltaic power plant site selection and wiring collaborative optimization method based on graph neural networks according to claim 1, characterized in that, The core strategy of the local correction is to relax the local constraints into a continuous domain while maintaining optimality, solve for continuous approximate solutions, and then obtain feasible integer solutions through directional branching back discretization.