Abstract
Abstract
Design of wastewater treatment plant (WWTP) networks can be complicated by the existence of various uncertainties and multiscale nature of the planning process. This article presented a multiscale two-stage mixed integer stochastic (MSTMIS) model for optimal design of WWTP networks under uncertainty. The model was first formulated by a general two-stage stochastic nonlinear programming problem and solved by genetic algorithm to obtain the deterministic single nominal scenario and fix the first-stage long-term decisions. A sensitivity analysis was then used to select the most influential parameters, from which second-stage short-term decisions were finalized by generating stochastic scenarios. A real-world case study on development of a WWTP network in the metropolitan area of St. John's, Canada was conducted to examine the efficacy of the proposed model. Optimization results indicated that the total cost over a 20-year span was optimized at $8.28 × 107 by the MSTMIS model, which is lower than that optimized by the traditional one-stage solution algorithm. The proposed MSTMIS model can simultaneously address the challenges posed by uncertainty and multiscale nature and, thus, provide the decision makers more confidence in making economic decisions related to WWTP network design.
Introduction
R
Long-term decisions are usually considered as one-time decisions and need to be made at the beginning of the planning horizon, whereas short-term decisions are recurring decisions that can be altered to better accommodate long-term decisions. An ideal combination of both short- and long-term planning can greatly reduce system cost and maximize economic and environmental benefits (Jing et al., 2015). If appropriate short-term planning is not implemented during the long-term procedure, there might be potential benefits lost because traditional planning tends to be more conservative and less risk taking. Many studies have emphasized the importance of coupling short- and long-term decisions in water resource management. For example, Verl et al. (2011) stated the importance of distinguishing between short- and long-term planning and claimed that short-term planning consists of the anticipatory consideration and the reaction to unexpected occurrences, while long-term planning is usually a prerequisite for detailed scheduling and process control. Chang et al. (2014) recommended that urban water managers should have both short-term and long-term seasonal demand forecasting for establishing proactive plans under increasing pressure caused by climate change. AlQattan et al. (2015) proposed and solved a multiperiod mixed integer linear programming problem to help develop a country-wide large-scale energy and water cogeneration plan in Kuwait. Oxley (2015) optimized the allocation of water for a river basin management to maximize net economic benefit over a long-term planning horizon using short-term and long-term modeling components. However, most of these studies focused solely on the link between short- and long-term decisions and were not reflective of the existence of various uncertainties that can further complicate the management of water resources (Taha et al., 2016). The uncertainties can manifest themselves as a large number of stochastic model parameters that would require huge amount of computational resources and time to obtain a more robust design (Li et al., 2014; Xu et al., 2014; Xin et al., 2015; He, 2016; NematiAn, 2016).
Particularly, when planning a WWTP network to cover multiple cities or communities, the high level of uncertainty in factors such as wastewater volume, influent quality, treatment technology, and effluent/product reuse market may complicate the assessment of investment decisions and the planning strategy (Wu et al., 2011; Jing et al., 2013a, 2013b; Li et al., 2013, 2014; An et al., 2016). Bozkurt et al. (2015) argued that uncertainty in model parameters can affect the performance of the proposed WWTP network design model and, therefore, should be reduced to achieve a more optimal design decision. Castillo et al. (2016) developed an intelligent knowledge-based system and superstructure-based optimization to generate a ranked short-list of feasible treatments for WWTP network. An uncertainty analysis on the variation in influent concentrations was also conducted to increase the quality and robustness of the decisions.
Among the literature, two-stage stochastic programming is one of the most popular modeling approaches that can effectively tackle uncertainties during multiscale decision making processes (Xu et al., 2009). For example, Xu et al. (2009) proposed an inexact two-stage stochastic robust programming model to deal with water resource allocation problems under uncertainty. Kim et al. (2011) applied two-stage stochastic programming to explore the design of a biofuel network in the SE region of United States with uncertainty. However, the application of two-stage stochastic programming in WWTP network design has not been well reported in the literature. Lee (2012) also mentioned that although stochastic programming is helpful for multiscale and multistage problems, the exponentially growing number of scenarios and computational demands may limit its application and efficacy. Therefore, to the best of our knowledge, how to effectively and efficiently integrate both short- and long-term planning decisions with uncertainties, especially for WWTP network design, still remains as a challenge and desires further explorations.
To remediate this situation by coupling short- and long-term decisions, taking uncertainties into account, and reducing the design problem to a manageable size, this article presented a multiscale two-stage mixed integer stochastic (MSTMIS) model for the optimal design of WWTP networks under uncertainty. The MSTMIS model was formulated by a two-stage stochastic nonlinear programming problem. The problem was first solved using genetic algorithm (GA) to obtain the single nominal scenario (i.e., first-stage decisions) attaining the minimum cost based on the deterministic data. A sensitivity analysis was then performed to rank input parameters according to their influence on the optimization results. To enhance the robustness of the decisions under uncertainty, a new WWTP network (i.e., second-stage decisions) could then be optimized by solving a number of stochastic scenarios generated by varying key parameters. A real-world case study in regard to the planning of a WWTP and sludge processing network was carried out to examine the efficacy of the proposed model.
Methodology
The MSTMIS model is a two-stage stochastic nonlinear programming problem that takes the following form:
where f1 is a nonlinear function that needs to be minimized; x are the first-stage decision variables (may contain integers) which need to be determined before the realization of the uncertain parameters
where f2 is a nonlinear function; y are the second-stage decisions (may contain integers) that can be taken after uncertainty is disclosed; and g2 and h2 are the nonlinear inequality and equality constraints, respectively. In the case of a finite set of scenarios, Equation (1) can be rewritten as:
where
GA, which is a probabilistic global optimization technique, is used to solve the first-stage decisions in the proposed MSTMIS model. GA is a stochastic optimization technique inspired by the theory of evolution that repeatedly modifies a population of individual solutions. Parameters such as elite count, crossover fraction, and population size are adjustable to allow for low resource consumption and high performance. The detailed description of GA can be found in Liao et al. (2012) and Jing et al. (2015). By setting the parameters contained in Equations (9)–(13) (other than decision variables) at their most likely values, the first-stage optimization results can be obtained as the single nominal scenario such that the long-term decisions (e.g., the location, size, and type of facility) are fixed.
Ideally, the second-stage optimization would be based on a large number of scenarios by adding uncertainty into each of the parameters in Equations (9)–(13). However, to reduce the problem into a manageable size, a sensitivity analysis is needed to reveal the importance of each parameter. It is performed by keeping the single nominal scenario while varying one factor at a time (OFAT) to determine its impact on the objective function. The OFAT approach ensures that any change observed in the output will unambiguously be due to the single parameter changed. Based on the outputs from the sensitivity analysis, the most influential parameters can then be selected for the second-stage optimization. Then, to accommodate uncertainty in the second-stage optimization, the first-stage long-term decisions (e.g., capital costs) are adopted and fixed, while the short-term decisions (e.g., operating costs) are allowed to change. The most influential parameters are allowed to vary within their predefined ranges and generate a limited number of stochastic scenarios. The second-stage optimization results are then obtained. It should be noted that the final solution may not offer a global optimum, but it offers a robust solution over all possible realizations of uncertainties.
The stepwise procedure for implementing the MSTMIS model on a MATLAB platform is summarized as follows (Fig. 1):

