Hydropower station optimization scheduling method based on McCormick envelope
By linearizing the nonlinear relationships in the reservoir optimization scheduling model using the McCormick envelope method and SOS2 constraints, the problem of nonlinear transformation in the optimization scheduling of large-scale cascade reservoir groups is solved, and efficient reservoir scheduling solutions are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-03
AI Technical Summary
In reservoir optimization scheduling models, existing technologies struggle to effectively convert nonlinear relationships into linear ones, making it difficult for dynamic programming and evolutionary algorithms to solve large-scale cascade reservoir group optimization scheduling problems. In particular, there is insufficient research on nonlinearization methods for multiplying power generation flow with net head, which limits the use of linear programming solvers.
The McCormick envelope method is used to linearize the output calculation formula, and the univariate nonlinear relationship is piecewise linearized by combining SOS2 constraints. In high-precision scenarios, the intervals are further subdivided, and large-scale cascade reservoir optimization scheduling is performed using solvers such as glpk and cplex.
It realizes the transformation of nonlinear relationships into linear relationships, and can effectively use linear programming solvers for large-scale cascade reservoir optimization scheduling, improving solution efficiency and accuracy.
Smart Images

Figure CN121787799A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of water conservancy dispatching, and specifically relates to an optimized dispatching method for hydropower stations based on McCormick envelope. Background Technology
[0002] In conventional reservoir optimization scheduling models, the reservoir scheduling calculation formulas are highly nonlinear and have coupling relationships, making it difficult to solve using linear solvers. Therefore, evolutionary algorithm models such as dynamic programming or genetic algorithms are generally used.
[0003] When a river basin has a large number of cascade reservoirs and complex connections between upstream and downstream tributary reservoirs, dynamic programming suffers from the curse of dimensionality, and evolutionary algorithms may get trapped in local optima instead of finding the global optimum. Currently, linear programming solvers such as glpk and cplex are quite mature, offer fast computation speeds, and are well-suited for large-scale linear solutions. Therefore, how to transform nonlinear relationships into linear relationships is a future research direction for the optimal scheduling of large-scale cascade reservoir groups.
[0004] In reservoir scheduling models, conventional linearization methods for nonlinear relationships of univariate functions are relatively mature, such as SOS2 constraints. However, there is limited research on linearization methods for multiplying the power generation flow and net head in the power output calculation formula, which limits the use of large solvers in reservoir scheduling. Summary of the Invention
[0005] This invention provides a method for optimizing the scheduling of hydropower stations based on McCormick envelopes to solve the problem of difficulty in linearizing the output calculation formula.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for optimal scheduling of hydropower stations based on McCormick envelope includes the following steps: Step 1: Basic Data Collection and Objective Function Construction: Basic data collection includes constraints on the power station's outflow range, water level range, water level fluctuation constraints, power output range constraints, water level-storage capacity curve, tailrace water level-flow curve, and flow-head loss curve. The water balance equation is clarified, and an objective function is constructed with the goal of maximizing the total power generation of the reservoir. Step 2: Organizing and transforming linear constraints: Organize the water balance equation, outflow range constraints, water level range constraints, water level fluctuation constraints, output range constraints, and natural linear constraints for net head calculation, and transform them into standardized linear formulas; Step 3: SOS2 piecewise linearization of univariate nonlinear constraints: For univariate nonlinear functions, piecewise linearization combined with SOS2 constraints is used to complete the linearization process; Step 4: Direct linearization of the output formula using McCormick envelope: For the nonlinear term of the binary product of power generation flow and net head in the output formula, in scenarios where the fluctuation of the unit output range is small and the solution scale is large, the McCormick envelope method is directly used to achieve linearization. Step 5: Interval Subdivision and McCormick Envelope Optimization in High-Precision Scenarios: For scenarios with high scheduling accuracy requirements, the water head and power generation flow are subdivided into intervals, and McCormick envelope linearization is performed within the activated sub-intervals.
[0007] Furthermore, in step one, the expression for the objective function is: ; in, To contribute to the power station Indicates hours, T This refers to the number of hours in a time period.
[0008] Furthermore, in step two, the specific formula is as follows: Water balance equation: ,in, For the reservoir capacity, For the previous storage capacity, For inbound flow, Total outbound flow For time; Flow equation: Outbound flow range constraints: ;in, These are the total outflow, power generation flow, and water wastage, respectively. To minimize outbound flow, Maximum outbound flow rate; Water level range constraints: ;in, The reservoir water level, The lowest water level, This is the highest water level; Water level fluctuation constraints: ;in, The reservoir water level, This refers to the water level at the previous moment. Z represents the water level fluctuation; Output range constraints: ;in, Output value For the minimum output of the power station, To the maximum output of the power plant; Water head formula: ;in, For the water purification head, The reservoir water level, This is the tailwater level. This is due to head loss.
[0009] Furthermore, in step three, the univariate nonlinear function includes the relationship between water level and reservoir capacity, the relationship between tailwater level and flow rate, and the flow rate and head loss curve.
[0010] Furthermore, in step three, the nonlinearization of the water level-reservoir capacity relationship specifically includes: Water level segmentation points are The corresponding storage capacity segmentation point is , To represent the total number of points, introduce a non-negative real number. The water level and reservoir capacity then satisfy the following SOS2 constraint: ; ; ; .
[0011] Furthermore, in step four, the use of the McCormick envelope specifically includes: Output calculation formula ; For product Using McCormick linear envelope: ; in, Output value This is the output coefficient. As slack variables, The following constraints must be met: ; In the formula, These are the maximum and minimum values of the water head, respectively; These represent the maximum and minimum values of the power generation flow rate; Let t be the net water head and power generation flow rate at time t.
[0012] Furthermore, step five specifically includes the following steps: S51. Let the set of water head segments be... I , I ={0,1,2,...n,n_h}, the corresponding head is... The set of power generation flow segments is as follows: J , J ={0,1,2,...,n_q}, the corresponding power generation flow is The time set is ; S52, the formula for the combination of convex and concave water heads is as follows, indicating that at most one set of adjacent water head intervals can be selected: ; ; ; In the formula, SOS2 weights represent the head at point [point]. The weights; S53. The formula for the convex combination of power generation flow is as follows, indicating that at most one set of adjacent power generation flow intervals can be selected: ; ; ; In the formula, SOS2 weights represent the power generation flow at point [point]. The weights; S54. Bilinear approximation: Approximate calculation of the product of water head and power generation flow; S55, One-dimensional constraint activation: only one interval can be activated for each time period water head, and only one interval can be activated for each time period power generation flow. S56 and SOS2 constraints and activation variables ensure consistency; S57, Boundary Variable Calculation; S58, McCormick constraint: ; In the formula, This is an approximation of the output calculation formula; Indicates time period t The lower and upper limits of the water head; This represents the lower and upper bounds of the power generation flow rate over time period t. This represents the total outbound flow.
[0013] Furthermore, step S54, which approximates the product of water head and power generation flow rate, is as follows: ; ; ; ; ; In the formula, This is an approximation of the output calculation formula. for At point ( i , j The weight value on ) for i The water head corresponding to the water head segment, for j The power generation flow rate corresponding to the power generation flow rate segment. For water head at point The weight, For power generation flow at point The weight.
[0014] Furthermore, step S55 specifically includes: ; ; In the formula, This indicates that the water head is activated in the interval [i, i+1]. ( ={0,1,2,...,n_h-1}); Indicates that the power generation flow is within the range [ j , j+1 ]activation, ( ={0,1,2,...,n_q-1}); In step S56, the head weight is non-zero only at the point corresponding to the activation interval: for (First point) ; for (The last point) ; for , .
[0015] Furthermore, step S57 specifically includes: determining the boundaries of water head and power generation flow rate. ; ; ; ; ; ; In the formula: Indicates time period t The lower and upper limits of the water head; This represents the lower and upper bounds of the power generation flow rate over time period t. This indicates that the water head is activated in the interval [i, i+1]. fori The water head corresponding to the water head segment, for i The +1 head segment corresponds to the water head. for j The power generation flow rate corresponding to the power generation flow rate segment. for j The +1 head segment corresponds to the water head.
[0016] The present invention can achieve the following beneficial effects: This method uses McCormick envelope to linearize the output calculation formula, and combines it with SOS2 to linearize the univariate nonlinear relationship, thus transforming all nonlinear relationships into linear relationships. This allows for the use of solvers such as glpk and cplex to solve large-scale cascade reservoir optimization scheduling. Attached Figure Description
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a technical roadmap for an optimized scheduling method for hydropower stations based on McCormick envelope, as described in this invention. Figure 2 This is a graph showing the calculation results of the fixed water head current range in this invention; Figure 3 The diagram shows the calculation results of the water head current range divided according to the present invention. Detailed Implementation
[0018] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.
[0019] A method for optimal scheduling of hydropower stations based on McCormick envelope includes the following steps: Step 1: Basic data collection and objective function construction.
[0020] The basic data collected for the power station includes outflow range constraints, water level range constraints, water level fluctuation constraints, output range constraints, water level-storage capacity curves, tailrace water level-flow rate, and flow-head loss curves.
[0021] At the same time, the water balance equation is considered to ensure that the water volume of the reservoir is balanced during the scheduling process.
[0022] The core objective of the scheduling is to maximize the total power generation of the reservoir, and the objective function is as follows: ; in, Power output for the power station, in units of ; It represents hours, with the unit being h; T This refers to the number of hours in a time period.
[0023] Step Two: Linear Constraint Arrangement and Transformation: The water balance equation, outflow range constraints, water level range constraints, water level fluctuation constraints, output range constraints, and natural linear constraints for net head calculation are processed and transformed into standardized linear formulas. The specific formulas are as follows: Water balance equation: ,in, For the reservoir capacity; The previous storage capacity; This refers to the inbound flow rate; Total outbound flow; Time is measured in seconds.
[0024] Flow equation: Outbound flow range constraints: ;in, These are the total outflow, power generation flow, and water wastage, respectively. To minimize outbound flow, This represents the maximum outbound flow rate.
[0025] Water level range constraints: ;in, The reservoir water level, The lowest water level, This is the highest water level.
[0026] Water level fluctuation constraints: ;in, The reservoir water level, This refers to the water level at the previous moment. Z represents the water level fluctuation.
[0027] Output range constraints: ;in, Output value For the minimum output of the power station, This is the maximum output of the power plant.
[0028] Water head formula: ;in, For the water purification head, The reservoir water level, This is the tailwater level. This is due to head loss.
[0029] The water level fluctuation constraint can be further linearized as follows: .
[0030] Step 3: SOS2 piecewise linearization of univariate nonlinear constraints.
[0031] The nonlinear constraints include the water level-storage capacity relationship, the tailrace water level-discharge relationship, the discharge-head loss curve, and the output calculation formula. Among them, the univariate functional relationships such as the water level-storage capacity relationship, the tailrace water level-discharge relationship, and the discharge-head loss curve can be linearized piecewise and linearized using SOS2 constraints. The nonlinearization of the water level-storage capacity relationship is used as an example for illustration.
[0032] Water level segmentation points are The corresponding storage capacity segmentation point is , To represent the total number of points, introduce a non-negative real number. The water level and reservoir capacity then satisfy the following SOS2 constraint: ; ; ; .
[0033] Similarly, the tailwater level-discharge relationship and the flow-head loss curve can be linearized using a similar method.
[0034] Step 4: Direct linearization of the McCormick envelope of the output formula.
[0035] Output calculation formula There exists and Multiplication is a non-linear relationship, so it needs to be linearized. For bivariate multiplication, McCormick envelope linearization can be used.
[0036] For units with relatively small output ranges, where the corresponding head and power generation flow range can be determined, and the solution scale is large, the McCormick envelope can be directly used, as follows: For product Using McCormick linear envelope: ; in, Output value This is the output coefficient. As slack variables, The following constraints must be met: ; In the formula: These are the maximum and minimum values of the water head, respectively; These represent the maximum and minimum values of the power generation flow rate; Let t be the net water head and power generation flow rate at time t.
[0037] Step 5: Interval subdivision and McCormick envelope optimization in high-precision scenarios.
[0038] For scenarios requiring high scheduling accuracy, it is necessary to divide the head and power generation flow into intervals, determine the head and power generation flow intervals corresponding to the unit output, and then perform McCormick envelope solving within the identified head and flow intervals. The main methods are as follows: S51. Let the set of water head segments be... I , I ={0,1,2,...n,n_h}, the corresponding head is... , The set of power generation flow segments is as follows: J , J ={0,1,2,...,n_q}, the corresponding power generation flow is , The time set is .
[0039] S52, the formula for the combination of convex and concave water heads is as follows, indicating that at most one set of adjacent water head intervals can be selected: ; ; ; In the formula, SOS2 weights represent the head at point [point]. The weights are in the range [0,1].
[0040] S53. The formula for the convex combination of power generation flow is as follows, indicating that at most one set of adjacent power generation flow intervals can be selected: ; ; ; In the formula, SOS2 weights represent the power generation flow at point [point]. The weights are in the range [0,1].
[0041] S54. Bilinear Approximation. Approximate calculation of the product of water head and power generation flow: ; ; ; ; ; In the formula, This is an approximation of the output calculation formula. for At point ( i , j The weight value on ) for i The water head corresponding to the water head segment, for j The power generation flow rate corresponding to the power generation flow rate segment. For water head at point The weight, For power generation flow at point The weight.
[0042] S55, One-dimensional constraint activation.
[0043] Only one interval can be activated per time period for water head, and only one interval can be activated per time period for power generation flow. ; ; In the formula, This indicates that the water head is activated in the interval [i, i+1], and its value is the binary variable {0, 1}. ( ={0,1,2,...,n_h-1}); Indicates that the power generation flow is within the range [ j , j+1 ] Activated, with a value of the binary variable {0,1}. ( ={0,1,2,...,n_q-1}); S56 and SOS2 constraints and activation variables ensure consistency.
[0044] The head weight can only be non-zero at the point corresponding to the activation interval: for (First point) ; for (The last point) ; for , .
[0045] Similarly, traffic weights can only be non-zero at the points corresponding to the activation interval: for (First point) ; for (The last point) ; for , .
[0046] S57, Boundary Variable Calculation.
[0047] The boundaries of water head and power generation flow rate are determined: ; ; ; ; ; ; In the formula: Indicates time period t The lower and upper limits of the water head; This represents the lower and upper bounds of the power generation flow rate over time period t. This indicates that the water head is activated in the interval [i, i+1]. for i The water head corresponding to the water head segment, for i The +1 head segment corresponds to the water head. for j The power generation flow rate corresponding to the power generation flow rate segment. for j The +1 head segment corresponds to the water head.
[0048] S58, McCormick constraint: ; In the formula, This is an approximation of the output calculation formula; Indicates time period t The lower and upper limits of the water head; This represents the lower and upper bounds of the power generation flow rate over time period t. This represents the total outbound flow.
[0049] The above formulas can be used to convert univariate monotonic nonlinear functions such as water level and reservoir capacity into linear functions, and to convert the bivariate product nonlinear relationship in the output formula into a linear function, which can then be solved using solvers such as glpl and cplex.
[0050] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for optimal scheduling of hydropower stations based on McCormick envelope, characterized in that, Includes the following steps: Step 1: Basic Data Collection and Objective Function Construction: Basic data collection includes constraints on the power station's outflow range, water level range, water level fluctuation constraints, power output range constraints, water level-storage capacity curve, tailrace water level-flow curve, and flow-head loss curve. The water balance equation is clarified, and an objective function is constructed with the goal of maximizing the total power generation of the reservoir. Step 2: Organizing and transforming linear constraints: Organize the water balance equation, outflow range constraints, water level range constraints, water level fluctuation constraints, output range constraints, and natural linear constraints for net head calculation, and transform them into standardized linear formulas; Step 3: SOS2 piecewise linearization of univariate nonlinear constraints: For univariate nonlinear functions, piecewise linearization combined with SOS2 constraints is used to complete the linearization process; Step 4: Direct linearization of the output formula using McCormick envelope: For the nonlinear term of the binary product of power generation flow and net head in the output formula, in scenarios where the fluctuation of the unit output range is small and the solution scale is large, the McCormick envelope method is directly used to achieve linearization. Step 5: Interval Subdivision and McCormick Envelope Optimization in High-Precision Scenarios: For scenarios with high scheduling accuracy requirements, the water head and power generation flow are subdivided into intervals, and McCormick envelope linearization is performed within the activated sub-intervals.
2. The method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 1, characterized in that: In step one, the expression for the objective function is: ; in, To contribute to the power station Indicates hours, T This refers to the number of hours in a time period.
3. The method for optimal scheduling of hydropower stations based on McCormick envelope as described in claim 1, characterized in that: In step two, the specific formula is as follows: Water balance equation: ,in, For the reservoir capacity, For the previous storage capacity, For inbound flow, Total outbound flow For time; Flow equation: Outbound flow range constraints: ;in, These are the total outflow, power generation flow, and water wastage, respectively. To minimize outbound flow, Maximum outbound flow rate; Water level range constraints: ;in, The reservoir water level, The lowest water level, This is the highest water level; Water level fluctuation constraints: ;in, The reservoir water level, This refers to the water level at the previous moment. Z represents the water level fluctuation; Output range constraints: ;in, Output value For the minimum output of the power station, To the maximum output of the power plant; Water head formula: ;in, For the water purification head, The reservoir water level, This is the tailwater level. This is due to head loss.
4. The method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 1, characterized in that: In step three, the univariate nonlinear functions include the water level-storage capacity relationship, the tailwater level-discharge relationship, and the flow-head loss curve.
5. The method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 4, characterized in that: In step three, the nonlinearization of the water level-reservoir capacity relationship specifically includes: Water level segmentation points are The corresponding storage capacity segmentation point is , To represent the total number of points, introduce a non-negative real number. The water level and reservoir capacity then satisfy the following SOS2 constraint: ; ; ; 。 6. The method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 1, characterized in that: In step four, the use of the McCormick envelope specifically includes: Output calculation formula , ; For product Using McCormick linear envelope: ; in, Output value This is the output coefficient. As slack variables, The following constraints must be met: ; In the formula, These are the maximum and minimum values of the water head, respectively; These represent the maximum and minimum values of the power generation flow rate; Let t be the net water head and power generation flow rate at time t.
7. The method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 1, characterized in that: Step 5 Specifically, the following steps are included: S51. Let the set of water head segments be... I , I ={0,1,2,...n,n_h}, the corresponding head is... The set of power generation flow segments is as follows: J , J ={0,1,2,...,n_q}, the corresponding power generation flow is The time set is ; S52, the formula for the combination of convex and concave water heads is as follows, indicating that at most one set of adjacent water head intervals can be selected: ; ; ; In the formula, SOS2 weights represent the head at point [point]. The weights; S53. The formula for the convex combination of power generation flow is as follows, indicating that at most one set of adjacent power generation flow intervals can be selected: ; ; ; In the formula, SOS2 weights represent the power generation flow at point [point]. The weights; S54. Bilinear approximation: Approximate calculation of the product of water head and power generation flow; S55, One-dimensional constraint activation: only one interval can be activated for each time period water head, and only one interval can be activated for each time period power generation flow. S56 and SOS2 constraints and activation variables ensure consistency; S57, Boundary Variable Calculation; S58, McCormick constraint: ; In the formula, This is an approximation of the output calculation formula; Indicates time period t The lower and upper limits of the water head; This represents the lower and upper bounds of the power generation flow rate over time period t. This represents the total outbound flow.
8. The method for optimal scheduling of hydropower stations based on McCormick envelope according to claim 7, characterized in that: Step S54, which approximates the product of water head and power generation flow, is as follows: ; ; ; ; ; In the formula, This is an approximation of the output calculation formula. for At point ( i , j The weight value on ) for i The water head corresponding to the water head segment, for j The power generation flow rate corresponding to the power generation flow rate segment. For water head at point The weight, For power generation flow at point The weight.
9. A method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 7, characterized in that: Step S55 specifically includes: ; ; In the formula, This indicates that the water head is activated in the interval [i, i+1]. ( ={0,1,2,...,n_h-1}); Indicates that the power generation flow is within the range [ j , j+1 ]activation, ( ={0,1,2,...,n_q-1}); In step S56, the head weight is non-zero only at the point corresponding to the activation interval: for (First point) ; for (The last point) ; for , .
10. A method for optimal scheduling of hydropower stations based on McCormick envelopes according to claim 9, characterized in that: Step S57 specifically includes: determining the boundaries of water head and power generation flow rate. ; ; ; ; ; ; In the formula: Indicates time period t The lower and upper limits of the water head; This represents the lower and upper bounds of the power generation flow rate over time period t. This indicates that the water head is activated in the interval [i, i+1]. for i The water head corresponding to the water head segment, for i The +1 head segment corresponds to the water head. for j The power generation flow rate corresponding to the power generation flow rate segment. for j The +1 head segment corresponds to the water head.