## Abstract

Optimizing the design and operation of urban water distribution networks (WDNs) is a complex, nonlinear problem. The optimization of WDNs can be performed for the pumping schedule, the location and elevation of reservoirs, the physical characteristics of pipes, and the placement of pressure-reducing valves, among other objectives. This study applies the anarchic society optimization (ASO) algorithm to find the optimal location and elevation of auxiliary tanks in urban water networks. The ASO is validated with mathematical benchmark functions, and is implemented to determine the location and elevation of auxiliary tanks in two urban water networks. The fuzzy reliability index for urban water network ranges between 74 and 79%, which is close to the global optima. The ASO exhibited better performance optimizing the reliability of WDNs than the genetic algorithm.

## INTRODUCTION

The optimization of the design and operation of water resources systems has been approached with linear programming (LP), nonlinear programming (NLP), dynamic programming (DP), and evolutionary algorithms (EA) (Bozorg-Haddad *et al.* 2008, 2013, 2015a, 2015b, 2016a, 2016b, 2016c, 2016d, 2017; Soltanjalili *et al.* 2011, 2013a, 2013b; Farhangi *et al.* 2012; Fallah-Mehdipour *et al.* 2013a, 2013b, 2014; Orouji *et al.* 2013, 2014a, 2014b; Akbari-Alashti *et al.* 2014; Beygi *et al.* 2014; Aboutalebi *et al.* 2015, 2016a, 2016b, 2016c; Ahmadi *et al.* 2015; Jahandideh-Tehrani *et al.* 2015; Solgi *et al.* 2015, 2016a; Garousi-Nejad *et al.* 2016a, 2016b; Soleimani *et al.* 2016a, 2016b, 2017; Zolghadr-Asli *et al.* 2016a, 2016b; 2017a, 2017b, 2017c, 2017d, 2017e). Goulter & Bouchart (1990) designed a water distribution network (WDN) by maximizing its reliability and minimizing its cost. They concluded that considering the reliability as an objective function in designing the WDN is a complex task. Simpson *et al.* (1994) compared the genetic algorithm (GA) with other optimization methods in optimizing the diameter of water network pipes, and highlighted the advantages of GA. Savic & Walters (1997) minimized the costs of a WDN using the GA. Cunha & Sousa (1999) applied the simulated annealing (SA) approach to the design of WDNs. Fanni *et al.* (2000) applied the tabu search (TS) method in optimizing the WDN. Geem *et al.* (2001) developed an EA named harmony search (HS) algorithm, and Cai *et al.* (2001) implemented the GA and LP to solve complex problems in water resources management. Eusuff & Lansey (2003) optimized the design of WDN with the shuffled frog leaping algorithm. Maier *et al.* (2003) employed ant colony optimization (ACO) in the optimal design of WDNs. Geem (2006) reported the application of HS in minimizing the costs of WDN by changing the pipe diameters. They concluded that HS competes favorably with other EAs. Afshar *et al.* (2006) used ACO for optimal locating of water quality monitoring stations. Tabesh & Hoomehr (2009) found the location and set pressure of pressure reducing valves to manage the demands in WDN. Afshar & Sharifi (2009) applied ACO in multi-objective optimization of water reservoirs. Muranho *et al.* (2012) extended the SA approach that selects the optimal diameters of pipes aided by the EPANET software.

Jahanshahi & Bozorg-Haddad (2008) employed the honey-bee mating optimization (HBMO) algorithm for optimal design of water distribution systems. The optimization constraints were minimum required pressure heads at nodes and the allowable range of water velocity in pipes. Tabesh *et al.* (2011) optimized the location and dosage of chlorine injection to minimize the chlorine surplus at nodes by combining the GA and the simulation model EPANET2. Kurek & Ostfeld (2014) resolved the multi-objective control of WDNs to minimize the pumping costs, maximize the water quality and maximize the storage-reliability. Babaei *et al.* (2015) optimized the pump speed of variable speed drive pumps and chlorine injection dosage to minimize the chlorine consumption costs and maximize the hydraulic and quality reliability of WDNs. Solgi *et al.* (2016b) studied the optimal operation of WDNs under water shortage considering water quality with the HBMO.

