Improved Optimization for Wastewater Treatment and Reuse System Using Computational Intelligence

River water pollution by wastewater can cause significant negative impact on the aquatic sustainability. Hence, accurate modeling of this complicated system and its cost-effective treatment and reuse decision is very important because this optimization process is related to economic expenditure, societal health, and environmental deterioration. In order to optimize this complex system, we may consider three treatment or reuse options such as microscreening filtration, nitrification, and fertilization-oriented irrigation on top of two existing options such as settling and biological oxidation. The objective of this environmental optimization is to minimize the economic expenditure of life cycle costs while satisfying the public health standard in terms of groundwater quality and the environmental standard in terms of river water quality. Particularly, this study improves existing optimization model by pinpointing the critical deficit location of dissolved oxygen sag curve by using analytic differentiation. Also, the proposed formulation considersmore practical constraints such asmaximal size of irrigation area andminimal amount of filtration treatment process.The results obtained by using an evolutionary algorithm, named a parameter-setting-free harmony search algorithm, show that the proposed model successfully finds optimal solutions while conveniently locating the critical deficit point.


Introduction
Polluted water dumped into a river causes considerable negative impact on the sustainability of aquatic life.Thus, accurate modeling of this complex system and optimal decision making is therefore very critical since this relates to environmental deterioration, economic expenditure, and human health.
In order to optimize this complicated problem, we should first consider various life cycle costs of wastewater treatment and reuse alternatives such as microscreening filtration, nitrification, and diverted fertilization-wise irrigation as well as settling and biological oxidation [1].Under the optimally minimized budget, all the technical and regulatory constraints such as dissolved oxygen level along the river reach, nitrate-nitrogen level in groundwater, nitrogen amount for crop uptake, irrigation area size, and treatment amount in filtration process should be addressed.
To date, various simulation-optimization approaches have been proposed to the wastewater treatment problem [1][2][3][4][5][6][7].However, there is still more room to improve in terms of optimization formulation and simulation calculation for obtaining better solutions.Particularly, this study improves existing simulation calculations by exactly finding the critical deficit point of dissolved oxygen sag curve using analytic calculus.While previous approaches [1][2][3] approximate the minimal point by roughly discretizing the continuous river reach into eight points (5,10,15,20,25,30,40, and 50 km away from the effluent spot), this study clearly pinpoints the minimal location by analytically performing the differential calculus.In addition, the proposed formulation considers more practical constraints such as maximal size of irrigated area and minimal amount of filtration treatment.
Thus, this study intends to improve the optimization structure and the calculation process of the complex wastewater treatment and reuse problem and then to find the optimal solution using an improved evolutionary algorithm, which does not require the boring process of algorithm parameter setting.

