Optimal Control Strategy of a Sewer Network

: This paper proposes a series of methods to increase the efﬁciency of the operating of a sewer network that serves a medium-sized city with a population of 250,000 inhabitants. The sewer network serves ﬁve areas of the city and consists of seven tanks that communicate with one another and with the treatment plant through pipes. The controls are applied to the process by valves and pumps. The main objective of this paper is to determine the optimal controls to minimize two performance criteria: volume of overﬂow, and overﬂow quality index. The sewer network was modeled in the BSMSewer environment. The optimization of the operating of the sewer network was carried out in the conditions of an inﬂuent computed in relation to the number of inhabitants and to the area served, using genetic algorithms as a method of optimization. Five optimization strategies were analyzed by numerical simulation. The analysis of the ﬁve strategies was done by comparison of their results with one another, as well as in relation to the case where all of the controls were set at maximum values of 100%. The simulations showed that the third strategy produced the best results in relation to each of the two criteria.


Introduction
The development of human communities has led to an increase in the volume of polluted water that must be treated and discharged into natural receptors (rivers, lakes, groundwater etc.). On average, a person uses between 79 and 307 L of water every day for drinking, cooking, washing, cleaning, and hygiene. Naturally, this water used must be collected and treated before returning to the environment. Industrial activities also produce wastewater that can endanger the environment when discharged. This has led to the adoption of strict environmental protection legislation regarding the volume and the quality of water discharged into natural receptors. Currently, the issue of collecting and treating polluted water is treated in an integrated way, as clearly set forth by the European Water Quality Directive adopted by the European Union in 2000.
The main issues that arise regarding wastewater are as follows: 1.
The wastewater collection from various domestic or industrial activities and/or stormwater. It should be noted that in case of large rainfall events and significant amounts of stormwater, it is possible to overload water collection systems, leading to discharges of the excess water into the environment-discharges that can cause flooding or lead to soil and natural water pollution; 2.
The wastewater treatment in treatment plants, after which it can be discharged into natural receptors.
The wastewater collection is carried out within the sewer networks, which consist of pipes, tanks, pumps, etc. Several factors influence the design of a sewer network, including ground conditions, topography, effluent composition, and construction sequencing. These set-points for flow control at 12 stormwater retention tanks in the sewer system. The system's operation significantly reduces the amount of rainwater discharged into rivers and water bodies, and more rainwater is treated in the wastewater treatment plant. The authors of [14] present an automatic control strategy (equal filling degree) that can be applied to any type of sewer network, regardless of its size. This method can be a starting point for additional control (e.g., by optimization or manual control). In [15] a method of water pollution control is presented that has the drawback of the need for a large-capacity storage tank. The control method (water-quality-based double-gates control strategy for combined sewer overflows pollution control) uses the chemical oxygen demand (COD) as a control criterion. The control method gives good results even in rainfall conditions. In [16], neural networks were used to predict the discharges in the sewer systems. Different neural networks were investigated using different sets of input and output data, resulting in the neural network with 50 neurons giving the best performance.
In [17], a three-level hierarchical control structure for municipal wastewater systems is proposed; the first level contains sensors and actuators connected to the PLCs, the second level consists of advanced process control systems for wastewater treatment plants and sewer systems, and the third is dedicated to the administrative level. The authors of [18] present another three-level control structure: The first level is the adaptation level, in which the prediction of the network input flows based on the precipitation measurements takes place. The second level is the optimization level that calculates the trajectories for the state and control variables for the entire sewer network, and the third control level is the distributed control level, where the controls calculated by level 2 represent set-points for the decentralized control of each tank.
The issue of controlling the wastewater collection networks has been addressed in many cases by using different optimization algorithms to avoid discharges, efficient use of the treatment plant, and efficient use of the storage tank network [3,18,19]. In [20], a quick pluvial flood warning system using rainfall thresholds is proposed. A tabu search algorithm is implemented with initial boundary conditions based on hydrological analysis in order to optimize the rainfall thresholds. The choice of the optimization method depends on the system's characteristics, the available data, and the objectives of the control strategy. Thus, in [21], linear programming was used to control the storage capacity in a large wastewater collection system. Dynamic programming has been used to design a minimum cost sewer network [22] and to control the San Francisco sewer system [23]. The theory of squared linear control has been used in the multivariable linear control of wastewater collection systems [24,25]. Last, but not least, artificial intelligence, the Internet of things, and genetic algorithms have been used [19,26,27] for the design of wastewater collection systems and the control of their discharges into natural receptors, as well as multi-agent systems in optimization problems (e.g., negotiation mechanisms between various polluting entities for their access to the wastewater treatment plant) [28].
In this paper, the authors propose five optimization strategies based on genetic algorithms of a sewer network for a medium-sized city in Romania with 250,000 inhabitants. The network was modeled in the BSMSewer environment.
The rest of this paper is structured as follows: Section 2 presents the structure and the characteristics of the sewer network, the influent provided by the five areas of the city, the performance criteria, and a brief description of the optimization method; Section 3 shows the simulation results obtained with the five optimization strategies, and the last two sections are dedicated to the discussions and conclusions.

