Wastewater systems are of crucial importance to the promotion of sustainable development. Through an integrated planning approach, the costs can be minimized and the resulting benefits maximized. A planning approach at regional level exploits the economies of scale, while achieving a better environmental performance. In this paper we set out a decision support approach for the planning of regional wastewater systems. Optimization models are used, aimed at finding optimal configurations for the location, type and size of the system's infrastructure: sewers, pump stations, and wastewater treatment plants. Solutions are evaluated in terms of the cost of installing, operating and maintaining the infrastructure, and the water quality in the river that receives the treated wastewater. The river water quality varies in accordance with the effluent discharges, and is assessed using environmental parameters. The models are solved with a simulated annealing algorithm complemented by a local improvement procedure. Its application is illustrated through a case study in the Una river basin region, in Brazil.

## INTRODUCTION

The importance of promoting the good quality of all water bodies is widely recognized, as it is in the Water Framework Directive adopted by the European Union. The wastewater generated in urban areas is one of the main causes of water pollution, and its impact is particularly hazardous when wastewater is discharged without any treatment. For instance, in Portugal around 25% of domestic wastewater is still discharged without appropriate treatment. But in other parts of the world, such as Brazil, over 60% of the population lacks any wastewater treatment system (that is, around 115 million people).

Wastewater systems are of crucial importance to the promotion of a sustainable development. But they can be very costly and the solutions adopted difficult to reverse. Therefore, they must be planned efficiently, taking into account not only the costs but also the quality of the receiving water bodies. In the short run a very significant investment effort is required. However, in the long term, the benefits derived will largely exceed the costs (World Bank 2014). Although wastewater systems are often planned at local level, a planning approach at regional level exploits the economies of scale, while achieving a better environmental performance.

This paper presents a decision support approach for large-scale planning of regional wastewater systems. The approach considers the main facilities of the wastewater drainage and treatment system in order to collect wastewater generated in the population centers for the final discharge into a river or set of rivers where it should be discharged. The costs of installing the wastewater system and operating it over its life span are taken into account, together with the environmental concern. In addition to a low cost solution, water quality standards should be met in the river that receives the treated wastewater. Different water quality parameters can be used to assess the water quality of the river, which varies in accordance with the effluent discharges. To represent the problems as accurately as possible, such models must incorporate discrete variables and nonlinear functions. Because of the complexity of resolving mixed-integer nonlinear optimization models, heuristic algorithms must be implemented (Maier *et al*. 2014). We have used a hybrid algorithm composed of a combination of a simulated annealing algorithm (SA) and a local improvement procedure (LI) as the solution method. The application of the model is illustrated through a case study in the Una river basin region, in Brazil, and the results for three different cases are compared and commented upon.

## PLANNING APPROACH

The infrastructure for draining and treating wastewater includes three major facilities: wastewater treatment plants (WWTPs) to treat the wastewater before it is released into rivers, sewer networks to connect the population centers with the WWTPs, and pump stations to lift wastewater when gravity cannot naturally accomplish the flow. The aim of regional wastewater system planning is to determine an optimal solution for the layout of the sewer network, and for the location, type, and size of the pump stations and WWTPs to include in the system. Solutions are evaluated in terms of discounted costs relating to the installation, operation and maintenance of the infrastructure, and the water quality of the river that receives the treated wastewater discharges. This search for the best regional wastewater system entails too many configurations to be evaluated individually; thus it can only be efficient if pursued through optimization models.

Several optimization models have been developed for the search for the best regional wastewater system, as presented in the survey by Melo & Câmara (1994) on the first optimization models applied. Along with the progress of the approaches proposed in the literature, which evolved from simplified versions of the problem to more complex models, the techniques required to solve the models were also improved based on modern heuristics. Aras *et al*. (2007) and Andrade *et al*. (2013) developed genetic algorithms and SA algorithms, respectively, to solve waste load allocation models with water quality assessment in the receiving river. An SA algorithm was used by Cunha *et al*. (2009) in a model for locating and scaling components of the system's sewer networks and WWTPs. The objective function of this model relates to system costs and is subjected to different constraints to ensure that the sewer network will be scaled according to hydraulic laws and regulations. Constraints to ensure that the treated wastewater discharged from the WWTPs will not create environmental damage have also been considered. To this end, the water quality standards fixed for the river are evaluated through a water quality model based on environmental parameters such as dissolved oxygen (DO), biochemical oxygen demand, nitrogen, and phosphorus. More recently, scenario-based techniques such as robust optimization models have been developed to consider the presence of uncertainty in the planning stage (Zeferino *et al*. 2012; Kang & Lansey 2013).

