# Qualification of Hydraulic Analysis Models for Optimal Design of Water Distribution Systems
## 3 Application and Results
### Optimization Formulations
#### 3.2.2 Objective Function and Design Constraints  
As an objective function in the optimal design of WDSs, the pipe construction cost is used. The pipe construction cost is among the construction costs for WDSs, including most of the costs compared with other facilities' costs (e.g., valve, joint, and affiliated facility  
Figure 2: Flow chart of a genetic algorithm.  
installation costs). The pipe construction cost considers determining the most effective set of network configurations, containing the pipe diameter and layout, and satisfying hydraulic constraints. In this study, the pipe materials, installations (i.e., base installation, trenching, excavation, embedment, backfill, and compaction costs), and affiliated facilities (e.g., valves, fittings, and hydrants) are considered to calculate the pipe construction cost [28]. The function of the pipe construction cost can be expressed as shown in Equation (13), and Table 1 describes the parameters for calculating the pipe construction cost, considering the pipe materials, installations, and affiliated facilities. Moreover, the diameter of the pipes is used as the determinant variable of the optimal design of water distribution systems in this study. Therefore, the optimization is to perform the least-cost design within the range that satisfies the hydraulic constraints through the combination of various pipe diameters.  
\[Minimize\ CC=a+b(x^{c})+d(u^{c})+f(xu) \tag{13}\]  
where \(y\) is the unit pipe cost ($/ft; 1 ft = 0.3048 m); \(x\) is the pipe diameter in inches (1 in = 2.54 cm); \(u\) is the indicator variable; and \(a\), \(b\), \(c\), \(d\), \(e\), and \(f\) are component-specific parameter values estimated using regression analyses. Table 1 shows the representative parameters.  
For hydraulic constraints, this study uses the water threshold of pressure. If the pressure at each node does not meet the pressure constraint during the hydraulic analysis of the optimal design, it gives a penalty point by adding a large value to penalty constant \(\alpha\). This penalty point has an impact on the value of the objective function so that it can not to be selected. If it comes approximately close to the hydraulic constraints, it cannot affect the selection of the optimal solution because of the small penalty point. In order to prevent such occurrence, a large penalty point can be generated by adding a large value to \(\beta\). The penalty function value determined here is added to the construction cost (CC) in Equation (13). Then, for the solution that satisfies the constraint, the CC is smaller than the solution that does not, and through this, effective optimization can proceed. The penalty function \(P\) is shown in Equation (14).  
\[P=\left\{\alpha\bigg{(}\left|h_{i}-h_{min}^{i\ \ \sigma}\right|^{i}_{max}\bigg{|}+\beta\,\ \textbf{for pressure constraint}\bigg{)}\right. \tag{14}\]  
where, \(P\) is a penalty function, \(h_{i}\) is the pressure head at node \(i\) (m), \(h_{min}\) and \(h_{max}\) are the minimum and maximum pressure heads (m), and \(\alpha\) and \(\beta\) are the penalty constants.