Structure and Characteristics of the Sewer Network
As stated above, a sewer network serving a medium-sized city with a population of 250,000 inhabitants was considered as a case study. The structure of this network is presented in detail in [29]. It contains 7 tanks, as shown in Figure 1, noted as TK i , i = 1...7.

Structure and Characteristics of the Sewer Network
As stated above, a sewer network serving a medium-sized city with a population of 250,000 inhabitants was considered as a case study. The structure of this network is presented in detail in [29]. It contains 7 tanks, as shown in Figure 1, noted as TKi, 1. . .7. It was considered that the 7 tanks collect wastewater and stormwater from 5 collection areas. It should also be mentioned that the first 4 tanks collect domestic wastewater and stormwater, while the 5th tank collects industrial wastewater. In Figure 1, the following notations are used:  di, 1. . .5, is the inflow of tank from the corresponding collection area;  ui, 1. . .7, is the outflow of tank ;  qover,i, 1. . .7, represents the overflow of each tank.
Each collection area is characterized by its surface and the number of inhabitants living on that surface, as stated in Table 1.

Collection Area Number
Collection Area Surface (ha) The Population Served (Number of Inhabitants)  1  2500  75,000  2  5000  50,000  3  6000  40,000  4  7500  60,000  5  3500  25,000 Tanks 1-4 and tank 7 communicate via free fall of the polluted water, using a valve at the outlet to control the outflow, while the other 2 tanks (tanks 5 and 6) use pumps to drain the wastewater.
The volume of each tank, , is computed considering a value of 0.05 m 3 for each inhabitant of the collection area served by tank if it directly serves a collecting area or, conversely, 0.05 m 3 for each of the average number of inhabitants served by the tanks whose outflow is part of the influent of tank . For the tank that serves the area containing the industrial zone, an additional capacity was added with the same value as the average industrial wastewater production per day-2500 m /day. It was considered that the 7 tanks collect wastewater and stormwater from 5 collection areas. It should also be mentioned that the first 4 tanks collect domestic wastewater and stormwater, while the 5th tank collects industrial wastewater. In Figure 1, the following notations are used: , is the inflow of tank i from the corresponding collection area; Each collection area is characterized by its surface and the number of inhabitants living on that surface, as stated in Table 1. Tanks 1-4 and tank 7 communicate via free fall of the polluted water, using a valve at the outlet to control the outflow, while the other 2 tanks (tanks 5 and 6) use pumps to drain the wastewater.
The volume of each tank, V i , is computed considering a value of 0.05 m 3 for each inhabitant of the collection area served by tank i if it directly serves a collecting area or, conversely, 0.05 m 3 for each of the average number of inhabitants served by the tanks whose outflow is part of the influent of tank i. For the tank that serves the area containing the industrial zone, an additional capacity was added with the same value as the average industrial wastewater production per day-Q ind = 2500 m 3 /day.
The maximum flow at the output of tank i, U max,i , is computed as follows: • For the tanks that use pumps to drain the wastewater, a constant value is considered representing the maximum flow of the pump; • For the gravitational tanks, the maximum flow is considered to be 3 times higher than the average wastewater production of the population served by tank i, or by the tanks whose outflow is part of tank i's inflow-the average domestic water Q pe = 0.15 m 3 /(day·inhabitant).
The volumes and the maximum output flow of the 7 tanks are given in Table 2. The following assumptions were considered for the transport component of each collection area [10]:

1.
A 15 min delay until the wastewater travels from one person to the tank corresponding to the collection area; 2.
Twenty-five percent of TSS can accumulate in the piping, but no more than 10 kg/ha. The accumulated particulates will be flushed away when the flow increases over 8 times compared to the average domestic flow of the corresponding collection area (e.g., during pluviometric events).

The Influent of the Sewer Network
The influent of the sewer network comes from the 5 collection areas previously mentioned. It is defined on a time horizon of 28 days. Domestic wastewater and stormwater are collected from the first 4 areas, while industrial wastewater is collected from the 5th area, with loads specific to a medium-sized brewery industry [30]. Daily and yearly variations in the influent were also considered. Thus, all three components of the collected wastewater (domestic, industrial, and stormwater) can be modeled by time series based on previous information and/or on meteorological information. Figure 2 presents the influent generated for the 1st collection area, while Figure 3 shows the influent generated for the 5th collection area (the industrial part of the city). Table 3 gives the average loads and the average flow values of the entire time horizon of 28 days (39,968 values for each tank), expressed in kg/m 3 . Table 4 shows the same average loads for all of the collection areas, expressed as concentrations. water are collected from the first 4 areas, while industrial wastewater is collected from the 5th area, with loads specific to a medium-sized brewery industry [30]. Daily and yearly variations in the influent were also considered. Thus, all three components of the collected wastewater (domestic, industrial, and stormwater) can be modeled by time series based on previous information and/or on meteorological information. Figure 2 presents the influent generated for the 1st collection area, while Figure 3 shows the influent generated for the 5th collection area (the industrial part of the city).

Performance Criteria of a Sewer Network
The efficiency of the operation of a sewerage network is given by 10 performance criteria implemented for BSMSewer [10], which are presented in Table 5.    Table 3 gives the average loads and the average flow values of the entire time horizon of 28 days (39,968 values for each tank), expressed in kg/m 3 . Table 4 shows the same average loads for all of the collection areas, expressed as concentrations.

Genetic Algorithm
The genetic algorithm is a metaheuristic algorithm commonly used to find solutions to the optimization problems, inspired by the biological natural selection process. It uses a population of chromosomes, consisting of genes, that is a genetic representation of the solutions to the optimization problem. It uses biologically inspired operators such as crossover, mutation, and selection to evolve from the initial population to a population containing solutions that minimize a fitness function associated with a chromosome. During each generation, the algorithm uses the selection operator to select a part of the existing population to breed a new generation. A new generation solution is obtained by applying the crossover function to its pair of parents, and by using the mutation operator to randomly change the values of some genes [31]. The genetic algorithm used to minimize the volume of overflow and the overflow quality index for a sewer network has the following characteristics:

•
The chromosome number and structure of genes is chosen according to each control strategy approach, as can be seen in the following sections; • The population size is chosen to consist of 20 individuals; • The initial population is randomly generated with a uniform distribution; • The crossover function that generates the offspring chromosome (C) from two parent chromosomes (P1 and P2) generates a binary vector (S) with random values that have the same length as the chromosome. Considering this randomly generated binary vector, if S(k) = 0, then the gene k of the offspring chromosome inherits the value of gene k of the first parent, or if S(k) = 1, the gene k of the offspring chromosome inherits the gene k value of the second parent ( Figure 4).

•
The parent chromosomes are randomly chosen from the population, using for each candidate a probability directly proportional to its fitness function; • To each gene of the parents, he mutation function adds a random value chosen from a Gaussian distribution with zero mean and standard deviation calculated for each gene as follows: where k-the current generation number; Gen-the maximum number of generations; σ k -standard deviation of the Gaussian distribution at the generation k (at the first generation, σ 1 is the size of the gene range);

•
The genetic algorithm stops when the maximum number of generations is reached (100 generations), or when the best fitness does not improve in the last 30 generations.
Remark: For each of the control strategies, the genetic algorithm was run twice, with two different fitness functions. The first time, it looked for the optimal controls to minimize the volume of overflow (V ovf ), while the second time it minimized the overflow quality index (OQI).


The initial population is randomly generated with a uniform distribution;  The crossover function that generates the offspring chromosome (C) from two parent chromosomes (P1 and P2) generates a binary vector (S) with random values that have the same length as the chromosome. Considering this randomly generated binary vector, if S(k) = 0, then the gene k of the offspring chromosome inherits the value of gene k of the first parent, or if S(k) = 1, the gene k of the offspring chromosome inherits the gene k value of the second parent ( Figure 4).