Anarchic society optimization (ASO) is a new approach among swarm-intelligence methods. ASO was introduced by Ahmadi-Javid (2011), who compared the results of ASO with those of the GA and particle swarm optimization (PSO) and demonstrated the advantages of ASO, claiming that the ASO algorithm converges to a globally optimal solution with probability one. Shayeghi & Dadashpour (2012) compared the ASO with PSO, vector evaluated PSO (VEPSO), and chaos resilient PSO (CRPSO) to control an automatic voltage regulator system, and the best results corresponded to ASO. Ahmadi-Javid & Hooshangi-Tabrizi (2012) solved a permutation flow-shop scheduling problem with linear objective function. The results demonstrated the ASO's efficiency in solving such problems.

This study evaluates the ASO solving capacity with several mathematical functions commonly employed to test optimization algorithms. In addition, this paper optimizes the location and elevation of auxiliary tanks by maximizing the fuzzy reliability of WDNs. The optimization performance of ASO is compared with that of the GA.

## METHODOLOGY

*Anarchism* is the belief in the abolition of all government and in the organization of society on a voluntary, cooperative basis without recourse to force or compulsion. *Anarchist*s do not support chaos and disorder; rather, they believe in stateless societies based on voluntary associations and corporations, and are generally opposed to any government, and believe that democracy is synonymous with the tyranny of the majority (Woodcook 2004). Anarchic ideology has not rendered successful societal experiments; yet, it has inspired the development of novel optimization methods in the applied sciences.

This paper applies ASO to water resources optimization. ASO appears to be the only optimization algorithm inspired by political ideology, in this case anarchism. ASO was introduced by Ahmadi-Javid (2011). According to the ASO algorithm, members of a society change their positions according to their individual experiences, their group or syndicate experiences, and historical societal experiences. At some time, after several movements, at least one of the society members reaches a near optimal position. ASO creates algorithmic analogs to these anarchic members to search the solution space and reach near optimal solutions to an optimization problem (Ahmadi-Javid 2011). This study reports the first application of the ASO algorithm to optimize the reliability of urban water networks.

### Assumptions and formulation

Let *S* be a solution space and be an objective function that is minimized over *S*. Consider a society of *N* members of society searching for the best position available (global minimum of the function *f* over ) in an unknown land (solution space). denotes the position of the -th member in the -th iteration of the ASO. The best position visited by all members in the -th iteration is denoted by . The best position reached by the -th member in the *k*-th iteration is denoted by and called . The best position experienced by all members in the first *k* iterations is denoted by and is called . In the following, the ASO algorithmic elements are demonstrated based on movement policies.

Figure 1 shows the framework of the ASO algorithm. Each member has a strategy to decide how to move and change its position in the next iteration. According to Figure 1, some society members are selected from the solution space. Then, the fitness of each member is evaluated by comparing its fitness to the positions , , and to produce three movement policies., The next movement and new position of a member are determined by combining these movement policies. The movement policies are explained in the next sections.

### Movement policy based on the current position

*S*the fickleness index is defined by one of the following formulas (Ahmadi-Javid 2011): where = a non-negative number in . The above equations return a fickleness index in the interval . On the basis of the value, the -th member can choose its next position. Low values of represent a suitable position of the -th member relative to other members. Otherwise, the -th member is not satisfied with its position and will move in an attempt to improve it. The movement policy for the -th member is ruled by the value of :

### Movement policy based on other members' positions

_{.}However, the members' movements are not predictable because of their anarchic nature, and they may move towards another society member. Therefore, the External Irregularity index, , is introduced for the -th member in the -th iteration as follows: where and = positive numbers and = a dispersion measure, e.g., the coefficient of variation of the members' objective function values when the objective function

*f*is positive on