Problem and Modeling
The original wastewater treatment and reuse problem was proposed by Haith [1].A municipal area, where 100,000 citizens reside, dumps wastewater (40,000 m 3 /day) into a river after treating it with settling and biological oxidation.However, these processes are not enough to meet the water quality regulation (5 ppm or 5 mg/liter in terms of dissolved oxygen (DO)).Thus, the local government plans to construct an extra treatment system to improve the effluent quality.As seen in Figure 1, the extra treatment system can include two treatment options (filtration and nitrification) and one diverted irrigation option for the sake of crop fertilization.In this system, there are five decision variables such as (1) wastewater volume directly dumped into the river ( 1 kilo-m 3 /day), (2) wastewater volume treated by filtration process ( 2 kilo-m 3 /day), (3) wastewater volume treated by nitrification process ( 3 kilo-m 3 /day), (4) wastewater volume treated by nitrification and filtration processes ( 4 kilo-m 3 /day), and (5) wastewater volume diverted for crop fertilization ( 5 kilo-m 3 /day).
If wastewater is fully mixed with river flow at the discharge point, initial effluent quality  0 ,  0 , and  0 can be calculated using Table 1  ( For the discharged amount ( 1 +  2 +  3 ) into the river, dissolved oxygen level () at  km from the discharge point can be expressed as in (2).Here,  is flow velocity (this study uses 7.9 km/day);  2 is reaeration rate (this study uses 0.5/day);   is saturation DO (this study uses 8.0 ppm);  and  are CBOD and NBOD (ppm) at ; and  1 and   are rate constants (this study uses 0.35/day and 0.2/day, resp.) The first term of the right-hand side (RHS) in (2) stands for oxygen increase owing to reaeration and the second and third terms stand for oxygen decrease owing to oxidation by carbonaceous and nitrogenous material.
The differential equation can have an analytic solution by manipulating it using (3) to (14) [3].From the relationship (2) becomes Equation ( 4) can be written again in the form of 1st-order nonhomogeneous ordinary differential equation as in If an integral factor  is introduced, From ( 5) and ( 6), (7) Equation ( 8) can be integrated as ( 9) If Equation ( 9) is divided by , it becomes Here, ∫  ( 2 /) () becomes Thus, (10) becomes If  = 0 and  = C + C, (12) becomes Finally, an analytic solution is obtained as in (14), which is known as the DO sag equation by Streeter-Phelps [8] Another option, instead of the filtration and/or nitrification treatments, is diverted irrigation for crop fertilization.
The diverted volume  5 has nitrogen.If the nitrogen concentration of  5 is  (20 ppm in this study), the contained nitrogen amount becomes 0.1 (kg/ha).Here, 0.1 is unit conversion coefficient;  is another decision variable, denoting irrigation rate (cm/week); and  is the irrigation period (13 weeks in this study).If the nitrogen consuming amount of crop is NC (170 kg/ha in this study), the nitrogen amount (0.1) in  5 should be equal to or greater than the crop's nitrogen demand (NC) as follows: The surplus nitrogen amount 0.1 − NC is percolated into groundwater.And, total liquid amount percolated into groundwater becomes  +  − ET.Here,  is precipitation amount (cm) during the irrigation period; and ET is evapotranspiration amount (cm) during the irrigation period.Thus, the nitrate-nitrogen concentration   (ppm) in the percolation amount can be expressed as in (16).Here, 10 is the unit conversion coefficient; and   should be equal to or less than 10 ppm according to local government regulation

Improved Optimization Formulation
The objective function of the wastewater treatment problem described in the previous section is the total life cycle cost to be minimized as in (17) [1,2].The cost function consists of three subcosts including filtration process cost  ft , nitrification process cost  nt , and irrigation process cost  ir .
Minimize  =  ( 1 ,  2 ,  3 ,  4 ,  5 , ) ft ($10 3 /year) is composed of capital cost (first term in RHS of (18)) and operation and maintenance (O&M) cost (second term in RHS of (18)) nt ($10 3 /year) is composed of capital cost (first term in RHS of (19)) and O&M cost (second term in RHS of (19)) ir ($10 3 /year) is composed of capital cost of transmission pipeline (first term in RHS of (20)), capital cost of storage system (second term in RHS of (20)), O&M cost of storage system (third term in RHS of (20)), capital cost of irrigation system (4th term in RHS of (20)), O&M cost of irrigation system (5th term in RHS of (20)), land rent cost (6th term in RHS of (20)), and crop sales benefit (7th term in RHS of Technical and regulatory constraints for this problem are 6.54 ≤  ≤ 13.07. Equation ( 21) constrains the total wastewater amount to be equal to 40 kilo m 3 /day; (22) constrains the amount of nitrification to be equal to or greater than that of both nitrification and filtration; (23) constrains any subwastewater amount to stay between lower and upper limits (0 to 40 kilo m 3 /day); (24) constrains DO level at any point along the river reach to be greater than or equal to 5 ppm; and (25) constrains total nitrogen amount to be greater than or equal to crop nitrogen requirement as specified in (15) and also constrains nitrate-nitrogen concentration   to be less than or equal to 10 ppm as specified in (16).
In order to improve this biased result, a slight modification was made to the cost coefficients [3].When the cost coefficients for filtration and nitrification were reduced, some portion was assigned to  2 and  3 [3].However, this case is also not very realistic because most of the portion was assigned to  2 and  3 while only a tiny amount was assigned to  5 and  1 .
Here, if we analyze the best solution in [2], we may improve the optimization formulation.For example, without the constraint of irrigated area, the area size can be expanded up to 428 ha.But, more realistically we can consider the maximum irrigation size (for example, 100 ha in this study), as follows: Also, the filtration process may require minimum treatment amount (e.g., 10 kilo m 3 /day in this study) because a tiny amount is not realistic for operating the treatment plant cost-effectively, as follows: For the DO level constraint specified in (24), we have to ideally check the entire river reach.However, we were not able to check all the continuous points because the number of tasks is astronomical.Thus, previous research [1][2][3] approximately and arbitrarily checked only 8 points (5, 10, 15, 20, 25, 30, 40, and 50 km from the origin).This approach is not accurate at all and sometimes violates minimal DO level because actual maximum deficit point exists between two points.Also, there is a chance that the deficit point exists out of the range (5 to 50 km) if the model is applied to other problems.
In order to overcome this critical drawback, this study proposes an analytical solution which can deterministically find the minimal DO location instead of checking only eight points.Basically, we can obtain the minimal DO location by differentiating the DO function specified in (14).However, the task is too complicated to easily obtain it.Nonetheless, this very problem has a problem-specific way to find the location deterministically.

Harmony Search Algorithm
This study utilizes a parameter-setting-free harmony search (PSF-HS) algorithm for obtaining the optimal solution.Different from the original harmony search (HS) algorithm, the PSF-HS algorithm does not require the tedious process of algorithm parameter value setting [9] and has so far been applied to various bench-mark problems [10,11] and engineering optimization problems including structural design [12] and groundwater pollution source identification [13].
More generally, the HS algorithm has so far been theoretically developed and practically applied to various computational intelligence and complex problems [14][15][16].
The basic structure of HS algorithm contains a solution pool named harmony memory (HM), which has randomly generated solutions as many as harmony memory size (HMS; 30 in this study) [2]: And, at every improvisation (iteration), a new harmony (solution vector) x New is generated based upon HM as follows: where Δ is pitch adjusting volume that is obtained as (
If the new harmony x New satisfies every constraint and is better than the worst harmony x Worst contained in HM, the former is included in HM and the latter is excluded from HM as follows: The processes specified in (38) and (39) are repeated until a termination criterion, such as maximum number of iterations (improvisations), is satisfied.
The PSF-HS algorithm, when compared with the basic HS algorithm, has one extra matrix, called operation type matrix (OTM).Equation (40) shows one example of OTM OTM memorizes the operation history of every harmony stored in HM.At the early stage, HMCR and PAR have a constant value of 0.5, and OTM is accumulating the operation information.Then, HMCR and PAR are iteratively updated based on OTM, instead of using fixed parameter values where ct(⋅) stands for the function which returns the number of designated operations.
Since every decision variable has different HMCR and PAR, (38) can be slightly changed as follows:

Computation Results
The improved optimization model was applied to the wastewater treatment and reuse system and obtained the results using the PSF-HS approach (5,000 iterations).Table 2 shows the detailed results out of 10 runs.While a traditional mathematical optimization algorithm such as generalized reduced gradient method gets stuck in local optima or even diverges [2], the PSF-HS was able to robustly find solution vectors.
As observed in the table, optimal costs were obtained, ranging from 371.5 $10 3 /year to 383.1 $10 3 /year with the average of 376.8 $10 3 /year.Also, all the constraints were satisfied: every filtration inflow ( 2 +  4 ) was greater than minimally required amount (10 kilo-ton/day); every pure nitrification amount ( 3 −  4 ) was greater than 0, which means  3 ≥  4 ; every irrigation area is less than 100 ha; every nitrogen amount for crop fertilization is greater than the required amount (170 kg/ha); every water quality in groundwater is less than the regulated level (10 ppm); and every DO level at the pinpointed lowest location is greater than the minimally required level (5 ppm).
Figure 2 shows DO sag curve for the best cost ($371.5× 10 3 /year) from the solution vector ( 1 = 0.05;  2 = 0.05;  3 = 32.37; 4 = 9.95;  5 = 7.53;  = 13.07).The Meanwhile, as observed in Figure 4, all PAR have converged into low values (≤0.1) after 1,000 iterations, except the PAR for irrigation rate , which rose up to 0.5 and then slightly went down to 0.35.This means that PSF-HS mostly does not need any further pitch adjustment for each treated or diverted volume; however, the irrigation rate needs to be frequently pitch-adjusted because it should satisfy the nitrate-nitrogen concentration level (  ≤ 10 ppm) in groundwater.

Conclusions
This study proposed an improved optimization model for the wastewater treatment and reuse system that contains three options such as filtration, nitrification, and diverted irrigation and found optimal solutions using the PSF-HS technique.The improved optimization model could obtain the minimal life cycle cost design while satisfying DO level at the critical deficit location, minimal amount for filtration process, and maximal size of irrigation area as well as proper groundwater quality and nitrogen amount for crop farming.
The major improvements of this study are to consider more realistic design constraints such as maximal irrigation size and minimal filtration amount and to pinpoint the critical deficit location of dissolved oxygen by using differential calculus instead of checking roughly dispersed points.While previous approaches checking eight discrete points had difficulty in finding the exact location of the critical deficit point, this study could exactly spot the point using analytic solution of the DO concentration function.
However, the weakness of this study is the fact that the analytic solution can be obtained only in special cases where the difference amount between reaeration rate ( 2 ) and NBOD rate constant (  ) is twice as large as that between reaeration rate ( 2 ) and CBOD rate constant ( 1 ), observed in this bench-mark problem.Thus, for future research, we would like to develop the analytic solution which can be applied to more general cases.
With respect to algorithm side, PSF-HS has advantages over original HS because it does not demand a tedious parameter setting process for HMCR and PAR and individually considers HMCR and PAR for each variable [9].Meanwhile, PSF-HS also has disadvantages because it has an additional matrix and requires additional setting (starting HMCR and PAR values and duration of rehearsal).Also, the solution quality of PSF-HS is not always better than that of original HS whose parameter values are manually and properly chosen [9].Thus, the future research direction of PSF-HS can be how to efficiently perform the additional setting process and how to enhance the solution quality.

Figure 1 :
Figure 1: Schematic of wastewater treatment system.

2 Complexity Table 1 :
Quantified effect of each treatment.

Table 2 :
Optimization results for wastewater treatment system.