A flowchart of the proposed MSTMIS model. MSTMIS, multiscale two-stage mixed integer stochastic.
Step 1: Define the two-stage stochastic nonlinear programming problem, including objective function, long- and short-term decision variables, parameters, constraints, and their bounds.
Step 2: Set all parameters at their most likely values. For GA, set population size (Np) and maximum generation count (Ng).
Step 3: Solve the problem using GA to get the single nominal scenario. Due to its stochastic nature, GA is repeated a number of times with different starting solutions to obtain the best possible results (Xiang et al., 2013; Liu et al., 2016).
Step 4: Based on the single nominal scenario, conduct the OFAT sensitivity analysis by individually varying each parameter within preset ranges while keeping others as constants and evaluating the change of the objective function.
Step 5: Select the most influential parameters based on the results obtained from Step 4 and create a number of stochastic scenarios. Monte Carlo simulation is applied to randomly sample parameter values from their preset ranges and distributions.
Step 6: Assign probability to stochastic scenarios, then find the second-stage short-term decisions by keeping the first-stage long-term decisions (obtained in Step 3) fixed.
Case Study
A case study in regard to the planning of a hypothetical WWTP network was carried out to examine the efficacy of the proposed model. The network contains the city of St. John's and six nearby cities in the metropolitan area of St. John's, Newfoundland and Labrador, Canada (Fig. 2). The metropolitan area covers 670 km2 and has a population of 175,729. It has a humid continental climate with an average annual precipitation of 1,534 mm and a daily mean temperature of 5.0°C. Due to the low populations (i.e., from 1,283 to 102,500), all seven cities are considered to be small in size. The metropolitan area has a few wastewater treatment facilities which were mostly built in the 1970s–1990s to treat storm water and wastewater (Government of Newfoundland and Labrador, 2005a). Owing to the population growth and increasingly stringent environmental standards, a new WWTP network is planned such that each city will build and operate its own secondary WWTP. It should be noted that a centralized WWTP is considered infeasible in this case due to cost and technique concerns. Each city's WWTP will feature one of three available secondary treatment processes, including oxidation ditch, aerated lagoon, and sequential batch reactor, which are chosen because they have been successfully used in other small-scale cities or communities in Newfoundland and Labrador (Government of Newfoundland and Labrador, 2005a, 2005b).

