# jHawanet: An Open-Source Project for the Implementation and Assessment of Multi-Objective Evolutionary Algorithms on Water Distribution Networks

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. jHawanet: Programming Environment

#### 2.1. EPAToolkit: Library for Modeling of Water Distribution Networks

#### 2.2. jMetal: Framework for Multi-Objective Evolutionary Optimization

#### 2.2.1. Quality Indicators

_{SP}) [33], and Hypervolume (I

_{HV}) [15,34,35]. It is worth noting that jMetal can generate the best approximation to the Pareto front for a given algorithm and problem, performing in addition the stochastic analysis required to calculate a given quality indicator and perform statistical analysis.

#### 2.2.2. Statistical Analysis

#### 2.3. Coupling Project between EPAToolkit and jMetal

## 3. Example Application: Pump Optimization Problem

#### 3.1. Problem Statement

_{nx24}), where zero represents an off pump and one represents an on pump. Finally, the set of obtained solutions must meet a series of hydraulic and operational constraints that ensure their feasibility. Such constraints involve water mass and energy conservation at each node of the network, minimum pressure, and demand flow requirements at each node, as well as continuity of water levels in each reservoir from the end of a nominal day to the beginning of the next day.

#### 3.2. Case Studies

_{min}) and maximum (H

_{max}). In this case, the minimum level is 0 m for both tanks, while the maximum levels are 5 m for tank I and 10 m for tank II. The initial levels are 4.5 and 9.5 m, respectively. Regarding the demand of the system, only the two nodes located between the tanks have demands. They vary reaching the highest level of consumption at 7:00 with a peak factor of 1.7 and at 18:00 with a peak factor of 1.5. The h 00:00, 13:00, and 24:00 have the lowest demands. In these cases, a factor of 0.5 is presented. Energy consumption tariffs have two variations. The first one, 0.0244 ($/KWh) ranged from 00.00 to 07.00 h. From that time, the prices increase to 0.12 ($/KWh).

^{4}during each h of the day.

## 4. Experimental Results and Discussion

_{SP}), and Hypervolume (I

_{HV}) indicator distributions calculated for the case studies. Red lines indicate the median value, while the orange lines indicate the mean value. Grey bars indicate the best performing algorithm for each indicator, as inferred by the Wilcoxon and Friedman statistical tests.

_{SP}distributions as a function of algorithm and case study. SMPSO achieves on average the best (lowest) values in all three case studies. NSGA-II was the second-best algorithm with three-second places, while SPEA2 had the worst performance for the three case studies. The Wilcoxon test confirms that SMPSO spread values on Van Zyl, Baghmalek, and Anytown networks outperform the ones obtained by NSGA-II and SPEA2, with a statistical significance of 95%. However, this test did not show differences statistically significant between NSGA-II and SPEA2 for the Baghmalek and Anytown networks.

_{SP}metric for the three algorithms under consideration. The results are distributed according to ${\chi}^{2}$ with two degrees of freedom at 5% significance level (p-value < 0.05). In this case, SMPSO, NSGA-II, and SPEA2 were ranked first, second, and third, respectively.

_{HV}metric implemented in jMetal follows the strategy proposed originally by Zitzler [15]. The inputs are the Pareto front approximations generated by the algorithms involved in the experiments, and the approximation generated by the analyzed algorithm, while the output is its Hypervolume.

_{HV}metric is for maximization problems. Consequently, as jMetal handles the optimization problems as minimization ones, the now normalized Pareto front has to be inverted. Finally, it is calculated the hypervolume contributions of all solutions of the normalized approximation to the Pareto front. It is essential to highlight that all solutions outside the convex hull, formed by the origin of coordinates and the inverted normalized Pareto front, are set up to the origin. The previous means that contribution to the hypervolume of these solutions are zero.

_{HV}distribution as a function of algorithm and case study. Once again, SPEA2 was the algorithm with the best (highest) values for the Van Zyl and Baghmalek networks. The second place was for the NSGA-II algorithm with two-second positions. Finally, SMPSO with the first place in Anytown and two third places was the algorithm with the worse performance on this quality indicator. The Wilcoxon test also confirms SPEA2 as the algorithm with superior behavior on the three networks, considering differences that are statistically significant at the 95% level.

_{HV}metrics.

## 5. Conclusions

