Optimal Design of the Water Treatment Plants

A design must satisfy a number of technical considerations thus of a good design for a water requires technical competence in the related areas. While engineers may take this fact to be self-evident, it often needs to be stressed to industrial or political leaders motivated by their hopes for what a proposed water treatment system might accomplish, rather than what is possible with the resources available [2]. Moreover economics and other values must also be taken into account in the choice of a design,which cannot be determined by technical considerations alone. Moreover, these non-technical issues tend to dominate the final choice of a design for a water treatment system.


Introduction
The design of a water treatment system represents a decision about how limited resources should be used to achieve specific objective, and the final design is selected from various proposals that would accomplish the same objectives [1].
A design must satisfy a number of technical considerations thus of a good design for a water requires technical competence in the related areas. While engineers may take this fact to be self-evident, it often needs to be stressed to industrial or political leaders motivated by their hopes for what a proposed water treatment system might accomplish, rather than what is possible with the resources available [2]. Moreover economics and other values must also be taken into account in the choice of a design,which cannot be determined by technical considerations alone. Moreover, these non-technical issues tend to dominate the final choice of a design for a water treatment system.
The traditional approach to designing water treatment systems uses the average (mode or median) of water quality data.
However the operation of such water treatment plants may lead to a number of significant dangers [3], as the input water quality is usually not at a constant level. This leads to uncertainties that can only be addressed using a stochastic optimal design model. In the stochastic model [4], a small probability (α) leads to lower risk and higher reliability, with the α-value being chose by a decision maker.
The objective of this paper is to demonstrate how to apply systems analysis to the design of a water treatment system based on the concept and practice of optimization theory.
Models for solving environmental system problems are generally nonlinear, including objective functions and constraints. Such the models should thus be solved using nonlinear methods, although NLP problems are more difficult to solve, as they have been studied by researchers for more than 20 years, no ideal solutions have yet been found. This is mainly because many certain factors cause the solution to stop at a non-optimal point. The rest of this paper is organized as follows. Section 2 examines the mathematical theory underlying the concept of flexible tolerance, which forms the basis for all that follows. Section 3 applies the model a case study of an existing water treatment plant, while Section 4 describes the system optimization procedure. Section 5 gives the results of a sensitivity analysis, an essential part of any practical optimization approach, since mathematical descriptions of reality are inherently in exact. Finally, Section 6 presents the suggestions for academics and practitioners, and the conclusions of this work.

Concept of tolerance
While using the concept of tolerance in a flexible simplex method to slove NLP problems is theoretically feasible, when the number of variables exceeds seven or eight, the simplex deteriorates and becomes much less efficient [5,6]. Therefore, methods based on the concept of flexible tolerance have not been proposed in the literature on NLP. Kao et al. proposed the concept of flexible tolerance, in which the tolerance is gradually reduced in the process of calculations, and approaches zero when the optimal solution is reached. Using this method, many pull-in operations are not needed [7], and thus intuitively this is a feasible approach.