Contour map of the St. John's metropolitan area.
Aerated lagoon uses mechanical aerators to provide oxygen and keep the aerobic organisms suspended and mixed with wastewater to achieve a high rate of organic degradation. Oxidation ditch is a modified activated sludge treatment process that uses a single or multichannel configuration within a ring- or horseshoe-shaped basin. Sequential batch reactor is a fill and draw reactor system that utilizes a single complete mix reactor in which all steps of conventional activated sludge process take place. A portion of the reclaimed wastewater can be used for various purposes such as agriculture irrigation and groundwater recharge. In addition, one sludge processing center (SPC) is also planned to be built in one of the seven cities to handle the sludge generated from the WWTPs. Composted or digested sludge can then be sold back to each city as soil conditioner or fertilizer for agriculture and gardening purposes. The detailed problem description is presented as follows.
Objective function
The objective function [Eq. (15)] is to minimize the overall cost for building and running the WWTP network containing a SPC over a 20-year span. The overall cost (f) can be calculated as the sum of costs minus the sum of benefits as follows. It is assumed that the impact of inflation is considered as 5% in the optimization process (Nel et al., 2009; Kerstens et al., 2015). Note that
f1: The capital and operating costs of the SPC in Equation (16). The capacity of the SPC is determined by how much sludge is shipped in annually. SPCC and SPCO are the capital ($ per annual ton capacity) and operating costs ($/ton) of the SPC. Qj [Eq. (21)] and zj are the total amount of sludge generated at the jth city (ton/year) and the percentage (%) being shipped to the SPC, respectively.
f2: The capital and operating costs of all WWTPs in Equation (17), where WG is the preset wastewater generation rate (L/day/capita) that covers sewage from residential areas, industry, commercial operations, institutions, and storm runoff; Pj are the populations of each city, which are assumed to be unchanged; xij are the binary variables (1 means to build, 0 otherwise) indicating whether to build a type i WWTP in city j; Ci and Oi are the capital ($ per daily liter capacity) and daily operating costs ($/L) of each type of WWTP, respectively. One assumption in this study is that there are 365 days in each year. The last item stands for the conversion of present value from future annuity. In addition, it is assumed that all three types of WWTP are able to meet the guidelines for effluent discharge.
f3: The transportation cost of shipping sludge from each city to the SPC or the landfill in Equation (18), where yj and yk are the binary variables (1 means to build, 0 otherwise) indicating whether to build the SPC in city j; Djk is the distance (km) between city j and k (Table 1); Si is the sludge generation rate (kg per kg BOD); SWR is the sludge weight reduction rate (%); Dj is the distance (km) between city j and the landfill; and T is the transportation cost ($/ton/km) that considers both fixed and variable costs. The first part of the right hand side of this equation stands for the annual transportation cost for shipping sludge from each WWTP to the SPC. For example, if y1 is 1, which means SPC will be in city 2, then y2–y7 must be 0 because there will be only one SPC developed (see the following Constraints section). Then there will be no transportation cost for conveying sludge from city 1 because y1 − 1 is 0. For city 2, the only nonzero item would be conveying sludge from city 2 to 1 where SPC will be located and y1 is 1, and so on. The second part of the right hand side of this equation stands for the transportation cost of shipping the remaining sludge from each city to the landfill in 20 years. It should be noted that extra penalty (L) is charged for shipping sludge directly to the landfill due to special handling requirements.
f4: The revenue of reusing treated wastewater in Equation (19), where RRP is the percentage of reclaimed wastewater that can be reused (%), RWi is the benefit of reusing reclaimed wastewater ($/L) depending on the type of WWTP.
f5: The revenue of selling compost in Equation (20), where CP is compost price ($/ton).
Constraints
The first constraint defines that for each of the seven cities, there is only one type of WWTP out of three that can be chosen and built. The second constraint suggests that there can be only one SPC built in one of the seven cities. The last constraint indicates that the amount of sludge shipped from each city is >0 and less than the total amount of sludge generated from its WWTP.
Optimization settings
To solve the single nominal scenario and find the first-stage decision on the location of the SPC and the type of WWTP, the most likely values of all parameters (Table 2) were collected from government reports, reports from consulting firms, journal publications, and research reports (U.S. EPA, 1999a, 1999b, 1999c; Government of Newfoundland and Labrador, 2005a, 2005b; Nowak, 2006; Canadian Council of Ministers of the Environment (CCME), 2008a, 2008b, 2009). GA optimization was performed in MATLAB® and repeated 20 times to accommodate solutions obtained from different initial populations. The total number of variables was 35. Population size (Np) and maximum generation count (Ng) were set as 50 and 1,000, respectively. To evaluate the significance of each parameter, an OFAT sensitivity analysis was performed to find the most influential parameters by varying ±30% and ±15% from their most likely values (Autrique and Lormel, 2008; Jing and Chen, 2011). For the selected most influential parameters, Monte Carlo simulation was used to randomly generate 250 different combos based on uniform distribution within their ±30% ranges (Lee, 2012; Méndez et al., 2013). Then the second-stage decisions could be obtained by assigning equal probability for the sake of simplicity (Lee, 2012). The final solution that contained both first- and second-stage decisions would have the lowest overall cost by taking all 250 stochastic scenarios into account.
TS, total solids; WWTP, wastewater treatment plant.
Results and Discussion
Single nominal scenario and sensitivity analysis
The optimal solution of the single nominal scenario (Table 3) was obtained with a minimized cost of $8.34 × 107. As first-stage long-term decisions (i.e., xij and yj), the SPC was optimized to be built in St. John's, while most of the cities were assigned with aerated lagoon as their secondary treatment options, except for Portugal-St. Philips, Conception Bay South, and Bay Bulls where sequential batch reactor and oxidation ditch were recommended. The total amount of sludge generated at all cities was 2,375.9 ton/year, of which 2,261.7 ton/year was transported to the SPC. The total capital and operating cost of the WWTPs was $8.63 × 107, which was the key factor influencing the total network decision. The costs related to SPC and sludge transportation were $2.62 × 106 and $1.97 × 106, respectively. Treated wastewater reusing and compost sales generated benefits of $5.51 × 106 and $1.97 × 106, respectively.
SPC, sludge processing center.
As shown in Fig. 3, the sensitivity analysis indicated that WG was the most important parameter because it directly determines the capital and operating costs of the WWTPs and SPC. The objective function changed by ±31% and ±15.5% when WG was increased by ±30% and ±15%, respectively. This implied that for any WWTP network design problem, an accurate estimate of the wastewater generation rate based on long-term statistics and future projections may be a priority (Dai et al., 2015). In addition, C2, C3, O2, and O3 were determined as the other four most influential parameters because aerated lagoon and sequential batch reactor were recommended for most of the cities. These five parameters were further carried into the multiple stochastic scenario design.