- In terms of the quality of the Pareto fronts obtained, the visual comparison is insufficient and unreliable to determine which algorithm has better performance in the optimization problem.
- Considering the quality indicators provided by jMetal, the SPEA2 algorithm outperforms the NSGA-II and SMPSO algorithms. In this regard, both the Epsilon and Hypervolume quality indicators demonstrate that SPEA2 is the best performing algorithm for the studied benchmark networks, while the Spread indicator shows no significant differences between the considered algorithms.

## Supplementary Materials

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## Abbreviations

NSGA | Non-dominated Sorting Genetic Algorithm |

SPEA | Strength Pareto Evolutionary Algorithm |

SMPSO | Speed-constrained multi-objective particle swarm optimization algorithm |

WDN | Water distribution network |

MOEA | Multi-objective evolutionary algorithm |

USEPA | U.S. Environmental Protection Agency |

DLL | Dynamic link library |

OS | Operation System |

JNA | Java Native Access library |

MOEA/D | Multi-objective evolutionary algorithm based on decomposition |

WASFGA | Weighting achievement scalarizing function genetic algorithm |

ESPEA | Electrostatic Potential Energy Evolutionary Algorithm |

ZDT | Zitzler–Deb–Thiele problems |

DTLZ | Deb– Thiele–Laumanns–Zitzler problems |

WFG | Walking-Fish-Group problems |

MAF | Many objective-optimization families |

CDTLZ | Constrained Deb– Thiele–Laumanns–Zitzler problems |

${I}_{\epsilon}^{+}$ | Epsilon index |

I_{SP} | Spread index |

I_{HV} | Hypervolume index |

MIT | Massachusetts Institute of Technology |

IQR | Interquartile range |

## References