The multiplier method with flexible tolerance
This study uses the following four methods: the feasible directions method, flexible simplex method, quadratic approximation method, and multipliers method, which are all implemented to cope with the concept of flexible tolerance. A computer program is developed in this work that makes use of these approaches based on factors such as convergence, rate of convergence, accuracy, core memory needed, and the ease of use. Of all four methods, the multipliers approach has been shown to have the best performance with regard to all these factors [7].
Due to space limitations, this paper only presents the basic theory of the multipliers method and the procedure used to apply it, based on concept of flexible tolerance, in order to solve NLP problems.
There are two types of difficulty that arise when solving NLP problems. First, in the process of calculation, the constraints are often difficult to satisfy in order to reach the optimal solution. Next, even if the optimal solution is obtained, many pull-in operations are required to meet all the constraints at all times. Therefore, the concept of flexible tolerance is proposed in this work to allow a tolerance for each constraint. In the process of calculation, the tolerance is gradually reached. And then approaches zero when the optimal solution is obtained. The problem is as follows: s.t. , As shown in Fig. 1, the feasible region is an arc. If the initial point is X =(2, 0), then it needs to move through the arc −X − X − X + 4 = 0, and finally converges at the optimal point X * = (2/√2, 2/√2). The point moves along the line and travels a very short way at first and must enter the feasible region. In the next step, the point moves forward in a straight line direction and repeats the same pull-in operations. However, this process wastes much computational time, because the convergence rate is too slow. Therefore, a new concept of tolerance based on the work of Paviani and Himmeblau is proposed in this study [7,8]. At the beginning of the solving procedure, a tolerance range is introduced for every constraint, and the constraint is assumed to be satisfied within this. There are three cases to be considered: Where h(x) is the constraint.
In each step, the tolerance is gradually reduced so that it can finally approach zero when the optimal solution is reached. Figure 2 shows the geometry of the concept of tolerance. When the problem has more than one constraint, as shown by Equation (2), all the constraints can be combined to consider their overall tolerance, which is presented as follows: Suppose that Ui is a Heaviside operator, T(X), which is always positive, is defined as follows: which means that all constraints should be satisfied. When T( ) = 0, all constraints are satisfied, and is a feasible solution. When 0 ≤ T( ) ≤∈ X is almost feasible; when T( ) >∈, X is infeasible so it should move toward the feasible region. When the problem is presented in the form of equation (1) with ∈= 1/3, Fig. 3 represents the near feasible region. The two semicircles are the tolerance for X ≥ 0 and X ≥ 0.

Hestenes' multiplier method
One of the ways to solve an NLP problems is the use of a combined technique, which the objective function and constraints are combined by using a special algorithm to become an unconstrained NLP. While the solution remains the same as for the original problem, the unconstrained NLP is much easier to solve than the constrained one. Therefore, this method of functional conversion is favored by most researchers, and many methods have been proposed to convert functions, using the interior penalty value, exterior penalty value, and multipliers, with this last one being considered the best [9,10].
For the NLP problem, as in Eq. (2), the objective function and constraints are combined into Eq. (5): where Ui: Heaviside operator 0, R: penalty value When R approaches?, then the optimal solution X* for Equation (5) is the X* for Equation (2).
With regard to the concept of flexible tolerance, the tolerance is defined as follows: The minimum value of F(X, l, m, R) is calculated for each stage.
where λ; μ: Lagrange multiplier R: penalty value, a constant during the solution process The difference between two functions (F) in two consecutive stages should be equal to or greater than zero, or This is the basis of the convergence for the multipliers method. Based on the research conducted by Equation (2) can be transformed as follows: Where < >: means that if the value inside the < > is greater than zero, then < >=0; if it is smaller than zero (e.g., a), then < >=a (a<0). 1,2,...., The minimum value for Equation (11) can be found in every step. Meanwhile, the values of and  can be modified based on Equation (12).
When σ = σ , τ = τ , then the convergence is in the optimal solution.
The Hessian matrix included in Equation (11) is expressed as follows: If gi (x) and hj(x) are linear constraints, then Equation (13) can be simplified to ∇ F(x) is independent of either σ or τ, and thus the convergence will not be influenced by the shape of function F. Figure 4 shows a flow chart of the multipliers method using the concept of tolerance.

The objective function
Cost functions for water treatment plants have been proposed by Clark [11] and Wiesner [12]. Most of the cost functions used in the United States and Taiwan are given as power functions. The costs associated with water treatment plants include: (1) initial capital (construction) cost; (2) maintenance and operation cost; and (3) inflation adjustment factor (real discount rate). In Taiwan, the cost function of a typical treatment plant is normally given as a quadratic function, as in Lee and Wu [13].
The actual objective function for an existing plant is as follows: The coefficients in Equation (15) can be obtained, given a specific feed rate and plant capacity (parameter of units design criteria), from various regression curves available in the government water supply design manuals produced by the Taiwan Water Supply Company [14].
The structural constraints are the parameters representing the input water quality, output water quality, treatment efficiency, detention time, operating limit, and treatment characteristics.