Sensitivity analysis of model parameters.
Multiple stochastic scenario design
The five most influential parameters were allowed to vary within their ±30% ranges, namely 0.56–1.04 for C2 ($ per daily liter capacity), 0.616–1.144 for C3 ($ per daily liter capacity), 0.000042–0.000078 for O2 ($/L), 0.000189–to 0.000351 for O3 ($/L), and 285.6–530.4 for WG (L/day/capita). Then 250 stochastic scenarios were randomly generated within these ranges and considered to finalize the second-stage short-term decisions (i.e., zj) as shown in Table 4. The results showed that the expected total cost was further minimized to $8.28 × 107 by assigning 250 scenarios equal probability, which was slightly lower than the single nominal scenario (i.e., $8.34 × 107). The difference was due to the change of second-stage decisions related to the transportation of sludge to the SPC. It is worth noting that most of the sludge received at the SPC was from St. John's and Mount Pearl, which agreed well with the single nominal design. As the production of sludge was proportional to the amount of wastewater treated, such dominance was also ascribed to the large amount of wastewater generated in these two cities due to large populations.
To further validate the proposed two-stage approach, the same 250 stochastic scenarios were each solved without any first-stage decisions and repeated 20 times to obtain the best results. In other words, for each scenario, the choice of WWTP, the location of SPC, and the annual amount of sludge transported to the SPC all could vary. Figure 4a compares the distribution of the objective function with and without fixed first-stage decisions. It can be seen that with the first-stage decisions fixed, the overall cost mainly spans from $5 × 107 to $1.3 × 108, with an average around $8.28 × 107 as stated above. On the contrary, if no first-stage decisions were made (i.e., traditional one-stage optimization, making all decisions at the same time), then the overall cost would be sharply increased to $6 × 107 to $2 × 108, with an average around $1.3 × 108. Such a huge rise in cost indicated that if uncertainty was considered at the beginning of any planning efforts, then the results were not as good as those obtained by tackling uncertainty at the second stage. The same findings can be observed in Fig. 4b and c, where the costs related to WWTP and sludge transportation were all lower using the two-stage optimization.