- López-Ibáñez, M. Operational Optimisation of Water Distribution Networks. Ph.D. Thesis, Edinburgh Napier University, Edinburgh, UK, 2009. [Google Scholar]
- Makaremi, Y.; Haghighi, A.; Ghafouri, H.R. Optimization of Pump Scheduling Program in Water Supply Systems Using a Self-Adaptive NSGA-II; a Review of Theory to Real Application. Water Resour. Manag.
**2017**, 31, 1283–1304. [Google Scholar] [CrossRef] - Huang, Y.-C.; Lin, C.-C.; Yeh, H.-D. An Optimization Approach to Leak Detection in Pipe Networks Using Simulated Annealing. Water Resour. Manag.
**2015**, 29, 4185–4201. [Google Scholar] [CrossRef] - Casillas, M.; Garza-Castañón, L.; Puig, V. Optimal Sensor Placement for Leak Location in Water Distribution Networks using Evolutionary Algorithms. Water
**2015**, 7, 6496–6515. [Google Scholar] [CrossRef][Green Version] - Mora-Melia, D.; Iglesias-Rey, P.L.; Martinez-Solano, F.J.; Ballesteros-Pérez, P. Efficiency of Evolutionary Algorithms in Water Network Pipe Sizing. Water Resour. Manag.
**2015**, 29, 4817–4831. [Google Scholar] [CrossRef] - Mora-Melia, D.; Iglesias-Rey, P.L.; Martínez-Solano, F.J.; Muñoz-Velasco, P. The efficiency of setting parameters in a modified shuffled frog leaping algorithm applied to optimizing water distribution networks. Water
**2016**, 8, 182. [Google Scholar] [CrossRef] - Wang, Y.; Hua, Z.; Wang, L.; Wang, Y.; Hua, Z.; Wang, L. Parameter Estimation of Water Quality Models Using an Improved Multi-Objective Particle Swarm Optimization. Water
**2018**, 10, 32. [Google Scholar] [CrossRef] - Letting, L.; Hamam, Y.; Abu-Mahfouz, A.; Letting, L.K.; Hamam, Y.; Abu-Mahfouz, A.M. Estimation of Water Demand in Water Distribution Systems Using Particle Swarm Optimization. Water
**2017**, 9, 593. [Google Scholar] [CrossRef] - Ngamalieu-Nengoue, U.A.; Martínez-Solano, F.J.; Iglesias-Rey, P.L.; Mora-Meliá, D.; Ngamalieu-Nengoue, U.A.; Martínez-Solano, F.J.; Iglesias-Rey, P.L.; Mora-Meliá, D. Multi-Objective Optimization for Urban Drainage or Sewer Networks Rehabilitation through Pipes Substitution and Storage Tanks Installation. Water
**2019**, 11, 935. [Google Scholar] [CrossRef] - Liu, Y.; Yang, T.; Zhao, R.-H.; Li, Y.-B.; Zhao, W.-J.; Ma, X.-Y.; Liu, Y.; Yang, T.; Zhao, R.-H.; Li, Y.-B.; et al. Irrigation Canal System Delivery Scheduling Based on a Particle Swarm Optimization Algorithm. Water
**2018**, 10, 1281. [Google Scholar] [CrossRef] - Raju, K.S.; Kumar, D.N. Irrigation Planning using Genetic Algorithms. Water Resour. Manag.
**2004**, 18, 163–176. [Google Scholar] [CrossRef][Green Version] - Rossman, L.A. EPANET 2.0 User’s Manual; EPA/600/R-00/057; Water Supply and Water Resources Division, National Risk Management Research Laboratory: Cincinnatti, OH, USA, 2000. [Google Scholar]
- Pasha, M.; Fayzul, K.; Lansey, K. Strategies to develop warm solutions for real-time pump scheduling for water distribution systems. Water Resour. Manag.
**2014**, 28, 3975–3987. [Google Scholar] [CrossRef] - Van Zyl, J.E.; Savic, D.A.; Walters, G.A. Operational Optimization of Water Distribution Systems Using a Hybrid Genetic Algorithm. J. Water Resour. Plan. Manag.
**2004**, 130, 160–170. [Google Scholar] [CrossRef] - Zitzler, E.; Thiele, L. Multiobjective evolutionary algorithms: A comparative case study and the strength Pareto approach. IEEE Trans. Evol. Comput.
**1999**, 3, 257–271. [Google Scholar] [CrossRef] - Barán, B.; von Lücken, C.; Sotelo, A. Multi-objective pump scheduling optimisation using evolutionary strategies. Adv. Eng. Softw.
**2005**, 36, 39–47. [Google Scholar] [CrossRef] - Mala-Jetmarova, H.; Barton, A.; Bagirov, A. Impact of Water-Quality Conditions in Source Reservoirs on the Optimal Operation of a Regional Multiquality Water-Distribution System. J. Water Resour. Plan. Manag.
**2015**, 141, 04015013. [Google Scholar] [CrossRef] - Stokes, C.S.; Simpson, A.R.; Maier, H.R. A computational software tool for the minimization of costs and greenhouse gas emissions associated with water distribution systems. Environ. Model. Softw.
**2015**, 69, 452–467. [Google Scholar] [CrossRef] - Morley, M.S.; Atkinson, R.M.; Savi, D.A.; Walters, G.A. GAnet: Genetic algorithm platform for pipe network optimisation. Adv. Eng. Softw.
**2001**, 32, 467–475. [Google Scholar] [CrossRef] - Van Thienen, P.; Vertommen, I. Gondwana: A generic optimization tool for drinking water distribution systems design and operation. Procedia Eng.
**2015**, 119, 1212–1220. [Google Scholar] [CrossRef] - Mala-Jetmarova, H.; Sultanova, N.; Savic, D. Lost in optimisation of water distribution systems? A literature review of system operation. Environ. Model. Softw.
**2017**, 93, 209–254. [Google Scholar] [CrossRef][Green Version] - Durillo, J.J.; Nebro, A.J. jMetal: A Java framework for multi-objective optimization. Adv. Eng. Softw.
**2011**, 42, 760–771. [Google Scholar] [CrossRef] - Nebro, A.J.; Durillo, J.J.; Vergne, M. Redesigning the jMetal Multi-Objective Optimization Framework. In Proceedings of the Companion Publication of the 2015 Annual Conference on Genetic and Evolutionary Computation, Madrid, Spain, 11–15 July 2015; pp. 1093–1100. [Google Scholar]
- Deb, K. Multi-objective Optimization. In Search Methodologies. Introductory Tutorials in Optimization and Decision Support Techniques; Burke, E.K., Kendall, G., Eds.; Springer Science & Business Media: New York, NY, USA, 2014; pp. 403–449. ISBN 978-1-4614-6939-1. [Google Scholar]
- Ravber, M.; Mernik, M.; Črepinšek, M. The impact of Quality Indicators on the rating of Multi-objective Evolutionary Algorithms. Appl. Soft Comput. J.
**2017**, 55, 265–275. [Google Scholar] [CrossRef] - Elarbi, M.; Bechikh, S.; Said, L.B.; Datta, R. Multi-objective optimization: Classical and evolutionary approaches. In Recent Advances in Evolutionary Multi-objective Optimization; Springer: Cham, Switzerland, 2017; pp. 1–30. [Google Scholar]
- Bechikh, S.; Elarbi, M.; Said, L.B. Many-objective optimization using evolutionary algorithms: A survey. In Recent Advances in Evolutionary Multi-objective Optimization; Springer: Cham, Switzerland, 2017; pp. 105–137. [Google Scholar]
- Zitzler, E.; Knowles, J.; Thiele, L. Quality Assessment of Pareto Set Approximations. In Mutiobjective Optimization; LNCS; Branke, J., Deb, K., Miettinen, K., Słowiński, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5252, pp. 373–404. [Google Scholar]
- Zhou, A.; Qu, B.-Y.; Li, H.; Zhao, S.-Z.; Suganthan, P.N.; Zhang, Q. Multiobjective evolutionary algorithms: A survey of the state of the art. Swarm Evol. Comput.
**2011**, 1, 32–49. [Google Scholar] [CrossRef] - López-Ibáñez, M.; Knowles, J.; Laumanns, M. On sequential online archiving of objective vectors. In Proceedings of the Evolutionary Multi-Criterion Optimization (EMO 2011), Ouro Preto, Brazil, 5–8 April 2011; Volume 6576, pp. 46–60. [Google Scholar]
- Wang, S.; Ali, S.; Yue, T.; Li, Y.; Liaaen, M. A Practical Guide to Select Quality Indicators for Assessing Pareto-Based Search Algorithms in Search- Based Software Engineering. In Proceedings of the IEEE/ACM 38th IEEE International Conference on Software Engineering (ICSE ’16), Austin, TX, USA, 14–22 May 2016; pp. 631–642. [Google Scholar]
- Knowles, J.; Thiele, L.; Zitzler, E. A tutorial on the performance assessment of stochastic multiobjective optimizers. Tech. Rep.
**2006**, 214. [Google Scholar] - Yu, X.; Gen, M. Multiobjective Optimization. In Introduction to Evolutionary Algorithms; Roy, R., Ed.; Decision Engineering; Springer-Verlag: London, UK, 2010; pp. 193–262. ISBN 9781849961288. [Google Scholar][Green Version]
- Bader, J.; Zitzler, E. HypE: An algorithm for fast hypervolume-based many-objective optimization. Evol. Comput.
**2011**, 19, 45–76. [Google Scholar] [CrossRef] [PubMed] - While, L.; Bradstreet, L.; Barone, L. A fast way of calculating exact hypervolumes. IEEE Trans. Evol. Comput.
**2012**, 16, 86–95. [Google Scholar] [CrossRef] - Derrac, J.; García, S.; Molina, D.; Herrera, F. A practical tutorial on the use of nonparametric statistical tests as a methodology for comparing evolutionary and swarm intelligence algorithms. Swarm Evol. Comput.
**2011**, 1, 3–18. [Google Scholar] [CrossRef] - Fooladivanda, D.; Taylor, J.A. Energy-optimal pump scheduling and water flow. IEEE Trans. Control Netw. Syst.
**2018**, 5, 1016–1026. [Google Scholar] [CrossRef] - Walski, T.M.; Brill, E.D.; Gessler, J.; Goulter, I.C.; Jeppson, R.M.; Lansey, K.; Lee, H.; Liebman, J.C.; Mays, L.; Morgan, D.R.; et al. Battle of the Network Models: Epilogue. J. Water Resour. Plan. Manag.
**1987**, 113, 191–203. [Google Scholar] [CrossRef] - Zitzler, E.; Deb, K.; Thiele, L. Comparison of Multiobjective Evolutionary Algorithms: Empirical Results. Evol. Comput.
**2000**, 8, 173–195. [Google Scholar] [CrossRef][Green Version] - Wolpert, D.H.; Macready, W.G. No free lunch theorems for optimization. IEEE Trans. Evol. Comput.
**1997**, 1, 67–82. [Google Scholar] [CrossRef][Green Version] - Deb, K. Introduction to evolutionary multiobjective optimization. In Multiobjective Optimization; Springer: Berlin/Heidelberg, Germany, 2008; pp. 59–96. [Google Scholar]
- Zitzler, E.; Laumanns, M.; Thiele, L. SPEA2: Improving the Strength Pareto Evolutionary Algorithm; TIK-Report; ETH Zurich: Zurich, Switzerland, 2001. [Google Scholar]