*S*. Equation (4) indicates a measure of the distances of society members from . The closer the members are to , the more complacent their behaviors are. Otherwise, the members behave anarchically. Equation (5) represents a diversity index of the society in which the index is proportional to the dispersion of the members. The society members tend to behave more complacently if the diversity of the society increases. The movement policy based on other members' position is determined as follows based on a threshold for :

The closer the threshold is to zero (one), the more anarchic (complacent) the behaviors of the members are.

### Movement policy based on past positions

According to this policy the members behave more anarchically (complacently) whenever the threshold is close to zero (one).

### Combining the movement policies

The overall movement policy is found by combining the three previous movements. Three combination methods can achieve the combination of policies:

elitism

sequential;

crossover

Also, it is possible to crossover the movement policies sequentially. This study applies the sequential crossover method to combine the movement policies. Ahmadi-Javid (2011) demonstrated that ASO is a general case of PSO when defined by the above movement policies.

## CASE STUDY

### Verification of the ASO algorithm with benchmark mathematical functions

*x*variables. The global minima of the Spherical, Rosenbrock and Bukin-6 functions are at the points (0, 0), (1, 1), and (–10, 1), respectively.

### Optimizing the reliability of WDNs with the ASO algorithm

WDNs are designed and constructed to supply sufficient water with suitable pressure. If the WDN is not able to serve its expected functions, then the reliability of the network is reduced. Many indices have been proposed to quantify the WDN reliability (Gupta & Bhave 1996; Todini 2000; Ostfeld *et al.* 2002; Liserra *et al.* 2014; Shirzad & Tabesh 2016). This research applies the fuzzy reliability index (Shirzad & Tabesh 2016).

*et al.*2014): where = pressure head at node

*j*; = maximum head over which the available discharge does not change with pressure and remains constant; = minimum head below which no discharge is available in the node; = desired head for which the entire water-demand flow is provided at the nodes; = volumetric portion of the available discharge which does not depend on pressure; and = the head-dependent portion of the available discharge. These parameters are obtained as follows:

Values of *a* and *b* equal to 50% have been proposed by Tabesh *et al.* (2014), assuming equal portions for volumetric- and head-dependent discharges. The values , and are assigned in this work.

*i*and = counters for pipes and nodes, respectively; and = total number of pipes and nodes, respectively; = the discharge required at the node (m

^{3}/sec); = length of the -th pipe (m); = the membership function of the -th pipe to the pipe fuzzy reliability function; = the membership function of the -th node to nodal fuzzy reliability function; = pressure head at node

*j*(m); = head loss per 1 kilometer length of pipe (m/km), computed by Hazen-Williams equation; = discharge in -th pipe (m

^{3}/sec); = diameter of -th pipe (m); and = Hazen-Williams coefficient of the -th pipe.

### Reliability optimization in a simple WDN

The WDN introduced by Ozger & Mays (2003) was chosen to evaluate the performance of this paper's model. The network includes 20 pipes and 14 nodes. The pipes' diameters are 152–762 mm and lengths are 243–1,524 m. Hazen-Williams coefficients of the pipes vary between 90 and 130. The network, which is presented schematically in Figure 3, has one reservoir. The optimization model is intended to find the best location and elevation of an auxiliary tank in such a way that the of the network (Equation (17)) is maximized. The constraints of the optimization are the hydraulic governing equations of the WDN (continuity at nodes and head losses in pipes). The feasible elevation of the auxiliary tank ranges between 20 and 100 m.

### Reliability optimization in an existing WDN – Kashan City, Iran

A WDN located in the central zone of Kashan city, Iran, covering an area of 1950 (ha), was selected for this study. The maximum discharge for water consumption is 931 litres per second in this city. The example WDN features 47.4 km of steel, polyethylene, and asbestos-cement pipes. The network was modeled with 34 nodes and 49 pipes (whose diameters range from 63 through 400 mm), and is diagramed in Figure 4.

## RESULTS AND DISCUSSION

### Results of the minimization of mathematical benchmarks

The results of the ASO algorithm were compared with the GA's, and the comparison established the better performance of the former algorithm in its convergence to the global optimal point. An evaluation of the algorithms' performances was made with multiple runs because of the random nature of their solutions.