The parent chromosomes are randomly chosen from the population, using for each candidate a probability directly proportional to its fitness function;  To each gene of the parents, he mutation function adds a random value chosen from a Gaussian distribution with zero mean and standard deviation calculated for each gene as follows: Gen-the maximum number of generations; o -standard deviation of the Gaussian distribution at the generation k (at the first generation, is the size of the gene range);

Simulation Results
The optimization of the operation of the sewer network is based on the prediction of the influent (as shown in Section 2.2) and on the control computation using genetic algorithms ( Figure 5). Remark: For each of the control strategies, the genetic algorithm was run twice, with two different fitness functions. The first time, it looked for the optimal controls to minimize the volume of overflow (V ), while the second time it minimized the overflow quality index (OQI).

Simulation Results
The optimization of the operation of the sewer network is based on the prediction of the influent (as shown in Section 2.2) and on the control computation using genetic algorithms ( Figure 5). Five strategies for optimizing the operating of the sewer network were approached. The analysis of the sewer network efficiency was focused mainly on 2 of the performance criteria-V and OQI-of the 10 mentioned in Section 2.3.

Operation of the Sewer Network with Constant Controls at Maximum Values (100%)
This case was considered in [29]. No control system was taken into account; therefore, all valves at the tank outputs were considered to be fully opened, while all of the pumps were running at 100% as long as the wastewater level in the tank was over 0.5 m. The simulation results are presented in Table 6. Analyzing the sewer network structure from Figure 1 and the results from Table 6, it can be observed that minimizing the two performance criteria of the sewer network can be done only in relation with the output controls of tanks 3, 4, and 5. Setting the output control of the other tanks to a value smaller than 100% does not help in decreasing any of the performance criteria. The outflows of tanks 1, 2, and 6 represent the inflows for tank 7 ( Figure 1) and, because tank 7 does not overflow when no control is used, setting the output control of these tanks to a value smaller than 100% does not help in decreasing any of the performance criteria. The only effect of decreasing the controls of tanks 1, 2, and 6 is to increase the overflows of those tanks. The outflow of tank 7 is connected di- Five strategies for optimizing the operating of the sewer network were approached. The analysis of the sewer network efficiency was focused mainly on 2 of the performance criteria-V ovf and OQI-of the 10 mentioned in Section 2.3.

Operation of the Sewer Network with Constant Controls at Maximum Values (100%)
This case was considered in [29]. No control system was taken into account; therefore, all valves at the tank outputs were considered to be fully opened, while all of the pumps were running at 100% as long as the wastewater level in the tank was over 0.5 m. The simulation results are presented in Table 6. Analyzing the sewer network structure from Figure 1 and the results from Table 6, it can be observed that minimizing the two performance criteria of the sewer network can be done only in relation with the output controls of tanks 3, 4, and 5. Setting the output control of the other tanks to a value smaller than 100% does not help in decreasing any of the performance criteria. The outflows of tanks 1, 2, and 6 represent the inflows for tank 7 ( Figure 1) and, because tank 7 does not overflow when no control is used, setting the output control of these tanks to a value smaller than 100% does not help in decreasing any of the performance criteria. The only effect of decreasing the controls of tanks 1, 2, and 6 is to increase the overflows of those tanks. The outflow of tank 7 is connected directly to the wastewater treatment plant input, so keeping this tank's output control set to 100% is the best solution in relation with the sewer network performance.

Control Strategy #1-Constant Controls
In this strategy, the controls at the outputs of tanks 3, 4, and 5 are maintained constant at certain values that are determined by the genetic algorithm in order to minimize the fitness function. The chromosome contains three genes ( Figure 6): rectly to the wastewater treatment plant input, so keeping this tank's output control set to 100% is the best solution in relation with the sewer network performance.

Control Strategy #1-Constant Controls
In this strategy, the controls at the outputs of tanks 3, 4, and 5 are maintained constant at certain values that are determined by the genetic algorithm in order to minimize the fitness function. The chromosome contains three genes ( Figure 6): where ∈ 0, 1 is the percentage control of the valve/pump at the outlet of tank i.