Stochastic constraints
The input water quality is not always at a constant level, and thus the model will generate a probability problem. Due to space limitation, this work will only consider the chanceconstrained stochastic model.  Equation (16) is formally identical to Equation (17) (i.e., they are deterministically equivalent) except that the former includes the random nature of total alkalinity and the free carbon dioxide.
The alum for coagulation can be obtained from: where: T : Raw water turbidity (T.U)  Total alkalinity for coagulation Detention times Chlorine disinfection where: D1: Design dosage for prechlorination D7: Design dosage for postchlorination

Stochastic constraints transformation
Equations (16) to (24) show that the stochastic characteristic has been included in each constraint so that the inverse of the marginal cumulative distribution function of the input water quality parameters needs to be solved. In this situation, the stochastic constraints can be transferred to certain ones. The relationship between probability and b is shown in Fig. 6. If Pr[gi(x)≤ Bi]≥ α, and α = 0.15, b = 100, b = 180 diagram (b) can be used to convert the constrain, which contains probability the constraint, into a deterministic equivalent. Since pr [.] is greater than 0.15, the answer is in the curve interval (mn), and the corresponding b is equal to 100; the solution is gi(x) ≥100, which is inconsistent with the original problem statement that gi (x) ≤Bi. Diagram (c) thus explains the conversion procedure. Since pr[.]≥0.15, the answer is on the curve (m0n0); the corresponding b equals 180; so the solution is gi (x) ≤180. This coincides with the original problem statement gi (x) ≤Bi.

Equation (21) is expressed as
and 1 − α is the complementary probability of α.
Rearranging the terms in Equation (29), one obtains:

Deterministic equivalent for the stochastic model
Since the objective function excluded the probability item, it is not convertible.
The following Constraints are used.
The total alkalinity for coagulation is presented as follows: that is, Using diagram (b) in Figure 6, if the decision maker lets α = 0.25 or 1 − α = 75% , and Q = 75000 , then Equation (35) can be easily obtained: The corrosion control relationship is presented as follows when α<0.6:  0.215 0.071 0.215 4.14 consistent but unreasonable The effluent water quality of the selected existing plant should be corrosive in some respects. If this constraint is not neglected in the structural constraints, a feasible solution for this model is not available, and thus the sensitivity analysis is necessary to make the conclusion significant and meaningful.

Input data
The software developed by Kao et al. [7] was tested and modified to ensure that it was appropriate for use in this research. The data input was carried out using the following two methods: 1. Data such as N1(number of variables), NEQ (number of constraints containing ''=''), NGE (number of constraints containing ''<'' or ''>''), R(penalty value), and X (coordinates of the beginning and ending points) are input using the READ command. 2. The objective function and constraints are input using the ''SUB ROUTINE'' function; the objective function is designated as SUBROUTINE FUN, whereas the constraints are designated as SUBROUTINE CON.

Besides;
Initial values are ''0'' for σ and τ so that F(X, σ , τ , R) is made a standard penalty function. And the value of penalty value R is input intuitively using values of 1, 10, 10 , 10 , 10 , . . . , and so on. It is kept a constant during the problem solving process. In the actual scope of solution, the probability value a varies from 0.1 to 0.4 with intervals of 0.05.