The optimization models for regional wastewater system planning developed in this paper are inspired by the model described in Cunha *et al*. (2009). The models enable different objectives to be taken into account, corresponding to various ways to represent the problem goals. These objectives, either in terms of cost or river water quality, are supplemented through the use of environmental or financial constraints, respectively. The financial constraint is equivalent to a budget ceiling and can apply to situations where, although there are environmental concerns with the solution, the funds available are insufficient to ensure the desired levels of water quality standards. In previous studies, this type of regional planning of wastewater systems has typically been applied to theoretical test problems. These optimization models are now applied to a case study based on a real-world situation to illustrate the potential of the approach in a more realistic and consistent manner. The present models also take into account the presence of tributaries that produce water flow and quality variations in the river where the (treated) wastewater is discharged. In addition, they can take into consideration previously existing infrastructure components that could be used in the new solution.

## OPTIMIZATION MODELS

This section presents two models for regional wastewater system planning. They have different objective functions and are subjected to a set of constraints, in particular to ensure that the system is designed in compliance with hydraulic laws and regulations. The method to solve the models is also described.

### Cost minimization model

#### Objective function

*C*is the discounted cost of installing, operating, and maintaining the sewer network and the WWTPs, in the solution to be implemented. The cost of the sewer network relates to the diameter of the sewers and size of pump stations. These depend on the wastewater flow, on the length, and on the hydraulic heads at the ends of sewers. The cost of the WWTPs, which are assumed to provide a given level of wastewater treatment, depends on the amount of wastewater treated and it varies according to the type of treatment, which is defined by the size of the WWTPs.

#### Constraints

*N*is a set of nodes;

*N*is a set of population centers;

_{S}*N*is a set of intermediate nodes;

_{I}*N*is a set of possible WWTPs;

_{T}*T*is a set of WWTP types (small or large);

*QR*is the amount of wastewater produced at node

_{i}*i*;

*Q*is the flow carried from node

_{ij}*i*to node

*j*;

*QT*is the amount of wastewater conveyed to a WWTP located at node

_{k}*k*;

*Q*min

*and*

_{ij}*Q*max

*are, respectively, the minimum and maximum flow allowed in the sewer linking node*

_{ij}*i*to node

*j*;

*QT*max

*is the maximum amount of wastewater that can be treated at node*

_{kp}*k*with a WWTP of type

*p*;

*x*is 1 if there is a sewer to carry wastewater from node

_{ij}*i*to node

*j*, and 0 otherwise;

*y*is 1 if there is a WWTP of type

_{kp}*p*at node

*k*, and 0 otherwise;

*DO*is the lowest DO concentration in the river; and

_{R}*DO*

_{min}is the value of the minimum DO concentration allowed in the river.

Constraints (2)–(5) are continuity equations to ensure that all nodes, as well as the whole system in general, are in equilibrium with respect to wastewater flows. Constraints (6)–(8) are capacity equations and specify the limits for the size of the facilities that must be verified. Constraints (9) and (10) are 0–1 constraints, and constraints (11) and (12) are nonnegativity constraints. Constraint (13) is an environmental constraint to ensure appropriate minimum levels of DO concentrations along the river. The *DO _{R}* is defined by the lower concentrations of DO within all reaches of the river. These DO concentrations depend on the discharges of wastewater in the respective reach and in the upstream reaches, and in the characteristics of the river (transversal section, slope, flow, etc.).

### DO maximization model

#### Objective function

It is intended that the lowest values of DO concentration in the river are as high as possible to ensure the survival of the aerobic organisms that inhabit it.

#### Constraints

*C*

_{max}is the value of the maximum discounted cost that can be spent.