Volume of Overflow Minimization (Strategy #1)
Characteristics: fitness function: V ; the algorithm stopped after 69 generations. In Figure 7, the best and the average fitness of each of the generations can be observed. The following optimal controls were obtained: * The simulation results are presented in Table 7. where u i ∈ [0, 1] is the percentage control of the valve/pump at the outlet of tank i.

Volume of Overflow Minimization (Strategy #1)
Characteristics: fitness function: V ovf ; the algorithm stopped after 69 generations. In Figure 7, the best and the average fitness of each of the generations can be observed. rectly to the wastewater treatment plant input, so keeping this tank's output control set to 100% is the best solution in relation with the sewer network performance.

Control Strategy #1-Constant Controls
In this strategy, the controls at the outputs of tanks 3, 4, and 5 are maintained constant at certain values that are determined by the genetic algorithm in order to minimize the fitness function. The chromosome contains three genes ( Figure 6): where ∈ 0, 1 is the percentage control of the valve/pump at the outlet of tank i.

Volume of Overflow Minimization (Strategy #1)
Characteristics: fitness function: V ; the algorithm stopped after 69 generations. In Figure 7, the best and the average fitness of each of the generations can be observed.
The simulation results are presented in Table 7. The following optimal controls were obtained: The simulation results are presented in Table 7.

Overflow Quality Index Minimization (Strategy #1)
Characteristics: fitness function: OQI; the algorithm stopped after 91 generations. Figure 8 presents the best and the average fitness evolution during the generations.  Characteristics: fitness function: OQI; the algorithm stopped after 91 generations. Figure 8 presents the best and the average fitness evolution during the generations.
The simulation results are presented in Table 8.  The values of the optimal controls are as follows: The simulation results are presented in Table 8.

Control Strategy #2
The outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level is below a certain value h i,LI M , the valve/pump control will be u i , while if the level is above h i,LI M , then the control will be considered 1 (100%). This way, when the liquid level is over a certain limit, the output control is kept to 100%, so the overflow of the current tank will be as low as possible. In order to prevent the quick change of the control when the tank level is around h i,LI M , a hysteresis was considered, as presented in Figure 9.

Control Strategy #2
The outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level is below a certain value ℎ , , the valve/pump control will be , while if the level is above ℎ , , then the control will be considered 1 (100%). This way, when the liquid level is over a certain limit, the output control is kept to 100%, so the overflow of the current tank will be as low as possible. In order to prevent the quick change of the control when the tank level is around ℎ , , a hysteresis was considered, as presented in Figure 9. For each of the three tanks, ℎ , and , 3 … 5, are determined by the optimization algorithm in order to minimize the fitness function. The chromosomal structure is presented in Figure 10.  For each of the three tanks, h i,LI M and u i , i = 3 . . . 5, are determined by the optimization algorithm in order to minimize the fitness function. The chromosomal structure is presented in Figure 10.

Control Strategy #2
The outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level is below a certain value ℎ , , the valve/pump control will be , while if the level is above ℎ , , then the control will be considered 1 (100%). This way, when the liquid level is over a certain limit, the output control is kept to 100%, so the overflow of the current tank will be as low as possible. In order to prevent the quick change of the control when the tank level is around ℎ , , a hysteresis was considered, as presented in Figure 9. For each of the three tanks, ℎ , and , 3 … 5, are determined by the optimization algorithm in order to minimize the fitness function. The chromosomal structure is presented in Figure 10.

Volume of Overflow Minimization (Strategy #2)
Characteristics: fitness function: V ovf ; the algorithm stopped after 93 generations. In Figure 11 the best and the average fitness of each of the generations can be observed. The following optimal solutions were obtained: The simulation results are presented in Table 9. The following optimal solutions were obtained: The simulation results are presented in Table 9.

Overflow Quality Index Minimization (Strategy #2)
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 12 shows the best and the average fitness of each of the generations.

Overflow Quality Index Minimization (Strategy #2)
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 12 shows the best and the average fitness of each of the generations. The following optimal controls were obtained:

Control Strategy #3
The controls for the outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level in the tank is below a certain level h i,LI M , the valve/pump control will be u i,B , while if the level is above h i,LI M , then the control will be considered u i,A . No inequality constraints for u i,A and u i,B were considered. In this way, when the liquid level is approaching the limit, the new control value can be higher than the old one, in order to make the overflow of the current tank smaller, or it can be lower in order to help the tank whose inflow is the outflow of the current tank to overflow less. To prevent the control quickly changing when the tank level is around h i,LI M , a hysteresis was considered around this level, as presented in Figure 13. The following optimal controls were obtained: The simulation results are presented in Table 10.

Control Strategy #3
The controls for the outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level in the tank is below a certain level ℎ , , the valve/pump control will be , , while if the level is above ℎ , , then the control will be considered , . No inequality constraints for , and , were considered. In this way, when the liquid level is approaching the limit, the new control value can be higher than the old one, in order to make the overflow of the current tank smaller, or it can be lower in order to help the tank whose inflow is the outflow of the current tank to overflow less. To prevent the control quickly changing when the tank level is around ℎ , , a hysteresis was considered around this level, as presented in Figure 13.   For each of the three tanks, ℎ , , , , and , , 3 … 5 are determined by the optimization algorithm to minimize the fitness function. In this case, the chromosomal structure is presented in Figure 14. For each of the three tanks, h i,LI M , u i,A , and u i,B , i = 3 . . . 5 are determined by the optimization algorithm to minimize the fitness function. In this case, the chromosomal structure is presented in Figure 14. For each of the three tanks, ℎ , , , , and , , 3 … 5 are determined by the optimization algorithm to minimize the fitness function. In this case, the chromosomal structure is presented in Figure 14.  Figure 15 shows the best and the average fitness of each of the generations. Characteristics: fitness function: V ovf ; the algorithm stopped after 100 generations. Figure 15 shows the best and the average fitness of each of the generations. The simulation results are presented in Table 11.

Overflow Quality Index Minimization
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 16 shows the best and the average fitness of each of the generations. The following optimal solutions were obtained: The simulation results are presented in Table 11.

Overflow Quality Index Minimization
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 16 shows the best and the average fitness of each of the generations.
The following optimal solutions were obtained: The simulation results are presented in Table 12.  The simulation results are presented in Table 12.

Control Strategy #4
The controls for the outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level in the tank is below a certain level ℎ , , the valve/pump control will be , ; if the level is above ℎ , , then the control will be , and if the level is between ℎ and ℎ , the control

Control Strategy #4
The controls for the outputs of tanks 3, 4, and 5 are considered to vary in time, depending on the liquid level in the tank, as follows: if the liquid level in the tank is below a certain level h i,LOW , the valve/pump control will be u i,B ; if the level is above h i,H IGH , then the control will be u i,A , and if the level is between h i,LOW and h i,H IGH , the control will be scaled accordingly between u i,B and u i,A (Figure 17). For each of the three tanks, ℎ , , ℎ , , , , and , , 3 … 5 are determined by the optimization algorithm to minimize the fitness function. The two limits, ℎ , and ℎ , , must always respect the constraint ℎ , ℎ , . This requires changing some characteristics of the genetic algorithm (e.g., initial population, crossover function, mutation function) to make sure that all solutions are valid. To avoid this, it must be considered that ℎ , ℎ , , ℎ , and ℎ , ℎ , , ℎ , , where ℎ , and ℎ , are provided by the genetic algorithm. Therefore, the chromosome contains 12 genes, as presented in Figure 18.

Volume of Overflow Minimization
Characteristics: fitness function: V ; the algorithm stopped after 100 generations. Figure 19 presents the best and the average fitness of each of the generations. For each of the three tanks, h i,LOW , h i,H IGH , u i,A , and u i,B , i = 3 . . . 5 are determined by the optimization algorithm to minimize the fitness function. The two limits, h i,LOW and h i,H IGH , must always respect the constraint h i,LOW < h i,H IGH . This requires changing some characteristics of the genetic algorithm (e.g., initial population, crossover function, mutation function) to make sure that all solutions are valid. To avoid this, it must be considered that h i,LOW = min(h i,1 , h i,2 ) and h i,H IGH = max(h i,1 , h i,2 ), where h i,1 and h i,2 are provided by the genetic algorithm. Therefore, the chromosome contains 12 genes, as presented in Figure 18. For each of the three tanks, ℎ , , ℎ , , , , and , , 3 … 5 are determined by the optimization algorithm to minimize the fitness function. The two limits, ℎ , and ℎ , , must always respect the constraint ℎ , ℎ , . This requires changing some characteristics of the genetic algorithm (e.g., initial population, crossover function, mutation function) to make sure that all solutions are valid. To avoid this, it must be considered that ℎ , ℎ , , ℎ , and ℎ , ℎ , , ℎ , , where ℎ , and ℎ , are provided by the genetic algorithm. Therefore, the chromosome contains 12 genes, as presented in Figure 18.

Volume of Overflow Minimization
Characteristics: fitness function: V ; the algorithm stopped after 100 generations. Figure 19 presents the best and the average fitness of each of the generations.

Volume of Overflow Minimization
Characteristics: fitness function: V ovf ; the algorithm stopped after 100 generations. Figure 19 presents the best and the average fitness of each of the generations.
The following optimal solution is obtained: The simulation results are presented in Table 13.

Overflow Quality Index Minimization
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 20 shows the best and the average fitness of each of the generations.  The following optimal solution is obtained: The simulation results are presented in Table 13.

Overflow Quality Index Minimization
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 20 shows the best and the average fitness of each of the generations.   Figure 20. Best and average fitness evolution in control strategy #4 when minimizing OQI.
The following optimal solutions were obtained: The following optimal solutions were obtained: The simulation results are presented in Table 14.

Control Strategy #5
This strategy is similar to strategy #3 ( Figure 13), but this time, it is considered that h i,LI M is equal to 3.5 m. This way, the number of genes of the chromosome is smaller, decreasing the number of dimensions of the solution space. This should improve the convergence of the algorithm and decrease the probability of getting stuck at a local minimum.
For each of the three tanks, u i,A and u i,B , i = 3 . . . 5, are determined by the optimization algorithm to minimize the fitness function. In this case, the structure of the chromosome is as presented in Figure 21.

Volume of Overflow Minimization
Characteristics: fitness function: V ; the algorithm stopped after 100 generations. Figure 22 presents the best and the average fitness of each of the generations.

Volume of Overflow Minimization
Characteristics: fitness function: V ovf ; the algorithm stopped after 100 generations. Figure 22 presents the best and the average fitness of each of the generations.
The following optimal solutions were obtained: The simulation results are presented in Table 15.

Volume of Overflow Minimization
Characteristics: fitness function: V ; the algorithm stopped after 100 generations. Figure 22 presents the best and the average fitness of each of the generations.
The simulation results are presented in Table 15.

Overflow Quality Index Minimization
Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 23 shows the best and the average fitness of each of the generations.
The following optimal solutions were obtained: The simulation results are presented in Table 16. Characteristics: fitness function: OQI; the algorithm stopped after 100 generations. Figure 23 shows the best and the average fitness of each of the generations.
The simulation results are presented in Table 16.

Discussion
The study carried out in this paper presents a series of results regarding the optimization of the volume of overflow and the overflow quality index-results obtained on the model of a sewer network corresponding to a city in eastern Romania, with a population of 250,000 inhabitants. The method of genetic algorithms was used for optimization. Simple controls that required the computation of 3-12 parameters were generated. Figure 24 presents the evolutions of the fitness functions over generations for all five strategies in the two cases considered in the analysis: (a) when minimizing V , and (b) when minimizing OQI.

Discussion
The study carried out in this paper presents a series of results regarding the optimization of the volume of overflow and the overflow quality index-results obtained on the model of a sewer network corresponding to a city in eastern Romania, with a population of 250,000 inhabitants. The method of genetic algorithms was used for optimization. Simple controls that required the computation of 3-12 parameters were generated. Figure 24 presents the evolutions of the fitness functions over generations for all five strategies in the two cases considered in the analysis: (a) when minimizing V ovf , and (b) when minimizing OQI. A synthesis of the simulation results obtained with the five optimal control strategies, in relation to the minimization of both the volume of overflow and the overflow quality index, is given in Table 17. The results are analyzed by comparison with the case when the controls have maximum values (the valves are fully opened and the pumps provide maximum flows). In the third and fifth columns (Percentage of "No control"), the differences can be found between the values of the performance criteria computed when the optimization strategies are applied and the aforementioned situation. For example, −21.18% (column #3) means that strategy #1 ensures a 21.18% lower volume of overflow than in the case of "No control", which means that strategy #1 is more efficient in relation to this performance criterion.
The results from Table 17 show that in all of the optimization strategies applied in the conditions of an influent that contains the three components of wastewater (domestic, industrial, and stormwater), significant improvements in the performance criteria were observed. Of the five optimization strategies, strategy #3 ensures the most efficient operation in relation to the volume of overflow, while strategy #4 ensures the best efficiency A synthesis of the simulation results obtained with the five optimal control strategies, in relation to the minimization of both the volume of overflow and the overflow quality index, is given in Table 17. The results are analyzed by comparison with the case when the controls have maximum values (the valves are fully opened and the pumps provide maximum flows). In the third and fifth columns (Percentage of "No control"), the differences can be found between the values of the performance criteria computed when the optimization strategies are applied and the aforementioned situation. For example, −21.18% (column #3) means that strategy #1 ensures a 21.18% lower volume of overflow than in the case of "No control", which means that strategy #1 is more efficient in relation to this performance criterion.
The results from Table 17 show that in all of the optimization strategies applied in the conditions of an influent that contains the three components of wastewater (domestic, industrial, and stormwater), significant improvements in the performance criteria were observed. Of the five optimization strategies, strategy #3 ensures the most efficient operation in relation to the volume of overflow, while strategy #4 ensures the best efficiency in relation to the overflow quality index, as highlighted in Table 17 in yellow. As the values of the overflow quality index are quite close in strategies #3 and #4 (−30.19% compared to −31.94%), it can be stated that strategy #3 can be considered the best. In fact, the evolutions of the fitness functions (Figure 24a-orange curve and Figure 24b-magenta curve) show the same thing-they converge to the minimum values.
Statistical parameters for the strategy that gave the best results (strategy #3, when minimizing V ovf ) were computed. The genetic algorithm was run 18 times, and the results shown in Table 18 were obtained.  Table 19 shows the values of the statistical parameters in relation to the two criteria (V ovf and OQI): Low values of the standard deviation were obtained in relation to both V ovf and OQI, showing that the values of the two performance criteria are quite well grouped around the average values. This proves that the algorithm is robust and reliable.
The optimization strategies approached in this paper assume the following: optimal controls are computed and applied in the process for the time horizon considered; during this period, a new set of controls is determined, which will be applied in the next time horizon, and so on. Compared to the present paper, in [32], the use of fuzzy-logic-based structures for the control of storage tank capacities in order to reduce the volume of overflow is proposed. Although the results obtained by the authors are good, this method does not guarantee optimality.
Additionally, [18] deals with a similar problem following the control of a combined sewer network by two methods: nonlinear optimal control and multivariable feedback control. The case study consisted of a sewer network of lower capacity than the one used in this paper. In the case of the first method, the authors' attention was focused on two objectives: (1) increasing the efficiency of the sewer network operating only in terms of the volume of overflow-as opposed to the present paper, which also considered OQI-and (2) increasing the computational efficiency of the optimization algorithm. A qualitative analysis of the results obtained in the present paper and in [18] shows that they are similar, taking into account the differences in structure and scale between the two sewer networks.

Conclusions
The present paper shows that sewer networks are very well suited to the use of optimization algorithms in order to increase their operational performance. The main idea of this paper was to determine the optimal set of controls to ensure minimal values of two of the performance criteria proposed for the BSMSewer simulation environment (volume of overflow, and overflow quality index). Five optimization strategies based on genetic algorithms were proposed and tested on a varied influent containing three components: domestic wastewater, stormwater, and industrial wastewater.
In essence, our method has the advantage of simplicity in application. The accuracy of the results depends directly on the influent prediction over the chosen time horizon. In principle, the prediction horizon can be reduced so that the values of the influent have a higher degree of confidence. Through an analysis of meteorological observations, an acceptable compromise can be reached regarding the choice of the prediction horizon between the degree of confidence of the meteorological observations and the computing time. Furthermore, this paper shows that the results are better as the number of control parameters (chromosome structure) is increased (strategies #3 and #4 have 9 and 12 parameters, respectively, compared to strategy #1 (3 parameters), strategy #2 (6 parameters), and strategy #5 (6 parameters)). The price paid is the significant increase in the running time in the case of strategies #3 and #4, with 12-16 h optimization sequences, using a computer with the following characteristics: Intel Core i5-10500T CPU @ 2.30 GHz with 8 GB of RAM.
In subsequent research, the authors aim to approach other control (optimization) strategies for sewer networks: optimization of sewer networks using aggregate criteria (e.g., the two criteria considered in the paper aggregated in a single criterion), real-time control of sewer networks, and the use and testing of other optimization algorithms to solve the optimization problem, including the wastewater treatment plant in the optimization procedure.

Conflicts of Interest:
The authors declare no conflict of interest.