Urban storage and drainage scheduling method based on SWMM and MPC coupling
By coupling the urban storage and drainage scheduling method of SWMM and MPC, a multi-level facility coordination system was constructed, which solved the problems of resource waste and insufficient facilities in the existing drainage system in complex environments, and achieved efficient real-time control and improved system resilience.
Patent Information
- Application Number
- CN202510809051.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-12
AI Technical Summary
The existing drainage system wastes resources or has insufficient facilities in dealing with complex and changing environments, and the existing real-time control effect is limited. It does not fully consider the synergy between various storage and drainage facilities, which limits the efficient use of the drainage system under different rainfall recurrence periods.
An urban storage and drainage scheduling method based on the coupling of SWMM and MPC is adopted. Through dynamic real-time optimization scheduling, a three-level system is constructed by combining green, gray and blue infrastructure to achieve synergistic efficiency of multi-level facilities. The genetic algorithm is used to drive the objective function to optimize the road water depth, pipe network overflow and facility energy consumption, forming a closed-loop control of prediction-optimization-feedback.
It has significantly improved the speed of response to rainstorms and the accuracy of scheduling, minimized the depth of road waterlogging, maximized the reduction rate of pipeline overflow, and minimized facility energy consumption, thereby improving the overall resilience and synergy of the system.
Smart Images