The results of 10 different runs of the ASO and GA algorithms are listed in Table 1, where the superior performance of the ASO algorithm over the GA is seen, and it is seen that the values of the standard deviations of the ASO are smaller than the GA's.

Run number . | Bukin-6 . | Spherical . | Rosenbrock . | Global . | |||
---|---|---|---|---|---|---|---|

GA . | ASO . | GA . | ASO . | GA . | ASO . | ||

1 | 0 | ||||||

2 | |||||||

3 | |||||||

4 | |||||||

5 | |||||||

6 | |||||||

7 | |||||||

8 | |||||||

9 | |||||||

10 | |||||||

Best | |||||||

Average | |||||||

Worst | |||||||

SD | |||||||

Coefficient of variation |

Run number . | Bukin-6 . | Spherical . | Rosenbrock . | Global . | |||
---|---|---|---|---|---|---|---|

GA . | ASO . | GA . | ASO . | GA . | ASO . | ||

1 | 0 | ||||||

2 | |||||||

3 | |||||||

4 | |||||||

5 | |||||||

6 | |||||||

7 | |||||||

8 | |||||||

9 | |||||||

10 | |||||||

Best | |||||||

Average | |||||||

Worst | |||||||

SD | |||||||

Coefficient of variation |

Figure 5 illustrates the maximum and minimum values calculated by the ASO algorithm in each generation and the average rate of convergence of the two algorithms for the three mathematical benchmark functions. Figure 5 also shows that the rate of convergence of ASO exceeds that of the GA and their solutions are near the global optima. Table 2 shows the characteristics of ASO and GA used in minimizing the benchmark functions.

Parameter . | Bukin-6 . | Rosenbrock . | Sphere . |
---|---|---|---|

Population size | 30 | 30 | 30 |

Number of evaluations | 9,000 | 9,000 | 9,000 |

α – Fickleness | 0.3 | 0.3 | 0.3 |

θ – External irregularity | 0.05 | 0.05 | 0.05 |

β – Internal irregularity | variable | variable | variable |

Number of dimensions (variables) | 2 | 2 | 2 |

Parameter . | Bukin-6 . | Rosenbrock . | Sphere . |
---|---|---|---|

Population size | 30 | 30 | 30 |

Number of evaluations | 9,000 | 9,000 | 9,000 |

α – Fickleness | 0.3 | 0.3 | 0.3 |

θ – External irregularity | 0.05 | 0.05 | 0.05 |

β – Internal irregularity | variable | variable | variable |

Number of dimensions (variables) | 2 | 2 | 2 |

### Results for the simple WDN with comparisons with the Kashan City results

The simple WDN's elevation and location of the auxiliary tank were optimized by the GA, and the results were compared to the ASO's. The optimization toolbox in MATLAB R2013 was applied for the GA optimization and the ASO algorithm was programmed in the MATLAB software. The GA and ASO parameters were chosen by means of a trial-and-error procedure. Subsequently, each algorithm's population size and iteration number (generations) were set equal to 4 and 200, respectively. Both optimization algorithms executed 800 fitness evaluations (FE). Also, the *α*-Fickleness parameter and the *θ*-External Irregularity were set equal to 0.3 and 0.05, respectively. The *β*-Internal Irregularity decreases linearly from 0.05 in the first iteration to zero in the last iteration. Table 3 lists the parameters employed for optimizing the simple and the existing WDNs.

Parameter . | Simple network (Ozger & Mays 2003) . | Existing network (Kashan city) . |
---|---|---|

Population | 4 | 5 |

Iterations | 200 | 200 |

Number of evaluations | 804 | 1005 |

α – Fickleness | 0.3 | 0.3 |

θ – External irregularity | 0.05 | 0.05 |

β – Internal irregularity | variable | variable |

Number of dimensions (variables) | 2 | 2 |

Parameter . | Simple network (Ozger & Mays 2003) . | Existing network (Kashan city) . |
---|---|---|

Population | 4 | 5 |

Iterations | 200 | 200 |