Analysis of the results
Two methods based on the concept of tolerance, the method of feasible directions and the multipliers method, have been developed in this research, and solved using computer software. Due to the limited length of this article, only the multipliers method that leads to better results is presented in this work to demonstrate the theory and application of flexible tolerance.
The quadratic regression cost function is used to obtain the nonlinear objective function. The computer program outlined above is used to execute the calculation based on a 10% interest rate, 0.11017 of capital recovery factor, and 25 years design life for the water treatment plant. The results show that when α is less than 0.25 (α<0.25), the mode has no solution, and the optimal solution can only be obtained when α equals 0.25. This indicates that the actual operation of the water treatment plant is subject to 25% risk or 75% reliability. Compared with the 50% reliability for a water treatment plant designed using the traditional approach, the results obtained using the method proposed in this research are much better. Table 1 lists the original design values and those obtained in this research. The solution of the proposed model is considered ''an exact'' one. The observation that the proposed model has significant solutions only when the α value exceeds 0.25 is significant, as it indicates that the lack of appropriate equipment for adding alkaline chemicals in the existing water treatment plant causes corrosive, treated effluent. In the flowchart shown in Figure 5, if a new unit operation, that is, Unit #2′, is added between Unit #2 and Unit #3, a new variable, that is, X ′, will be included in the model to indicate the lime dosage in kgs/h. As shown in Fig. 7, these modifications lead to the optimal solution. As shown in Table 2, the modified model can be solved even if the αvalue equals 0.01, thus indicating that the reliability is raised to 99.9%.
The sensitivity analysis is usually conducted by varying the price coefficient (c ), constants (b ), and coefficient constant (a ) used in a model and changing the constraints and decision variables. [15] Although not discussed in this article due to length limitations, the results of the sensitivity analysis are more significant with regard to effluent turbidity, corrosion control, and fecal coliform removal.

The problem
No single procedure can deal completely with all aspects of a system, and systems analyst, with the responsibility to carefully investigate the entire situation, we must incorporate all the important elements. The question thus arises, how can this be done efficiently? This section presents a procedure for using all the optimization elements to achieve the best design.

Design procedure
There are four main steps for systems, as follows.

Screening
Screening of the feasible solutions to obtain a small set of non-inferior ones, using a screening models [16]. The screening process in effect defines regions of optimality, and the results are best interpreted as first-order estimates or the nature of the actual best designs for a system.

Sensitivity analysis
Sensitivity analysis of these best solutions is then carried out, to determine their performance in realistic situations.
In the formal process, a specific sensitivity analysis should be conducted to determine how the optimum design would change if the problem were formulated differently. Similarity, the opportunity costs should be examined to see if the optimum design is likely to change, given the known or anticipated changes in the parameters of the objective function.
Overall, the sensitivity analysis general reveals many ways in which the "optimum" solutions derived in the screening process can be improved, demonstrating that some designs perform better over a wide range of likely conditions. The analysis may also indicate the importance of certain factors that are otherwise assumed away.

Dynamic analysis
Dynamic analysis is used to establish the optimal pattern of development over time, and can be done reasonably easily after the screening and sensitivity analysis.
Dynamic programming is typically best suited for this analysis, as it deals effectively with nonconvex feasible regions such as those generated by exponential growth and economies of scale.

Presentation
Presentation is the organization of the final results in a way that makes sense to the client, as the client needs to see why the proposed plan is preferable to alternative, to the appreciates, and that the trade-offs between objectives are reasonable.

Concept
Sensitivity analysis is the process of investigating the dependence of an optimal solution to changes in the way a problem is formulated. Doing a sensitivity analysis is a key part of the design process, equal in importance to the optimization of the process itself.
The significance of sensitivity analysis stems from the fact that the mathematical problem solved in any optimization is only an approximation of the real problem, and no mathematical models will ever represent systems exactly, each differing from reality in any or all of the following ways:  Structurally, because the overall nature of the equations does not correspond precisely to the actual situation.  Parametrically, as we are not able to determine all coefficients precisely.  Probabilistically, in that we typically assume that the situation is deterministic when it is generally variable. In this work, the author has used a stochastic model to solve the problem of uncertainty.
This section presents the sensitivity analysis principally in the context of linear programming. This is because the solutions to linear programming problems automatically include most of the sensitivity information a designer needs, and thus linear programming is the main basis for sensitivity analysis. In addition the linearity of linear programming makes it easier to explain key concepts, which the reader can then extend to other forms of optimization.
Most of this section is devoted to the two most important aspects of sensitivity analysis, the concept and use of:  shadow prices.  opportunity costs.