Constraint (15) respects the total discounted cost of the system, and is included to provide a financial concern by fixing a budget ceiling.

### Solution method

*et al.*1983) supplemented by a LI procedure is used to solve the mixed-integer nonlinear optimization model. The SA algorithm starts with any initial feasible solution (the initial incumbent solution) and progressively searches candidate solutions selected at random in the neighborhood of the incumbent solution. Candidate solutions better than the incumbent solution are always accepted (becoming the incumbent solution). But candidate solutions worse than the incumbent solution may also be accepted, which is an important feature of the algorithm that prevents it getting stuck in local optima. The transition between solutions is controlled according to a cooling schedule involving some parameters. The algorithm proceeds in a controlled manner until the value of solutions ceases to increase. The LI procedure starts with the best solution obtained through the SA algorithm as the incumbent solution. Then it moves into the best solution within all possible solutions in the neighborhood of the incumbent solution in successive iterations, until no better solutions can be found (Figure 1). The parameters of the SA algorithm supplemented by an LI procedure were calibrated in Zeferino

*et al*. (2009) to solve a similar type of model, and the resulting hybrid algorithm proved to be extremely efficient. These parameters were tested beforehand and showed that they remain accurate for the model presented in this paper.

A hydraulic simulation model is used for each candidate solution to assess the hydraulic behavior of the system while sizing sewers (according to the pipe diameters commercially available), treatment plants, and possible pump stations, complying with all relevant regulations. Furthermore, a water quality simulation model is used to estimate the effects of wastewater discharges in the river. This model evaluates the water quality of the river in terms of different parameters, taking atmospheric re-aeration, photosynthesis, respiration, sediment oxygen demand, carbonaceous organic matter oxidation, and nitrification into consideration (Cunha *et al*. 2009).

## CASE STUDY

The proposed models were tested on a case study based on a real region in the Una river basin, on the southern coast of Pernambuco State, Brazil. The basin has an area of approximately 6,736 km^{2} and encompasses the Una River and three main tributaries, which are considered in this case study: Chata River, Pirangí River, and Jacuipe River. The Una River flows from its source near the city of Capoeiras into the Atlantic Ocean, near the city of Barreiros, along a length of 250 km and with a descent of 900 m. The water quality standard in the Una River, in terms of minimum DO concentration (*DO*_{min}), is assumed to be 7.0 mg/L.

Ten possible locations were singled out for the implementation of the WWTPs. These characterize some of the most likely locations for the treatment of the wastewater, that is, close to cities near the Una River and close to the mouth of the tributaries. The possible locations of WWTPs cover a total of 11 reaches of the Una River, each with specific characteristics in terms of cross-section, slope and flow. The flow of the river is taken to be 2 m^{3}/s in its upper reaches. It increases by 2 m^{3}/s after inflow of the first tributary, by 4 m^{3}/s after inflow of the second tributary and by 8 m^{3}/s after the third tributary. Thus, in the lower reaches the Una River has a flow of 16 m^{3}/s.

## CASE STUDY RESULTS

After collecting all data on the study region, the model was solved using the hybrid algorithm. Three different cases are applied to represent different combinations of the model's objective functions and constraints. By varying the objectives and constraints we can see how the budget or quality standards that have to be ensured influence the final solution for the system.

### Cost minimization – no water quality constraints considered

In this case the optimization model is aimed at finding a minimum cost solution and there is no environmental concern since the minimum *DO _{R}* is not considered; that is, constraint (13) is not included. The objective function consists of cost minimization (1) and the constraints relate to hydraulic laws and regulations (2–12).

### Cost minimization – with water quality constraint considered

This approach should be applied when the optimization model is aimed at finding a minimum cost solution, but certain water quality standards in the river have to be simultaneously guaranteed. For this case study, the water quality is evaluated in terms of the lowest DO within all the reaches of the river. The objective function consists of cost minimization (1). The constraints relate to all hydraulic laws and regulations (2–12), and include the environmental concern given through constraint (13) for a *DO*_{min} of 7.0 mg/L, which is taken as the quality standard for the case study.