Figure CN120634167A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to storage and drainage scheduling, and in particular to an urban storage and drainage scheduling method based on SWMM and MPC coupling. Background Art
[0002] The drainage system is an engineering network system that collects, transports, treats and discharges surface water (rainwater) and sewage (domestic sewage, industrial wastewater) within a city or region. Its core goals are to prevent floods and drainage, ensure sanitation, prevent pollution and protect the ecology.
[0003] However, existing technologies often have the following problems: traditional drainage systems rely on static designs. When dealing with complex and changing environments, they may not be able to fully play their role, resulting in resource waste, or serious waterlogging due to insufficient facility capacity; existing real-time control based on model predictive control is mostly based only on historical rainfall data samples or small rainfall recurrence periods for optimization simulation, so its real-time control effect is limited; it mainly focuses on real-time optimization control of independent pipe network drainage systems, without fully considering the synergistic effects between various storage and drainage facilities, which in turn limits the efficient utilization of drainage systems under different rainfall recurrence periods. Summary of the Invention
[0004] In response to the above problems, the present invention provides an urban storage and drainage scheduling method based on the coupling of SWMM and MPC, which improves the rainstorm response speed and scheduling accuracy through dynamic real-time optimization scheduling, and realizes the synergistic efficiency of multi-level facilities.
[0005] In order to achieve the purpose of the present invention, the following scheme is adopted: An urban storage and drainage scheduling method based on SWMM and MPC coupling includes the following steps: S100: Acquire data within the area and construct SWMM; S200: Uses MPC to construct an objective function to achieve optimization goals, and uses SWMM to provide real-time feedback to correct the objective function. The optimization goals include minimizing road water depth, maximizing pipe network overflow reduction, and minimizing facility energy consumption. S300: Output the coordinated control plan for storage and drainage facilities and the joint dispatching instructions, and implement the joint storage and drainage optimization according to the optimization objectives.
[0006] Furthermore, the output storage and drainage facilities described in S300 include green infrastructure, gray infrastructure, and blue infrastructure. Green infrastructure includes biological retention ponds, rainwater gardens, and sunken green spaces. Gray infrastructure includes pipeline systems, gates, pumping stations, and regulating reservoirs. Blue infrastructure includes rivers and reservoirs.
[0007] Furthermore, the green infrastructure is set as the interception layer, the gray infrastructure is set as the transmission layer, and the blue infrastructure is set as the storage layer. The interception layer and the transmission layer, as well as the transmission layer and the storage layer are all connected hydraulically.
[0008] Furthermore, S100 includes: S110: Collect historical rainfall data, real-time rainfall data, static geographic information, drainage network data, road topology data, hydrological topology data, and storage pool spatial data; S120: Automatically divide sub-catchments using static geographic information and hydrological topology data, automatically calculate flow paths using static geographic information and urban drainage network data, and determine catchment boundaries and final flow directions; S130: Generalize the road into an open channel, add a parallel open channel pipe between adjacent nodes according to the drainage network data, create a road drainage system, and determine the inlet offset and outlet offset; S140: Weir flow formulas are used to hydraulically model the overflow and diversion processes at the nodes. Virtual valve nodes are set up in the storage tanks, and the opening status is dynamically adjusted based on preset control logic or real-time optimization results to implement storage management of excess rainwater. S150: Couple drainage pipe network data, road topology data, hydrological topology data, and storage reservoir spatial data to construct a road network-pipeline network dual drainage system to simulate the coordinated drainage process during heavy rain.
[0009] Furthermore, in S110, the drainage network data includes node information, upstream inspection well data, and downstream inspection well data; S130 is: generalize the road into an open channel, add a parallel open channel pipe between adjacent nodes according to the node information, create a road drainage system, determine the water inlet offset according to the upstream inspection well data, and determine the water outlet offset according to the downstream inspection well data.
[0010] Furthermore, S200 includes: S210: Initialize SWMM calculations through pyswmm to obtain the current operating status of the storage and drainage facility system. The results are passed to subsequent simulations through the hot start file as the initial boundary conditions for the next time step, providing a dynamic benchmark for predicting the optimal control strategy of pump stations, gates, and storage tanks in the future. S220: Calculate the optimal control strategy sequence for each time step in the future period based on the current storage and drainage facility system operating status, SWMM output results, and the preset objective function; S230: In subsequent time steps, the current state of the storage and drainage facility system is fed back through SWMM real-time simulation, the MPC error is dynamically corrected, and the optimization calculation is re-executed until the end of the simulation cycle.
[0011] Furthermore, S220 includes: S221: Randomly generate an initial population. Individuals are coded using a mixture of binary and real numbers, where binary codes represent discrete variables and real numbers represent continuous variables. Each individual corresponds to a storage-discharge coordination strategy. S222: Prioritize the exchange of control gene segments of the associated facilities and perturb the variables with a probability of p=0.01 to ensure that the parameters after mutation meet the engineering constraints; S223: Perform fitness evaluation using the following function: ; where h i is the depth of water on the road, Q overflow is the overflow of the pipe network, E energy is the energy consumption of the pump station / valve, w1, w2, and w3 are pre-configured weight coefficients; S224: Roulette wheel selection and elite retention mechanism are used to retain the optimal strategy of each generation, and the optimization is cyclically performed until the maximum number of iterations is reached or the fitness converges, and the global optimal storage and discharge coordinated control solution is output.
[0012] Furthermore, the formula of the objective function in S200 is: ; where h i is the maximum water depth of the i-th road, E energy is the operating energy consumption of the pump station, gate, and storage tank, Φ penalty is a dynamic penalty term, and α and β are pre-configured weight coefficients.
[0013] Furthermore, in S221, the discrete variables include the start and stop status of the pump station, and the continuous variables include the gate opening percentage and the water level setting value of the regulating reservoir; The pump station start and stop status formula is: ; where u j Indicates the start and stop status of the j-th pump station. When the value is 0, it means it is closed, and when the value is 1, it means it is running. m is the total number of pump stations; The gate opening percentage formula is: ; Where V k (t) is the opening percentage of the kth gate at time t, Δv max The upper limit of the gate opening change rate; The formula for setting the water level of the storage tank is: ; where z l (t) is the water level of the lth storage tank at time t, Q in, l(t) is the water flow rate of the storage tank, Q out , l(t) is the discharge flow of the storage tank, A l (z l ) is the surface area of the storage tank that changes with water level.
[0014] Further, Φ penalty The calculation formula is: ; where Q p is the actual flow rate of the pth section of the pipe network, Q p,max Design capacity for it, z q is the real-time water level of the storage tank q, z q,safe is the safe water level threshold.
[0015] The beneficial effects of this technical solution are: 1. By coupling SWMM and MPC, real-time monitoring data is carried out, rolling predictions of urban flooding risks are made, and optimal control instructions for pump stations and gates are dynamically generated, forming a "prediction-optimization-feedback" closed loop, significantly improving the speed of rainstorm response and scheduling accuracy.
[0016] 2. Use genetic algorithms to drive the objective function to minimize road water depth, maximize pipe network overflow reduction rate, and minimize facility energy consumption. Combined with dynamic penalty terms to constrain safe water levels and pipe network capacity, balance flood control safety, energy consumption, and project reliability to achieve multi-objective collaborative optimization.
[0017] 3. Build a three-level system of "green interception-gray transfer-blue storage": green facilities reduce runoff at the source, gray facilities dynamically transfer, and blue facilities store at the end. Through hydraulic linkage and priority scheduling, the efficiency of facilities is released in layers to improve the overall resilience of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Shown is a flowchart of the overall steps of an embodiment of the present application.
[0019] Figure 2 A flow chart of the main steps of S100 in the embodiment of the present application is shown.
[0020] Figure 3 A flow chart of the main steps of S200 in the embodiment of the present application is shown.
[0021] Figure 4 A flow chart of the main steps of S220 in the embodiment of the present application is shown.
[0022] Figure 5 The figure shows the architecture diagram of the output storage and drainage facilities of the embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of this application clearer, the implementation methods of this application are described in detail below, but the embodiments described in this application are only part of the embodiments of this application, not all of the embodiments.
[0024] First, some technical terms already known in the art used in this embodiment are explained below.
[0025] SWMM: Storm Water Management Model.
[0026] MPC: Model Predictive Control.
[0027] Minimum cost path algorithm: An algorithm that finds a path from a starting point to an end point in a given grid and minimizes the sum of the weights on the path. It can be implemented in Python.
[0028] Weir flow formula: The core expression is: ; Where Q is the flow rate, σ s is the flooding coefficient, ε is the lateral contraction coefficient, m is the discharge coefficient, b is the weir width, g is the acceleration of gravity, and H0 is the total head including the approaching flow velocity head.
[0029] pyswmm: A Python library that provides an easy way to use and manipulate SWMM models.
[0030] Roulette wheel selection: A probabilistic selection method based on individual fitness or weight. The higher the fitness or weight of an individual, the greater the probability of being selected.
[0031] Elite retention mechanism: A strategy used in genetic algorithms to prevent the optimal individuals from being lost during the evolution process, thereby improving the global convergence ability of the algorithm.
[0032] like Figures 1 to 5 The urban storage and drainage scheduling method based on SWMM and MPC coupling is implemented as follows: S100: Acquire data within the area and construct SWMM. Specifically, S100 includes: S110: Collect historical rainfall data, real-time rainfall data, static geographic information, drainage network data, road topology data, hydrological topology data, and storage tank spatial data. Drainage network data includes node information, upstream inspection well data, and downstream inspection well data. Specifically, real-time rainfall data comes from field measurements or meteorological forecast systems to support SWMM's dynamic modeling and real-time control updates. Other data are static parameters used for SWMM's initial modeling configuration. S120: Automatically divide sub-catchments using static geographic information and hydrological topology data, automatically calculate flow paths using static geographic information and urban drainage network data, and determine the catchment boundary and the final direction of the flow. Specifically, the automatic flow path calculation is performed by identifying drainage network nodes and terrain slope directions and using a minimum cost path algorithm to calculate the final direction of the flow, with the final direction of the flow being a river or a storage pond. S130: Generalize the road into an open channel, add a parallel open channel pipe between adjacent nodes based on the drainage network data, create a road drainage system, and determine the inlet offset and outlet offset. More specifically, S130 is: generalize the road into an open channel, add a parallel open channel pipe between adjacent nodes based on the node information, create a road drainage system, determine the inlet offset based on the upstream inspection well data, and determine the outlet offset based on the downstream inspection well data; S140: Weir flow formulas are used to hydraulically model the overflow and diversion processes at the nodes. Virtual valve nodes are set up in the storage tanks, and the opening status is dynamically adjusted based on preset control logic or real-time optimization results to implement storage management of excess rainwater. S150: Couple drainage pipe network data, road topology data, hydrological topology data, and storage reservoir spatial data to construct a road network-pipeline network dual drainage system to simulate the coordinated drainage process during heavy rain. Specifically, the surface pipe network, road open channels, and emergency storage facilities are coupled. S200: The objective function is constructed through MPC to achieve the optimization goal. The objective function is corrected through real-time feedback from SWMM. The optimization goals include minimizing the depth of road waterlogging, maximizing the reduction rate of pipe network overflow, and minimizing facility energy consumption. Specifically, S200 includes: S210: Initialize SWMM calculations through pyswmm to obtain the current operating status of the storage and drainage facility system. The results are passed to subsequent simulations through the hot start file as the initial boundary conditions for the next time step, providing a dynamic benchmark for predicting the optimal control strategy of pump stations, gates, and storage tanks in the future. Specifically, the operating status includes pipe network flow and node water depth parameters. S220: Based on the current operating status of the storage and drainage facility system, SWMM output results, and the preset objective function, the optimal control strategy sequence for each time step in the future period is calculated. During actual execution, only the first control strategy in the optimized sequence is used to ensure the real-time response of the system. More specifically, S220 includes: S221: Randomly generate an initial population, with individuals using a mixed encoding of binary and real numbers. Binary encoding represents discrete variables, while real numbers represent continuous variables. Specifically, discrete variables include the start and stop status of the pumping station, i.e., its total valve opening instruction, and continuous variables include gate opening percentage and reservoir water level setting value. Each individual corresponds to a storage and drainage coordination strategy, such as "pumping station A is turned on, gate B is opened to 60%, and the water level of reservoir C rises to 3.5m." The pump station start and stop status formula is: ; where u j Indicates the start and stop status of the j-th pump station. When the value is 0, it means it is closed, and when the value is 1, it means it is running. m is the total number of pump stations; The gate opening percentage formula is: ; Where V k (t) is the opening percentage of the kth gate at time t, in %, Δv max The upper limit of the gate opening change rate is in % / min, to prevent frequent adjustments; The formula for setting the water level of the storage tank is: ; where z l (t) is the water level of the lth storage tank at time t, in m, Q in , l(t) is the water flow rate of the storage tank, the unit is m³ / s, Q out ,l(t) is the discharge flow of the storage tank, in m³ / s, which is controlled by the valve or pump station, A l (z l ) is the surface area of the storage tank that changes with water level, in m², and is determined by the tank's geometry; S222: Prioritize the exchange of control gene segments for related facilities, such as the gene combination for the coordinated regulation of gates and storage ponds, to generate a new strategy that takes into account both drainage and water storage efficiency. Perturb the variables with a probability of p=0.01 to ensure that the parameters after mutation meet the engineering constraints, such as the gate opening does not exceed the limit and the water level in the storage pond is within the safe range. S223: Perform fitness evaluation using the following function: ; where h i is the depth of water on the road, Q overflow is the overflow of the pipe network, E energy is the energy consumption of the pump station / valve, w1, w2, and w3 are pre-configured weight coefficients, reflecting the multi-objective priority of the storage and drainage coordination; S224: Roulette wheel selection and elite retention mechanisms are used to retain the optimal strategy of each generation to avoid the loss of high-quality solutions. Optimization is repeated until the maximum number of iterations is reached or the fitness converges. Automatic convergence thresholds are used as the primary method, supplemented by manual rules, to output the global optimal storage and discharge coordinated control solution. More specifically, the formula of the objective function in S200 is: ; where h i is the maximum water depth of the ith road, in meters, E energy is the operating energy consumption of the pump station, gate, and storage tank, in kW·h, Φ penalty is a dynamic penalty term used to constrain operating conditions that violate physical constraints. α and β are pre-configured weight coefficients that balance the priorities of water accumulation control, energy consumption, and safety. Specifically, the dynamic penalty term converts physical limitations such as the pipe network carrying capacity and the facility safety water level into dynamic penalty terms. When the actual value exceeds the threshold, the optimization cost is automatically increased to ensure that the generated solution meets the project safety requirements. The formula is as follows: ; Where Qp is the actual flow rate of the pth section of the pipe network, in m³ / s, Qp,max is its design capacity, zq is the real-time water level of the storage tank q, in m, and zq,safe is the safe water level threshold; The square term strengthens the penalty for exceeding the limit condition, ensuring that the generated strategy meets the engineering safety constraints; S230: In subsequent time steps, the current state of the storage and drainage facility system is fed back through SWMM real-time simulation, such as the deviation between the actual water level and the predicted value, to dynamically correct the MPC error and re-execute the optimization calculation, forming a closed-loop control cycle of "prediction-optimization-execution-feedback correction". This process continues to iterate until the end of the simulation cycle, ultimately achieving adaptive adjustment of the control strategy and optimization of system stability in a dynamic environment; S300: Output the coordinated control plan of storage and drainage facilities and the joint dispatching instructions, and implement the joint storage and drainage optimization according to the optimization objectives. Specifically, the output storage and drainage facilities include green infrastructure, gray infrastructure, and blue infrastructure. Green infrastructure includes biological retention ponds, rainwater gardens, and sunken green spaces. Gray infrastructure includes pipeline systems, gates, pumping stations, and storage tanks. Blue infrastructure includes rivers and reservoirs. The green infrastructure is set as the interception layer, the gray infrastructure is set as the transmission layer, and the blue infrastructure is set as the storage layer. The interception layer and the transmission layer, as well as the transmission layer and the storage layer, are hydraulically connected. More specifically, the joint dispatching instructions include gate opening and closing, pump station start and stop, and storage facility water level adjustment.
[0033] The above are only some of the embodiments listed in this application and are not intended to limit this application.
Claims
1. A method for urban storage and drainage scheduling based on SWMM and MPC coupling, characterized in that: The following steps are involved: S100: Acquire data within the area and construct SWMM; S200: Uses MPC to construct an objective function to achieve optimization goals, and uses SWMM to provide real-time feedback to correct the objective function. The optimization goals include minimizing road water depth, maximizing pipe network overflow reduction, and minimizing facility energy consumption. S300: Output the coordinated control plan for storage and drainage facilities and the joint dispatching instructions, and implement the joint storage and drainage optimization according to the optimization objectives.
2. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 1 is characterized in that: The output storage and drainage facilities described in S300 include green infrastructure, gray infrastructure, and blue infrastructure. Green infrastructure includes biological retention ponds, rainwater gardens, and sunken green spaces. Gray infrastructure includes pipeline systems, gates, pumping stations, and regulating reservoirs. Blue infrastructure includes rivers and reservoirs.
3. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 2 is characterized in that: The green infrastructure is set as the interception layer, the gray infrastructure is set as the transmission layer, and the blue infrastructure is set as the storage layer. The interception layer and the transmission layer, as well as the transmission layer and the storage layer are all connected hydraulically.
4. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 1 is characterized in that: S100 includes: S110: Collect historical rainfall data, real-time rainfall data, static geographic information, drainage network data, road topology data, hydrological topology data, and storage pool spatial data; S120: Automatically divide sub-catchments using static geographic information and hydrological topology data, automatically calculate flow paths using static geographic information and urban drainage network data, and determine catchment boundaries and final flow directions; S130: Generalize the road into an open channel, add a parallel open channel pipe between adjacent nodes according to the drainage network data, create a road drainage system, and determine the inlet offset and outlet offset; S140: Weir flow formulas are used to hydraulically model the overflow and diversion processes at the nodes. Virtual valve nodes are set up in the storage tanks, and the opening status is dynamically adjusted based on preset control logic or real-time optimization results to implement storage management of excess rainwater. S150: Couple drainage pipe network data, road topology data, hydrological topology data, and storage reservoir spatial data to construct a road network-pipeline network dual drainage system to simulate the coordinated drainage process during heavy rain.
5. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 4 is characterized in that: In S110, the drainage network data includes node information, upstream inspection well data, and downstream inspection well data; S130 is: generalize the road into an open channel, add a parallel open channel pipe between adjacent nodes based on the node information, create a road drainage system, determine the water inlet offset based on the upstream inspection well data, and determine the water outlet offset based on the downstream inspection well data.
6. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 1 is characterized in that: S200 includes: S210: Initialize SWMM calculations through pyswmm to obtain the current operating status of the storage and drainage facility system. The results are passed to subsequent simulations through the hot start file as the initial boundary conditions for the next time step, providing a dynamic benchmark for predicting the optimal control strategy of pump stations, gates, and storage tanks in the future. S220: Calculate the optimal control strategy sequence for each time step in the future period based on the current storage and drainage facility system operating status, SWMM output results, and the preset objective function; S230: In subsequent time steps, the current state of the storage and drainage facility system is fed back through SWMM real-time simulation, the MPC error is dynamically corrected, and the optimization calculation is re-executed until the end of the simulation cycle.
7. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 6 is characterized in that: The S220 includes: S221: Randomly generate an initial population. Individuals are coded using a mixture of binary and real numbers, where binary codes represent discrete variables and real numbers represent continuous variables. Each individual corresponds to a storage-discharge coordination strategy. S222: Prioritize the exchange of control gene segments of the associated facilities and perturb the variables with a probability of p=0.01 to ensure that the parameters after mutation meet the engineering constraints; S223: Perform fitness evaluation using the following function: ; where h i is the depth of water on the road, Q overflow is the overflow of the pipe network, E energy is the energy consumption of the pump station / valve, w1, w2, and w3 are pre-configured weight coefficients; S224: Roulette wheel selection and elite retention mechanism are used to retain the optimal strategy of each generation, and the optimization is cyclically performed until the maximum number of iterations is reached or the fitness converges, and the global optimal storage and discharge coordinated control solution is output.
8. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 2 is characterized in that: The formula of the objective function in S200 is: ; where h i is the maximum water depth of the i-th road, E energy is the operating energy consumption of the pump station, gate, and storage tank, Φ penalty is a dynamic penalty term, and α and β are pre-configured weight coefficients.
9. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 7 is characterized in that: In S221, discrete variables include the start and stop status of the pump station, and continuous variables include the gate opening percentage and the water level setting value of the storage tank; The pump station start and stop status formula is: ; where u j Indicates the start and stop status of the j-th pump station. When the value is 0, it means it is closed, and when the value is 1, it means it is running. m is the total number of pump stations; The gate opening percentage formula is: ; Where V k (t) is the opening percentage of the kth gate at time t, Δv max The upper limit of the gate opening change rate; The formula for setting the water level of the storage tank is: ; where z l (t) is the water level of the lth storage tank at time t, Q in , l(t) is the water flow rate of the storage tank, Q out , l(t) is the discharge flow of the storage tank, A l (z l ) is the surface area of the storage tank that changes with water level.
10. The urban storage and drainage scheduling method based on SWMM and MPC coupling according to claim 8 is characterized in that: Φ penalty The calculation formula is: ; where Q p is the actual flow rate of the pth section of the pipe network, Q p,max Design capacity for it, z q is the real-time water level of the storage tank q, z q,safe is the safe water level threshold.