**Figure 1.**Workflow of a jHawanet project for a multi-objective optimization of a drinking water network.

**Figure 5.**Approximations to the Pareto front obtained by the NSGA-II, SPEA2, and SMPSO algorithms for the (

**left**) Anytown, (

**center**) Baghmalek, and (

**right**) Van Zyl network case studies.

**Figure 6.**Quality indicators boxplots for the (

**left**) Anywotn, (

**center**) Baghmalek, and (

**right**) Van Zyl network case studies.

Quality Indicator | Category | Monotony | Complexity | Requirements |
---|---|---|---|---|

Spread (${I}_{SP}$) | Distribution | Not strict | Quadratic | - |

Epsilon (${I}_{\epsilon}^{+}$) | Convergence | Not strict | Quadratic | Pareto front |

Hypervolume (${I}_{HV}$) | Convergence & Distribution | Strictly monotonous | Exponential to m | Worst point |

NSGA-II | SPEA2 | SMPSO | |
---|---|---|---|

Population size | 100 | 100 | 100 |

Archive size | - | 100 | 100 |

Integer SBX crossover | Distribution index ${n}_{c}=20$, Crossover rate ${p}_{c}=0.9$ | - | |

Integer polynomial mutation | Distribution index of ${n}_{m}=20$ Mutation rate ${p}_{m}\text{}=\text{}1/{D}^{*}$ | ||