Number of evaluations | 804 | 1005 |

α – Fickleness | 0.3 | 0.3 |

θ – External irregularity | 0.05 | 0.05 |

β – Internal irregularity | variable | variable |

Number of dimensions (variables) | 2 | 2 |

The objective function value obtained with the GA after 800 FEs equaled 0.696. To reach this value, the auxiliary tank must be placed at node 1 and an elevation of 80.72 m. ASO reached an objective function value equal to 0.797, by placing the tank at node 6 and elevation 66.56 after executing the same number of FEs (i.e., 800). NLP cannot solve this complex problem. The ASO algorithm was run to execute 100,000 FEs and the objective function reached 0.7970 in this instance, which coincided with that obtained after 800 FEs. This solution is considered as a near global optimum, as written in Table 4. Comparing the average results of 10 sequential runs of the models shows that the GA converged to 0.689, while ASO achieved 0.795. Also, the worst solution of the GA and ASO are equal to 0.676 and 0.787, respectively. This means that the worst ASO solution is better than the best solution of the GA.

Run Number . | Simple network (Ozger & Mays 2003) . | Existing network (Kashan city) . | ||
---|---|---|---|---|

GA . | ASO . | GA . | ASO . | |

1 | 0.6773 | 0.7970 | 0.6398 | 0.7378 |

2 | 0.6762 | 0.7970 | 0.6739 | 0.7370 |

3 | 0.6762 | 0.7919 | 0.7360 | 0.7381 |

4 | 0.6775 | 0.7919 | 0.6398 | 0.7333 |

5 | 0.6867 | 0.7970 | 0.6740 | 0.7086 |

6 | 0.6762 | 0.7970 | 0.6726 | 0.7331 |

7 | 0.6762 | 0.7970 | 0.6986 | 0.7381 |

8 | 0.6955 | 0.7868 | 0.6398 | 0.7375 |

9 | 0.6762 | 0.7969 | 0.7199 | 0.7378 |

10 | 0.6762 | 0.7963 | 0.6940 | 0.7370 |

Best | 0.6955 | 0.7970 | 0.7360 | 0.7381 |

Average | 0.6794 | 0.7949 | 0.6788 | 0.7338 |

Worst | 0.6762 | 0.7868 | 0.6398 | 0.7086 |

SD | 0.00618 | 0.00333 | 0.03199 | 0.00860 |

Coefficient of variation | 0.00909 | 0.00419 | 0.04713 | 0.01172 |

Run Number . | Simple network (Ozger & Mays 2003) . | Existing network (Kashan city) . | ||
---|---|---|---|---|

GA . | ASO . | GA . | ASO . | |

1 | 0.6773 | 0.7970 | 0.6398 | 0.7378 |

2 | 0.6762 | 0.7970 | 0.6739 | 0.7370 |

3 | 0.6762 | 0.7919 | 0.7360 | 0.7381 |

4 | 0.6775 | 0.7919 | 0.6398 | 0.7333 |

5 | 0.6867 | 0.7970 | 0.6740 | 0.7086 |

6 | 0.6762 | 0.7970 | 0.6726 | 0.7331 |

7 | 0.6762 | 0.7970 | 0.6986 | 0.7381 |

8 | 0.6955 | 0.7868 | 0.6398 | 0.7375 |

9 | 0.6762 | 0.7969 | 0.7199 | 0.7378 |

10 | 0.6762 | 0.7963 | 0.6940 | 0.7370 |

Best | 0.6955 | 0.7970 | 0.7360 | 0.7381 |

Average | 0.6794 | 0.7949 | 0.6788 | 0.7338 |

Worst | 0.6762 | 0.7868 | 0.6398 | 0.7086 |

SD | 0.00618 | 0.00333 | 0.03199 | 0.00860 |

Coefficient of variation | 0.00909 | 0.00419 | 0.04713 | 0.01172 |