Histogram comparison between proposed two-stage optimization and traditional one-stage optimization on
Trends of distributions in Fig. 4a and b were similar, implying that WWTP costs was the dominating factor to the objective function, and therefore, the types of WWTP were better determined during the first-stage decision making. The transportation cost seemed to have a nonsignificant contribution to the objective function as shown in Fig. 4c and its variation was minimal after the location of SPC was fixed. However, for a larger problem with longer distances and more SPCs, transportation may become more important and transfer stations may be considered. Interestingly, the SPC costs (Fig. 4d) and compost sales (Fig. 4f) seemed to be higher for the two-stage case, indicating that the amount of sludge shipped to the landfill dominated. It was reported that the WWTPs in Canada were generating 0.67 million tons of dry sludge every year (Eskicioglu et al., 2008). By including sludge disposal during the WWTP network design process, the economic and environmental concerns of wastewater sludge can be taken into account. Nowak et al. (2004) also argued that the future sludge disposal may be a crucial cost factor in the decision between a centralized and a decentralized wastewater and sludge treatment facility network design. The wastewater reusing benefits (Fig. 4e) were around 10% of the total cost, which was close to the percentage reported by Vestner et al. (2013). It also favored the traditional one-stage optimization; however, its sales increase was not comparable to the huge overall cost difference as shown in Fig. 4a. Reclaimed wastewater may be used for many purposes such as irrigation of gardens and agricultural fields, toilet flushing, and industrial cooling water. However, overall speaking, such reuse has been limited in Canada compared to other regions in the world, such as Qatar, Israel, and Kuwait in per inhabitant average and China, Mexico, and United States in total volume. Despite its limited economic importance, the reuse of wastewater is still worth to be advocated and included in any WWTP network planning.
Overall speaking, if the decision maker wants to make long- and short-term decisions together using traditional optimization methods, rather than separating them by the two-stage stochastic method, then there would be a great chance that the network cannot reach its optimal cost effectiveness.
Environmental implications
Aerated lagoon was the best choice for four out of the seven cities, which cover most of the total population in the metropolitan area. It has the lowest operating cost, which better suits the wastewater generation capacity of densely populated areas. It is also well suited for treating municipal and industrial wastewater of low to medium strength, which well represents the quality of wastewater discharged from the metropolitan area of St. John's because of the low industrial activity. Mechanical devices are mainly used for aeration and, therefore, make its operation and maintenance less skill based. Since the 1960s, it has been adopted for over half (15 out of 27) of the wastewater treatment facilities in Newfoundland and Labrador. However, it requires large footprint in terms of land, which may be compensated through the long-term operating and maintenance savings. It may also experience surface ice formation and reduced rates of biological activity during winter times. Oxidation ditch was assigned to the smallest city Bay Bulls as it usually requires higher capital cost that may strictly limit its applicability in urban areas. There has been only one oxidation ditch system in Holyrood (population around 2000), Newfoundland and Labrador since 1974. Compared to its direct alternative, aerated lagoon, it is also open basin, but requires more daily attendance and maintenance. Therefore, it is more suited to serve communities with small populations. Sequential batch reactor was recommended for two coastal cities, Portugal-St. Philips and Conception Bay South. The city of Portugal-St. Philips has had a small-scale sequential batch reactor WWTP since 2003. It has a design average flow and a peak flow of 7.7 and 28.5 L/s, respectively, and can meet the effluent treatment levels for BOD, total solids (TS), total nitrogen, and fats/oils/grease. It was chosen because the city of Portugal-St. Philips has no storm sewer and no separate system underground for groundwater and rainwater runoff. There is a high potential for infiltration that could cause the flow rate to the WWTP to jump to 7–10 times above the average, which is uncommon for larger cities. A bypass is then needed and biomass could be flushed off. Unlike other techniques that may need 2 weeks to be restored, a sequential batch reactor could be restored within a day or two while maintaining its treatment efficiency. In addition, it is suited for wide flow variations and can be placed within residential development. However, it needs to be noted that, although sequential batch reactor requires the lowest capital commitment, its high operating cost and complex system may need technically skilled operators or advanced programmable controllers.
Conclusion
To address the multiscale nature and to reduce the impacts caused by uncertainty, a MSTMIS model was developed to aid WWTP network design. A real-world case study was carried out to design a WWTP network for the metropolitan area of St. John's, Canada. The case was first solved for the first-stage decisions on the location of the SPC and the type of WWTP as the single nominal scenario with an overall cost of $8.34 × 107. Sensitivity analysis indicated that wastewater generation rate, capital and operation costs of aerated lagoon, and sequential batch reactor were determined as the most significant parameters. These parameters were then simultaneously varied within ±30% ranges to generate 250 stochastic scenarios. The stochastic scenarios with equal probability were solved to fix the second-stage decisions on the amount of sludge transported from each city to the SPC with an overall cost of $8.28 × 107. By comparing with solutions obtained from not fixing the first-stage decisions, it was showed that if the long- and short-term decisions were made together using traditional optimization methods, rather than the two-stage stochastic method, then there would be a great chance that the network cannot reach its optimal cost effectiveness. The optimization results also suggested that, for the metropolitan area of St. John's, aerated lagoon and oxidation ditch were recommended for large and small populations, respectively, whereas sequential batch reactor may better suit the needs of coastal communities in terms of high peak flows during precipitation events. As WWTP network design has been receiving increasing attention due to urbanization, the proposed model can offer more economic decisions to such problems by addressing the impacts caused by uncertainty and the multiscale nature. For future research, treatment process simulation modules, expert and public opinions, approximate dynamic programming, and other advanced treatment techniques will be incorporated into the proposed model to further tackle the challenge posed by uncertainty and the multiscale nature.
Notation List
Footnotes
Acknowledgments
Special thanks go to the Natural Sciences and Engineering Research Council of Canada (NSERC), Research & Development Corporation of Newfoundland and Labrador (RDC NL), Canada Foundation for Innovation (CFI), Canada-China Scholars Exchange Program (CCSEP), and Foreign Affairs, Trade and Development Canada for financing and supporting this research.
Author Disclosure Statement
No competing financial interests exist.