*DO*) ensures its constraint (

_{R}*DO*

_{min}= 7.0 mg/L).

### DO maximization – with a budget ceiling

When there is a budget ceiling on developing the wastewater system, which may not provide enough to guarantee the desired water quality levels, the alternative model is used. In this case, the objective is to maximize the water quality of the river through the objective function of *DO _{R}* maximization (14). The constraints used in this model relate to all hydraulic laws and regulations (2–12), and include a financial concern given through Equation (15) for a

*C*

_{max}of €150.0 million.

### Comparison of results

For the cost minimization model solutions, the water quality constraint (*DO*_{min} = 7.0 mg/L) corresponds to an increase in the lowest DO concentration of approximately 24% at the expense of a cost increase of about 10%. In the case of the *DO _{R}* maximization model solution with the €150.0 million budget, the cost is 6% higher than the minimum cost solution with no water quality constraints, but the lowest DO increase in the river is around 16%. This

*DO*maximization solution has a cost saving of around 4% compared to the cost minimization solution with the

_{R}*DO*

_{min}constraint, which involves the need to respect the budget ceiling. But this implies the DO concentration falling below the

*DO*

_{min}resulting from the 6% decrease in the lowest DO in the river. The results show that the constraints applied are binding on the solutions and are as important as, or more important than, the objective function to provide optimal solutions relevant to the characteristics of the problem.

In terms of infrastructure, the main difference between the solutions is the length of the sewer network. The solution that requires a higher level of DO in the river consists of discharges spread more widely over the region and more targeted at the lower reaches, into areas where the river flow is larger. This mitigates the environmental impacts, but it requires a longer sewer system and therefore costs more. Additional pump stations might also have been expected, but the topography of the region allowed extension of the sewers without increasing the number of pump stations. In contrast, the solution with no water quality constraints (the minimum cost solution) required a shorter length of sewers and fewer large-scale WWTPs, resulting in this being the lowest cost system.

The computational time taken to solve the cost minimization model using a computer with a 2.2 GHz processor was 7 seconds without resorting to the water quality simulation model. When the water quality constraint is applied, the time required to solve the model increased to around 16 minutes. The computational time to solve the DO maximization model was around 9 minutes.

## CONCLUSION

A decision support approach for regional wastewater systems planning was presented in this paper. The proposed approach is aimed at determining optimal solutions for the configuration of the system's infrastructure. Two optimization models were developed, explicitly taking into account financial concerns regarding the cost of the infrastructure, and environmental concerns in terms of the water quality of the river that receives the discharged effluent. A cost minimization problem with environmental constraints is a typical planning problem. But the models presented also address situations of financial constraints, such as a budget ceiling, with the environmental concern included in the objective function. The results show that different planning problems with specific goals can make use of constraints as additional (or primary) objectives to provide optimal solutions for the regional wastewater system.

A case study has been used inspired by a real region within the Una river basin, located in the state of Pernambuco, Brazil. The application to real-world situations illustrates the potential utility of the models in a realistic and consistent manner. First, we considered the cost minimization of the system. Then, constraints on the water quality level in the river that receives the treated effluents were included. Finally, a budget ceiling for the solution of the system was taken into account by means of a constraint for such costs, while searching to maximize the water quality in the river. The results confirm the need to find a compromise when such conflicting objectives are at stake. The range of water quality and cost variations in the solutions is considerable, in particular given the high costs involved. But the cost savings and water quality improvements would be higher than those provided by some non-optimal solution.

This paper has shown that regional planning of wastewater systems can benefit from the advantages inherent to the use of optimization models. Future research can expand the approach to fit other real-world features such as the consideration of wastewater generated by other sources like industrial and agricultural activities. By using decision support models we gain a more accurate view of the decisions to implement, and today it is possible to obtain these efficiently using currently available computational capabilities. These can be incorporated in a decision-chain process and should provide an important aid to reaching better decisions. This is particularly relevant because of when this aid may be more significant, that is, in the early planning stage.

## ACKNOWLEDGEMENTS

This study had the support of Fundação para a Ciência e Tecnologia (FCT), through the strategic project UID/MAR/04292/2013 granted to MARE.