Selection strategy | Binary tournament | ||

*$D$ is the number of decision variables (solution dimensionality). |

**Table 3.**Average ranking of the algorithms considering the I

_{SP}metric. Friedman statistic considering reduction performance (distributed according to ${\chi}^{2}$ with 2 degrees of freedom: 6.0, p-value < 0.05).

Algorithm | Ranking |
---|---|

SMPSO | 1.0 |

NSGA-II | 2.0 |

SPEA2 | 3.0 |

**Table 4.**Average ranking of the algorithms considering the ${I}_{\epsilon}^{+}$ metric. Friedman statistic considering reduction performance (distributed according to ${\chi}^{2}$ with 2 degrees of freedom: 4.6666, p-value < 0.1).

Algorithm | Ranking |
---|---|

SPEA2 | 1.0 |

NSGA-II | 2.33 |

SMPSO | 2.66 |

**Table 5.**Average ranking of the algorithms considering the I

_{HV}metric. Friedman statistic considering increasing performance (distributed according to ${\chi}^{2}$ with 2 degrees of freedom: 6.0, p-value < 0.05).

Algorithm | Ranking |
---|---|

SPEA2 | 3.0 |

NSGA-II | 2.0 |

SMPSO | 1.0 |

**Table 6.**SPEA2 pairwise comparisons—Wilcoxon test summary for the Van Zyl, Baghmalek, and Anytown networks.

I_{SP} | ${\mathit{I}}_{\mathit{\epsilon}}^{+}$ | I_{HV} | Total | |
---|---|---|---|---|

+ | 0 | 6 | 5 | 11 |

- | 4 | 0 | 1 | 5 |

= | 2 | 0 | 0 | 2 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Gutiérrez-Bahamondes, J.H.; Salgueiro, Y.; Silva-Rubio, S.A.; Alsina, M.A.; Mora-Meliá, D.; Fuertes-Miquel, V.S. jHawanet: An Open-Source Project for the Implementation and Assessment of Multi-Objective Evolutionary Algorithms on Water Distribution Networks. *Water* **2019**, *11*, 2018.
https://doi.org/10.3390/w11102018

**AMA Style**

Gutiérrez-Bahamondes JH, Salgueiro Y, Silva-Rubio SA, Alsina MA, Mora-Meliá D, Fuertes-Miquel VS. jHawanet: An Open-Source Project for the Implementation and Assessment of Multi-Objective Evolutionary Algorithms on Water Distribution Networks. *Water*. 2019; 11(10):2018.
https://doi.org/10.3390/w11102018

**Chicago/Turabian Style**

Gutiérrez-Bahamondes, Jimmy H., Yamisleydi Salgueiro, Sergio A. Silva-Rubio, Marco A. Alsina, Daniel Mora-Meliá, and Vicente S. Fuertes-Miquel. 2019. "jHawanet: An Open-Source Project for the Implementation and Assessment of Multi-Objective Evolutionary Algorithms on Water Distribution Networks" *Water* 11, no. 10: 2018.
https://doi.org/10.3390/w11102018