Shadow prices
A shadow price is the rate of change of the objective function with respect to a particular constraint, an essentially equivalent to the Lagrangian multiplier. The shadow price has no necessary connection with money, despite its name, and its units are those of the objective function divided by the constraint. The shadow price is expressed in dollars only when the objective function is also expressed in dollars or profit.

Use of shadow price
Shadow prices enable the designer to:  identify which constraints might most beneficially be changed, and to initiate these changes as fundamental ways to improve the design.  react appropriately when external circumstances create opportunities or threats to change the constraints.

Sign of shadow prices
A key practical question with regard to shadow prices is: what is the sign of the shadow price, and in which direction can one change a constraint to improve the design? The relationship between the nature of the shadow prices and the changes in constraints is that:  Relaxing the constraints leads to improvements in the optimum design, either increasing a maximum or decreasing a minimum.  Changes in constraints that "raise the roof" or "lower the floor" will tend to improve the optimum design. A constraints is relaxed if it is changed so as increase the size of the feasible region, that is, if an upper bound is increased or a lower bound is decreased.
It is important to note that there is no simple relationship between the sign of the change in constraint and the sign of the shadow price. This is because an increase in the constraint can either relax or tighten a constraint, depending on whether it is an upper or lower bound and if the constraint is a maximizing or minimizing one.

Range of shadow prices
In general, the shadow price is the instantaneous change in the objective function with respect to a specific constraint, ∂Y/∂bj (Y=g(x), b is the r.h.s of the j-th constraint).
This rate can vary with the decision variables and normally will when the constraints are nonlinear.
The peculiarity of linear programming in this regard is that the shadow prices are constant over a range, rather than varying continuously. If we really describe the problem accurately with the appropriate nonlinear equations, the shadow prices will usually vary instantaneously. Even though the range of constancy of the shadow prices is thus an artificial result, the concept is very useful in practice, because it indicates how sensitive the optimum solution is to the constraint. Indeed, if the range is narrow, this means that even small changes in the constraint could lead to quite different shadow prices, thus that the shadow prices may change rapidly.
The range of the shadow price is defined by the intersections of the constraints adjacent to the one that defines the optimum solution of the linear program. In general there can be a limit to the range of a shadow price for both increases or decreases.

Definition of opportunity cost
Opportunity costs, in the context of sensitivity analysis, are related to the coefficients of the decision variables in the objective function. In general terms they define the "cost" of using decision variables that are not part of the optimal design.
In general, the set of optimal decision variables, X * , can be divided into two categories. The two categories for the optimum set of the decision variables, X * are thus the  optimal variables those with nonzero values at the optimum( X * ≠ 0). These are said to be "in the solution".  non-optimal variables, those equal to zero at the optimum(X * = 0). These are said to be "not in the solution".
With this distinction in mind, we can now formally define opportunity costs in the sensitivity analysis: The opportunity cost is the rate of the degradation of the optimum per unit use of a non-optimal variable in the design. The notion of degradation here is important, as it refers to the worsening of an optimum solution. This may either be a decrease, if we are trying to maximize, or an increase, if we are trying to minimize.

Use of opportunity costs
Opportunity costs are thus used to define the coefficient of the decision variables which would lead to a change in design. The designer, having defined the optimum design, then continuously monitors the situation to determine when it has changed enough so that a new design ought to be used.

Conclusion
This study was presented under the assumptions that readers have some knowledge of and experience with the following: (1) mathematical models for systems optimization, (2) engineering economics, (3) cost-benefit analyses, and (4) water supply engineering, especially the functional design of water treatment systems.
This work proposes a new method based on the concept of flexible tolerance to solve problems involving nonlinear conditions that unavoidably arise when mathematical models for optimizing water treatment plant design are implemented. The significant contribution of this paper is that the proposed method can be used to obtain optimal solutions rapidly and accurately by allowing approximate solutions to approach exact ones. Additionally, this work also proposed proactive and improved concepts for the sensitivity analysis and systems optimization procedures, which can help that enable readers to implement the method presented in this work and thus optimize water treatment design by drawing inferences about their use from the examples given in earlier sections.