The variation of the solutions calculated in various runs measures the performance of an algorithm. The standard deviation (SD) and the coefficient of variations (C_{v}) are suitable measures of variability. The SDs of 10 sequential runs of the GA and ASO equal 0.006 and 0.003, respectively, establishing that ASO yields more uniform results than the GA. The C_{v} of the sequential runs of ASO is low (= 0.004), which is two times smaller than the GA's.

Figure 6 depicts the best and worst rates of convergence of the ASO algorithm over 10 runs for the simple network and the Kashan city's WDN. It is evident in Figure 6 that the GA and ASO converge after approximately 800 FEs. The ASO's convergence rate is superior to that of the GA in addition to yielding a better objective function value. Figure 7 shows the hourly variation of the WDN average pressure head and reliability. The comparison of the calculated hourly pressure head variations associated with the best results of ASO and GA indicates that the ASO solution produces suitable pressure head variations within a range of values narrower than those produced with the GA. It follows from Figure 7 that the results of the ASO algorithm imply high reliability during a considerable part of the day. The comparison of the results of GA and ASO confirms that the ASO results are closer to the global optimal solution than the GA's.

### Results for the Kashan City's WDN

The hourly demand of Kashan city's WDN is shown in Figure 8, where it is seen that the maximum water demand is between 8 and 9 am. Table 3 lists the parameters applied in the GA and ASO optimizations. These parameters were selected by a trial-and-error technique. The population size and iteration number were selected equal to 5 and 200, respectively (approximately 1,000 FEs). The parameter values were selected in a manner similar to that used in the optimization of the simple WDN. The GA results show that the auxiliary tank should be placed at node 25 and elevation 1,000.56 m to reach a maximum reliability equal to 0.720. The results of optimization by the ASO algorithm indicate that by placing the tank at node 24 and elevation 1,004.98 m, the reliability increases to 0.738. Performing a run with 10^{6} FES produced a near global optimal solution equal to 0.741. Table 4 shows the optimization results garnered with the GA and ASO algorithm.

The average of results of 10 sequential runs by GA and ASO equaled 0.679 and 0.734, respectively, indicating that the ASO algorithm converges on average to a better solution than the GA. The worst result of ASO, equal to 0.709, is better than that of GA, equal to 0.640. Also, the worst result of ASO is superior to the average of the GA results. Our results indicate that the SD of the ASO results over 10 runs is 0.009, while the GA's equals 0.032. The calculated SD of results establishes that the variation of the ASO results is about four times smaller than the GA's. The average values of the objective function from 10 different runs of the GA and the ASO are 99.6 and 97.2% of the global optimal solution, respectively. Figure 6(c) and 6(d) illustrate the ASO's convergence characteristics and the GA's and ASO's average convergence characteristics from 10 runs for Kashan city's WDN. The hourly variation of average pressure head and reliability of the WDN is depicted in Figure 9, which shows that the average pressure head of the WDN is maintained in a more desirable range by using the results of ASO than using the results produced with the GA. Also, the results of the ASO algorithm are more reliable than the GA's in most hours of the day.

## SUMMARY AND CONCLUSION

Evolutionary and heuristic algorithms are flexible and effective optimization methods applicable to complex optimization problems. They rely on a general algorithmic structure to achieve near optimal answers, and the main difference between them resides in the manner in which they update intermediate solutions between consecutive iterations. This study reports the first application of the ASO algorithm to optimize the reliability of urban water networks.

The ASO algorithm's performance was assessed and validated with benchmark mathematical functions. The ASO algorithm was also applied to a simple WDN introduced by Ozger & Mays (2003) and to an existing water network in Kashan city, Iran, with the objective of maximizing the networks' reliability. The best results in 10 sequential runs of the ASO and GA algorithms were 0.797 and 0.696, respectively, for the simple network and 0.738 and 0.736, respectively, in the Kashan city's water network. In addition, the average results of 10 sequential runs of ASO and GA for the simple network were 0.679 and 0.795, respectively, and for the Kashan city's network equaled 0.679 and 0.734, respectively. These comparisons demonstrated the superiority of the ASO algorithm and its better rate of convergence in reaching near-global optima relative to the GA solutions.

## REFERENCES

*,*

*,*

*.*