원시데이터 수집 시스템
선정목록으로

Optimal design-for-control of self-cleaning water distribution networks using a convex multi-start algorithm

관련 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)

기본 정보

저자
  1. Bradley Jenks — Department of Civil and Environmental Engineering, Imperial College London, London SW7 2BB, United Kingdom
  2. Filippo Pecci — Department of Civil and Environmental Engineering, Imperial College London, London SW7 2BB, United Kingdom
  3. Ivan Stoianov — Department of Civil and Environmental Engineering, Imperial College London, London SW7 2BB, United Kingdom
DOI
10.1016/j.watres.2023.119602
저널
Water Research
발행년도
2023
발행기관
Elsevier BV
피인용수
8
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.watres.2023.119602
토픽
Membrane Separation Technologies
OpenAlex ID
W4317376901

평가 내용

관련도
관련
사업분야
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

The provision of self-cleaning velocities has been shown to reduce the risk of discolouration in water distribution networks (WDNs). Despite these findings, control implementations continue to be focused primarily on pressure and leakage management. This paper considers the control of diurnal flow velocities to maximize the self-cleaning capacity (SCC) of WDNs. We formulate a new optimal design-for-control problem where locations and operational settings of pressure control and automatic flushing valves are jointly optimized. The problem formulation includes a nonconvex objective function, nonconvex hydraulic conservation law constraints, and binary variables for modelling valve placement, resulting in a nonconvex mixed integer nonlinear programming (MINLP) optimization problem. Considering the challenges with solving nonconvex MINLP problems, we propose a heuristic algorithm which combines convex relaxations (with domain reduction), a randomization technique, and a multi-start strategy to compute feasible solutions. We evaluate the proposed algorithm on case study networks with varying size and degrees of complexity, including a large-scale operational network in the UK. The convex multi-start algorithm is shown to be a more robust solution method compared to an off-the-shelf genetic algorithm, finding good-quality feasible solutions to all design-for-control numerical experiments. Moreover, we demonstrate the implemented multi-start strategy to be a fast and scalable method for computing feasible solutions to the nonlinear SCC control problem. The proposed method extends the control capabilities and benefits of dynamically adaptive networks to improve water quality in WDNs.

본문 121,149자

본문 펼치기
## Optimal design-for-control of self-cleaning water distribution networks using a convex multi-start algorithm Bradley Jenks <sup>a</sup>, Filippo Pecci <sup>a</sup>, Ivan Stoianov <sup>a</sup> _aDepartment of Civil and Environmental Engineering, Imperial College London, London SW7 2BB, United Kingdom_ Abstract The provision of self-cleaning velocities has been shown to reduce the risk of discolouration in water distribution networks (WDNs). Despite these findings, control implementations continue to be focused primarily on pressure and leakage management. This paper considers the control of diurnal flow velocities to maximize the self-cleaning capacity (SCC) of WDNs. We formulate a new optimal design-for-control problem where locations and operational settings of pressure control and automatic flushing valves are jointly optimized. The problem formulation includes a nonconvex objective function, nonconvex hydraulic conservation law constraints, and binary variables for modelling valve placement, resulting in a nonconvex mixed integer nonlinear programming (MINLP) optimization problem. Considering the challenges with solving nonconvex MINLP problems, we propose a heuristic algorithm which combines convex relaxations (with domain reduction), a randomization technique, and a multi-start strategy to compute feasible solutions. We evaluate the proposed algorithm on case study networks with varying size and degrees of complexity, including a large-scale operational network in the UK. The convex multi-start algorithm is shown to be a more robust solution method compared to an off-the-shelf genetic algorithm, finding good-quality feasible solutions to all design-for-control numerical experiments. Moreover, we demonstrate the implemented multi-start strategy to be a fast and scalable method for computing feasible solutions to the nonlinear SCC control problem. The proposed method extends the control capabilities and benefits of dynamically adaptive networks to improve water quality in WDNs. _Keywords:_ water quality, discolouration, self-cleaning capacity, design-for-control, mixed integer nonlinear programming, convex optimization 1. Introduction The management of water quality in water distribution networks (WDNs) presents a complex operational challenge. As a direct consequence of ageing and deteriorating infrastructure, the mitigation of discolouration incidents is becoming one of the key operational challenges within water quality management programmes. In addition to discolouration being the largest source of customer complaints (Vreeburg and Boxall, 2007, Husband and Boxall, 2011, Armand et al., 2017), there is a growing body of evidence suggesting its occurrence harbours increased microbial activity (Liu et al., 2013, 2014, van der Wielen and Lut, 2016). These conditions can accelerate biofilm growth and drastically reduce the efficacy of disinfectant residuals in protecting against waterborne illness and contaminants intrusion. Moreover, WDNs in the UK are highly sectorized and operated with fixed topology for purposes of leakage management. This type of network configuration, referred to as district metered areas (DMAs), has been demonstrated to exacerbate water quality deterioration and increase the risk of discolouration incidents (Machell and Boxall, 2014, Armand et al., 2018). With progressively stringent water quality regulations, water companies are seeking effective and cost-efficient operational control strategies to reduce the risk of discolouration. Discolouration is primarily a consequence of resuspended material accumulated within WDNs (Vreeburg and Boxall, 2007). It can materialize from the cumulative impact of the following processes (Boxall and Dewis, 2005): (i) the ingress and/or development of particulate matter; (ii) the accumulation of particulates at the pipe invert and/or formation of cohesive layers at the pipe wall; and (iii) a hydraulic disturbance (i.e. trigger event), which mobilizes loose particulates and generates sufficient shear stress to overcome cohesive forces at the pipe wall. Such hydraulic disturbances can be generated from different phenomena, including pressure transients during unsteady hydraulic conditions (Aisopou et al., 2012). Apart from their origin, the physical pathways of discolouration are intrinsically connected to network hydraulics. In a recent study focusing on the impact of network sectorization on water quality, Armand et al. (2018) proposed a set of surrogate hydraulic variables for discolouration risk assessment. Central to their findings was the role of diurnal flow velocities on particle transport and fate. This connection between discolouration and hydrodynamic conditions has been supported by numerous experimental and theoretical studies; see van Summeren and Blokker (2017) and Armand et al. (2018) for reviews on the topic. These studies have mainly focused on the development of predictive tools for modelling particle transport and accumulation processes. Most notably, Boxall et al. (2001) developed the Prediction of Discolouration in Distribution Systems (PODDS) model, an empirically-based numerical tool which aims to characterize cohesive layer strength at the pipe wall. The PODDS model was later updated to account for material regeneration in Furnass et al. (2014), where both erosion and regeneration processes require calibration using continuous flow and turbidity data. Because such tools require extensive field testing and are generally limited to pipe-level assessments, their use in practice has not yet been widespread. Recognizing this limitation, van Summeren and Blokker (2017) presented a theoretical particle transport model, combining the effects of gravitational settling, hydraulic shear stresses, and bed-load transport. To complement this, several laboratory-based experimental studies have emerged to better understand the complex interactions between particle properties and pipe hydraulics (e.g. Sharpe et al., 2019; Braga et al., 2020). In addition to predictive modelling, research has also focused on reducing the severity and frequency of discolouration incidents through network design, maintenance, and control. Water companies in the Netherlands have been conducting experimental research on the design and implementation of controls for self-cleaning networks. The self-cleaning capacity (SCC) of a WDN is defined as the ability for pipes to experience peak daily flow velocities above a threshold required to routinely re-suspend particles and thus prevent accumulation (Vreeburg et al., 2009). Previous experimental programmes have suggested resuspension velocities on the order of 0.2 m _/_ s to 0.25 m _/_ s in distribution pipes (Ryan et al., 2008, Blokker et al., 2010). This has been corroborated with a recent field study monitoring turbidity under various flow rates, where an increase in turbidity levels were observed at flow velocities greater than 0.2 m _/_ s (Prest et al., 2021). Water companies in the Netherlands have demonstrated successful self-cleaning implementations by redesigning looped, oversized networks to branched layouts with smaller diameter pipes (Vreeburg et al., 2009). A recent study has also investigated the trade-off between self-cleaning velocities and fire flow capacity in North American WDNs (Gibson et al., 2019). However, since the redesign of WDN infrastructure becomes cost-prohibitive at scale, there have been recent forays in the reconfiguration of existing network topology to promote self-cleaning networks (Blokker et al., 2012, Abraham et al., 2016, 2018). Combining UK and Dutch experience, Abraham et al. (2016, 2018) formulated an optimization problem for increasing SCC by redistributing flow through changes in network topology. More specifically, the optimization problem aimed to maximize the number of pipes with flow velocities above a self-cleaning threshold through two separate strategies: (i) optimal closure of isolation valves and (ii) optimal operational 2 settings of existing pressure control valves (Abraham et al., 2016, 2018). Abraham et al. (2018) solved the problem of optimizing valve closures using a linear graph analysis tool. Following Schaub et al. (2014), a line-outage distribution factor (LODF) matrix was computed to estimate the flow redistribution resulting from an outage (closure) of an (or multiple) edge-to-edge relation(s). For the optimal control problem, Abraham et al. (2016) computed a local solution by approximating the nonsmooth objective function as a continuous nonlinear function, followed by application of a tailored sequential convex programming algorithm. While the benefits of the LODF solution method for optimal valve closures were demonstrated numerically using an operational network in the Netherlands, results from the control problem were limited to a small-scale theoretical network. Moreover, decision variables were restricted to the control of existing unidirectional pressure reducing valves (PRVs). Building on the SCC optimization problem posed in Abraham et al. (2016, 2018), this manuscript considers both control and design-for-control problem formulations. The latter involves the simultaneous optimization of valve placement and operational settings for both existing and new control valves. In addition to unidirectional PRVs, this work also considers bidirectional dynamic boundary valves (DBVs) and automatic flushing valves (AFVs) as dynamic hydraulic controls. These hydraulic controls were developed to facilitate the novel operational framework of dynamically adaptive networks (Wright et al., 2014, Ulusoy et al., 2022). The resulting optimization problem is formulated as a nonconvex mixed integer nonlinear program (MINLP). Both mathematical optimization and heuristic methods have been used to solve design and control problems in WDNs (see literature review in Mala-Jetmarova et al., 2017). For mathematical optimization methods, scalability is recognized as a current limitation in solving MINLP problems to global optimality (Koch et al., 2012, Sahinidis, 2019); that is, the implementation of global solvers become impractical for large problem cases. Consequently, heuristic approaches are often employed to compute satisfactory feasible solutions. A common heuristic method used for WDN optimization problems is the genetic algorithm (GA). While GAs have been successfully applied to design problems, the computational effort required to find solutions sufficiently close to the global optimum grows rapidly with problem size (Maier et al., 2014). In this manuscript, we develop a heuristic algorithm based on convex optimization and a multi-start scheme to compute feasible solutions to the considered MINLP problem. To handle integer variables, we first formulate a convex subproblem through polyhedral relaxations of nonconvex terms and the continuous relaxation of binary variables. We subsequently employ a randomization heuristic to sample _N_ candidate valve configurations from the set of fractional values generated from the convex subproblem. We then fix binary variables for each sampled valve configuration and compute (locally) optimal operational settings from a nonlinear programming (NLP) control problem. This follows the heuristic algorithm presented in Pecci et al. (2022), extending its application to the SCC design-for-control problem and to the nonsmooth Hazen-Williams friction model. Since the degree of nonlinearity of the SCC problem is higher than the problem investigated in Pecci et al. (2022), we include a multi-start strategy and a feasibility restoration problem for selecting starting points. This step aims to minimize the risk of poor local optima as well as ensure hydraulic feasibility of the NLP control problem. Finally, the best feasible solution is selected from the set of sampled valve configurations. The proposed heuristic algorithm further increases the benefits from the implementation of dynamically adaptive networks as it expands their control capabilities to enhance water quality in WDNs. This manuscript is organized as follows. In Section 2, we formulate the design-for-control problem of maximizing the network SCC through dynamic hydraulic controls. We then present the proposed heuristic algorithm in Section 3. Finally, in Section 4, we demonstrate the performance of the developed heuristic algorithm using three case study networks with varying size and degrees of complexity. To facilitate a broader discussion on heuristic approaches for the design and control of WDNs, we compare the results with an off-the-shelf GA implementation, which is a common approach used in the literature. 3 2. Problem formulation We investigate a design-for-control problem to maximize the length of network pipes experiencing flow velocities above a given self-cleaning capacity (SCC) threshold. This is achieved by installing new valves and/or controlling their operational settings. For this purpose, our problem formulation considers three valve types as pressure and connectivity control actuators. First, pressure reducing valves (PRVs), which are modelled having unidirectional flow. Second, bidirectional dynamic boundary valves (DBVs), for which flow is permitted in both directions across discrete model time steps. Here, DBVs represent the operation of remote-controlled isolation valves, which modulate flow and pressure between adjacent zones. Third, automatic flushing valves (AFVs), whose flushing rate is bounded by a set maximum value. Throughout this manuscript, we refer to either PRVs or DBVs as _control_ _valves_, as both have the capability of controlling pressure and are modelled at network links. On the other hand, AFVs are simply referred to as _flushing_ _valves_ and are modelled at network nodes. We consider operational scenarios, for which PRV locations have been fixed to minimize average zone pressure (AZP), and thus decision variables include only their operational settings. In comparison, both locations and operational settings of DBVs and AFVs are considered as decision variables. The operational settings of valves are modelled as continuous variables, whereas their placement (location) are modelled through binary variables. All network links and nodes are considered as potential locations of DBVs and AFVs, respectively. As the current stage of this work focuses on the selfcleaning capacity of pipes at the DMA or distribution level, we do not consider storage tanks or pumping activity as forms of hydraulic control. Therefore, we assume discrete and hydraulically independent model time steps. Finally, it is noted that this work relies on the availability of a calibrated hydraulic model. _2.1._ _Hydraulic variables and constraints_ The problem considers a water distribution network (WDN) with _np_ links, _nn_ demand nodes and _n_ 0 known head nodes (e.g. water sources, reservoirs). The network is modelled as a directed graph with _np_ edges (links) and _nn_ + _n_ 0 vertices (nodes). A demand-driven hydraulic analysis is used to simulate steady-state network hydraulics over _nt_ discrete time steps. For each time step _t_ _∈{_ 1 _, . . ., nt}_, known hydraulic conditions are given by vectors of nodal demands _dt_ _∈_ R <sup>_nn_</sup> and source hydraulic heads _h_ <sup>0</sup> _t_ <sup>_∈_</sup> <sup>R</sup> <sup>_n_</sup> <sup>0.</sup> Moreover, vectors _ηt_ _∈_ R <sup>_np_</sup> and _αt_ _∈_ R <sup>_nn_</sup> are included to model local losses introduced by the action of control valves and operational demands at flushing valves, respectively. Unique vectors of hydraulic states _qt_ _∈_ R <sup>_np_</sup> and _ht_ _∈_ R <sup>_nn_</sup> are computed by solving the following steady-state energy (1a) and mass (1b) conservation equations governing pipe flow: _A_ 12 _ht_ + _A_ 10 _h_ <sup>0</sup> _t_ <sup>+</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_qt_</sup> <sup>) +</sup> <sup>_ηt_</sup> <sup>= 0</sup> (1a) _A_ <sup>_T_</sup> 12 <sup>_qt_</sup> <sup>_−_</sup> <sup>_dt_</sup> <sup>_−_</sup> <sup>_αt_</sup> <sup>= 0</sup> <sup>_,_</sup> (1b) where _A_ 12 _∈_ R <sup>_np×nn_</sup> and _A_ 10 _∈_ R <sup>_np×n_</sup> <sup>0</sup> are the link-node incidence matrices for demand and known head nodes, respectively; and the vector _φ_ ( _qt_ ) = [ _φ_ 1( _q_ 1 _,t_ ) _. . . φnp_ ( _qnp,t_ )] <sup>_T_</sup> models frictional head losses associated with flows _qt_ . Omitting time index _t_, _φj_ ( _qj_ ) is defined in general form for flow conveyed across link _j_ as: _φj_ ( _qj_ ) = _rj|qj|_ <sup>_nj_</sup> <sup>_−_</sup> <sup>1</sup> _qj,_ _∀j_ _∈{_ 1 _, . . ., np},_ (2) where the resistance coefficient _rj_ and exponent _nj_, both independent of time _t_, take different values depending on the link type (e.g. pipe or valve) and on the frictional head loss model. For valve links, _nj_ = 2 and _rj_ = _gπ_ <u>8</u> _<u>K</u>_ <sup>2</sup> _Dj_ <sup>4</sup> _j_ <sup>, with</sup> <sup>_Kj_</sup> <sup>and</sup> <sup>_Dj_</sup> <sup>representing the valve loss coefficient and diameter, respectively (Larock</sup> et al., 1999). In this work, we apply the Hazen-Williams (HW) model to characterize frictional head losses 4 across pipe links. The HW model is an explicit and empirical relationship between pipe flow and frictional head loss, with _nj_ = 1 _._ 852 and _rj_ is defined as follows for all _j_ _∈{_ 1 _, . . ., np}_ : <u>10</u> _<u>.</u>_ <u>67</u> _<u>Lj</u>_ _rj_ = _Cj_ <sup>1</sup> <sup>_._</sup> <sup>852</sup> _Dj_ <sup>4</sup> <sup>_._</sup> _j_ <sup>1</sup> <sup>_._</sup> <sup>852</sup> _Dj_ <sup>4</sup> <sup>_._</sup> <sup>871</sup> _,_ (3) _j_ where _C_ is the HW coefficient, a dimensionless number representing frictional characteristics; _L_ is pipe length in meters; and _D_ is pipe diameter in meters (Larock et al., 1999). Similarly, explicit approximations of the Darcy-Weisbach formula (e.g. Valiantzas, 2008) could be used to model frictional head losses. Finally, it is convenient to isolate the nonlinear term _φ_ ( _qt_ ) in (1a). Here, we introduce a vector of auxiliary variables _θt_ _∈_ R <sup>_np_</sup>, which separates the energy conservation constraint into its linear and nonlinear components, as follows: _A_ 12 _ht_ + _A_ 10 _h_ <sup>0</sup> _t_ <sup>+</sup> <sup>_θt_</sup> <sup>+</sup> <sup>_ηt_</sup> <sup>= 0</sup> (4a) _θt −_ _φ_ ( _qt_ ) = 0 _._ (4b) Valve placement and operation are modelled as follows. For each time step _t ∈{_ 1 _, . . ., nt}_, the continuous variable _ηt_ _∈_ R <sup>_np_</sup> presented in (1a) models the local losses introduced by the action of control valves and the continuous variable _αt_ _∈_ R <sup>_nn_</sup> presented in (1b) models the flow emitted at flushing valves. Moreover, binary variables _z_ _∈{_ 0 _,_ 1 _}_ <sup>_np_</sup> are included to model PRV and DBV placement, and _vt_ <sup>+</sup> _∈{_ 0 _,_ 1 _}_ <sup>_np_</sup> over, binary variables _z_ _∈{_ 0 _,_ 1 _}_ <sup>_np_</sup> are included to model PRV and DBV placement, and _vt_ <sup>+</sup> _∈{_ 0 _,_ 1 _}_ <sup>_np_</sup> and _vt_ <sup>_−_</sup> <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}np_</sup> <sup>to assign their control capabilities in the positive or negative flow direction, respectively,</sup> and _vt_ <sup>_−_</sup> <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}np_</sup> <sup>to assign their control capabilities in the positive or negative flow direction, respectively,</sup> across each time step _t_ . Thus, for all links _j_ _∈{_ 1 _, . . ., np}_ and time steps _t ∈{_ 1 _, . . ., nt}_, binary variables _zj_, _vj,t_ <sup>+</sup> <sup>, and</sup> <sup>_v_</sup> _j,t_ <sup>_−_</sup> <sup>are set as</sup> _j,t_ <sup>+</sup> <sup>, and</sup> <sup>_v_</sup> _j,t_ <sup>_−_</sup> _j,t_ <sup>_−_</sup> <sup>are set as</sup> _zj_ = _vj,t_ <sup>+</sup> <sup>=</sup> _vj,t_ <sup>_−_</sup> <sup>=</sup> �1 control valve on link _j_ 0 no valve �1 control valve on link _j_ in positive direction 0 no valve �1 control valve on link _j_ in negative direction 0 no valve (5) Analogously, the placement of AFVs at network nodes is modelled using binary variables _y_ _∈{_ 0 _,_ 1 _}_ <sup>_nn_</sup>, defined as _yi_ = �1 flushing valve placed at node _i_ (6) 0 no valve These binary variables are subject to the following physical and economical constraints, which limit pressure control capabilities in a single direction at each time step _t_ (7a) and enforce a maximum number of control valves _nv_ and flushing valves _nf_ considered for installation (7b)-(7c): _j,t_ <sup>+</sup> <sup>+</sup> <sup>_v_</sup> _j,t_ <sup>_−_</sup> _vj,t_ <sup>+</sup> _j,t_ <sup>_−_</sup> <sup>_≤_</sup> <sup>_zj,_</sup> _∀j_ _∈{_ 1 _, . . ., np},_ _∀t ∈{_ 1 _, . . ., nt}_ (7a) _np_ _zj_ = _nv_ (7b) _j_ =1 _nn_ _yi_ = _nf_ _._ (7c) _i_ =1 5 _j,t_ <sup>+</sup> <sup>,</sup> <sup>and</sup> <sup>_v_</sup> _j,t_ <sup>_−_</sup> Since we assume that existing PRVs have fixed location and unidirectional flow, _zj_, _vj,t_ <sup>+</sup> Since we assume that existing PRVs have fixed location and unidirectional flow, _zj_, _vj,t_ <sup>+</sup> <sup>,</sup> <sup>and</sup> <sup>_v_</sup> _j,t_ <sup>_−_</sup> <sup>are set</sup> <sup>_a_</sup> _priori_ for all time steps _t ∈{_ 1 _, . . ., nt}_ at the known set of PRV links _N_ PRV _⊆{_ 1 _, . . ., np}_ . We introduce constant vectors to bound the continuous hydraulic variables and formulate big-M constraints for modelling the operation of control and flushing valves. For a given vector of maximum allowed velocities _u_ <sup>max</sup> _∈_ R <sup>_np_</sup> and vector of link cross-sectional areas _A_ _∈_ R <sup>_np_</sup>, let _qt_ <sup>_L_</sup> <sup>=</sup> <sup>_−Au_</sup> <sup>max</sup> <sup>and</sup> lowed velocities _u_ <sup>max</sup> _∈_ R <sup>_np_</sup> and vector of link cross-sectional areas _A_ _∈_ R <sup>_np_</sup>, let _qt_ <sup>_L_</sup> <sup>=</sup> <sup>_−Au_</sup> <sup>max</sup> <sup>and</sup> _qt_ <sup>_U_</sup> <sup>=</sup> <sup>_Au_</sup> <sup>max be the vectors of lower and upper bound flows across network links at time step</sup> <sup>_t_</sup> <sup>, respectively.</sup> _qt_ <sup>_U_</sup> <sup>=</sup> <sup>_Au_</sup> <sup>max be the vectors of lower and upper bound flows across network links at time step</sup> <sup>_t_</sup> <sup>, respectively.</sup> Bounds on the auxiliary head loss vector _θt_ are set as _θt_ <sup>_L_</sup> <sup>:=</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_q_</sup> _t_ <sup>_L_</sup> <sup>) and</sup> <sup>_θ_</sup> _t_ <sup>_U_</sup> <sup>:=</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> <sup>).</sup> <sup>Moreover, let</sup> <sup>_h_</sup> _t_ <sup>min</sup> _t_ <sup>_L_</sup> <sup>) and</sup> <sup>_θ_</sup> _t_ <sup>_U_</sup> _t_ <sup>_U_</sup> <sup>).</sup> <sup>Moreover, let</sup> <sup>_h_</sup> _t_ <sup>min</sup> _t_ <sup>_L_</sup> <sup>:=</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_q_</sup> _t_ <sup>_L_</sup> _t_ <sup>_U_</sup> <sup>:=</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> _t_ <sup>:=</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_q_</sup> _t_ <sup>_L_</sup> <sup>) and</sup> <sup>_θ_</sup> _t_ <sup>_U_</sup> <sup>:=</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> <sup>).</sup> <sup>Moreover, let</sup> <sup>_h_</sup> _t_ and _h_ <sup>max</sup> _t_ _∈_ R <sup>_nn_</sup> specify minimum and maximum heads at network nodes, respectively. The minimum head and _h_ <sup>max</sup> _t_ _∈_ R <sup>_nn_</sup> specify minimum and maximum heads at network nodes, respectively. The minimum head is set to a minimum regulatory pressure plus the node elevation and the maximum head is set to the largest available known source head. Bounds on _ηt_ for _j_ _∈{_ 1 _, . . ., np}_ are then defined as follows: ( _ηt_ <sup>_L_</sup> _ηt_ <sup>_L_</sup> <sup>)</sup> <sup>_j_</sup> <sup>:= (</sup> <sup>_h_</sup> _t_ <sup>min</sup> _ηt_ <sup>_U_</sup> <sup>)</sup> <sup>_j_</sup> <sup>:= (</sup> <sup>_h_</sup> _t_ <sup>max</sup> <sup>max</sup> _t_ ) _k,_ _∀i_ ( _ηt_ <sup>_U_</sup> _t_ <sup>min</sup> ) _i −_ ( _h_ <sup>max</sup> _t_ _t_ <sup>max</sup> ) _i −_ ( _h_ <sup>min</sup> _t_ <sup>min</sup> _t_ ) _k,_ _∀i_ _−→j_ _k_ (8a) _−→j_ _k_ (8b) We formulate big-M constraints to model valve placement and enforce energy conservation at control valve links, ensuring _ηt_ and _qt_ act in the same direction. These constraints are written as follows: _t_ <sup>_U_</sup> <sup>)</sup> <sup>_v_</sup> _t_ <sup>+</sup> _ηt −_ diag( _ηt_ <sup>_U_</sup> _t_ <sup>+</sup> <sup>_≤_</sup> <sup>0</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (9a) _t_ <sup>_L_</sup> <sup>)</sup> <sup>_v_</sup> _t_ <sup>_−_</sup> _t_ <sup>_L_</sup> <sup>)</sup> <sup>_v_</sup> _t_ <sup>+</sup> _t_ <sup>_L,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (9c) _−_ _ηt_ + diag( _ηt_ <sup>_L_</sup> _−_ _qt −_ diag( _qt_ <sup>_L_</sup> _t_ <sup>+</sup> <sup>_≤−q_</sup> _t_ <sup>_L,_</sup> _t_ <sup>_−_</sup> <sup>_≤_</sup> <sup>0</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (9b) _t_ <sup>_U_</sup> <sup>)</sup> <sup>_v_</sup> _t_ <sup>_−_</sup> _qt_ + diag( _qt_ <sup>_U_</sup> _t_ <sup>_−_</sup> <sup>_≤_</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> _t_ <sup>_U_</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (9d) _t_ <sup>_L_</sup> <sup>)</sup> <sup>_v_</sup> _t_ <sup>+</sup> _−_ _θt −_ diag( _θt_ <sup>_L_</sup> _t_ <sup>+</sup> <sup>_≤−θ_</sup> _t_ <sup>_L_</sup> _t_ <sup>_L,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (9e) _t_ <sup>_U_</sup> <sup>)</sup> <sup>_v_</sup> _t_ <sup>_−_</sup> _t_ <sup>_U_</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}._ (9f) _θt_ + diag( _θt_ <sup>_U_</sup> _t_ <sup>_−_</sup> <sup>_≤_</sup> <sup>_θ_</sup> _t_ <sup>_U_</sup> Additionally, let _αt_ <sup>_U_</sup> <sup>be a known upper bound on the flushing rate at AFVs.</sup> <sup>The following big-M constraint</sup> is then included to model flushing valve placement and enforce bounds on the continuous variable _αt_ : _αt −_ diag( _αt_ <sup>_U_</sup> <sup>)</sup> <sup>_y_</sup> <sup>_≤_</sup> <sup>0</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}._ (10) Finally, lower and upper bounds on hydraulic variables _ht_, _qt_, _ηt_ and _θt_ are set to define the feasible solution space, _t_ <sup>_L_</sup> <sup>_≤_</sup> <sup>_qt_</sup> <sup>_≤_</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> _qt_ <sup>_L_</sup> _t_ <sup>_U_</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (11a) <sup>min</sup> _t_ _≤_ _ht_ _≤_ _h_ <sup>max</sup> _t_ _h_ <sup>min</sup> _t_ <sup>max</sup> _t_ _,_ _∀t ∈{_ 1 _, . . ., nt}_ (11b) _ηt_ <sup>_L_</sup> _t_ <sup>_L_</sup> <sup>_≤_</sup> <sup>_ηt_</sup> <sup>_≤_</sup> <sup>_η_</sup> _t_ <sup>_U_</sup> <sup>_,_</sup> _t_ <sup>_U_</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (11c) 0 _≤_ _αt_ _≤_ _αt_ <sup>_U_</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}_ (11d) _θt_ <sup>_L_</sup> _t_ <sup>_L_</sup> <sup>_≤_</sup> <sup>_θt_</sup> <sup>_≤_</sup> <sup>_θ_</sup> _t_ <sup>_U_</sup> _t_ <sup>_U_</sup> <sup>_,_</sup> _∀t ∈{_ 1 _, . . ., nt}._ (11e) _2.2._ _Self-cleaning capacity objective function_ The objective of this study is to maximize the length of network pipes satisfying the self-cleaning capacity (SCC) threshold. The SCC objective function is defined as the following length-weighted sum over all pipes _np_ and hydraulic time steps _nt_ (Abraham et al., 2018): _,_ (12) _f_ SCC := <sup><u>1</u></sup> _nt_ _nt_ _np_ - _t_ =1 _j_ =1 6 _wjκj_ - _<u>qj,t</u>_ _Aj_ where _A_ is the link cross-sectional area; and _κj_ ( _·_ ) is an indicator function which models the state of pipe velocities with reference to a minimum threshold. The indicator function is described for link _j_ as follows _κj_ ( _u_ ) = 1 if _|u| > u_ <sup>min</sup> _j_ (13) 0 otherwise _,_ with _u_ <sup>min</sup> _j_ representing the threshold flow velocity at link _j_, defined _a_ _priori_ (see presented literature in Section 1). Moreover, a weighting is included to normalize the length of link _j_ to the entire network, _wj_ = <u>�</u> _~~n~~_ _<u>Lp</u>_ _<u>j</u>_ _k_ =1 <sup>_Lk_</sup> <sup>, where</sup> <sup>_L ∈_</sup> <sup>R</sup> <sup>_np_</sup> <sup>is the vector of pipe lengths.</sup> The SCC objective function _f_ SCC is nonsmooth at _±u_ <sup>min</sup>, resulting in unbounded gradients. Therefore, in order to employ gradient-based optimization methods, the threshold function _κ_ ( _·_ ) is approximated with a continuous sum of sigmoids (or logistic) function, as proposed in Abraham et al. (2016). The sigmoidal and _ψj_ <sup>_−_</sup> function has positive and negative components, defined by _ψj_ <sup>+</sup> _j_ function has positive and negative components, defined by _ψj_ <sup>+(</sup> <sup>_u_</sup> <sup>) :=</sup> 1 + _e_ <sup>_−ρ_</sup> <sup>(</sup> <sup>_u−u_</sup> <sup>min</sup> and _ψj_ <sup>_−_</sup> <sup>(</sup> <sup>_u_</sup> <sup>) :=</sup> - _j_ ) <sup>�</sup> <sup>_−_</sup> <sup>1</sup> 1 + _e_ <sup>_−ρ_</sup> <sup>(</sup> <sup>_−u−u_</sup> <sup>min</sup>, respectively, where _ρ_ is a parameter which sets the sigmoid function curvature. The following expression combines these sigmoid functions to approximate _f_ SCC posed in (12): _j_ <sup>+(</sup> <sup>_u_</sup> <sup>) :=</sup> - _j_ ) <sup>�</sup> <sup>_−_</sup> <sup>1</sup> 1 + _e_ <sup>_−ρ_</sup> <sup>(</sup> <sup>_u−u_</sup> <sup>min</sup> _np_ _j_ =1 - _<u>qj,t</u>_ _Aj_ + _ψj_ <sup>_−_</sup> + _ψj_ <sup>_−_</sup> - _<u>qj,t</u>_ _Aj_ �� _._ (14) _f_ SCC� <sup>:=</sup> <sup><u>1</u></sup> _nt_ _nt_ _t_ =1 _wj_ _ψj_ <sup>+</sup> where velocity is defined as _uj,t_ = - _<u>qAj,tj</u>_ �. In accordance with that reported in Abraham et al. (2016), we found _ρ ≤_ 100 provided a step-like objective function, whilst still being sufficiently smooth at the threshold boundaries for gradients to exist. An example of the SCC indicator function _κ_ ( _·_ ) and its continuous sum of sigmoids approximation _f_ SCC� <sup>are shown in Figure 1.</sup> where velocity is defined as _uj,t_ = - _<u>qj,t</u>_ _Aj_ Figure 1: SCC indicator function _κ_ ( _·_ ) and its continuous sum of sigmoids approximation _f_ SCC� <sup>for link</sup> <sup>_j_</sup> _2.3._ _Mixed-integer nonlinear program_ The SCC design-for-control problem aims to maximize (14), subject to hydraulic conservation laws and physical and economical valve constraints. The problem formulation includes continuous variables denoted 7 by _x_ := [ _q h η θ α_ ] <sup>_T_</sup> and binary variables denoted by _v_ := [ _v_ <sup>+</sup> _v_ <sup>_−_</sup> ] <sup>_T_</sup>, _y_ and _z_ . Here, the objective function is replaced with its additive inverse to result in a minimization optimization problem. The resulting mixed integer nonlinear program (MINLP) is summarized by the following problem formulation. minimize _x_ _,_ _v_ _,_ _y_ _,_ _z_ _−_ _f_ SCC� <sup>(14)</sup> subject to linear hydraulic conservation constraints (1b) and (4a) nonconvex HW head loss model constraints (4b) big-M constraints for control valve operation (9a) _−_ (9f) big-M constraints for flushing valve operation (10) physical and economical valve constraints (7a) _−_ (7c) _x_ _∈_ _Q_ (11a) _−_ (11e) _v_ _∈{_ 0 _,_ 1 _}_ <sup>2</sup> <sup>_npnt_</sup> _,_ _y_ _∈{_ 0 _,_ 1 _}_ <sup>_nn_</sup> _,_ _z_ _∈{_ 0 _,_ 1 _}_ <sup>_np_</sup> (MINLP) where _Q_ is a rectangle representing upper and lower bounds for the continuous decision variables. The continuous decision variables are defined as: _q_ := ( _qt_ ) _t_ =1 _,...,nt_, _h_ := ( _ht_ ) _t_ =1 _,...,nt_, _η_ := ( _ηt_ ) _t_ =1 _,...,nt_, _θ_ := ( _θt_ ) _t_ =1 _,...,nt_ and _α_ := ( _αt_ ) _t_ =1 _,...,nt_ . The binary decision variables varying with time step _t_ are defined as: _v_ <sup>+</sup> := ( _vt_ <sup>+)</sup> <sup>_t_</sup> <sup>=1</sup> <sup>_,...,n_</sup> _t_ <sup>and</sup> <sup>_v−_</sup> <sup>:= (</sup> <sup>_v_</sup> _t_ <sup>_−_</sup> <sup>)</sup> <sup>_t_</sup> <sup>=1</sup> <sup>_,...,n_</sup> _t_ <sup>.</sup> Problem (MINLP) has _nt_ (3 _np_ + 2 _nn_ ) continuous variables, 2 _ntnp_ + _np_ + _nn_ binary variables and 2 _ntnp_ nonconvex terms. Observe that the problem grows rapidly with the size of the considered WDN (see Table 1), making it a difficult nonconvex MINLP problem to solve. To overcome these challenges, we develop a convex heuristic to compute feasible solutions to Problem (MINLP). The following section describes the solution algorithm and its implementation details. 3. Solution method The proposed solution algorithm combines convex relaxations with a randomization heuristic and multistart solver to compute feasible solutions to Problem (MINLP). First, we formulate convex relaxations of Problem (MINLP), which yield a linear programming (LP) subproblem. Here, the nonconvex SCC objective function (12) and nonconvex energy conservation constraints (4b) are relaxed using polyhedral envelopes, and a continuous relaxation is applied to binary decision variables. We also include a domain reduction step where the resulting convex subproblem is tightened using both model decomposition and optimization-based bound tightening (OBBT) techniques. Then, a randomization heuristic uses the fractional valve placement values from the convex subproblem solution to form nonlinear programming (NLP) control problems. Local solutions to these NLP problems are computed using a strictly feasible sequential convex programming (SFSCP) solver. We also implement a multi-start strategy, which includes an optimization-based feasibility restoration problem to ensure hydraulic feasibility of the starting points. Figure 2 offers a detailed overview of the solution method, referred to as the convex multi-start (CMS) algorithm. The algorithm steps and overall implementation details are provided in the following subsections. _3.1._ _Convex relaxation_ There are two sources of nonlinear nonconvexity that make Problem (MINLP) difficult to solve. These are the SCC objective function _f_ SCC� <sup>(14) and the HW head loss model</sup> <sup>_φ_</sup> <sup>(</sup> <sup>_·_</sup> <sup>) in equality constraint (4b).</sup> <sup>One</sup> approach to overcome nonconvexity is through polyhedral relaxations, which can be formulated as linear constraints and thus efficiently handled by state-of-the-art linear solvers. Since the resulting mixed integer 8 Domain reduction OBBT and decomposition Store solution and repeat for i = 1,...,N trials Initialization Hydraulic model and SCC parameters Convex relaxation LP from linear relaxations and continuous variables z'i, y' i, η Multi-start solver Feasibility restoration and NLP control problems Randomization heuristic Sample valve location set z'i = 1,...,N, y' i = 1,...,N Output Best feasible solution z'best,y' best,ηbest,α best Figure 2: Proposed convex multi-start (CMS) algorithm linear program (MILP) may still have a large number of binary variables, it is convenient to apply a continuous relaxation to binary variables. In addition to the computational advantages, a continuous relaxation increases the search space for the set of optimal binary variables. Here, we implement the aforementioned relaxation techniques to formulate a convex subproblem of Problem (MINLP), with its solution forming the basis of the heuristic algorithm. We first relax the nonconvex objective function in (14) with a linear outer approximation. Let _σt_ <sup>+</sup> <sup>_∈_</sup> <sup>R</sup> <sup>_np_</sup> and _σt_ <sup>_−_</sup> _∈_ R <sup>_np_</sup> be vectors of auxiliary variables introduced to model the positive _ψ_ <sup>+</sup> and negative _ψ_ <sup>_−_</sup> sigmoid functions, respectively. The objective function _f_ SCC� <sup>is</sup> <sup>then</sup> <sup>reformulated</sup> <sup>as</sup> <sup>the</sup> <sup>following</sup> <sup>set</sup> <sup>of</sup> 9 We first relax the nonconvex objective function in (14) with a linear outer approximation. Let _σt_ <sup>+</sup> _t_ <sup>_−_</sup> _∈_ R <sup>_np_</sup> be vectors of auxiliary variables introduced to model the positive _ψ_ <sup>+</sup> and negative _ψ_ <sup>_−_</sup> inequality constraints: _σt_ <sup>+</sup> <sup>_≤_</sup> <sup>_ψ_</sup> <sup>+</sup> _σt_ <sup>+</sup> _σt_ <sup>_−_</sup> <sup>_≤_</sup> <sup>_ψ−_</sup> _σt_ <sup>_−_</sup> - _<u>qt</u>_ _A_ - _<u>qt</u>_ _A_ _,_ _t ∈{_ 1 _, . . ., nt}_ (15a) _,_ _t ∈{_ 1 _, . . ., nt}._ (15b) To ensure equivalence with (14), the SCC objective function becomes _f_ SCC� <sup>:=</sup> <sup><u>1</u></sup> _nt_ _nt_ _np_ - _t_ =1 _j_ =1 _j,t_ _wj_ - _σj,t_ <sup>+</sup> _j,t_ <sup>+</sup> <sup>+</sup> <sup>_σ_</sup> _j,t_ <sup>_−_</sup> - _._ (16) We construct concave envelopes for the positive _ψ_ <sup>+</sup> and negative _ψ_ <sup>_−_</sup> components of _f_ SCC� <sup>.</sup> <sup>This</sup> <sup>follows</sup> the methodology presented in Udell and Boyd (2014, 2016) for sigmoidal functions, resulting in piecewise linear relaxations. These relaxations are written as the following constraint: _Stqt_ + _Ttσt_ _≤_ _st,_ _∀t ∈{_ 1 _, . . ., nt}_ (17) <sup>_−_</sup> _t_ <sup>]</sup> <sup>_T_</sup> <sup>and vector</sup> <sup>_st_</sup> <sup>:=</sup> <sup>[</sup> <sup>_s_</sup> <sup>+</sup> _t_ <sup>_−_</sup> _t_ <sup>]</sup> <sup>_T_</sup> <sup>depend on flow velocity</sup> <sup>+</sup> _t_ <sup>_s−_</sup> _t_ where matrices _St_ := [ _St_ <sup>+</sup> _t_ <sup>_−_</sup> <sup>]</sup> <sup>_T_</sup> <sup>and</sup> <sup>_Tt_</sup> <sup>:=</sup> <sup>[</sup> <sup>_T_</sup> <sup>+</sup> _t_ _t_ <sup>+</sup> <sup>_S_</sup> _t_ <sup>_−_</sup> <sup>+</sup> _t_ <sup>_T −_</sup> _t_ bounds _u_ <sup>_L_</sup> _t_ <sup>:=</sup> - _<u>qAtL</u>_ - and _u_ <sup>_U_</sup> _t_ <sup>:=</sup> - _<u>qAtU</u>_ - as well as the sigmoid function parameters. A detailed derivation of these relaxations is provided in Appendix A.1. Moreover, an example of the implemented relaxation is illustrated in Figure 3a, with _ψ_ <sup>ˆ</sup> denoting the set of linear relaxations. bounds _u_ <sup>_L_</sup> _t_ <sup>_L_</sup> _t_ <sup>:=</sup> - _<u>qtL</u>_ _A_ - and _u_ <sup>_U_</sup> _t_ <sup>_U_</sup> _t_ <sup>:=</sup> - _<u>qtU</u>_ _A_ We then implement polyhedral relaxations for the HW head loss model _φ_ ( _·_ ) in equality constraint (4b). This builds on the relaxation methods for monomials of odd degree introduced by Liberti and Pantelides (2003) by formulating polyhedral relaxations for the HW head loss model. Similar to (A.23), the formulated relaxations are written as the following linear constraint: _Rtqt_ + _Etθt_ _≤_ _rt,_ _∀t ∈{_ 1 _, . . ., nt}_ (18) where matrices _Rt_ and _Et_ and vector _rt_ are derived from flow bounds _qt_ <sup>_L_</sup> _t_ <sup>_L_</sup> <sup>and</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> where matrices _Rt_ and _Et_ and vector _rt_ are derived from flow bounds _qt_ <sup>_L_</sup> <sup>and</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> <sup>and</sup> <sup>the</sup> <sup>HW</sup> <sup>model</sup> parameters. Further details are presented in Appendix A.2 and an example of the implemented relaxation is illustrated in Figure 3b, noting that the polyhedral relaxation is denoted by _φ_ <sup>ˆ</sup> . Lastly, we implement the continuous relaxation of binary variables _v_, _y_, and _z_ . These are combined with continuous decision variables _x_, defined in Problem (MINLP), and the continuous auxiliary variables associated with the _f_ SCC� <sup>inequality constraints (A.22a) and (A.22b),</sup> <sup>denoted by</sup> <sup>_σ_</sup> <sup>:=</sup> <sup>[</sup> <sup>_σ_</sup> <sup>+</sup> <sup>_σ−_</sup> <sup>].</sup> <sup>The resulting</sup> convex relaxation of Problem (MINLP) is represented by the following LP subproblem. _x_ minimize _,_ _v_ _,_ _y_ _,_ _z_ _,_ _σ_ _−_ _f_ SCC� <sup>reformulated in (16)</sup> subject to linear relaxations of HW head loss model constraints (18) linear relaxations of _ψ_ <sup>+</sup> and _ψ_ <sup>_−_</sup> sigmoid functions (A.23) linear hydraulic conservation constraints (1b) and (4a) big-M constraints for control valve operation (9a) _−_ (9f) big-M constraints for flushing valve operation (10) physical and economical valve constraints (7a) _−_ (7c) _x_ _∈_ _Q_ (11a) _−_ (11e) _,_ _σ_ _∈_ [0 _,_ 1] <sup>2</sup> <sup>_npnt_</sup> _v_ _∈_ [0 _,_ 1] <sup>2</sup> <sup>_npnt_</sup> _,_ _y_ _∈_ [0 _,_ 1] <sup>_nn_</sup> _,_ _z_ _∈_ [0 _,_ 1] <sup>_np_</sup> 10 (LP) (a) Sum of sigmoids objective function _ψ_ ( _uj_ ) (b) HW head loss model _φ_ ( _qj_ ) Figure 3: Examples of implemented linear relaxations for link _j_ The optimal value to Subproblem (LP) yields a lower bound to the original nonconvex Problem (MINLP). In particular, vectors _y_ _∈_ R <sup>_nn_</sup> and _z_ _∈_ R <sup>_np_</sup> of continuous variables for valve placement can be interpreted as the probability distribution from which random samples are drawn to solve the NLP control problem. Moreover, the vector _η_ _∈_ R <sup>_np_</sup> from Subproblem (LP) is used as one of _M_ starting points in the multi-start strategy. These steps are discussed in the subsequent sections. Furthermore, we implement a domain reduction procedure to reduce the bound intervals and thus strengthen the convex relaxations formulated for Subproblem (LP). The main procedure implemented is an optimizationbased bound tightening (OBBT) algorithm (Belotti et al., 2009). The OBBT algorithm solves a series of LP optimization problems, with objective functions set to both maximize and minimize link flow. This is augmented with a forest-core decomposition scheme to reduce the number of flow variables whose bounds are tightened (Simpson et al., 2014). The forest of a WDN comprises the disjoint union of all outer branch (or tree) components (Deuerlein, 2008). The core represents the set of looped (or block) graphs, which contain the roots of all forest trees. Following Pecci et al. (2019), we only perform bound tightening on the set of core links. We include psuedocode for the OBBT algorithm in Appendix B. _3.2._ _Randomization heuristic_ In searching for a good quality local solution to Problem (MINLP), we employ a randomization heuristic to sample candidate valve configurations. Here, the fractional values of _y_ _∈_ R <sup>_nn_</sup> and _z_ _∈_ R <sup>_np_</sup> yielded from the solution to Subproblem (LP) define a discrete probability distribution for the index sets _{_ 1 _, . . ., nn}_ and _{_ 1 _, . . ., np}_, respectively. We propose to randomly sample candidate pressure control _nv_ and flushing _nf_ valve configurations from the respective probability distributions over _N_ sampling trials. This creates sampled vectors of binary variables _yi_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}nn_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}np_</sup> <sup>,</sup> <sup>from</sup> <sup>which</sup> <sup>a</sup> <sup>local</sup> _i_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}nn_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> sampled vectors of binary variables _yi_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}nn_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}np_</sup> <sup>,</sup> <sup>from</sup> <sup>which</sup> <sup>a</sup> <sup>local</sup> solution to the NLP control problem is obtained for each trial _i_ _∈{_ 1 _, . . ., N_ _}_ (see Section 3.3). To avoid redundant valve configurations, we store binary values from each trial in the set _P_ _∈_ R <sup>_N_</sup> <sup>_×_</sup> <sup>(</sup> <sup>_nv_</sup> <sup>+</sup> <sup>_nf_</sup> <sup>)</sup>, checking its intersection with _{yi_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′}_</sup> <sup>before</sup> <sup>fixing</sup> <sup>valve</sup> <sup>placement</sup> <sup>values</sup> <sup>and</sup> <sup>proceeding</sup> <sup>to</sup> <sup>the</sup> <sup>NLP</sup> <sup>control</sup> problem. Psuedocode for the implemented randomization heuristic is detailed in Algorithm 1. _i_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> _3.3._ _Multi-start solver_ The final component of the CMS solution algorithm concerns the optimization of valve settings. This control problem is formulated to compute (locally) optimal operational settings for each candidate valve con 11 <u>Algorithm 1</u> <u>Randomization heuristic</u> 1: Input: vectors of fractional values _y_ _∈_ [0 _,_ 1] <sup>_nn_</sup> and _z_ _∈_ [0 _,_ 1] <sup>_np_</sup> _▷_ Problem (LP) 2: Output: sampled vectors of binary variables _yi_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}nn_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}np_</sup> 3: Initialize _P_ _←∅_ _i_ <sup>_′_</sup> =1 _,...,N_ <sup>_∈{_</sup> <sup>0</sup> <sup>_,_</sup> <sup>1</sup> <sup>_}np_</sup> 4: for _i_ = 1 _, . . ., N_ do 5: while _{yi_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′}_</sup> _i_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> _i_ <sup>_′}_</sup> <sup>=</sup> <sup>_∅_</sup> <sup>or</sup> <sup>_{y_</sup> _i_ <sup>_′_</sup> _i_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> 5: while _{yi_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′}_</sup> <sup>=</sup> <sup>_∅_</sup> <sup>or</sup> <sup>_{y_</sup> _i_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′} ∈P_</sup> <sup>do</sup> 6: Sample _yi_ <sup>_′_</sup> <sup>from vector</sup> <sup>_y_</sup> 6: Sample _yi_ <sup>_′_</sup> <sup>from vector</sup> <sup>_y_</sup> <sup>with probability weights equal to fractional values</sup> 7: Sample _zi_ <sup>_′_</sup> <sup>from vector</sup> <sup>_z_</sup> <sup>with probability weights equal to fractional values</sup> 8: end while 9: Update visited valve locations: _P_ ( _i_ ) _←{yi_ <sup>_′_</sup> 9: Update visited valve locations: _P_ ( _i_ ) _←{yi_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′}_</sup> 10: Vectors _yi_ <sup>_′_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> _i_ <sup>_′_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> _i_ <sup>_′_</sup> <sup>_∪_</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> 10: Vectors _yi_ <sup>_′_</sup> <sup>and</sup> <sup>_z_</sup> _i_ <sup>_′_</sup> _▷_ Input to multi-start solver 11: <u>end for</u> figuration generated from the randomization heuristic. Because the objective function in Problem (MINLP) is highly nonlinear, we implement a strategy to use multiple starting points in order to avoid getting trapped in poor local optima. This includes a feasibility restoration subproblem to ensure hydraulically feasible starting points are passed to the NLP solver. We refer to the overall solution process as the multi-start solver, which has steps highlighted by the process diagram shown in Figure 4. _3.3.1._ _Strictly feasible sequential convex programming solver_ With the placement of DBVs and AFVs from the set of sampled configurations _{_ 1 _, . . ., N_ _}_, we then fix binary flow direction variables _vt_ <sup>+</sup> <sup>and</sup> <sup>_v_</sup> _t_ <sup>_−_</sup> <sup>at DBV locations for each time step</sup> <sup>_t ∈{_</sup> <sup>1</sup> <sup>_, . . ., nt}_</sup> <sup>. This yields a</sup> nonconvex NLP problem with continuous decision variables denoted by _x_ := [ _q h η α_ ] <sup>_T_</sup> . Moreover, big-M constraints for pressure control and flushing valve operations found in Problem (MINLP) are reformulated as variable bounds. These bounds are derived on the basis of the fixed binary variables. The corresponding NLP control problem is formulated as follows. minimize _x_ _−_ _f_ SCC� <sup>(14)</sup> subject to hydraulic conservation constraints (1a) and (1b) _x_ _∈_ _Q_ <sup>˜</sup> (NLP) where _Q_ <sup>˜</sup> represents the upper and lower variable bounds modified to account for directional constraints enforced by the fixed binary variables. Since the focus of this study is at the DMA- or distribution-level, which in practice limits the number of installed DBVs for consideration, we use an enumeration approach to test all DBV flow direction combinations for _vt_ <sup>+</sup> <sup>and</sup> <sup>_v_</sup> _t_ <sup>_−_</sup> <sup>.</sup> <sup>This approach was deemed appropriate on the</sup> basis of the relatively small computational (CPU) times recorded in Section 4. For example, the numerical experiment corresponding to the maximum number of installed DBVs on the largest network tested in this study (see Section 4.1 for details) resulted in a CPU time of less than five minutes. This CPU time is well within an assumed one hour limit for application in control strategies. We acknowledge, however, that this assumption warrants re-evaluation for system-wide studies which inevitably consider a larger set of control valves. Here, a total of _T_ = 2 <sup>_n_</sup> <sup>DBV</sup> control problems are solved to find the best DBV direction combination at each time step _t_ _∈{_ 1 _, . . ., nt}_ (see Figure 4). In this work, we use the strictly feasible sequential convex programming (SFSCP) method outlined in Wright et al. (2015) for solving a local optima to Problem (NLP). The SFSCP solver, also used to optimize SCC control valve settings in Abraham et al. (2016), is 12 Multi-start search strategy Inputs Sampled vectors y', z', andη Store solution and repeat for j = 1,...,M starting points DBV enumeration Set DBV direction trial Starting points Initialize multiple starting points x <sup>0</sup> Feasibility restoration Optimization problem to make x <sup>0</sup> SFSCP solver Local solution to NLP control problem i = 1,...,T j = 1,...,M j <sup>feasible</sup> v <sup>+</sup> i = 1,...,T <sup>, v-</sup> Store best NLP solution and repeat for i = 1,...,T trials Output Best NLP solution Figure 4: Process diagram of multi-start solver implemented because of its reliable convergence properties, namely its strict feasibility requirement for each iterate of the optimization process. The SFSCP solver linearizes the objective function and nonlinear hydraulic conservation constraints in Problem (NLP), from which a sequence of linear programs can be efficiently solved. Linear approximations are formulated using first-order Taylor expansions around the point _xk_ := [ _qk hk ηk αk_ ] <sup>_T_</sup> . Let _f_ := _f_ SCC� <sup>and the hydraulic conservation equality constraints (1a) and (1b)</sup> be denoted by _g_ ( _·_ ). It follows that _f_ ( _x_ ) _≈_ _f_ ( _xk_ ) + <sup>_<u>∂f</u>_</sup> (19) _∂q_ <sup>(</sup> <sup>_xk_</sup> <sup>)(</sup> <sup>_q −_</sup> <sup>_qk_</sup> <sup>)</sup> <sup>_,_</sup> and _g_ ( _x_ ) _≈_ _g_ ( _xk_ ) + <sup>_<u>∂g</u>_</sup> _∂q_ <sup>_<u>∂g</u>_</sup> _∂q_ <sup>(</sup> <sup>_xk_</sup> <sup>)(</sup> <sup>_q −_</sup> <sup>_qk_</sup> <sup>) +</sup> _∂η_ <sup>_<u>∂g</u>_</sup> _∂η_ <sup>_<u>∂g</u>_</sup> <sup>(</sup> <sup>_xk_</sup> <sup>)(</sup> <sup>_η −_</sup> <sup>_ηk_</sup> <sup>) +</sup> _∂α_ <sup>_<u>∂g</u>_</sup> (20) _∂α_ <sup>_<u>∂g</u>_</sup> <sup>(</sup> <sup>_xk_</sup> <sup>)(</sup> <sup>_α −_</sup> <sup>_αk_</sup> <sup>)</sup> <sup>_._</sup> are the linearized expressions used to formulate a convex subproblem for each iterate _k_ . This subproblem computes step directions _dηk_ and _dαk_ at point _xk_ for pressure control and flushing valve operational variables, respectively. Following Wright et al. (2015), a strictly feasible line search method is implemented to guarantee an improvement in objective function whilst ensuring hydraulic feasibility of the computed local 13 optima. We define the hydraulically feasible region by the set _F_ := - _x ∈_ R <sup>_np_</sup> <sup>+</sup> <sup>_nn_</sup> <sup>+</sup> <sup>_nv_</sup> <sup>+</sup> <sup>_nf_</sup> <sup>��</sup> _x_ satisfies constraints (1a) _,_ (1b) _,_ and variable bounds _Q_ <sup>˜</sup> _._ (21) The null space solver proposed in Abraham and Stoianov (2015) is used to solve hydraulic states _qk_ +1 and _hk_ +1 for the optimal controls obtained at iterate _k_ . If _xk_ _∈F_, then the optimization process moves to the next iterate _k_ := _k_ + 1. Otherwise, a backtracking procedure is implemented to reduce _dηk_ and _dαk_ until hydraulic feasibility is achieved. Termination of the SFSCP solver is triggered when relative improvements in the objective function are below a set tolerance _ϵ_ tol. The SFSCP solver steps are detailed in psuedocode presented in Appendix C (Wright et al., 2015). Moreover, the subsequent section describes a multi-start strategy for selecting feasible starting points _x_ <sup>0</sup> to be passed to the SFSCP solver. For completeness, we provide a brief discussion on the performance comparison with state-of-the-art nonlinear solver IPOPT. This is included as many large-scale WDN optimization studies have used IPOPT to compute locally optimal solutions for network controls (e.g. Pecci et al., 2019; Ulusoy et al., 2020; Nerantzis and Stoianov, 2022). Most of these studies, however, have applied a quadratic approximation (QA) to model the head loss function _ψ_ ( _·_ ) as the nonsmooth HW formula presents challenges for IPOPT, namely that its Hessian is unbounded at the origin. Preliminary efforts to introduce a QA model for the current SCC problem resulted in large inaccuracies compared to the HW model. This was expected as the current study aims to maximize pipe flow velocities, which increases the QA model error since a larger maximum flow value is required (Pecci et al., 2017; Equation 21). Therefore, we tested IPOPT using the HW model and relied on its feasibility restoration scheme to mitigate potential errors. Infeasibility errors were observed for the larger case study network when using the IPOPT solver, ultimately leading to the SFSCP solver as the more reliable and robust option for the current SCC control problem. The SFSCP and IPOPT solver comparison is detailed in Appendix D. _3.3.2._ _Multi-start strategy_ As highlighted in Figure 4, a multi-start strategy is implemented to find good quality local optima to Problem (NLP). Here, we initialize starting points _x_ <sup>0</sup> for multiple initial conditions _j_ _∈{_ 1 _, . . ., M_ _}_, which are sequentially passed to the SFSCP solver. Starting points are formed by simulating hydraulic states for different initial control valve settings _η_ <sup>0</sup> . For initial condition _j_ = 1, we set _ηj_ <sup>0</sup> =1 <sup>equal</sup> <sup>to</sup> <sup>the</sup> <sup>control</sup> valve settings resulting from Subproblem (LP). Otherwise, _ηj_ <sup>0</sup> =2 _,...,M_ <sup>is</sup> <sup>randomly</sup> <sup>generated</sup> <sup>between</sup> <sup>the</sup> previously set lower and upper _η_ bounds. Note that initial flushing operations are set as _α_ <sup>0</sup> = _{_ 0 _}_ for all initial conditions _j_ _∈{_ 1 _, . . ., M_ _}_ . Since the initial control conditions do not guarantee a solution in the hydraulically feasible region, we also include a feasibility restoration step. That is, if starting point _x_ <sup>0</sup> _j_ <sup>_∈F/_</sup> <sup>for all</sup> <sup>_j_</sup> <sup>_∈{_</sup> <sup>1</sup> <sup>_, . . ., M_</sup> <sup>_}_</sup> <sup>, feasibility is restored through the solution to the following NLP optimization</sup> problem. minimize _∥η −_ _η_ <sup>0</sup> _∥_ <sup>2</sup> 2 _x_ minimize 2 subject to hydraulic conservation constraints (1a) and (1b) _x_ _∈_ _Q_ <sup>˜</sup> (FR) where the objective function is set to minimize the squared _ℓ_ 2-norm between the vector of initial settings _η_ <sup>0</sup> and settings _η_ which produce a hydraulically feasible starting point. Problem (FR) is solved using the nonlinear IPOPT solver. Apart from cases where the fixed DBV directions strictly cannot facilitate a hydraulically feasible solution, we did not encounter infeasibility errors when using IPOPT as the NLP solver for Problem (FR). The discussion in Appendix D suggests that the nonconvexity of the SCC objective function in Problem (NLP) is a key factor for the observed infeasibility issues. 14 4. Numerical experiments and discussion We evaluate the SCC design-for-control problem using the proposed CMS solution algorithm. Since CMS is a heuristic, we also compare its performance with an off-the-shelf GA implementation, which is a common heuristic method for solving WDN design problems. This section is organized as follows. First, in Section 4.1 we describe the problem parameters, case study networks, and computational resources used to carry out the numerical experiments. Next, Section 4.2 discusses the results obtained when solving the control-only subproblem to Problem (MINLP), where valves locations are fixed. In this case, operational settings of existing PRV and DBV (if applicable) valve configurations are optimized to maximize selfcleaning conditions. We then investigate the solution to the design-for-control problem in Section 4.3, where the placement and operation of both pressure control and flushing valves are considered to improve SCC performance. _4.1._ _Computational setup_ All numerical experiments were performed in MATLAB R2021b (64-bit) for Microsoft Windows 11, installed on a 2.50-GHz Intel(R) Core(TM) i9-11900H CPU with 8 cores and 32.0 GB of memory (RAM). The LP problems involved in the convex relaxation, OBBT algorithm, and SFSCP solver were solved using Gurobi (v9.5.0; Gurobi Optimization, 2022), accessed via its MATLAB interface. With the exception of large problem cases, which had solver parameters (e.g. NumericFocus, Crossover, and Presolve) modified to deal with numerical issues, Gurobi’s default parameters were applied. Local solutions to the NLP feasibility restoration problems were solved using the state-of-the-art interior point solver IPOPT (v3.12.19; W¨achter and Biegler, 2006). IPOPT was accessed in MATLAB via the OPTI toolbox interface (Currie et al., 2012) and was implemented passing the exact Jacobian and Hessian matrices as inputs to the solver. The single objective GA was implemented using MATLAB’s off-the-shelf Global Optimization Toolbox with its default solver parameters (e.g. population size = 100; crossover fraction = 0.8; function tolerance = 1e _−_ 6). For each GA fitness evaluation, EPANET2.2 (Rossman et al., 2020) hydraulic solver was accessed via the EPANET-MATLAB Toolkit interface (Eliades et al., 2016). We set maximum time limits for the GA implementation associated with control and design-for-control problems of 6 and 12 hours, respectively. Furthermore, MATLAB’s parallel computing toolbox was employed (with eight local workers) to speed up code in the OBBT algorithm and multi-start solver. Finally, network hydraulics were computed within CMS using the null space method proposed in Abraham and Stoianov (2015). We evaluated the performance of the solution methods using three case study networks: Pescara, Modena, and BWFLnet. Problem data for each network, including the size of the resulting MINLP optimization problems, are summarized in Table 1. Moreover, network layouts are shown in Figure 5. Pescara and Modena are skeletonized versions of WDNs in medium-sized Italian cities, published by Bragalli et al. (2012) for benchmarking purposes. Since these are theoretical networks, unidirectional PRVs were placed at the outlet of each reservoir to represent existing valve configurations. BWFLnet is a large-scale operational network representing an area of the City of Bristol’s WDN, located in southwest England. It currently operates with dynamically controlled PRV and bidirectional DBV valves, which modulate flow and pressure between adjacent zones to minimize AZP. BWFLnet’s current control valve configuration was applied to model existing conditions - for more details on BWFLnet see Wright et al. (2014) and Waldron et al. (2020). Moreover, existing kept-shut boundary valves were opened in order to test the full capabilities of the proposed solution algorithm. Observe that the evaluated case study networks vary by size, network connectivity, and demand scenarios, enabling the proposed CMS algorithm to be tested on a range of network conditions. Pescara and Modena are relatively small-scale looped networks with theoretical (and quite large) demands. BWFLnet, on the other hand, represents a larger-scale operational network having 15 a branched structure and demands representing water consumption in a typical urban area in the UK. For reference, we note that the size of the resulting MINLP optimization problems for BWFLnet are at the upper end of the range reported in the MINLPLib database (Vigerske, 2022); MINLPLib is a widely used library of benchmarking MINLP problem instances. Table 1: Case study network problem data Problem data Pescara Modena BWFLnet _nn_ 67 268 2,745 _n_ 0 3 4 2 _np_ 98 317 2,816 Existing PRVs ( _n_ PRV) 4 4 3 Existing DBVs ( _n_ DBV) 0 0 2 No. free cont. variables 660 2,340 22,224 No. total cont. variables 1,712 5,948 55,752 No. binary variables 949 3,121 28,089 No. nonconvex terms 784 2,536 22,528 The known input parameters for Problem (MINLP) were selected as follows. For the SCC objective function _f_ SCC� <sup>(14),</sup> <sup>we</sup> <sup>set</sup> <sup>the</sup> <sup>sigmoid</sup> <sup>function</sup> <sup>curvature</sup> <sup>parameter</sup> <sup>_ρ_</sup> <sup>to</sup> <sup>50,</sup> <sup>unless</sup> <sup>stated</sup> <sup>otherwise.</sup> <sup>On</sup> the basis of the reviewed literature in Section 1, the self-cleaning velocity threshold _u_ <sup>min</sup> _j_ was set to 0.2 m _/_ s for all _j_ _∈{_ 1 _, . . ., np}_ . Since we are concerned with the redistribution of peak flows, we define four discrete hydraulic time steps _nt_ to represent peak demand scenarios within a typical diurnal demand profile. These were split between the morning and evening high demand periods and were unique to each case study. In relation to hydraulic feasibility constraints (11b), we applied a minimum regulatory pressure head of 15 m (UK regulations) at all nonzero demand nodes, for all case study networks. Moreover, the upper bound for flushing valve demands _α_ <sup>_U_</sup> shown in constraint (11d) was set to 25 L/s. This value was selected with reference to the recommended fire flow capacity at fire hydrants in the UK (Local Government Association and Water UK, 2007). For the design-for-control problem, we evaluated the placement and operation of _nv_ = 1 _, . . .,_ 3 bidirectional DBVs and _nf_ = 0 _, . . .,_ 3 AFVs. Hence, for each network, a total of 12 valve configurations were considered. The number of randomization trials _N_ in Algorithm 1 was set to the minimum of valve configuration combinations generated from the continuous relaxation in Subproblem (LP) or a maximum trial count; maximum trial counts were set to _N_ = 50 for Pescara and Modena and _N_ = 100 for BWFLnet. Finally, the number of initial conditions tested in the multi-start scheme (Figure 4) was set to _M_ = 5. _4.2._ _Existing valve configuration results_ We first investigated improvements to SCC performance achieved by optimizing the operational settings of existing pressure control valve configurations. This was considered a logical initial step as the implementation SCC-specific controls requires no additional capital investment and can thus be readily applied. As discussed previously, the theoretical case study networks, Pescara and Modena, were assumed to have PRVs assigned at each link leaving a source node (e.g. reservoir). On the other hand, BWFLnet had its existing operational valve configuration assigned. A subproblem of Problem (MINLP) was then formulated where binary variables _z_ were fixed for the known control valve locations and directional variables _v_ <sup>+</sup> and _v_ <sup>_−_</sup> were set free for networks with existing DBV locations (e.g. BWFLnet). Valve control settings and DBV directions were then optimized over the four peak demand periods using the multi-start strategy described 16 (a) Pescara (b) Modena (c) BWFLnet Figure 5: Case study network layouts in Section 3.3. The results are reported in Figure 6 through cumulative distribution plots of maximum flow velocities, weighted by pipe length. These plots offer a comparison between network SCC conditions with and without optimized controls. Considering _f_ SCC� <sup>is an approximation of the actual self-cleaning problem,</sup> we also include a sensitivity analysis on the sigmoid curvature parameter _ρ_ to test changes in relative performance. Moreover, Table 2 summarizes the control problem results obtained with both the multi-start solver and the GA implementation described in Section 4.1. We set a maximum time limit of one hour for the off-the-shelf GA solver, which was assumed to reflect an upper bound for the practical application of control problems. First, Figure 6 suggests that pressure modulation at existing control valves can significantly improve SCC conditions in the tested looped networks. This is highlighted by the numerical results for Modena, where the length of pipe experiencing self-cleaning velocities increased from approximately 60% to 95% for peak demand conditions. In contrast, results for BWFLnet, which has limited connectivity due to its 17 100 80 60 40 20 0 0 0.4 0.8 1.2 (a) Pescara 100 80 60 40 20 0 0 0.4 0.8 1.2 (b) Modena 100 80 60 40 20 0 0 0.4 0.8 1.2 (c) BWFLnet Figure 6: Cumulative distribution plots of maximum pipe flow velocities for control and no control scenarios (with _ρ_ sensitivity) branched structure, showed only modest improvements. These results were expected as the reduced interconnectivity in BWFLnet leads to pipe flows being primarily a function of downstream demands. For this reason, Section 4.3 presents the results for a design-for-control problem where we consider the installation of additional DBVs and flushing valves, which aim to improve self-cleaning conditions in branched networks. Furthermore, we report modest changes in the flow velocity profiles for the _ρ_ sensitivity analysis (see Figure 6). Since no pattern can be discerned between _ρ_ values, we conclude _ρ_ = 50 to be suitable for the design-for-control numerical experiments discussed in the subsequent section. 18 Table 2: Control problem results for existing valve configurations Case study networks Pescara Modena BWFLnet SCC objective (%) NLP solver 63.7 69.1 24.1 (CPU time, s) (1.61) (4.64) (200) GA solver 63.8 65.8 23.7 (CPU time, s) (3,600) (3,600) (3,600) AZP objective (m) Optimal AZP control 27.4 18.0 36.4 Optimal SCC control 32.6 23.3 52.6 As shown in Table 2, the multi-start solver computes solutions that are similar to those obtained by the GA, but at a fraction of the computational effort. While the GA consistently reaches the set timelimit of one hour, the longest computational time experienced by the multi-start solver is equal to 200 seconds. This is important as we are considering an optimal control problem, which may need to be solved in near real-time. The much longer CPU time required by the GA is likely due to the fact that it facilitates a search for the globally optimal solution. Thus, for highly nonlinear optimization problems, like that formulated for the current SCC problem, the GA retains a large solution space so as to avoid exclusion of the global optimum. This characteristic has been recognized as a challenge when using GAs for WDN control problems, especially when dealing with problems having a large number and range of free continuous variables (Maier et al., 2014, Ulusoy et al., 2022). Furthermore, we note that the GA implementation used in this work applies default parameters (see Section 4.1) and loads an external hydraulic solver (EPANET2.2) at each fitness evaluation. This off-the-shelf implementation is also likely to contribute to the relatively large CPU times. Extending the time limit to nearly 48 hours, the GA converges to a solution with an SCC value of approximately 24.8% for BWFLnet. This minimal performance gain suggests that the one-hour time limit is sufficient for the SCC control problem comparison. In addition, Table 2 provides a comparison of average zone pressure (AZP) performance between control settings optimized for AZP and SCC, respectively. Note that the AZP objective function is formulated as a weighted sum of nodal pressures averaged over _nt_ time steps (Wright et al., 2015; Equation 4). In accordance with findings in Abraham et al. (2016), we found a clear trade-off between the optimization of control settings for the SCC and AZP objectives. For example, a 16.2 m difference in AZP was recorded for BWFLnet. While this trade-off is not discussed further in the current study, we acknowledge the importance of having SCC and AZP objectives (among others) coexist in an overall operational network control strategy. Furthermore, the transition between such operational objectives may provoke large variations in hydraulic conditions (e.g. pressure transients) and should thus be managed accordingly. Future work is needed to investigate these considerations for the implementation of dynamically adaptive control strategies in operational WDNs. _4.3._ _Design-for-control results_ This section considers the SCC design-for-control problem for optimal placement and control of new bidirectional DBVs and AFVs. We test a total of 12 valve configurations for each case study network, where Experiment 1 corresponds to _nv_ = 1 and _nf_ = 0 and Experiment 12 corresponds to _nv_ = 3 and _nf_ = 3. As stated in Section 4.1, each experiment uses hydraulic conditions from four peak demand conditions across 19 a typical diurnal demand profile. Moreover, with the exception of existing DBVs in BWFLnet, the designfor-control numerical experiments include the existing PRV configurations shown in Figure 5, which were used for the optimal control subproblem in Section 4.2. We investigate the solution of Problem (MINLP) using three methods: (i) the proposed convex multi-start heuristic (CMS); (ii) CMS with domain reduction (as described in Section 3.1), referred to as CMS (DR); and (iii) an off-the-shelf GA implementation coupled with the EPANET2.2 hydraulic solver. Note that we set the following time limits for the GA on the basis of that recorded using CMS: 6 hours for Pescara and Modena; and 12 hours for BWFLnet. The SCC objective function results and corresponding CPU times from each solution method are shown in Figure 7 for the considered set of numerical experiments. Figures 7a, 7c, and 7e show that CMS finds feasible solutions for all numerical experiments. To highlight the improvements in SCC, we include a solid black line to represent initial hydraulic conditions and a dashed black line to report the SCC values obtained by optimally controlling existing valves, as done in Section 4.2. While SCC improvements are experienced for all case studies, we observe significant relative improvements compared with the control-only solution for BWFLnet. As previously discussed in Section 4.2, the SCC improvements for BWFLnet can be attributed to the deployment of AFVs, which facilitate controlled flushing demands at the optimally selected locations. Moreover, the additional DBVs act to further branch the network, thereby enhancing self-cleaning velocities. The increase in SCC is investigated further through network velocity plots shown in Figure 8. Here, we compare maximum pipe velocities resulting from initial hydraulics (i.e. no control) and, as an example, the design-for-control solution corresponding to _nv_ = 2 and _nf_ = 3. Figures 8b, 8d, and 8f clearly indicate a net increase in the overall extent of the network experiencing self-cleaning velocities from optimal valve controls. We observe optimal AFV placement to be near the network periphery in Pescara and BWFLnet. These results are intuitive as flushing demands facilitate self-cleaning velocities in areas that otherwise convey relatively low flow. In contrast, AFVs are concentrated near a source node in Modena. This is a result of existing PRVs modulating inlet pressure to shift the hydraulic balance point (or interface) between source nodes. In particular, the flow rates illustrated in Figure 8d suggest that source nodes near the top of the network supply a greater proportion of the demand. Additionally, we note that the optimal DBV locations, which increase self-cleaning velocities by redistributing flow paths, may result in sub-optimal conditions for controlling network pressure. Since we do not explicitly consider pressure management in the SCC problem formulation, the integration of selfcleaning and pressure management objectives should be a focus of future work. Lastly, Figure 8f highlights the limited influence of control features for the more branched BWFLnet network. Although the placement and operation of AFVs indeed improve self-cleaning hydraulic conditions, these are generally limited to direct upstream flow paths. In the case where self-cleaning velocities are sought for specific areas of the network (e.g. historical complaints), the SCC objective function can be modified to focus on a user-defined subset of pipes. In comparing the two implementations of CMS, with and without domain reduction, we observe the former to yield better quality feasible solutions. This can be attributed to the tighter relaxations resulting from domain reduction. In fact, tighter relaxations may generate fractional valve placement values closer to the feasible domain, and therefore more likely to result in better quality design-for-control solutions. In addition, the solution of subproblem (LP) with tighter relaxations computes control valve settings _η_ that are closer to the feasible set and the global optimum. As described in Section 3.3, these _η_ values are used as a starting point for the multi-start solver. Hence, we expect these settings to be advantageous in finding a better solution. Nonetheless, the OBBT algorithm comes at an increase in computational effort. Figures 7b, 7d, and 7f compare CPU times across numerical experiments for each solution method. Although the increase in CPU times are modest for the smaller networks, OBBT does not scale well for the larger operational network. For example, the increase in CPU time reported for BWFLnet was, at minimum, approximately 20 100 80 60 40 20 Control-only No control 0 0 2 4 6 8 10 12 (a) Pescara (SCC objective) 100 80 60 40 20 Control-only No control 0 0 2 4 6 8 10 12 (c) Modena (SCC objective) 100 80 60 Control-only 40 20 No control 0 0 2 4 6 8 10 12 (e) BWFLnet (SCC objective) 10 <sup>5</sup> 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 0 2 4 6 8 10 12 (b) Pescara (CPU time) 10 <sup>5</sup> 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 0 2 4 6 8 10 12 (d) Modena (CPU time) 10 <sup>5</sup> 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 0 2 4 6 8 10 12 (f) BWFLnet (CPU time) Figure 7: Design-for-control solutions to Problem (MINLP) for experiments corresponding to _nv_ = 1 _, . . .,_ 3 and _nf_ = 0 _, . . .,_ 3 50% when OBBT was applied. Even though Problem (MINLP) is considered a design problem, and is thus solved offline, OBBT can become impractical for large-scale and highly interconnected networks (Pecci et al., 2022). Future work should investigate speed improvements to OBBT or the implementation of tighter 21 (a) Pescara (no control) (b) Pescara (optimal design-for-control) (c) Modena (no control) (d) Modena (optimal design-for-control) (e) BWLFnet (no control) (f) BWFLnet (optimal design-for-control) Figure 8: Improvements to network self-cleaning velocities from optimal design-for-control solutions ( _nv_ = 2 and _nf_ = 3) 22 relaxations for Problem (MINLP). Finally, we compare design-for-control solutions computed by CMS with an off-the-shelf GA implementation. As described in Section 4.1, the EPANET2.2 hydraulic solver was employed within the GA’s fitness function to test hydraulic feasibility of the generated solutions. The solution was deemed feasible when the EPANET2.2 solver successfully converged and when the entire set of pressure heads across all time steps met the minimum pressure constraint. Otherwise, hydraulically infeasible solutions were discarded. Moreover, pressure set-points at control valves were bounded by the maximum head difference across the network (i.e. reservoir level less minimum node elevation). In Figure 7a, the GA solution is shown to produce comparable (if not better) SCC results for Pescara than CMS (DR). This is not surprising as the stochastic search procedure employed by the GA is well suited for highly nonlinear optimization problems, such as the current SCC objective function. Although the GA did not satisfy its termination criterion within the prescribed time limit (six hours), the relatively small number of free continuous variables in Pescara (e.g. pressure set-points and flushing rates; see Table 1) enabled the computation of good-quality feasible solutions. On the other hand, the GA was unable to find feasible solutions for numerous problem instances using Modena. This was particularly evident for experiments including the design and control of AFVs, which result in higher frictional losses materializing from flushing demands. Note that infeasibility is indicated by an SCC value of zero in Figure 7c. Additional GA experiments revealed such infeasibility issues to be linked to the relatively small range in hydraulically feasible pressures found in Modena. With the minimum regulatory pressure head relaxed from 15 m to 0 m (i.e. _h_ <sup>min</sup> set to node elevations), the GA found feasible solutions comparable to CMS (DR). These results highlight the efficacy of the proposed convex heuristic for a wider range of network conditions. For BWFLnet, CMS (DR) finds similar quality design-for-control solutions to the GA. However, as observed in Modena, CMS (DR) is shown to consistently outperform the GA for experiments considering the implementation of AFVs. In light of the comparison between solution methods, we investigated the computational overhead of the GA fitness function, as configured in this study using the EPANET-MATLAB Toolkit. This is a cumbersome process, and one which directly impacts the number of fitness evaluations performed by the GA. By comparison, CMS requires much less overhead from loading external software and computes hydraulic states via an efficient null space solver. Table 3 compares the number of EPANET2.2 solver calls (for the 12-hour time limit) with the null space solver calls in CMS. The comparison uses select design-for-control experiments for the BWFLnet case study network. Table 3: Comparison of the number of EPANET2.2 solver calls and null space hydraulic simulations in CMS for BWFLnet Experiment no. EPANET2.2 solver Null space solver 1 — _nv_ = 1, _nf_ = 0 11,064 4,208 3 — _nv_ = 1, _nf_ = 2 10,304 69,995 5 — _nv_ = 2, _nf_ = 0 11,064 61,274 7 — _nv_ = 2, _nf_ = 2 10,304 177,820 9 — _nv_ = 3, _nf_ = 0 10,304 87,976 11 — _nv_ = 3, _nf_ = 2 10,304 165,671 With the exception of Experiment 1, Table 3 reports the number of EPANET2.2 solver calls to be significantly less than the hydraulic simulations recorded in CMS. This identifies the hydraulic analysis as a bottleneck in the overall GA search procedure, particularly since its CPU times are over twice that reported using CMS. The comparison demonstrates the advantages of the proposed CMS algorithm in its ability to efficiently perform hydraulic simulations, which in turn yields more opportunities for CMS to compute solutions to the SCC problem than the GA over a given period. 23 5. Conclusions Novel operational strategies are needed to minimize the severity and frequency of discolouration incidents in WDNs. In this paper, we propose control and design-for-control strategies for maximizing the self-cleaning capacity (SCC) of a network. This is facilitated through the operational framework of dynamically adaptive networks by extending its control capabilities to enhance water quality. Building on previous work, we formulate an optimization problem to improve SCC through the optimal placement and operation of pressure control and automatic flushing valves. This results in a nonconvex MINLP problem. Since global solvers become intractable for large problem instances, we propose a tailored convex multi-start heuristic (referred to as CMS) to compute feasible solutions to the SCC design-for-control problem. CMS comprises a convex relaxation and randomized valve sampling procedure, which is demonstrated to effectively handle integer variables modelling valve placement. Given the high nonlinearity of the SCC objective function, CMS also implements a multi-start solver to compute feasible solutions to the SCC control problem, whilst mitigating the occurrence of poor local optima. Compared to an off-the-shelf GA implementation, which employs the EPANET2.2 hydraulic solver, CMS is shown to consistently yield good-quality feasible solutions to the SCC design-for-control problem. We demonstrate the robustness of CMS using networks with varying size and hydraulic complexity, including a large-scale operational network in the UK. Although the GA computed comparable solutions to CMS for most numerical experiments, it yielded worse-quality and, in some instances, infeasible solutions for larger and more complex conditions. Furthermore, we show the proposed multi-start solver to compute fast and scalable solutions to the SCC control problem, highlighting its suitability for application in near real-time control strategies. Altogether, the proposed convex multi-start algorithm represents progress towards the optimal design and control of smart water networks. Moving forward, the proposed solution for maximizing SCC needs to be integrated within a wider framework for the design and operation of WDNs with dynamically adaptive control. For example, the objective to minimize average zone pressure and pressure variations should include the periodic transition to a selfcleaning mode, as formulated in this manuscript through the operation of pressure control and automatic flushing valves. From an operational perspective, it is also important that this control framework considers the management of unsteady hydraulics arising from such dynamic controls. In relation to the SCC objective function, additional features should also be investigated to improve self-cleaning performance. These may include the impacts of flow reversals as well as a tailored approach to focus on specific areas of the network (e.g. historical complaints). These considerations, combined with advances in technologies for the operation of dynamically adaptive networks, will enable better control strategies for responding to environmental, financial, and regulatory challenges. 24 A. Convex relaxations This section presents a detailed derivation of the convex relaxations formulated for the nonconvex selfcleaning capacity (SCC) objective function and nonconvex HW head loss model. _A.1 Nonconvex SCC objective function_ Recalling Section 3.1, we define piecewise linear relaxations for the following nonconvex sigmoidal inequality constraints _,_ _∀t ∈{_ 1 _, . . ., nt}_ (A.22a) _,_ _∀t ∈{_ 1 _, . . ., nt}_ (A.22b) _σt_ <sup>+</sup> <sup>_≤_</sup> <sup>_ψ_</sup> <sup>+</sup> _σt_ <sup>_−_</sup> <sup>_≤_</sup> <sup>_ψ−_</sup> - _<u>qt</u>_ _A_ - _<u>qt</u>_ _A_ where _ψ_ <sup>+</sup> ( _·_ ) and _ψ_ <sup>_−_</sup> ( _·_ ) model the positive and negative components of the SCC objective function _f_ SCC� <sup>,</sup> respectively; _σt_ := [ _σt_ <sup>+</sup> <sup>_σ_</sup> _t_ <sup>_−_</sup> <sup>]</sup> <sup>_T_</sup> <sup>is the vector of auxiliary variables introduced to reformulate the SCC objective</sup> respectively; _σt_ := [ _σt_ <sup>+</sup> <sup>_σ_</sup> _t_ <sup>_−_</sup> <sup>]</sup> <sup>_T_</sup> <sup>is the vector of auxiliary variables introduced to reformulate the SCC objective</sup> function; and _qt_ _∈_ R <sup>_np_</sup> is the vector of link flows. As presented in Section 3.1, the resulting relaxations are written as the following linear inequality constraint: _t_ <sup>+</sup> <sup>_σ_</sup> _t_ <sup>_−_</sup> _Stqt_ + _Ttσt_ _≤_ _st,_ _∀t ∈{_ 1 _, . . ., nt}_ (A.23) <sup>_−_</sup> _t_ <sup>]</sup> <sup>_T_</sup> <sup>and vector</sup> <sup>_st_</sup> <sup>:= [</sup> <sup>_s_</sup> <sup>+</sup> _t_ <sup>_−_</sup> _t_ <sup>]</sup> <sup>_T_</sup> <sup>depend on flow bounds</sup> <sup>_q_</sup> _t_ <sup>_L_</sup> _t_ <sup>+</sup> <sup>_S_</sup> _t_ <sup>_−_</sup> <sup>+</sup> _t_ <sup>_T −_</sup> _t_ <sup>+</sup> _t_ <sup>_s−_</sup> _t_ where matrices _St_ := [ _St_ <sup>+</sup> _t_ <sup>_−_</sup> <sup>]</sup> <sup>_T_</sup> <sup>and</sup> <sup>_Tt_</sup> <sup>:= [</sup> <sup>_T_</sup> <sup>+</sup> _t_ _t_ and _qt_ <sup>_U_</sup> <sup>and the sigmoid function parameters.</sup> and _qt_ <sup>_U_</sup> <sup>and the sigmoid function parameters.</sup> Before proceeding with the derivation of (A.23), we note the following. First, we omit time indices _t_ and link indices _j_ for the sake of clarity. Second, we drop the sign of the sigmoid function _ψ_ ( _·_ ) and the vector of auxiliary variables _σ_ _∈_ R <sup>_np_</sup> ; apart from swapping the upper and lower flow bounds, the mathematical derivation does not change for the positive or negative _ψ_ ( _·_ ) functions. However, where deemed necessary to clearly explain the formulated relaxations, we use the positive sigmoid function. Finally, we use flow velocities as the domain for _ψ_ ( _·_ ), which are denoted by _u_ := - _Aq_ �. It follows that the lower and upper �. It follows that the lower and upper - _<u>q</u>_ _A_ domain bounds are denoted by _u_ <sup>_L_</sup> := - _<u>qL</u>_ _A_ - _<u>qU</u>_ _A_ domain bounds are denoted by _u_ <sup>_L_</sup> := - _<u>qAL</u>_ - and _u_ <sup>_U_</sup> := - _<u>qAU</u>_ �, respectively. We begin by considering the set - and _u_ <sup>_U_</sup> := ( _u, σ_ ) and its concave envelope given by �� _σ_ = _ψ_ ( _u_ ) _,_ _∀u ∈_ _u_ <sup>_L_</sup> _u_ <sup>_U_</sup> <sup>��</sup> _,_ (A.24) ( _u, σ_ ) �� 0 _≤_ _σ_ _≤_ _ψ_ ˆ( _u_ ) _,_ _∀u ∈_ _,_ (A.25) _u_ <sup>_L_</sup> _u_ <sup>_U_</sup> <sup>��</sup> where _ψ_ <sup>ˆ</sup> ( _·_ ) is a piecewise linear relaxation that depends on bounds _u_ <sup>_L_</sup> and _u_ <sup>_U_</sup> and the tangent point created with the sigmoid function. Following the examples presented in Udell and Boyd (2014, 2016), we discuss the steps to construct _ψ_ <sup>ˆ</sup> ( _·_ ) for various domain scenarios below. First, we look for the point _w_ such that the line from ( _u_ <sup>_L_</sup> _, ψ_ ( _u_ <sup>_L_</sup> )) to ( _w, ψ_ ( _w_ )) is tangent to _ψ_ ( _·_ ) at ( _w, ψ_ ( _w_ )). The bisection method, an iterative numerical algorithm (Miller, 2014), is used to compute the tangent point _w_ as no analytical expression exists for the equations of intersection in consideration. This follows the steps detailed in Algorithm A2. Since the SCC problem is mostly comprised of linear constraints, 25 <u>Algorithm A2</u> <u>Bisection method for nonconvex sigmoid objective function</u> 1: Input: _ψ_ ( _·_ ) model parameters, SCC threshold velocity _u_ <sup>min</sup>, and flow velocity bounds _u_ <sup>_L_</sup> and _u_ <sup>_U_</sup> 2: Output: unique point _w_ where the line from ( _y, ψ_ ( _y_ )) to ( _w, ψ_ ( _w_ )) is tangent to _ψ_ ( _·_ ) at ( _w, ψ_ ( _w_ )) 3: Define: for _ψ_ <sup>+</sup>, _y_ := _u_ <sup>_L_</sup> ; for _ψ_ <sup>_−_</sup>, _y_ := _u_ <sup>_U_</sup> ; equation of intersection _f_ ( _x_ ) := _ψ_ <sup>_′_</sup> ( _x_ )( _x−y_ )+ _ψ_ ( _y_ ) _−ψ_ ( _x_ ), where _x_ = _w_ at the root of _f_ ( _x_ ) 4: Initialize: (i) initial lower and upper bounds _x_ 0 and _x_ 1; and (ii) error tolerance _ϵ_ tol 5: if _u_ <sup>_L_</sup> _≥_ _u_ <sup>min</sup> then 6: _w_ _←_ _u_ <sup>_L_</sup> 7: else 8: _x_ 2 _←_ <sup>_<u>x</u>_</sup> <sup><u>0+</u></sup> 2 <sup>_<u>x</u>_</sup> <sup><u>1</u></sup> 2 9: while _|x_ 1 _−_ _x_ 0 _| ≥_ _ϵtol_ do 10: if _f_ ( _x_ 2) _× f_ ( _x_ 0) _≤_ 0 then 11: _x_ 1 _←_ _x_ 2 _<u>x</u>_ <u>0+</u> _<u>x</u>_ <u>1</u> 12: _x_ 2 _←_ 2 2 13: else 14: _x_ 0 _←_ _x_ 2 _<u>x</u>_ <u>0+</u> _<u>x</u>_ <u>1</u> 15: _x_ 2 _←_ 2 2 16: end if 17: end while 18: _w_ _←_ _x_ 2 19: <u>end if</u> it is also convenient to construct a linear upper bound to the concave segment of _ψ_ ( _·_ ). It follows that point _k_ represents the intersection of linear relaxations, at which point the maximum error of _ψ_ <sup>ˆ</sup> ( _·_ ) _−_ _ψ_ ( _·_ ) occurs. The constructed concave envelopes _ψ_ <sup>ˆ</sup> ( _·_ ) are described below for the four conceivable domain scenarios, with their corresponding plots shown in Figure A.9. If _u_ <sup>_L_</sup> _<_ _w_ _≤_ _u_ <sup>_U_</sup>, the concave envelope _ψ_ <sup>ˆ</sup> ( _u_ ) is defined as the following piecewise linear function (see Figure A.9a): _ψ_ ˆ( _u_ ) = - _ψ_ ( _w_ ) + _ψ_ <sup>_′_</sup> ( _w_ )( _u −_ _w_ ) _,_ _u_ <sup>_L_</sup> _≤_ _u ≤_ _k_ (A.26) _ψ_ ( _u_ <sup>_U_</sup> ) + _ψ_ <sup>_′_</sup> ( _u_ <sup>_U_</sup> )( _u −_ _u_ <sup>_U_</sup> ) _,_ _k_ _≤_ _u ≤_ _u_ <sup>_U_</sup> When _u_ <sup>_L_</sup> _< u_ <sup>_U_</sup> _≤_ _w_, the concave envelope _ψ_ <sup>ˆ</sup> ( _u_ ) is defined a the following linear function (see Figure A.9b): _ψ_ ˆ( _u_ ) = <sup>_<u>ψ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>uU</u>_</sup> <sup><u>)</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>ψ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>uL</u>_</sup> <sup><u>)</u></sup> ( _u −_ _u_ <sup>_L_</sup> ) _,_ _u_ <sup>_L_</sup> _≤_ _u ≤_ _u_ <sup>_U_</sup> (A.27) _u_ <sup>_U_</sup> _−_ _u_ <sup>_L_</sup> When _u_ <sup>_L_</sup> = _w_ and _w_ _≤_ _u_ <sup>_U_</sup>, the concave envelope _ψ_ <sup>ˆ</sup> ( _u_ ) is defined as the following piecewise linear function (see Figure A.9c): _ψ_ ˆ( _u_ ) = - _ψ_ ( _u_ <sup>_L_</sup> ) + _ψ_ <sup>_′_</sup> ( _u_ <sup>_L_</sup> )( _u −_ _u_ <sup>_L_</sup> ) _,_ _u_ <sup>_L_</sup> _≤_ _u ≤_ _k_ (A.28) _ψ_ ( _u_ <sup>_U_</sup> ) + _ψ_ <sup>_′_</sup> ( _u_ <sup>_U_</sup> )( _u −_ _u_ <sup>_U_</sup> ) _,_ _k_ _≤_ _u ≤_ _u_ <sup>_U_</sup> Lastly, if _u_ <sup>_L_</sup> = _w_ = _u_ <sup>_U_</sup>, the concave envelope _ψ_ <sup>ˆ</sup> ( _u_ ) is defined as the point (see Figure A.9d): _ψ_ ˆ( _u_ ) = _ψ_ ( _w_ ) (A.29) 26 Sigmoid functions _ψ_ <sup>+</sup> and _ψ_ <sup>_−_</sup> in (A.22) are then replaced with the appropriate concave envelopes _ψ_ <sup>ˆ</sup> ( _·_ ) described in (A.26) - (A.29). After rearranging terms, and substituting flow velocity _u_ with - _Aq_ - to align - _<u>q</u>_ _A_ described in (A.26) - (A.29). After rearranging terms, and substituting flow velocity _u_ with - _Aq_ - to align with the SCC problem variables, the linear inequality constraint shown in (A.23) is formulated. _A2._ _Nonconvex HW head loss constraints_ Building on the material presented in Pecci et al. (2019) (Appendix 1), we formulate polyhedral relaxations for the HW head loss model. Recall the energy conservation equality constraint _θt −_ _φ_ ( _qt_ ) = 0 _,_ _∀t ∈{_ 1 _, . . ., nt}_ (A.30) where _φ_ ( _·_ ) models the head loss materialized across network links _j_ _∈{_ 1 _, . . ., np}_ ; _θt_ _∈_ R <sup>_np_</sup> is the vector of auxiliary variables introduced to isolate the nonconvex head loss term; and _qt_ _∈_ R <sup>_np_</sup> is the vector of link flows. The resulting polyhedral relaxations are written as the following linear inequality constraint: _Rtqt_ + _Etθt_ _≤_ _rt,_ _∀t ∈{_ 1 _, . . ., nt}_ (A.31) where matrices _Rt_ and _Et_ and vector _rt_ depend on flow bounds _qt_ <sup>_L_</sup> _t_ <sup>_L_</sup> <sup>and</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> where matrices _Rt_ and _Et_ and vector _rt_ depend on flow bounds _qt_ <sup>_L_</sup> <sup>and</sup> <sup>_q_</sup> _t_ <sup>_U_</sup> <sup>and the HW model parameters.</sup> We follow a similar procedure to that detailed in Liberti and Pantelides (2003) for monomials of odd degree and later adapted in Pecci et al. (2019) for the quadratic approximation head loss model. The contribution of this work concerns the derivation of polyhedral relaxations for the HW head loss model, which has a fractional exponent dictating the relationship between _q_ and _φ_ ( _·_ ). Omitting indices _t_ and _j_, we begin by considering the set ( _q, θ_ ) �� _θ_ = _φ_ ( _q_ ) _,_ _∀q_ _∈_ _,_ (A.32) _q_ <sup>_L_</sup> _q_ <sup>_U_</sup> <sup>��</sup> and its convex relaxation given by ( _q, θ_ ) �� _<u>φ</u>_ ( _q_ ) _≤_ _θ_ _≤_ _φ_ ¯( _q_ ) _,_ _∀q_ _∈_ _,_ (A.33) _q_ <sup>_L_</sup> _q_ <sup>_U_</sup> <sup>��</sup> where _<u>φ</u>_ <u>(</u> _·_ ) and _φ_ <sup>¯</sup> ( _·_ ) are piecewise linear functions which formulate lower and upper relaxations of _φ_ ( _·_ ), respectively. These functions depend on flow bounds _q_ <sup>_L_</sup> and _q_ <sup>_U_</sup> and the tangent points created with _φ_ ( _·_ ). In the following, we present the derivations of _<u>φ</u>_ <u>(</u> _·_ ) and _φ_ <sup>¯</sup> ( _·_ ) for the complete range of domain scenarios. We start by looking for the point _<u>z</u>_ such that the line from ( _q_ <sup>_L_</sup> _, φ_ ( _q_ <sup>_L_</sup> )) to <u>(</u> _<u>z, φ</u>_ <u>(</u> _<u>z</u>_ <u>))</u> is tangent to _φ_ ( _·_ ) at <u>(</u> _<u>z, φ</u>_ <u>(</u> _<u>z</u>_ <u>)).</u> In contrast to the quadratic approximation method derived in Pecci et al. (2019), there is no analytical expression for finding root _<u>z</u>_ to the intersection between _φ_ ( _·_ ) and the tangent line at <u>(</u> _<u>z, φ</u>_ <u>(</u> _<u>z</u>_ )). Thus, the bisection method is used to find _<u>z</u>_ within an appropriate numerical tolerance. While similar to Algorithm A2, we present the exact steps taken to compute _<u>z</u>_ in Algorithm A3 for the sake of completeness. Analogously, the unique point _z_ ¯ is computed to find the line from ( _q_ <sup>_U_</sup> _, φ_ ( _q_ <sup>_U_</sup> )) to (¯ _z, φ_ (¯ _z_ )). The resulting set of linear relaxations for _φ_ ( _·_ ) are described below, with the corresponding plots presented in Figure A.10. Note that we define the set of polyhedral relaxations as _φ_ <sup>ˆ</sup> ( _·_ ) := _<u>{φ ∪</u>_ _φ_ <sup>¯</sup> _}_ . Moreover, let _<u>k</u>_ and _k_ <sup>¯</sup> denote the points of intersection between the linear functions in _<u>φ</u>_ <u>(</u> _·_ ) and _φ_ <sup>¯</sup> ( _·_ ), respectively. If _q_ <sup>_L_</sup> _<_ _z_ ¯ _<_ 0 _< z_ _< q_ <sup>_U_</sup>, the upper and lower bounds on _θ_ are defined as the following piecewise linear 27 (a) _u_ <sup>_L_</sup> _<_ _w_ _≤_ _u_ <sup>_U_</sup> (b) _u_ <sup>_L_</sup> _<_ _u_ <sup>_U_</sup> _≤_ _w_ (c) _u_ <sup>_L_</sup> = _w_ _≤_ _u_ <sup>_U_</sup> (d) _u_ <sup>_L_</sup> = _w_ = _u_ <sup>_U_</sup> Figure A.9: Concave envelopes of nonconvex sigmoidal inequality constraints (A.22) 28 <u>Algorithm A3</u> <u>Bisection method for nonconvex HW head loss model</u> 1: Input: _φ_ ( _·_ ) model parameters and flow bounds _q_ <sup>_L_</sup> and _q_ <sup>_U_</sup> 2: Output: unique point _z_ where the line from ( _y, φ_ ( _y_ )) to ( _z, φ_ ( _z_ )) is tangent to _φ_ ( _·_ ) at ( _z, φ_ ( _z_ )) 3: Define: for _<u>φ</u>_ <u>,</u> _z_ := _<u>z</u>_ <u>,</u> _y_ 1 := _q_ <sup>_L_</sup>, and _y_ 2 := _q_ <sup>_U_</sup> ; for _φ_ <sup>¯</sup>, _z_ := _z_ ¯, _y_ 1 := _q_ <sup>_U_</sup>, and _y_ 2 := _q_ <sup>_L_</sup> ; equation of intersection _f_ ( _x_ ) := _φ_ <sup>_′_</sup> ( _x_ )( _x −_ _y_ 1) + _φ_ ( _y_ 1) _−_ _φ_ ( _x_ ), where _x_ = _z_ at the root of _f_ ( _x_ ) 4: Initialize: (i) initial lower and upper bounds _x_ 0 and _x_ 1; and (ii) error tolerance _ϵ_ tol 5: if _f_ ( _y_ 2) _× f_ (0) _≤_ 0 then 6: _x_ 2 _←_ <sup>_<u>x</u>_</sup> <sup><u>0+</u></sup> 2 <sup>_<u>x</u>_</sup> <sup><u>1</u></sup> 2 7: while _|x_ 1 _−_ _x_ 0 _| ≥_ _ϵtol_ do 8: if _f_ ( _x_ 2) _× f_ ( _x_ 0) _≤_ 0 then 9: _x_ 1 _←_ _x_ 2 _<u>x</u>_ <u>0+</u> _<u>x</u>_ <u>1</u> 10: _x_ 2 _←_ 2 2 11: else 12: _x_ 0 _←_ _x_ 2 _<u>x</u>_ <u>0+</u> _<u>x</u>_ <u>1</u> 13: _x_ 2 _←_ 2 2 14: end if 15: end while 16: _z_ _←_ _x_ 2 17: else 18: _z_ _←_ NaN 19: <u>end if</u> functions (see Figure A.10a): _φ_ ¯( _q_ ) = _<u>φ</u>_ <u>(</u> _q_ ) = - _φ_ ( _q_ <sup>_L_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_L_</sup> )( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _k_ <sup>¯</sup> _φ_ ( _q_ <sup>_U_</sup> ) + _φ_ <sup>_′_</sup> (¯ _z_ )( _q −_ _q_ <sup>_U_</sup> ) _,_ _k_ ¯ _≤_ _q_ _≤_ _q_ <sup>_U_</sup> - _φ_ ( _q_ <sup>_L_</sup> ) + _φ_ <sup>_′_</sup> <u>(</u> _<u>z</u>_ )( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _<u>k</u>_ _φ_ ( _q_ <sup>_U_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_U_</sup> )( _q −_ _q_ <sup>_U_</sup> ) _,_ _<u>k</u>_ _≤_ _q_ _≤_ _q_ <sup>_U_</sup> When _z_ ¯ _≤_ _q_ <sup>_L_</sup> _<_ 0 _< z_ _< q_ <sup>_U_</sup>, _φ_ <sup>¯</sup> ( _·_ ) and _<u>φ</u>_ <u>(</u> _·_ ) are defined as follows (see Figure A.10b): _φ_ ¯( _q_ ) = <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qU</u>_</sup> <sup><u>)</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qL</u>_</sup> <sup><u>)</u></sup> ( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _q_ <sup>_U_</sup> _q_ <sup>_U_</sup> _−_ _q_ <sup>_L_</sup> _<u>φ</u>_ <u>(</u> _q_ ) = - _φ_ ( _q_ <sup>_L_</sup> ) + _φ_ <sup>_′_</sup> <u>(</u> _<u>z</u>_ )( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _<u>k</u>_ _φ_ ( _q_ <sup>_U_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_U_</sup> )( _q −_ _q_ <sup>_U_</sup> ) _,_ _<u>k</u>_ _≤_ _q_ _≤_ _q_ <sup>_U_</sup> When _q_ <sup>_L_</sup> _<_ _z_ ¯ _<_ 0 _< q_ <sup>_U_</sup> _≤_ _<u>z</u>_, _φ_ <sup>¯</sup> ( _·_ ) and _<u>φ</u>_ <u>(</u> _·_ ) are defined as follows (see Figure A.10c): (A.34) (A.35) (A.36) _φ_ ¯( _q_ ) = - _φ_ ( _q_ <sup>_L_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_L_</sup> )( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _k_ <sup>¯</sup> _φ_ ( _q_ <sup>_U_</sup> ) + _φ_ <sup>_′_</sup> (¯ _z_ )( _q −_ _q_ <sup>_U_</sup> ) _,_ _k_ ¯ _≤_ _q_ _≤_ _q_ <sup>_U_</sup> _<u>φ</u>_ <u>(</u> _q_ ) = <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qU</u>_</sup> <sup><u>)</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qL</u>_</sup> <sup><u>)</u></sup> ( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _q_ <sup>_U_</sup> _q_ <sup>_U_</sup> _−_ _q_ <sup>_L_</sup> 29 When 0 _≤_ _q_ <sup>_L_</sup> _<_ _q_ <sup>_U_</sup>, _φ_ <sup>¯</sup> ( _·_ ) and _<u>φ</u>_ <u>(</u> _·_ ) are restricted to the positive domain and defined as follows (see Figure A.10d): _φ_ ¯( _q_ ) = <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qU</u>_</sup> <sup><u>)</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qL</u>_</sup> <sup><u>)</u></sup> ( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _q_ <sup>_U_</sup> _q_ <sup>_U_</sup> _−_ _q_ <sup>_L_</sup> (A.37) _<u>φ</u>_ <u>(</u> _q_ ) = - _φ_ ( _q_ <sup>_L_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_L_</sup> )( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _<u>k</u>_ _φ_ ( _q_ <sup>_U_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_U_</sup> )( _q −_ _q_ <sup>_U_</sup> ) _,_ _<u>k</u>_ _≤_ _q_ _≤_ _q_ <sup>_U_</sup> Lastly, if _q_ <sup>_L_</sup> _<_ _q_ <sup>_U_</sup> _≤_ 0, _φ_ <sup>¯</sup> ( _·_ ) and _<u>φ</u>_ ( _·_ ) are restricted to the negative domain and defined as follows (see Figure A.10e): _φ_ ¯( _q_ ) = - _φ_ ( _q_ <sup>_L_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_L_</sup> )( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _k_ <sup>¯</sup> _φ_ ( _q_ <sup>_U_</sup> ) + _φ_ <sup>_′_</sup> ( _q_ <sup>_U_</sup> )( _q −_ _q_ <sup>_U_</sup> ) _,_ _k_ ¯ _≤_ _q_ _≤_ _q_ <sup>_U_</sup> (A.38) _<u>φ</u>_ <u>(</u> _q_ ) = <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qU</u>_</sup> <sup><u>)</u></sup> <sup>_<u>−</u>_</sup> <sup>_<u>φ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>qL</u>_</sup> <sup><u>)</u></sup> ( _q −_ _q_ <sup>_L_</sup> ) _,_ _q_ <sup>_L_</sup> _≤_ _q_ _≤_ _q_ <sup>_U_</sup> _q_ <sup>_U_</sup> _−_ _q_ <sup>_L_</sup> The HW head loss model _φ_ ( _·_ ) in (A.30) is then replaced with the appropriate polyhedral relaxation _φ_ <sup>ˆ</sup> ( _·_ ) described in (A.34) - (A.38). After rearranging terms, the linear inequality constraint in (A.31) is formulated. 30 (a) _q_ <sup>_L_</sup> _<_ _z_ ¯ _<_ 0 _<_ _<u>z</u>_ _<_ _q_ <sup>_U_</sup> (b) _z_ ¯ _≤_ _q_ <sup>_L_</sup> _<_ 0 _<_ _<u>z</u>_ _<_ _q_ <sup>_U_</sup> (c) _q_ <sup>_L_</sup> _<_ _z_ ¯ _<_ 0 _<_ _q_ <sup>_U_</sup> _≤_ _<u>z</u>_ (d) 0 _≤_ _q_ <sup>_L_</sup> _<_ _q_ <sup>_U_</sup> (e) _q_ <sup>_L_</sup> _<_ _q_ <sup>_U_</sup> _≤_ 0 Figure A.10: Polyhedral relaxations of nonconvex HW head loss constraints (A.30) 31 B. Optimization-based bound tightening algorithm In Section 3.1, we implement an optimization-based bound tightening (OBBT) algorithm to strengthen the convex relaxations formulated for Subproblem (LP). Following the supplementary material from Pecci et al. (2022), we tighten polyhedral relaxations for the nonconvex constraints by reducing the flow variable domain for link indices corresponding to the set of core links _C_ . For each OBBT iteration, we solve two optimization problems to independently maximize and minimize flow _qj,t_ for all links _j_ _∈C_ and hydraulic time steps _t_ _∈{_ 1 _, . . ., nt}_ . These are represented by the linear program described in Subproblem (LP), with objective functions set to both minimize and maximize _qj,t_ . We therefore solve 2 _nt|C|_ linear programs for each OBBT iteration. The algorithm is terminated once bound tightening progress diminishes between successive iterations, which is defined by a set tolerance on the maximum flow domain diameter. Moreover, we exclude forest links from the optimization scheme since their flows are defined _a priori_ by the aggregate of downstream demands and the maximum flow defined for automatic flushing valves. Psuedocode for the OBBT algorithm is described in Algorithm B1. <u>Algorithm B1</u> <u>OBBT</u> 1: Input: network data and initial flow bounds _q_ <sup>_L_</sup> and _q_ <sup>_U_</sup> 2: Output: tightened flow bounds _q_ <sup>_L_</sup> and _q_ <sup>_U_</sup> 3: Initialize _k_ max, _ϵ_ tol, and set _k_ = 1, _ϵ_ = 0 4: Initialize empty set diam _←∅_ 5: Compute initial maximum flow domain diameter: diam(1) = max _t∈{_ 1 _,...,nt}_ max _j∈C_ ( _qj,t_ <sup>_U_</sup> <sup>_−_</sup> <sup>_q_</sup> _j,t_ <sup>_L_</sup> 5: Compute initial maximum flow domain diameter: diam(1) = max _t∈{_ 1 _,...,nt}_ max _j∈C_ ( _qj,t_ <sup>_U_</sup> <sup>_−_</sup> <sup>_q_</sup> _j,t_ <sup>_L_</sup> <sup>)</sup> 6: while _ϵ_ tol _≥_ _ϵ_ and _k_ _≤_ _k_ max do 7: for _t ∈{_ 1 _, . . ., nt}_ do 8: for _j_ _∈C_ do 9: Solve Subproblem (LP) with objective function set to minimize _qt,j_ 10: Update lower flow bound _qt,j_ <sup>_L_</sup> 10: _t,j_ 11: Solve Subproblem (LP) with objective function set to maximize _qt,j_ 12: Update upper flow bound _qt,j_ <sup>_U_</sup> 12: _t,j_ 13: end for 14: end for 15: Compute diam( _k_ + 1) = max _t∈{_ 1 _,...,nt}_ max _j∈C_ ( _qj,t_ <sup>_U_</sup> _j,t_ <sup>_L_</sup> <sup>)</sup> _j,t_ <sup>_U_</sup> <sup>_−_</sup> <sup>_q_</sup> _j,t_ <sup>_L_</sup> <u>diam(</u> _<u>k</u>_ <u>+1)</u> 16: _ϵ_ _←_ diam( _k_ ) 17: _k_ _←_ _k_ + 1 18: <u>end while</u> 32 C. Strictly feasible sequential convex programming algorithm In Section 3.3.1, we implement a strictly feasible sequential convex programming (SFSCP) solver to compute feasible solutions to the nonlinear programming (NLP) control problem. This follows the implementations in Wright et al. (2015) and Abraham et al. (2016), with the addition of the continuous decision variable _α_ to model the operation of flushing valves. We present the SFSCP solver psuedocode in Algorithm C1, which is adapted from Wright et al. (2015). The variables used in Algorithm C1 are defined as follows: _f_ denotes the continuous sum of sigmoids SCC objective function _f_ SCC� <sup>;</sup> <sup>_η_</sup> <sup>and</sup> <sup>_α_</sup> <sup>model operational</sup> settings for pressure control and flushing valves, respectively; _dη_ and _dα_ denote step directions for the aforementioned continuous variables; _q_ and _h_ represent hydraulic states computed for each control configuration; and _F_ is the set defining the hydraulically feasible region. <u>Algorithm C1</u> <u>SFSCP solver</u> 1: Input: network data, fixed valve configuration, and feasible starting point _x_ 0 2: Output: _f_ <sup>_∗_</sup> and corresponding operational control settings _η_ <sup>_∗_</sup> and _α_ <sup>_∗_</sup> 3: Initialize _ϵ_ tol, _k_ max, and set _k_ = 1 4: Set _xk_ _←_ _x_ <sup>0</sup> 5: Compute initial hydraulic states _qk, hk_, and objective function _fk_ 6: while <sup>_<u>|fk−</u>_</sup> _|f_ <sup>_<u>f</u>_</sup> _k_ <sup>_<u>k</u>_</sup> _|_ <sup><u>+1</u></sup> <sup>_<u>|</u>_</sup> _> ϵ_ tol and _k_ _≤_ _k_ max do 7: _ηk_ +1 _, αk_ +1 _←_ NLP control problem with first-order Taylor approximations of nonlinear SCC objective function and energy conservation constraints 8: _dηk, dαk_ _←_ _ηk_ +1 _−_ _ηk, αk_ +1 _−_ _αk_ 9: _β_ = 1 10: _qk_ +1 _, hk_ +1 _←_ hydraulic simulation with controls _ηk_ + _βdηk, αk_ + _βdαk_ 11: _fk_ +1 _←_ recompute objective function 12: while _fk_ _> fk_ +1 or _xk_ +1 _∈F/_ do 13: _β_ _←_ _β/_ 2 14: _ηk_ +1 _, αk_ +1 _←_ _ηk_ + _βdηk, αk_ + _βdαk_ 15: _qk_ +1 _, hk_ +1 _←_ hydraulic simulation with controls _ηk_ + _βdηk, αk_ + _βdαk_ 16: _fk_ +1 _←_ recompute objective function 17: end while 18: _k_ _←_ _k_ + 1 19: _ηk, αk_ _←_ _ηk_ +1 _, αk_ +1 20: _fk_ _←_ _fk_ +1 21: <u>end while</u> 33 D. NLP solver performance comparison We use the SFSCP solver in this work for multiple reasons. First, it guarantees strict hydraulic feasibility for each optimization step and shows fast convergence properties in previously studied WDN control problems, as demonstrated in Wright et al. (2015). Second, since state-of-the-art nonlinear optimization solvers (e.g. IPOPT) require second-order derivatives, it avoids the complications associated with the nonsmooth HW head loss model, which has an unbounded hessian at the origin. Potential complications are exacerbated by the highly nonlinear SCC objective function used in this study. In order to justify application of the SFSCP solver, though, we conduct a performance comparison with solutions computed by IPOPT. Following Dolan and Mor´e (2002), we derive performance profiles to objectively compare the two solvers. Let _X_ := _{_ 1 _, . . ., nx}_ and _S_ := - _s_ SFSCP _, s_ IPOPT� be the set of test experiments and solvers, respectively, Let _X_ := _{_ 1 _, . . ., nx}_ and _S_ := - _s_ SFSCP _, s_ IPOPT� be the set of test experiments and solvers, respectively, where _nx_ is the number of experiments tested. Since we are interested in comparing the SCC objective function values, we set the performance metric _fx,s_ equal to _f_ SCC� <sup>for each experiment</sup> <sup>_x_</sup> <sup>produced by solver</sup> _s_ . We then compare solver performance for all experiments _x ∈X_ by normalizing _fx,s_ to the best computed solution for a particular experiment by any solver _s ∈S_ . This comparison is expressed as follows: - _s_ SFSCP _, s_ IPOPT _<u>fx,s</u>_ _rx,s_ = min <u>�</u> _fx,s_ _| s ∈S_ <u>�</u> _,_ (D.1) where _rx,s_ is the performance ratio of solver _s_ for experiment _x_ . Note that, if the solver produces an error or fails to find a feasible solution to the SCC control problem, we assign _fx,s_ = + _∞_ . An overall performance assessment of solver _s ∈S_ is then obtained by deriving the cumulative distribution function _ρs_ ( _τ_ ) = <sup><u>1</u></sup> _nx_ - _,_ (D.2) size - _x ∈X_ _| rx,s_ _≤_ _τ_ where _ρs_ ( _τ_ ) represents the percentage of experiments within a factor _τ_ of the best solution for solver _s ∈S_ . Figure D.1 presents the SFSCP and IPOPT solver performance profiles for _nx_ = 36 design-for-control experiments. In addition to existing unidirectional pressure reducing valves (PRVs), these experiments involved a combination of _nv_ = 1 _, . . .,_ 3 bidirectional dynamic boundary valves (DBVs) and _nf_ = 0 _, . . .,_ 3 automatic flushing valves (AFVs), as described in Section 4.1 of the manuscript. From Figure D.1, we first observe that the SFSCP solver finds feasible solutions for all experiments, while IPOPT returns infeasibility errors for just over 20% of the tested cases. This is illustrated by the distance along the x-axis from the origin to the vertical segment of the IPOPT solver (blue) plot. When looking at individual experiments, we identified a few features which may be contributing to IPOPT’s infeasibility errors. First, infeasibility occurs almost entirely for the larger case study network (e.g. BWFLnet), of which also has a greater range in operational demands and control features. Second, since good performance was recorded for the feasibility restoration problem (see Section 3.3.2 of the manuscript), we believe the highly nonlinear SCC objective function, in combination with the unbounded hessian of the HW model, to be a key factor in the encountered infeasibility errors. In any case, Figure D.1 shows the SFSCP solver to be within 10% of the best solution for all tested experiments, which is comparable to the IPOPT solver for experiments when no feasibility issues were present. This suggests that the SFSCP solver is appropriate for the current SCC design-for-problem study. Acknowledgments This work was supported by EPSRC (EP/P004229/1, Dynamically Adaptive and Resilient Water Supply Networks for a Sustainable Future), Bristol Water Plc, Analytical Technology (ATi), and Imperial College London’s Department of Civil and Environmental Engineering Skempton Scholarship. 34 1 0.95 0.9 0.85 0 0.2 0.4 0.6 0.8 1 Figure D.1: SFSCP and IPOPT solver performance profiles References Abraham, E., Blokker, M., and Stoianov, I. (2016). Network analysis, control valve placement and optimal control of flow velocity for self-cleaning water distribution systems. _18th Conference on Water Distribu-_ _tion System Analysis, WDSA2016_, pages 1–9. Abraham, E., Blokker, M., and Stoianov, I. (2018). Decreasing the discoloration risk of drinking water distribution systems through optimized topological changes and optimal flow velocity control. _Journal of_ _Water Resources Planning and Management_, 144(2):04017093. Abraham, E. and Stoianov, I. (2015). Sparse null space algorithms for hydraulic analysis of large-scale water supply networks. _Journal of Hydraulic Engineering_, 142(3). Aisopou, A., Stoianov, I., and Graham, N. (2012). In-pipe water quality monitoring in water supply systems under steady and unsteady state flow conditions: A quantitative assessment. _Water Research_, 46(1):235– 246. Armand, H., Stoianov, I., and Graham, N. (2017). A holistic assessment of discolouration processes in water distribution networks. _Urban Water Journal_, 14(3):263–277. Armand, H., Stoianov, I., and Graham, N. (2018). Impact of network sectorisation on water quality manage ment. _Journal of Hydroinformatics_, 20(2):424–439. Belotti, P., Lee, J., Liberti, L., Margot, F., and W¨achter, A. (2009). Branching and bounds tightening techniques for non-convex minlp. _Optimization Methods and Software_, 24(4-5):597–634. Blokker, E., Vreeburg, J., Schaap, P., and van Dijk, J. (2010). The self-cleaning velocity in practice. _Water_ _Distribution System Analysis (WDSA)_, pages 187–199. Blokker, M., Vogelaar, H., Goos, K., and Vreeburg, J. (2012). Using valve manipulation to manage dis colouration risk in drinkiing water. _Water Asset Management International_, 1:7–10. 35 Boxall, J., Skipworth, P., and Saul, A. (2001). A novel approach to modelling sediment movement in distribution mains based on particle characteristics. _Computing and Control in the Water Industry (CCWI)_ _Conference_ . Boxall, J. B. and Dewis, N. (2005). Identification of discolouration risk through simplified modelling. American Society of Civil Engineers. Braga, A. S., Saulnier, R., Filion, Y., and Cushing, A. (2020). Dynamics of material detachment from drinking water pipes under flushing conditions in a full-scale drinking water laboratory system. _Urban_ _Water Journal_, 17(8):745–753. Bragalli, C., Lodi, A., and D’Ambrosio, C. (2012). On the optimal design of water distribution networks: a practical minlp approach. _Optimization and Engineering_, 13(2):219–246. Currie, J., Wilson, D. I., Sahinidis, N., and Pinto, J. (2012). Opti: Lowering the barrier between open source optimizers and the industrial matlab user. _Foundations of computer-aided process operations_, 24:32. Deuerlein, J. W. (2008). Decomposition model of a general water supply network graph. _Journal_ _of_ _Hy-_ _draulic Engineering_, 134(6):822–832. Dolan, E. D. and Mor´e, J. J. (2002). Benchmarking optimization software with performance profiles. _Math-_ _ematical Programming_, 91(2):201–213. Eliades, D. G., Kyriakou, M., Vrachimis, S., and Polycarpou, M. M. (2016). Epanet-matlab toolkit: An open-source software for interfacing epanet with matlab. pages 1–8. Furnass, W. R., Collins, R. P., Husband, P. S., Sharpe, R. L., Mounce, S. R., and Boxall, J. B. (2014). Mod elling both the continual erosion and regeneration of discolouration material in drinking water distribution systems. _Water Science and Technology:_ _Water Supply_, 14(1):81–90. Gibson, J., Karney, B., and Guo, Y. (2019). Water quality and fire protection trade-offs in water distribution networks. _Journal - American Water Works Association_, 111(11):44–52. Gurobi Optimization (2022). Gurobi optimizer 9.5.0 reference manual. Husband, P. S. and Boxall, J. B. (2011). Asset deterioration and discolouration in water distribution systems. _Water Research_, 45(1):113–124. Koch, T., Ralphs, T., and Shinano, Y. (2012). Could we use a million cores to solve an integer program? _Mathematical Methods of Operations Research_, 76(1):67–93. Larock, B., Jeppson, R., and Watters, G. (1999). _Hydraulics of Pipeline Systems_ . CRC press. Liberti, L. and Pantelides, C. C. (2003). Convex envelopes of monomials of odd degree. _Journal of Global_ _Optimization_, 25:157–168. Liu, G., Bakker, G. L., Li, S., Vreeburg, J. H., Verberk, J. Q., Medema, G. J., Liu, W. T., and Dijk, J. C. V. (2014). Pyrosequencing reveals bacterial communities in unchlorinated drinking water distribution system: An integral study of bulk water, suspended solids, loose deposits, and pipe wall biofilm. _Environmental Science and Technology_, 48(10):5467–5476. 36 Liu, G., Verberk, J. Q., and Dijk, J. C. V. (2013). Bacteriology of drinking water distribution systems: An integral and multidimensional review. _Applied Microbiology and Biotechnology_, 97(21):9265–9276. Local Government Association and Water UK (2007). National guidance document on the provision of water for fire fighting. Machell, J. and Boxall, J. (2014). Modeling and field work to investigate the relationship between age and quality of tap water. _Journal of Water Resources Planning and Management_, 140(9):04014020. Maier, H. R., Kapelan, Z., Kasprzyk, J., Kollat, J., Matott, L. S., Cunha, M. C., Dandy, G. C., Gibbs, M. S., Keedwell, E., Marchi, A., Ostfeld, A., Savic, D., Solomatine, D. P., Vrugt, J. A., Zecchin, A. C., Minsker, B. S., Barbour, E. J., Kuczera, G., Pasha, F., Castelletti, A., Giuliani, M., and Reed, P. M. (2014). Evolutionary algorithms and other metaheuristics in water resources: Current status, research challenges and future directions. _Environmental Modelling and Software_, 62:271–299. Mala-Jetmarova, H., Sultanova, N., and Savic, D. (2017). Lost in optimisation of water distribution systems? a literature review of system operation. _Environmental Modelling and Software_, 93:209–254. Miller, G. (2014). _Numerical analysis for engineers and scientists_ . Nerantzis, D. and Stoianov, I. (2022). Optimization-based selection of hydrants and valves control in water distribution networks for fire incidents management. _IEEE Systems Journal_, pages 1–12. Pecci, F., Abraham, E., and Stoianov, I. (2017). Quadratic head loss approximations for optimisation prob lems in water supply networks. _Journal of Hydroinformatics_, 19(4):493–506. Pecci, F., Abraham, E., and Stoianov, I. (2019). Global optimality bounds for the placement of control valves in water supply networks. _Optimization and Engineering_, 20(2):457–495. Pecci, F., Stoianov, I., and Ostfeld, A. (2022). Convex heuristics for optimal placement and operation of valves and chlorine boosters in water networks. _Journal of Water Resources Planning and Management_, 148(2). Prest, E. I., Schaap, P. G., Besmer, M. D., and Hammes, F. (2021). Dynamic hydraulics in a drinking water distribution system influence suspended particles and turbidity, but not microbiology. _Water_, 13(109):1– 18. Rossman, L., Woo, H., Tryby, M., Shang, F., Janke, R., and Haxton, T. (2020). Epanet 2.2 user manual. Ryan, G., Mathes, P., Haylock, G., Jayaratne, A., Wu, J., Noui-Mehidi, N., Grainger, C., and Nguyen, B. (2008). Particles in water distribution systems. Sahinidis, N. V. (2019). Mixed-integer nonlinear programming 2018. _Optimization_ _and_ _Engineering_, 20(2):301–306. Schaub, M., Lehmann, J., Yaliraki, S., and Barahona, M. (2014). Structure of complex networks: Quantify ing edge-to-edge relations by failure-induced flow redistribution. _Network Science_, 2(1):66–89. Sharpe, R. L., Biggs, C. A., and Boxall, J. B. (2019). Hydraulic conditioning to manage potable water discolouration. _Proceedings of the Institution of Civil Engineers:_ _Water Management_, 172(1):3–13. 37 Simpson, A. R., Elhay, S., and Alexander, B. (2014). Forest-core partitioning algorithm for speeding up anal ysis of water distribution systems. _Journal of Water Resources Planning and Management_, 140(4):435– 443. Udell, M. and Boyd, S. (2014). Maximizing a sum of sigmoids. Udell, M. and Boyd, S. (2016). Bounding duality gap for separable problems with linear constraints. _Com-_ _putational Optimization and Applications_, 64(2):355–378. Ulusoy, A. J., Mahmoud, H. A., Pecci, F., Keedwell, E. C., and Stoianov, I. (2022). Bi-objective design for-control for improving the pressure management and resilience of water distribution networks. _Water_ _Research_, 222:118914. Ulusoy, A. J., Pecci, F., and Stoianov, I. (2020). An minlp-based approach for the design-for-control of resilient water supply systems. _IEEE Systems Journal_, 14(3):4579–4590. Valiantzas, J. D. (2008). Explicit power formula for the darcy-weisbach pipe flow equation: Application in optimal pipeline design. _Journal of Irrigation and Drainage Engineering_, 134(4):454–461. van der Wielen, P. W. and Lut, M. C. (2016). Distribution of microbial activity and specific microorganisms across sediment size fractions and pipe wall biofilm in a drinking water distribution system. _Water Science_ _and Technology:_ _Water Supply_, 16(4):896–904. van Summeren, J. and Blokker, M. (2017). Modeling particle transport and discoloration risk in drinking water distribution networks. _Drinking Water Engineering and Science_, 10(2):99–107. Vigerske, S. (2022). Minlplib: A library of mixed-integer and continuous nonlinear programming instances. Vreeburg, J. and Boxall, J. (2007). Discolouration in potable water distribution systems: A review. _Water_ _Research_, 41(3):519–529. Vreeburg, J. H., Blokker, E. J., Horst, P., and van Dijk, J. C. (2009). Velocity-based self-cleaning residential drinking water distribution systems. _Water Science and Technology:_ _Water Supply_, 9(6):635–641. Waldron, A., Pecci, F., and Stoianov, I. (2020). Regularization of an inverse problem for parameter estimation in water distribution networks. _Journal_ _of_ _Water_ _Resources_ _and_ _Planning_ _Management_, 146(9):04020076. Wright, R., Abraham, E., Parpas, P., and Stoianov, I. (2015). Control of water distribution networks with dynamic dma topology using strictly feasible sequential convex programming. _Water Resources Research_, 51(12):9925–9941. Wright, R., Stoianov, I., Parpas, P., Henderson, K., and King, J. (2014). Adaptive water distribution networks with dynamically reconfigurable topology. _Journal of Hydroinformatics_, 16(6):1280–1301. W¨achter, A. and Biegler, L. T. (2006). On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. _Mathematical Programming_, 106(1):25–57. 38

섹션 본문 108문단 · 75,815자

(제목 없음)

1The provision of self-cleaning velocities has been shown to reduce the risk of discolouration in water distribution networks (WDNs). Despite these findings, control implementations continue to be focused primarily on pressure and leakage management. This paper considers the control of diurnal flow velocities to maximize the self-cleaning capacity (SCC) of WDNs. We formulate a new optimal design-for-control problem where locations and operational settings of pressure control and automatic flushing valves are jointly optimized. The problem formulation includes a nonconvex objective function, nonconvex hydraulic conservation law constraints, and binary variables for modelling valve placement, resulting in a nonconvex mixed integer nonlinear programming (MINLP) optimization problem. Considering the challenges with solving nonconvex MINLP problems, we propose a heuristic algorithm which combines convex relaxations (with domain reduction), a randomization technique, and a multi-start strategy to compute feasible solutions. We evaluate the proposed algorithm on case study networks with varying size and degrees of complexity, including a large-scale operational network in the UK. The convex multi-start algorithm is shown to be a more robust solution method compared to an off-the-shelf genetic algorithm, finding good-quality feasible solutions to all design-for-control numerical experiments. Moreover, we demonstrate the implemented multi-start strategy to be a fast and scalable method for computing feasible solutions to the nonlinear SCC control problem. The proposed method extends the control capabilities and benefits of dynamically adaptive networks to improve water quality in WDNs.

Introduction

2The management of water quality in water distribution networks (WDNs) presents a complex operational challenge. As a direct consequence of ageing and deteriorating infrastructure, the mitigation of discolouration incidents is becoming one of the key operational challenges within water quality management programmes. In addition to discolouration being the largest source of customer complaints (Vreeburg and Boxall, 2007, Husband and Boxall, 2011, Armand et al., 2017, there is a growing body of evidence suggesting its occurrence harbours increased microbial activity (Liu et al., 2013, 2014, van der Wielen and Lut, 2016. These conditions can accelerate biofilm growth and drastically reduce the efficacy of disinfectant residuals in protecting against waterborne illness and contaminants intrusion. Moreover, WDNs in the UK are highly sectorized and operated with fixed topology for purposes of leakage management. This type of network configuration, referred to as district metered areas (DMAs), has been demonstrated to exacerbate water quality deterioration and increase the risk of discolouration incidents (Machell andBoxall, 2014, Armand et al., 2018). With progressively stringent water quality regulations, water companies are seeking effective and cost-efficient operational control strategies to reduce the risk of discolouration.

3Discolouration is primarily a consequence of resuspended material accumulated within WDNs (Vreeburg and Boxall, 2007). It can materialize from the cumulative impact of the following processes (Boxall and Dewis, 2005): (i) the ingress and/or development of particulate matter; (ii) the accumulation of particulates at the pipe invert and/or formation of cohesive layers at the pipe wall; and (iii) a hydraulic disturbance (i.e. trigger event), which mobilizes loose particulates and generates sufficient shear stress to overcome cohesive forces at the pipe wall. Such hydraulic disturbances can be generated from different phenomena, including pressure transients during unsteady hydraulic conditions (Aisopou et al., 2012). Apart from their origin, the physical pathways of discolouration are intrinsically connected to network hydraulics. In a recent study focusing on the impact of network sectorization on water quality, Armand et al. (2018) proposed a set of surrogate hydraulic variables for discolouration risk assessment. Central to their findings was the role of diurnal flow velocities on particle transport and fate. This connection between discolouration and hydrodynamic conditions has been supported by numerous experimental and theoretical studies; see van Summeren and Blokker (2017) and Armand et al. (2018) for reviews on the topic. These studies have mainly focused on the development of predictive tools for modelling particle transport and accumulation processes. Most notably, Boxall et al. (2001) developed the Prediction of Discolouration in Distribution Systems (PODDS) model, an empirically-based numerical tool which aims to characterize cohesive layer strength at the pipe wall. The PODDS model was later updated to account for material regeneration in Furnass et al. (2014), where both erosion and regeneration processes require calibration using continuous flow and turbidity data. Because such tools require extensive field testing and are generally limited to pipe-level assessments, their use in practice has not yet been widespread. Recognizing this limitation, van Summeren and Blokker (2017) presented a theoretical particle transport model, combining the effects of gravitational settling, hydraulic shear stresses, and bed-load transport. To complement this, several laboratory-based experimental studies have emerged to better understand the complex interactions between particle properties and pipe hydraulics (e.g. Sharpe et al., 2019;Braga et al., 2020).

4In addition to predictive modelling, research has also focused on reducing the severity and frequency of discolouration incidents through network design, maintenance, and control. Water companies in the Netherlands have been conducting experimental research on the design and implementation of controls for self-cleaning networks. The self-cleaning capacity (SCC) of a WDN is defined as the ability for pipes to experience peak daily flow velocities above a threshold required to routinely re-suspend particles and thus prevent accumulation (Vreeburg et al., 2009). Previous experimental programmes have suggested resuspension velocities on the order of 0.2 m/s to 0.25 m/s in distribution pipes (Ryan et al., 2008, Blokker et al., 2010. This has been corroborated with a recent field study monitoring turbidity under various flow rates, where an increase in turbidity levels were observed at flow velocities greater than 0.2 m/s (Prest et al., 2021). Water companies in the Netherlands have demonstrated successful self-cleaning implementations by redesigning looped, oversized networks to branched layouts with smaller diameter pipes (Vreeburg et al., 2009). A recent study has also investigated the trade-off between self-cleaning velocities and fire flow capacity in North American WDNs (Gibson et al., 2019). However, since the redesign of WDN infrastructure becomes cost-prohibitive at scale, there have been recent forays in the reconfiguration of existing network topology to promote self-cleaning networks (Blokker et al., 2012, Abraham et al., 2016, 2018.

5Combining UK and Dutch experience, Abraham et al. (2016Abraham et al. ( , 2018 formulated an optimization problem for increasing SCC by redistributing flow through changes in network topology. More specifically, the optimization problem aimed to maximize the number of pipes with flow velocities above a self-cleaning threshold through two separate strategies: (i) optimal closure of isolation valves and (ii) optimal operational settings of existing pressure control valves (Abraham et al., 2016(Abraham et al., , 2018. Abraham et al. (2018) solved the problem of optimizing valve closures using a linear graph analysis tool. Following Schaub et al. (2014), a line-outage distribution factor (LODF) matrix was computed to estimate the flow redistribution resulting from an outage (closure) of an (or multiple) edge-to-edge relation(s). For the optimal control problem, Abraham et al. (2016) computed a local solution by approximating the nonsmooth objective function as a continuous nonlinear function, followed by application of a tailored sequential convex programming algorithm. While the benefits of the LODF solution method for optimal valve closures were demonstrated numerically using an operational network in the Netherlands, results from the control problem were limited to a small-scale theoretical network. Moreover, decision variables were restricted to the control of existing unidirectional pressure reducing valves (PRVs). Building on the SCC optimization problem posed in Abraham et al. (2016Abraham et al. ( , 2018, this manuscript considers both control and design-for-control problem formulations. The latter involves the simultaneous optimization of valve placement and operational settings for both existing and new control valves. In addition to unidirectional PRVs, this work also considers bidirectional dynamic boundary valves (DBVs) and automatic flushing valves (AFVs) as dynamic hydraulic controls. These hydraulic controls were developed to facilitate the novel operational framework of dynamically adaptive networks (Wright et al., 2014, Ulusoy et al., 2022. The resulting optimization problem is formulated as a nonconvex mixed integer nonlinear program (MINLP).

6Both mathematical optimization and heuristic methods have been used to solve design and control problems in WDNs (see literature review in Mala-Jetmarova et al., 2017). For mathematical optimization methods, scalability is recognized as a current limitation in solving MINLP problems to global optimality (Koch et al., 2012, Sahinidis, 2019; that is, the implementation of global solvers become impractical for large problem cases. Consequently, heuristic approaches are often employed to compute satisfactory feasible solutions. A common heuristic method used for WDN optimization problems is the genetic algorithm (GA). While GAs have been successfully applied to design problems, the computational effort required to find solutions sufficiently close to the global optimum grows rapidly with problem size (Maier et al., 2014). In this manuscript, we develop a heuristic algorithm based on convex optimization and a multi-start scheme to compute feasible solutions to the considered MINLP problem. To handle integer variables, we first formulate a convex subproblem through polyhedral relaxations of nonconvex terms and the continuous relaxation of binary variables. We subsequently employ a randomization heuristic to sample N candidate valve configurations from the set of fractional values generated from the convex subproblem. We then fix binary variables for each sampled valve configuration and compute (locally) optimal operational settings from a nonlinear programming (NLP) control problem. This follows the heuristic algorithm presented in Pecci et al. (2022), extending its application to the SCC design-for-control problem and to the nonsmooth Hazen-Williams friction model. Since the degree of nonlinearity of the SCC problem is higher than the problem investigated in Pecci et al. (2022), we include a multi-start strategy and a feasibility restoration problem for selecting starting points. This step aims to minimize the risk of poor local optima as well as ensure hydraulic feasibility of the NLP control problem. Finally, the best feasible solution is selected from the set of sampled valve configurations. The proposed heuristic algorithm further increases the benefits from the implementation of dynamically adaptive networks as it expands their control capabilities to enhance water quality in WDNs.

7This manuscript is organized as follows. In Section 2, we formulate the design-for-control problem of maximizing the network SCC through dynamic hydraulic controls. We then present the proposed heuristic algorithm in Section 3. Finally, in Section 4, we demonstrate the performance of the developed heuristic algorithm using three case study networks with varying size and degrees of complexity. To facilitate a broader discussion on heuristic approaches for the design and control of WDNs, we compare the results with an off-the-shelf GA implementation, which is a common approach used in the literature.

Problem formulation

8We investigate a design-for-control problem to maximize the length of network pipes experiencing flow velocities above a given self-cleaning capacity (SCC) threshold. This is achieved by installing new valves and/or controlling their operational settings. For this purpose, our problem formulation considers three valve types as pressure and connectivity control actuators. First, pressure reducing valves (PRVs), which are modelled having unidirectional flow. Second, bidirectional dynamic boundary valves (DBVs), for which flow is permitted in both directions across discrete model time steps. Here, DBVs represent the operation of remote-controlled isolation valves, which modulate flow and pressure between adjacent zones. Third, automatic flushing valves (AFVs), whose flushing rate is bounded by a set maximum value. Throughout this manuscript, we refer to either PRVs or DBVs as control valves, as both have the capability of controlling pressure and are modelled at network links. On the other hand, AFVs are simply referred to as flushing valves and are modelled at network nodes. We consider operational scenarios, for which PRV locations have been fixed to minimize average zone pressure (AZP), and thus decision variables include only their operational settings. In comparison, both locations and operational settings of DBVs and AFVs are considered as decision variables. The operational settings of valves are modelled as continuous variables, whereas their placement (location) are modelled through binary variables. All network links and nodes are considered as potential locations of DBVs and AFVs, respectively. As the current stage of this work focuses on the selfcleaning capacity of pipes at the DMA or distribution level, we do not consider storage tanks or pumping activity as forms of hydraulic control. Therefore, we assume discrete and hydraulically independent model time steps. Finally, it is noted that this work relies on the availability of a calibrated hydraulic model.

Hydraulic variables and constraints

9The problem considers a water distribution network (WDN) with n p links, n n demand nodes and n 0 known head nodes (e.g. water sources, reservoirs). The network is modelled as a directed graph with n p edges (links) and n n + n 0 vertices (nodes). A demand-driven hydraulic analysis is used to simulate steady-state network hydraulics over n t discrete time steps. For each time step t ∈ {1, . . . , n t }, known hydraulic conditions are given by vectors of nodal demands d t ∈ R nn and source hydraulic heads h 0 t ∈ R n0 . Moreover, vectors η t ∈ R np and α t ∈ R nn are included to model local losses introduced by the action of control valves and operational demands at flushing valves, respectively. Unique vectors of hydraulic states q t ∈ R np and h t ∈ R nn are computed by solving the following steady-state energy (1a) and mass (1b) conservation equations governing pipe flow:

10where A 12 ∈ R np×nn and A 10 ∈ R np×n0 are the link-node incidence matrices for demand and known head nodes, respectively; and the vector φ(q t ) = [φ 1 (q 1,t ) . . . φ np (q np,t )] T models frictional head losses associated with flows q t . Omitting time index t, φ j (q j ) is defined in general form for flow conveyed across link j as:

11where the resistance coefficient r j and exponent n j , both independent of time t, take different values depending on the link type (e.g. pipe or valve) and on the frictional head loss model. For valve links, n j = 2 and r j = 8Kj gπ 2 D 4 j , with K j and D j representing the valve loss coefficient and diameter, respectively (Larock et al., 1999). In this work, we apply the Hazen-Williams (HW) model to characterize frictional head losses across pipe links. The HW model is an explicit and empirical relationship between pipe flow and frictional head loss, with n j = 1.852 and r j is defined as follows for all j ∈ {1, . . . , n p }:

12where C is the HW coefficient, a dimensionless number representing frictional characteristics; L is pipe length in meters; and D is pipe diameter in meters (Larock et al., 1999). Similarly, explicit approximations of the Darcy-Weisbach formula (e.g. Valiantzas, 2008) could be used to model frictional head losses. Finally, it is convenient to isolate the nonlinear term φ(q t ) in (1a). Here, we introduce a vector of auxiliary variables θ t ∈ R np , which separates the energy conservation constraint into its linear and nonlinear components, as follows:

13Valve placement and operation are modelled as follows. For each time step t ∈ {1, . . . , n t }, the continuous variable η t ∈ R np presented in (1a) models the local losses introduced by the action of control valves and the continuous variable α t ∈ R nn presented in (1b) models the flow emitted at flushing valves. Moreover, binary variables z ∈ {0, 1} np are included to model PRV and DBV placement, and v + t ∈ {0, 1} np and v − t ∈ {0, 1} np to assign their control capabilities in the positive or negative flow direction, respectively, across each time step t. Thus, for all links j ∈ {1, . . . , n p } and time steps t ∈ {1, . . . , n t }, binary variables z j , v + j,t , and v − j,t are set as

14Analogously, the placement of AFVs at network nodes is modelled using binary variables y ∈ {0, 1} nn , defined as y i = 1 flushing valve placed at node i 0 no valve

15These binary variables are subject to the following physical and economical constraints, which limit pressure control capabilities in a single direction at each time step t (7a) and enforce a maximum number of control valves n v and flushing valves n f considered for installation (7b)-(7c):

16Since we assume that existing PRVs have fixed location and unidirectional flow, z j , v + j,t , and v − j,t are set a priori for all time steps t ∈ {1, . . . , n t } at the known set of PRV links N PRV ⊆ {1, . . . , n p }.

17We introduce constant vectors to bound the continuous hydraulic variables and formulate big-M constraints for modelling the operation of control and flushing valves. For a given vector of maximum allowed velocities u max ∈ R np and vector of link cross-sectional areas A ∈ R np , let q L t = −Au max and q U t = Au max be the vectors of lower and upper bound flows across network links at time step t, respectively. Bounds on the auxiliary head loss vector θ t are set as θ L t := φ(q L t ) and θ U t := φ(q U t ). Moreover, let h min t and h max t ∈ R nn specify minimum and maximum heads at network nodes, respectively. The minimum head is set to a minimum regulatory pressure plus the node elevation and the maximum head is set to the largest available known source head. Bounds on η t for j ∈ {1, . . . , n p } are then defined as follows:

18We formulate big-M constraints to model valve placement and enforce energy conservation at control valve links, ensuring η t and q t act in the same direction. These constraints are written as follows:

19Finally, lower and upper bounds on hydraulic variables h t , q t , η t and θ t are set to define the feasible solution space,

202.2. Self-cleaning capacity objective function The objective of this study is to maximize the length of network pipes satisfying the self-cleaning capacity (SCC) threshold. The SCC objective function is defined as the following length-weighted sum over all pipes n p and hydraulic time steps n t (Abraham et al., 2018):

21where A is the link cross-sectional area; and κ j (·) is an indicator function which models the state of pipe velocities with reference to a minimum threshold. The indicator function is described for link j as follows

22with u min j representing the threshold flow velocity at link j, defined a priori (see presented literature in Section 1). Moreover, a weighting is included to normalize the length of link j to the entire network, w j = Lj np k=1 L k , where L ∈ R np is the vector of pipe lengths.

23The SCC objective function f SCC is nonsmooth at ±u min , resulting in unbounded gradients. Therefore, in order to employ gradient-based optimization methods, the threshold function κ(·) is approximated with a continuous sum of sigmoids (or logistic) function, as proposed in Abraham et al. (2016). The sigmoidal function has positive and negative components, defined by ψ + j (u) :

24, respectively, where ρ is a parameter which sets the sigmoid function curvature. The following expression combines these sigmoid functions to approximate f SCC posed in (12):

25where velocity is defined as u j,t = qj,t

26Aj . In accordance with that reported in Abraham et al. (2016), we found ρ ≤ 100 provided a step-like objective function, whilst still being sufficiently smooth at the threshold boundaries for gradients to exist. An example of the SCC indicator function κ(·) and its continuous sum of sigmoids approximation f SCC are shown in Figure 1.

Mixed-integer nonlinear program

27The SCC design-for-control problem aims to maximize (14), subject to hydraulic conservation laws and physical and economical valve constraints. The problem formulation includes continuous variables denoted by x := [q h η θ α] T and binary variables denoted by v := [v + v − ] T , y and z. Here, the objective function is replaced with its additive inverse to result in a minimization optimization problem. The resulting mixed integer nonlinear program (MINLP) is summarized by the following problem formulation. (14) subject to linear hydraulic conservation constraints (1b) and (4a) nonconvex HW head loss model constraints (4b) big-M constraints for control valve operation (9a) − (9f) big-M constraints for flushing valve operation (10) physical and economical valve constraints

28where Q is a rectangle representing upper and lower bounds for the continuous decision variables. The continuous decision variables are defined as: q := (q t ) t=1,...,nt , h := (h t ) t=1,...,nt , η := (η t ) t=1,...,nt , θ := (θ t ) t=1,...,nt and α := (α t ) t=1,...,nt . The binary decision variables varying with time step t are defined as:

29..,nt . Problem (MINLP) has n t (3n p + 2n n ) continuous variables, 2n t n p + n p + nn binary variables and 2n t n p nonconvex terms. Observe that the problem grows rapidly with the size of the considered WDN (see Table 1), making it a difficult nonconvex MINLP problem to solve. To overcome these challenges, we develop a convex heuristic to compute feasible solutions to Problem (MINLP). The following section describes the solution algorithm and its implementation details.

Solution method

30The proposed solution algorithm combines convex relaxations with a randomization heuristic and multistart solver to compute feasible solutions to Problem (MINLP). First, we formulate convex relaxations of Problem (MINLP), which yield a linear programming (LP) subproblem. Here, the nonconvex SCC objective function (12) and nonconvex energy conservation constraints (4b) are relaxed using polyhedral envelopes, and a continuous relaxation is applied to binary decision variables. We also include a domain reduction step where the resulting convex subproblem is tightened using both model decomposition and optimization-based bound tightening (OBBT) techniques. Then, a randomization heuristic uses the fractional valve placement values from the convex subproblem solution to form nonlinear programming (NLP) control problems. Local solutions to these NLP problems are computed using a strictly feasible sequential convex programming (SFSCP) solver. We also implement a multi-start strategy, which includes an optimization-based feasibility restoration problem to ensure hydraulic feasibility of the starting points. Figure 2 offers a detailed overview of the solution method, referred to as the convex multi-start (CMS) algorithm. The algorithm steps and overall implementation details are provided in the following subsections.

Convex relaxation

31There are two sources of nonlinear nonconvexity that make Problem (MINLP) difficult to solve. These are the SCC objective function f SCC (14) and the HW head loss model φ(·) in equality constraint (4b). One approach to overcome nonconvexity is through polyhedral relaxations, which can be formulated as linear constraints and thus efficiently handled by state-of-the-art linear solvers. Since the resulting mixed integer Initialization Hydraulic model and SCC parameters

Randomization heuristic

32Sample valve location set z' i = 1,...,N , y' i = 1,...,N

Output

33Best feasible solution z' best ,y' best ,η best ,α best z' i , y' i , η

Multi-start solver Feasibility restoration and NLP control problems

34Store solution and repeat for i = 1,...,N trials linear program (MILP) may still have a large number of binary variables, it is convenient to apply a continuous relaxation to binary variables. In addition to the computational advantages, a continuous relaxation increases the search space for the set of optimal binary variables. Here, we implement the aforementioned relaxation techniques to formulate a convex subproblem of Problem (MINLP), with its solution forming the basis of the heuristic algorithm.

35We first relax the nonconvex objective function in (14) with a linear outer approximation. Let σ + t ∈ R np and σ − t ∈ R np be vectors of auxiliary variables introduced to model the positive ψ + and negative ψ − sigmoid functions, respectively. The objective function f SCC is then reformulated as the following set of inequality constraints:

36To ensure equivalence with (14), the SCC objective function becomes

37We construct concave envelopes for the positive ψ + and negative ψ − components of f SCC . This follows the methodology presented in Boyd (2014, 2016) for sigmoidal functions, resulting in piecewise linear relaxations. These relaxations are written as the following constraint:

38as well as the sigmoid function parameters. A detailed derivation of these relaxations is provided in Appendix A.1. Moreover, an example of the implemented relaxation is illustrated in Figure 3a, withψ denoting the set of linear relaxations.

39We then implement polyhedral relaxations for the HW head loss model φ(·) in equality constraint (4b). This builds on the relaxation methods for monomials of odd degree introduced by Liberti and Pantelides (2003) by formulating polyhedral relaxations for the HW head loss model. Similar to (A.23), the formulated relaxations are written as the following linear constraint:

40where matrices R t and E t and vector r t are derived from flow bounds q L t and q U t and the HW model parameters. Further details are presented in Appendix A.2 and an example of the implemented relaxation is illustrated in Figure 3b, noting that the polyhedral relaxation is denoted byφ.

41Lastly, we implement the continuous relaxation of binary variables v, y, and z. These are combined with continuous decision variables x, defined in Problem (MINLP), and the continuous auxiliary variables associated with the f SCC inequality constraints (A.22a) and (A.22b), denoted by σ := [σ + σ − ]. The resulting convex relaxation of Problem (MINLP) is represented by the following LP subproblem. minimize x, v, y, z, σ − f SCC reformulated in (16) subject to linear relaxations of HW head loss model constraints (18) linear relaxations of ψ + and ψ − sigmoid functions (A.23) linear hydraulic conservation constraints (1b) and (4a) big-M constraints for control valve operation (9a) − (9f) big-M constraints for flushing valve operation (10) physical and economical valve constraints (7a) − (7c) The optimal value to Subproblem (LP) yields a lower bound to the original nonconvex Problem (MINLP).

42In particular, vectors y ∈ R nn and z ∈ R np of continuous variables for valve placement can be interpreted as the probability distribution from which random samples are drawn to solve the NLP control problem.

43Moreover, the vector η ∈ R np from Subproblem (LP) is used as one of M starting points in the multi-start strategy. These steps are discussed in the subsequent sections.

44Furthermore, we implement a domain reduction procedure to reduce the bound intervals and thus strengthen the convex relaxations formulated for Subproblem (LP). The main procedure implemented is an optimizationbased bound tightening (OBBT) algorithm (Belotti et al., 2009). The OBBT algorithm solves a series of LP optimization problems, with objective functions set to both maximize and minimize link flow. This is augmented with a forest-core decomposition scheme to reduce the number of flow variables whose bounds are tightened (Simpson et al., 2014). The forest of a WDN comprises the disjoint union of all outer branch (or tree) components (Deuerlein, 2008). The core represents the set of looped (or block) graphs, which contain the roots of all forest trees. Following Pecci et al. (2019), we only perform bound tightening on the set of core links. We include psuedocode for the OBBT algorithm in Appendix B.

Randomization heuristic

45In searching for a good quality local solution to Problem (MINLP), we employ a randomization heuristic to sample candidate valve configurations. Here, the fractional values of y ∈ R nn and z ∈ R np yielded from the solution to Subproblem (LP) define a discrete probability distribution for the index sets {1, . . . , n n } and {1, . . . , n p }, respectively. We propose to randomly sample candidate pressure control n v and flushing n f valve configurations from the respective probability distributions over N sampling trials. This creates sampled vectors of binary variables y i=1,...,N ∈ {0, 1} nn and z i=1,...,N ∈ {0, 1} np , from which a local solution to the NLP control problem is obtained for each trial i ∈ {1, . . . , N } (see Section 3.3). To avoid redundant valve configurations, we store binary values from each trial in the set P ∈ R N ×(nv+n f ) , checking its intersection with {y i ∪ z i } before fixing valve placement values and proceeding to the NLP control problem. Psuedocode for the implemented randomization heuristic is detailed in Algorithm 1.

Multi-start solver

46The final component of the CMS solution algorithm concerns the optimization of valve settings. This control problem is formulated to compute (locally) optimal operational settings for each candidate valve con-Algorithm 1 Randomization heuristic 1: Input: vectors of fractional values y ∈ [0, 1] nn and z ∈ [0, 1] np Problem (LP) 2: Output: sampled vectors of binary variables y i=1,...,N ∈ {0, 1} nn and z i=1,...,N ∈ {0, 1} np 3: Initialize P ← ∅ 4: for i = 1, . . . , N do 5:

47Sample y i from vector y with probability weights equal to fractional values 7:

48Sample z i from vector z with probability weights equal to fractional values 8: end while 9:

49Update visited valve locations:

50Vectors y i and z i Input to multi-start solver 11: end for figuration generated from the randomization heuristic. Because the objective function in Problem (MINLP) is highly nonlinear, we implement a strategy to use multiple starting points in order to avoid getting trapped in poor local optima. This includes a feasibility restoration subproblem to ensure hydraulically feasible starting points are passed to the NLP solver. We refer to the overall solution process as the multi-start solver, which has steps highlighted by the process diagram shown in (14) subject to hydraulic conservation constraints (1a) and (1b) x ∈Q (NLP) whereQ represents the upper and lower variable bounds modified to account for directional constraints enforced by the fixed binary variables. Since the focus of this study is at the DMA-or distribution-level, which in practice limits the number of installed DBVs for consideration, we use an enumeration approach to test all DBV flow direction combinations for v + t and v − t . This approach was deemed appropriate on the basis of the relatively small computational (CPU) times recorded in Section 4. For example, the numerical experiment corresponding to the maximum number of installed DBVs on the largest network tested in this study (see Section 4.1 for details) resulted in a CPU time of less than five minutes. This CPU time is well within an assumed one hour limit for application in control strategies. We acknowledge, however, that this assumption warrants re-evaluation for system-wide studies which inevitably consider a larger set of control valves. Here, a total of T = 2 nDBV control problems are solved to find the best DBV direction combination at each time step t ∈ {1, . . . , n t } (see Figure 4). In this work, we use the strictly feasible sequential convex programming (SFSCP) method outlined in Wright et al. (2015) for solving a local optima to Problem (NLP). The SFSCP solver, also used to optimize SCC control valve settings in Abraham et al. (2016), is implemented because of its reliable convergence properties, namely its strict feasibility requirement for each iterate of the optimization process. The SFSCP solver linearizes the objective function and nonlinear hydraulic conservation constraints in Problem (NLP), from which a sequence of linear programs can be efficiently solved. Linear approximations are formulated using first-order Taylor expansions around the point x k := [q k h k η k α k ] T . Let f := f SCC and the hydraulic conservation equality constraints (1a) and (1b) be denoted by g(·). It follows that

Starting points

51and

52are the linearized expressions used to formulate a convex subproblem for each iterate k. This subproblem computes step directions dη k and dα k at point x k for pressure control and flushing valve operational variables, respectively. Following Wright et al. (2015), a strictly feasible line search method is implemented to guarantee an improvement in objective function whilst ensuring hydraulic feasibility of the computed local optima. We define the hydraulically feasible region by the set F := x ∈ R np+nn+nv+n f x satisfies constraints (1a), (1b), and variable boundsQ . (21) The null space solver proposed in Abraham and Stoianov (2015) is used to solve hydraulic states q k+1 and h k+1 for the optimal controls obtained at iterate k. If x k ∈ F, then the optimization process moves to the next iterate k := k + 1. Otherwise, a backtracking procedure is implemented to reduce dη k and dα k until hydraulic feasibility is achieved. Termination of the SFSCP solver is triggered when relative improvements in the objective function are below a set tolerance tol . The SFSCP solver steps are detailed in psuedocode presented in Appendix C (Wright et al., 2015). Moreover, the subsequent section describes a multi-start strategy for selecting feasible starting points x 0 to be passed to the SFSCP solver. For completeness, we provide a brief discussion on the performance comparison with state-of-the-art nonlinear solver IPOPT. This is included as many large-scale WDN optimization studies have used IPOPT to compute locally optimal solutions for network controls (e.g. Pecci et al., 2019;Ulusoy et al., 2020;Nerantzis and Stoianov, 2022). Most of these studies, however, have applied a quadratic approximation (QA) to model the head loss function ψ(·) as the nonsmooth HW formula presents challenges for IPOPT, namely that its Hessian is unbounded at the origin. Preliminary efforts to introduce a QA model for the current SCC problem resulted in large inaccuracies compared to the HW model. This was expected as the current study aims to maximize pipe flow velocities, which increases the QA model error since a larger maximum flow value is required (Pecci et al., 2017;Equation 21). Therefore, we tested IPOPT using the HW model and relied on its feasibility restoration scheme to mitigate potential errors. Infeasibility errors were observed for the larger case study network when using the IPOPT solver, ultimately leading to the SFSCP solver as the more reliable and robust option for the current SCC control problem. The SFSCP and IPOPT solver comparison is detailed in Appendix D.

Multi-start strategy

53As highlighted in Figure 4, a multi-start strategy is implemented to find good quality local optima to Problem (NLP). Here, we initialize starting points x 0 for multiple initial conditions j ∈ {1, . . . , M }, which are sequentially passed to the SFSCP solver. Starting points are formed by simulating hydraulic states for different initial control valve settings η 0 . For initial condition j = 1, we set η 0 j=1 equal to the control valve settings resulting from Subproblem (LP). Otherwise, η 0 j=2,...,M is randomly generated between the previously set lower and upper η bounds. Note that initial flushing operations are set as α 0 = {0} for all initial conditions j ∈ {1, . . . , M }. Since the initial control conditions do not guarantee a solution in the hydraulically feasible region, we also include a feasibility restoration step. That is, if starting point x 0 j / ∈ F for all j ∈ {1, . . . , M }, feasibility is restored through the solution to the following NLP optimization problem. minimize x η − η 0 2 2 subject to hydraulic conservation constraints (1a) and (1b) x ∈Q

54where the objective function is set to minimize the squared 2 -norm between the vector of initial settings η 0 and settings η which produce a hydraulically feasible starting point. Problem (FR) is solved using the nonlinear IPOPT solver. Apart from cases where the fixed DBV directions strictly cannot facilitate a hydraulically feasible solution, we did not encounter infeasibility errors when using IPOPT as the NLP solver for Problem (FR). The discussion in Appendix D suggests that the nonconvexity of the SCC objective function in Problem (NLP) is a key factor for the observed infeasibility issues.

Numerical experiments and discussion

55We evaluate the SCC design-for-control problem using the proposed CMS solution algorithm. Since CMS is a heuristic, we also compare its performance with an off-the-shelf GA implementation, which is a common heuristic method for solving WDN design problems. This section is organized as follows. First, in Section 4.1 we describe the problem parameters, case study networks, and computational resources used to carry out the numerical experiments. Next, Section 4.2 discusses the results obtained when solving the control-only subproblem to Problem (MINLP), where valves locations are fixed. In this case, operational settings of existing PRV and DBV (if applicable) valve configurations are optimized to maximize selfcleaning conditions. We then investigate the solution to the design-for-control problem in Section 4.3, where the placement and operation of both pressure control and flushing valves are considered to improve SCC performance.

Computational setup

56All numerical experiments were performed in MATLAB R2021b (64-bit) for Microsoft Windows 11, installed on a 2.50-GHz Intel(R) Core(TM) i9-11900H CPU with 8 cores and 32.0 GB of memory (RAM). The LP problems involved in the convex relaxation, OBBT algorithm, and SFSCP solver were solved using Gurobi (v9.5.0; Gurobi Optimization, 2022), accessed via its MATLAB interface. With the exception of large problem cases, which had solver parameters (e.g. NumericFocus, Crossover, and Presolve) modified to deal with numerical issues, Gurobi's default parameters were applied. Local solutions to the NLP feasibility restoration problems were solved using the state-of-the-art interior point solver IPOPT (v3.12.19;Wächter and Biegler, 2006). IPOPT was accessed in MATLAB via the OPTI toolbox interface (Currie et al., 2012) and was implemented passing the exact Jacobian and Hessian matrices as inputs to the solver. The single objective GA was implemented using MATLAB's off-the-shelf Global Optimization Toolbox with its default solver parameters (e.g. population size = 100; crossover fraction = 0.8; function tolerance = 1e−6). For each GA fitness evaluation, EPANET2.2 (Rossman et al., 2020) hydraulic solver was accessed via the EPANET-MATLAB Toolkit interface (Eliades et al., 2016). We set maximum time limits for the GA implementation associated with control and design-for-control problems of 6 and 12 hours, respectively. Furthermore, MATLAB's parallel computing toolbox was employed (with eight local workers) to speed up code in the OBBT algorithm and multi-start solver. Finally, network hydraulics were computed within CMS using the null space method proposed in Abraham and Stoianov (2015).

57We evaluated the performance of the solution methods using three case study networks: Pescara, Modena, and BWFLnet. Problem data for each network, including the size of the resulting MINLP optimization problems, are summarized in Table 1. Moreover, network layouts are shown in Figure 5. Pescara and Modena are skeletonized versions of WDNs in medium-sized Italian cities, published by Bragalli et al. (2012) for benchmarking purposes. Since these are theoretical networks, unidirectional PRVs were placed at the outlet of each reservoir to represent existing valve configurations. BWFLnet is a large-scale operational network representing an area of the City of Bristol's WDN, located in southwest England. It currently operates with dynamically controlled PRV and bidirectional DBV valves, which modulate flow and pressure between adjacent zones to minimize AZP. BWFLnet's current control valve configuration was applied to model existing conditions -for more details on BWFLnet see Wright et al. (2014) and Waldron et al. (2020). Moreover, existing kept-shut boundary valves were opened in order to test the full capabilities of the proposed solution algorithm. Observe that the evaluated case study networks vary by size, network connectivity, and demand scenarios, enabling the proposed CMS algorithm to be tested on a range of network conditions. Pescara and Modena are relatively small-scale looped networks with theoretical (and quite large) demands. BWFLnet, on the other hand, represents a larger-scale operational network having a branched structure and demands representing water consumption in a typical urban area in the UK. For reference, we note that the size of the resulting MINLP optimization problems for BWFLnet are at the upper end of the range reported in the MINLPLib database (Vigerske, 2022); MINLPLib is a widely used library of benchmarking MINLP problem instances. (14), we set the sigmoid function curvature parameter ρ to 50, unless stated otherwise. On the basis of the reviewed literature in Section 1, the self-cleaning velocity threshold u min j was set to 0.2 m/s for all j ∈ {1, . . . , n p }. Since we are concerned with the redistribution of peak flows, we define four discrete hydraulic time steps n t to represent peak demand scenarios within a typical diurnal demand profile. These were split between the morning and evening high demand periods and were unique to each case study. In relation to hydraulic feasibility constraints (11b), we applied a minimum regulatory pressure head of 15 m (UK regulations) at all nonzero demand nodes, for all case study networks. Moreover, the upper bound for flushing valve demands α U shown in constraint (11d) was set to 25 L/s. This value was selected with reference to the recommended fire flow capacity at fire hydrants in the UK (Local Government Association and Water UK, 2007). For the design-for-control problem, we evaluated the placement and operation of n v = 1, . . . , 3 bidirectional DBVs and n f = 0, . . . , 3 AFVs. Hence, for each network, a total of 12 valve configurations were considered. The number of randomization trials N in Algorithm 1 was set to the minimum of valve configuration combinations generated from the continuous relaxation in Subproblem (LP) or a maximum trial count; maximum trial counts were set to N = 50 for Pescara and Modena and N = 100 for BWFLnet. Finally, the number of initial conditions tested in the multi-start scheme (Figure 4) was set to M = 5.

Existing valve configuration results

58We first investigated improvements to SCC performance achieved by optimizing the operational settings of existing pressure control valve configurations. This was considered a logical initial step as the implementation SCC-specific controls requires no additional capital investment and can thus be readily applied. As discussed previously, the theoretical case study networks, Pescara and Modena, were assumed to have PRVs assigned at each link leaving a source node (e.g. reservoir). On the other hand, BWFLnet had its existing operational valve configuration assigned. A subproblem of Problem (MINLP) was then formulated where binary variables z were fixed for the known control valve locations and directional variables v + and v − were set free for networks with existing DBV locations (e.g. BWFLnet). Valve control settings and DBV directions were then optimized over the four peak demand periods using the multi-start strategy described Figure 6 through cumulative distribution plots of maximum flow velocities, weighted by pipe length. These plots offer a comparison between network SCC conditions with and without optimized controls. Considering f SCC is an approximation of the actual self-cleaning problem, we also include a sensitivity analysis on the sigmoid curvature parameter ρ to test changes in relative performance. Moreover, Table 2 summarizes the control problem results obtained with both the multi-start solver and the GA implementation described in Section 4.1. We set a maximum time limit of one hour for the off-the-shelf GA solver, which was assumed to reflect an upper bound for the practical application of control problems.

59First, Figure 6 suggests that pressure modulation at existing control valves can significantly improve SCC conditions in the tested looped networks. This is highlighted by the numerical results for Modena, where the length of pipe experiencing self-cleaning velocities increased from approximately 60% to 95% for peak demand conditions. In contrast, results for BWFLnet, which has limited connectivity due to its branched structure, showed only modest improvements. These results were expected as the reduced interconnectivity in BWFLnet leads to pipe flows being primarily a function of downstream demands. For this reason, Section 4.3 presents the results for a design-for-control problem where we consider the installation of additional DBVs and flushing valves, which aim to improve self-cleaning conditions in branched networks. Furthermore, we report modest changes in the flow velocity profiles for the ρ sensitivity analysis (see Figure 6). Since no pattern can be discerned between ρ values, we conclude ρ = 50 to be suitable for the design-for-control numerical experiments discussed in the subsequent section. As shown in Table 2, the multi-start solver computes solutions that are similar to those obtained by the GA, but at a fraction of the computational effort. While the GA consistently reaches the set timelimit of one hour, the longest computational time experienced by the multi-start solver is equal to 200 seconds. This is important as we are considering an optimal control problem, which may need to be solved in near real-time. The much longer CPU time required by the GA is likely due to the fact that it facilitates a search for the globally optimal solution. Thus, for highly nonlinear optimization problems, like that formulated for the current SCC problem, the GA retains a large solution space so as to avoid exclusion of the global optimum. This characteristic has been recognized as a challenge when using GAs for WDN control problems, especially when dealing with problems having a large number and range of free continuous variables (Maier et al., 2014, Ulusoy et al., 2022. Furthermore, we note that the GA implementation used in this work applies default parameters (see Section 4.1) and loads an external hydraulic solver (EPANET2.2) at each fitness evaluation. This off-the-shelf implementation is also likely to contribute to the relatively large CPU times. Extending the time limit to nearly 48 hours, the GA converges to a solution with an SCC value of approximately 24.8% for BWFLnet. This minimal performance gain suggests that the one-hour time limit is sufficient for the SCC control problem comparison.

60In addition, Table 2 provides a comparison of average zone pressure (AZP) performance between control settings optimized for AZP and SCC, respectively. Note that the AZP objective function is formulated as a weighted sum of nodal pressures averaged over n t time steps (Wright et al., 2015;Equation 4). In accordance with findings in Abraham et al. (2016), we found a clear trade-off between the optimization of control settings for the SCC and AZP objectives. For example, a 16.2 m difference in AZP was recorded for BWFLnet. While this trade-off is not discussed further in the current study, we acknowledge the importance of having SCC and AZP objectives (among others) coexist in an overall operational network control strategy. Furthermore, the transition between such operational objectives may provoke large variations in hydraulic conditions (e.g. pressure transients) and should thus be managed accordingly. Future work is needed to investigate these considerations for the implementation of dynamically adaptive control strategies in operational WDNs.

Design-for-control results

61This section considers the SCC design-for-control problem for optimal placement and control of new bidirectional DBVs and AFVs. We test a total of 12 valve configurations for each case study network, where Experiment 1 corresponds to n v = 1 and n f = 0 and Experiment 12 corresponds to n v = 3 and n f = 3. As stated in Section 4.1, each experiment uses hydraulic conditions from four peak demand conditions across a typical diurnal demand profile. Moreover, with the exception of existing DBVs in BWFLnet, the designfor-control numerical experiments include the existing PRV configurations shown in Figure 5, which were used for the optimal control subproblem in Section 4.2. We investigate the solution of Problem (MINLP) using three methods: (i) the proposed convex multi-start heuristic (CMS); (ii) CMS with domain reduction (as described in Section 3.1), referred to as CMS (DR); and (iii) an off-the-shelf GA implementation coupled with the EPANET2.2 hydraulic solver. Note that we set the following time limits for the GA on the basis of that recorded using CMS: 6 hours for Pescara and Modena; and 12 hours for BWFLnet. The SCC objective function results and corresponding CPU times from each solution method are shown in Figure 7 for the considered set of numerical experiments. Figures 7a, 7c, and 7e show that CMS finds feasible solutions for all numerical experiments. To highlight the improvements in SCC, we include a solid black line to represent initial hydraulic conditions and a dashed black line to report the SCC values obtained by optimally controlling existing valves, as done in Section 4.2. While SCC improvements are experienced for all case studies, we observe significant relative improvements compared with the control-only solution for BWFLnet. As previously discussed in Section 4.2, the SCC improvements for BWFLnet can be attributed to the deployment of AFVs, which facilitate controlled flushing demands at the optimally selected locations. Moreover, the additional DBVs act to further branch the network, thereby enhancing self-cleaning velocities. The increase in SCC is investigated further through network velocity plots shown in Figure 8. Here, we compare maximum pipe velocities resulting from initial hydraulics (i.e. no control) and, as an example, the design-for-control solution corresponding to n v = 2 and n f = 3. Figures 8b, 8d, and 8f clearly indicate a net increase in the overall extent of the network experiencing self-cleaning velocities from optimal valve controls. We observe optimal AFV placement to be near the network periphery in Pescara and BWFLnet. These results are intuitive as flushing demands facilitate self-cleaning velocities in areas that otherwise convey relatively low flow. In contrast, AFVs are concentrated near a source node in Modena. This is a result of existing PRVs modulating inlet pressure to shift the hydraulic balance point (or interface) between source nodes. In particular, the flow rates illustrated in Figure 8d suggest that source nodes near the top of the network supply a greater proportion of the demand. Additionally, we note that the optimal DBV locations, which increase self-cleaning velocities by redistributing flow paths, may result in sub-optimal conditions for controlling network pressure. Since we do not explicitly consider pressure management in the SCC problem formulation, the integration of selfcleaning and pressure management objectives should be a focus of future work. Lastly, Figure 8f highlights the limited influence of control features for the more branched BWFLnet network. Although the placement and operation of AFVs indeed improve self-cleaning hydraulic conditions, these are generally limited to direct upstream flow paths. In the case where self-cleaning velocities are sought for specific areas of the network (e.g. historical complaints), the SCC objective function can be modified to focus on a user-defined subset of pipes.

62In comparing the two implementations of CMS, with and without domain reduction, we observe the former to yield better quality feasible solutions. This can be attributed to the tighter relaxations resulting from domain reduction. In fact, tighter relaxations may generate fractional valve placement values closer to the feasible domain, and therefore more likely to result in better quality design-for-control solutions. In addition, the solution of subproblem (LP) with tighter relaxations computes control valve settings η that are closer to the feasible set and the global optimum. As described in Section 3.3, these η values are used as a starting point for the multi-start solver. Hence, we expect these settings to be advantageous in finding a better solution. Nonetheless, the OBBT algorithm comes at an increase in computational effort. Figures 7b, 7d, and 7f compare CPU times across numerical experiments for each solution method. Although the increase in CPU times are modest for the smaller networks, OBBT does not scale well for the larger operational network. For example, the increase in CPU time reported for BWFLnet was, at minimum, approximately 50% when OBBT was applied. Even though Problem (MINLP) is considered a design problem, and is thus solved offline, OBBT can become impractical for large-scale and highly interconnected networks . Future work should investigate speed improvements to OBBT or the implementation of tighter relaxations for Problem (MINLP). Finally, we compare design-for-control solutions computed by CMS with an off-the-shelf GA implementation. As described in Section 4.1, the EPANET2.2 hydraulic solver was employed within the GA's fitness function to test hydraulic feasibility of the generated solutions. The solution was deemed feasible when the EPANET2.2 solver successfully converged and when the entire set of pressure heads across all time steps met the minimum pressure constraint. Otherwise, hydraulically infeasible solutions were discarded. Moreover, pressure set-points at control valves were bounded by the maximum head difference across the network (i.e. reservoir level less minimum node elevation). In Figure 7a, the GA solution is shown to produce comparable (if not better) SCC results for Pescara than CMS (DR). This is not surprising as the stochastic search procedure employed by the GA is well suited for highly nonlinear optimization problems, such as the current SCC objective function. Although the GA did not satisfy its termination criterion within the prescribed time limit (six hours), the relatively small number of free continuous variables in Pescara (e.g. pressure set-points and flushing rates; see Table 1) enabled the computation of good-quality feasible solutions. On the other hand, the GA was unable to find feasible solutions for numerous problem instances using Modena. This was particularly evident for experiments including the design and control of AFVs, which result in higher frictional losses materializing from flushing demands. Note that infeasibility is indicated by an SCC value of zero in Figure 7c. Additional GA experiments revealed such infeasibility issues to be linked to the relatively small range in hydraulically feasible pressures found in Modena. With the minimum regulatory pressure head relaxed from 15 m to 0 m (i.e. h min set to node elevations), the GA found feasible solutions comparable to CMS (DR). These results highlight the efficacy of the proposed convex heuristic for a wider range of network conditions. For BWFLnet, CMS (DR) finds similar quality design-for-control solutions to the GA. However, as observed in Modena, CMS (DR) is shown to consistently outperform the GA for experiments considering the implementation of AFVs. In light of the comparison between solution methods, we investigated the computational overhead of the GA fitness function, as configured in this study using the EPANET-MATLAB Toolkit. This is a cumbersome process, and one which directly impacts the number of fitness evaluations performed by the GA. By comparison, CMS requires much less overhead from loading external software and computes hydraulic states via an efficient null space solver. Table 3 compares the number of EPANET2.2 solver calls (for the 12-hour time limit) with the null space solver calls in CMS. The comparison uses select design-for-control experiments for the BWFLnet case study network. EPANET2.2 solver Null space solver 1 -n v = 1, n f = 0 11,064 4,208 3 -n v = 1, n f = 2 10,304 69,995 5 -n v = 2, n f = 0 11,064 61,274 7 -n v = 2, n f = 2 10,304 177,820 9 -n v = 3, n f = 0 10,304 87,976 11 -n v = 3, n f = 2 10,304 165,671

63With the exception of Experiment 1, Table 3 reports the number of EPANET2.2 solver calls to be significantly less than the hydraulic simulations recorded in CMS. This identifies the hydraulic analysis as a bottleneck in the overall GA search procedure, particularly since its CPU times are over twice that reported using CMS. The comparison demonstrates the advantages of the proposed CMS algorithm in its ability to efficiently perform hydraulic simulations, which in turn yields more opportunities for CMS to compute solutions to the SCC problem than the GA over a given period.

Conclusions

64Novel operational strategies are needed to minimize the severity and frequency of discolouration incidents in WDNs. In this paper, we propose control and design-for-control strategies for maximizing the self-cleaning capacity (SCC) of a network. This is facilitated through the operational framework of dynamically adaptive networks by extending its control capabilities to enhance water quality.

65Building on previous work, we formulate an optimization problem to improve SCC through the optimal placement and operation of pressure control and automatic flushing valves. This results in a nonconvex MINLP problem. Since global solvers become intractable for large problem instances, we propose a tailored convex multi-start heuristic (referred to as CMS) to compute feasible solutions to the SCC design-for-control problem. CMS comprises a convex relaxation and randomized valve sampling procedure, which is demonstrated to effectively handle integer variables modelling valve placement. Given the high nonlinearity of the SCC objective function, CMS also implements a multi-start solver to compute feasible solutions to the SCC control problem, whilst mitigating the occurrence of poor local optima. Compared to an off-the-shelf GA implementation, which employs the EPANET2.2 hydraulic solver, CMS is shown to consistently yield good-quality feasible solutions to the SCC design-for-control problem. We demonstrate the robustness of CMS using networks with varying size and hydraulic complexity, including a large-scale operational network in the UK. Although the GA computed comparable solutions to CMS for most numerical experiments, it yielded worse-quality and, in some instances, infeasible solutions for larger and more complex conditions. Furthermore, we show the proposed multi-start solver to compute fast and scalable solutions to the SCC control problem, highlighting its suitability for application in near real-time control strategies. Altogether, the proposed convex multi-start algorithm represents progress towards the optimal design and control of smart water networks.

66Moving forward, the proposed solution for maximizing SCC needs to be integrated within a wider framework for the design and operation of WDNs with dynamically adaptive control. For example, the objective to minimize average zone pressure and pressure variations should include the periodic transition to a selfcleaning mode, as formulated in this manuscript through the operation of pressure control and automatic flushing valves. From an operational perspective, it is also important that this control framework considers the management of unsteady hydraulics arising from such dynamic controls. In relation to the SCC objective function, additional features should also be investigated to improve self-cleaning performance. These may include the impacts of flow reversals as well as a tailored approach to focus on specific areas of the network (e.g. historical complaints). These considerations, combined with advances in technologies for the operation of dynamically adaptive networks, will enable better control strategies for responding to environmental, financial, and regulatory challenges.

A. Convex relaxations

67This section presents a detailed derivation of the convex relaxations formulated for the nonconvex selfcleaning capacity (SCC) objective function and nonconvex HW head loss model.

A.1 Nonconvex SCC objective function

68Recalling Section 3.1, we define piecewise linear relaxations for the following nonconvex sigmoidal inequality constraints

69where ψ + (·) and ψ − (·) model the positive and negative components of the SCC objective function f SCC , respectively; σ t := [σ + t σ − t ] T is the vector of auxiliary variables introduced to reformulate the SCC objective function; and q t ∈ R np is the vector of link flows. As presented in Section 3.1, the resulting relaxations are written as the following linear inequality constraint:

70and q U t and the sigmoid function parameters. Before proceeding with the derivation of (A.23), we note the following. First, we omit time indices t and link indices j for the sake of clarity. Second, we drop the sign of the sigmoid function ψ(·) and the vector of auxiliary variables σ ∈ R np ; apart from swapping the upper and lower flow bounds, the mathematical derivation does not change for the positive or negative ψ(·) functions. However, where deemed necessary to clearly explain the formulated relaxations, we use the positive sigmoid function. Finally, we use flow velocities as the domain for ψ(·), which are denoted by u := q A . It follows that the lower and upper domain bounds are denoted by u L := q L A and u U := q U A , respectively. We begin by considering the set (u, σ) σ = ψ(u), ∀u ∈ u L u U , (A.24) and its concave envelope given by

71whereψ(·) is a piecewise linear relaxation that depends on bounds u L and u U and the tangent point created with the sigmoid function. Following the examples presented in Boyd (2014, 2016), we discuss the steps to constructψ(·) for various domain scenarios below. First, we look for the point w such that the line from (u L , ψ(u L )) to (w, ψ(w)) is tangent to ψ(·) at (w, ψ(w)). The bisection method, an iterative numerical algorithm (Miller, 2014), is used to compute the tangent point w as no analytical expression exists for the equations of intersection in consideration. This follows the steps detailed in Algorithm A2. Since the SCC problem is mostly comprised of linear constraints, Algorithm A2 Bisection method for nonconvex sigmoid objective function 1: Input: ψ(·) model parameters, SCC threshold velocity u min , and flow velocity bounds u L and u U 2: Output: unique point w where the line from (y, ψ(y)) to (w, ψ(w)) is tangent to ψ(·) at (w, ψ(w)) 3: Define: for ψ + , y := u L ; for ψ − , y := u U ; equation of intersection f (x) := ψ (x)(x−y)+ψ(y)−ψ(x), where x = w at the root of f (x) 4: Initialize: (i) initial lower and upper bounds x 0 and x 1 ; and (ii) error tolerance tol 5: if u L ≥ u min then 6:

72w ← u L 7: else 8:

73x 1 ← x 2 12:

74x 2 ← x0+x1 w ← x 2 19: end if it is also convenient to construct a linear upper bound to the concave segment of ψ(·). It follows that point k represents the intersection of linear relaxations, at which point the maximum error ofψ(·) − ψ(·) occurs. The constructed concave envelopesψ(·) are described below for the four conceivable domain scenarios, with their corresponding plots shown in Figure A.9.

75If u L < w ≤ u U , the concave envelopeψ(u) is defined as the following piecewise linear function (see Figure A.9a):ψ

76When u L < u U ≤ w, the concave envelopeψ(u) is defined a the following linear function (see Figure A.9b):

77When u L = w and w ≤ u U , the concave envelopeψ(u) is defined as the following piecewise linear function (see Figure A.9c):ψ

78Lastly, if u L = w = u U , the concave envelopeψ(u) is defined as the point (see Figure A.9d):

79Sigmoid functions ψ + and ψ − in (A.22) are then replaced with the appropriate concave envelopesψ(·) described in (A.26) -(A.29). After rearranging terms, and substituting flow velocity u with q A to align with the SCC problem variables, the linear inequality constraint shown in (A.23) is formulated.

A2. Nonconvex HW head loss constraints

80Building on the material presented in Pecci et al. (2019) (Appendix 1), we formulate polyhedral relaxations for the HW head loss model. Recall the energy conservation equality constraint

81where φ(·) models the head loss materialized across network links j ∈ {1, . . . , n p }; θ t ∈ R np is the vector of auxiliary variables introduced to isolate the nonconvex head loss term; and q t ∈ R np is the vector of link flows. The resulting polyhedral relaxations are written as the following linear inequality constraint:

82where matrices R t and E t and vector r t depend on flow bounds q L t and q U t and the HW model parameters. We follow a similar procedure to that detailed in Liberti and Pantelides (2003) for monomials of odd degree and later adapted in Pecci et al. (2019) for the quadratic approximation head loss model. The contribution of this work concerns the derivation of polyhedral relaxations for the HW head loss model, which has a fractional exponent dictating the relationship between q and φ(·).

83Omitting indices t and j, we begin by considering the set

84and its convex relaxation given by (q, θ) φ(q) ≤ θ ≤φ(q), ∀q ∈ q L q U , (A.33)

85where φ(·) andφ(·) are piecewise linear functions which formulate lower and upper relaxations of φ(·), respectively. These functions depend on flow bounds q L and q U and the tangent points created with φ(·). In the following, we present the derivations of φ(·) andφ(·) for the complete range of domain scenarios. We start by looking for the point z such that the line from (q L , φ(q L )) to (z, φ(z)) is tangent to φ(·) at (z, φ(z)). In contrast to the quadratic approximation method derived in Pecci et al. (2019), there is no analytical expression for finding root z to the intersection between φ(·) and the tangent line at (z, φ(z)). Thus, the bisection method is used to find z within an appropriate numerical tolerance. While similar to Algorithm A2, we present the exact steps taken to compute z in Algorithm A3 for the sake of completeness. Analogously, the unique pointz is computed to find the line from (q U , φ(q U )) to (z, φ(z)). The resulting set of linear relaxations for φ(·) are described below, with the corresponding plots presented in Figure A.10. Note that we define the set of polyhedral relaxations asφ(·) := {φ ∪φ}. Moreover, let k andk denote the points of intersection between the linear functions in φ(·) andφ(·), respectively.

86If q L <z < 0 < z < q U , the upper and lower bounds on θ are defined as the following piecewise linear Algorithm A3 Bisection method for nonconvex HW head loss model 1: Input: φ(·) model parameters and flow bounds q L and q U 2: Output: unique point z where the line from (y, φ(y)) to (z, φ(z)) is tangent to φ(·) at (z, φ(z)) 3: Define: for φ, z := z, y 1 := q L , and y 2 := q U ; forφ, z :=z, y 1 := q U , and y 2 :

87, where x = z at the root of f (x) 4: Initialize: (i) initial lower and upper bounds x 0 and x 1 ; and (ii) error tolerance tol 5: if f (y 2 ) × f (0) ≤ 0 then 6:

88x 1 ← x 2 10:

89x 2 ← x0+x1 2 11: else 12:

90x 0 ← x 2 13:

91Whenz ≤ q L < 0 < z < q U ,φ(·) and φ(·) are defined as follows (see Figure A.10b):

92When q L <z < 0 < q U ≤ z,φ(·) and φ(·) are defined as follows (see Figure A.10c):

93When 0 ≤ q L < q U ,φ(·) and φ(·) are restricted to the positive domain and defined as follows (see Figure A.10d):φ

94Lastly, if q L < q U ≤ 0,φ(·) and φ(·) are restricted to the negative domain and defined as follows (see Figure A.10e):φ

95The HW head loss model φ(·) in (A.30) is then replaced with the appropriate polyhedral relaxationφ(·) described in (A.34) -(A.38). After rearranging terms, the linear inequality constraint in (A.31) is formulated.

B. Optimization-based bound tightening algorithm

96In Section 3.1, we implement an optimization-based bound tightening (OBBT) algorithm to strengthen the convex relaxations formulated for Subproblem (LP). Following the supplementary material from Pecci et al. (2022), we tighten polyhedral relaxations for the nonconvex constraints by reducing the flow variable domain for link indices corresponding to the set of core links C. For each OBBT iteration, we solve two optimization problems to independently maximize and minimize flow q j,t for all links j ∈ C and hydraulic time steps t ∈ {1, . . . , n t }. These are represented by the linear program described in Subproblem (LP), with objective functions set to both minimize and maximize q j,t . We therefore solve 2n t |C| linear programs for each OBBT iteration. The algorithm is terminated once bound tightening progress diminishes between successive iterations, which is defined by a set tolerance on the maximum flow domain diameter. Moreover, we exclude forest links from the optimization scheme since their flows are defined a priori by the aggregate of downstream demands and the maximum flow defined for automatic flushing valves. Psuedocode for the OBBT algorithm is described in Algorithm B1.

97Algorithm B1 OBBT 1: Input: network data and initial flow bounds q L and q U 2: Output: tightened flow bounds q L and q U 3: Initialize k max , tol , and set k = 1, = 0 4: Initialize empty set diam ← ∅ 5: Compute initial maximum flow domain diameter: diam(1) = max t∈{1,...,nt} max j∈C (q U j,t − q L j,t ) 6: while tol ≥ and k ≤ k max do 7:

98for t ∈ {1, . . . , n t } do 8:

99for j ∈ C do Compute diam(k + 1) = max t∈{1,...,nt} max j∈C (q U j,t − q L j,t )

16:

100← diam(k+1) diam(k)

17:

101k ← k + 1 18: end while C. Strictly feasible sequential convex programming algorithm In Section 3.3.1, we implement a strictly feasible sequential convex programming (SFSCP) solver to compute feasible solutions to the nonlinear programming (NLP) control problem. This follows the implementations in Wright et al. (2015) and Abraham et al. (2016), with the addition of the continuous decision variable α to model the operation of flushing valves. We present the SFSCP solver psuedocode in Algorithm C1, which is adapted from Wright et al. (2015). The variables used in Algorithm C1 are defined as follows: f denotes the continuous sum of sigmoids SCC objective function f SCC ; η and α model operational settings for pressure control and flushing valves, respectively; dη and dα denote step directions for the aforementioned continuous variables; q and h represent hydraulic states computed for each control configuration; and F is the set defining the hydraulically feasible region.

102Algorithm C1 SFSCP solver 1: Input: network data, fixed valve configuration, and feasible starting point x 0 2: Output: f * and corresponding operational control settings η * and α * 3: Initialize tol , k max , and set k = 1 4: Set x k ← x 0 5: Compute initial hydraulic states q k , h k , and objective function f k 6: while |f k −f k+1 | |f k | > tol and k ≤ k max do 7: η k+1 , α k+1 ← NLP control problem with first-order Taylor approximations of nonlinear SCC objective function and energy conservation constraints 8: dη k , dα k ← η k+1 − η k , α k+1 − α k 9: β = 1 10: q k+1 , h k+1 ← hydraulic simulation with controls η k + βdη k , α k + βdα k 11: f k+1 ← recompute objective function 12:

103while f k > f k+1 or x k+1 / ∈ F do 13:

104β ← β/2 14:

105η k+1 , α k+1 ← η k + βdη k , α k + βdα k 15: q k+1 , h k+1 ← hydraulic simulation with controls η k + βdη k , α k + βdα k f k ← f k+1 21: end while D. NLP solver performance comparison

106We use the SFSCP solver in this work for multiple reasons. First, it guarantees strict hydraulic feasibility for each optimization step and shows fast convergence properties in previously studied WDN control problems, as demonstrated in Wright et al. (2015). Second, since state-of-the-art nonlinear optimization solvers (e.g. IPOPT) require second-order derivatives, it avoids the complications associated with the nonsmooth HW head loss model, which has an unbounded hessian at the origin. Potential complications are exacerbated by the highly nonlinear SCC objective function used in this study. In order to justify application of the SFSCP solver, though, we conduct a performance comparison with solutions computed by IPOPT. Following Dolan and Moré (2002), we derive performance profiles to objectively compare the two solvers. Let X := {1, . . . , n x } and S := s SFSCP , s IPOPT be the set of test experiments and solvers, respectively, where n x is the number of experiments tested. Since we are interested in comparing the SCC objective function values, we set the performance metric f x,s equal to f SCC for each experiment x produced by solver s. We then compare solver performance for all experiments x ∈ X by normalizing f x,s to the best computed solution for a particular experiment by any solver s ∈ S. This comparison is expressed as follows:

107where r x,s is the performance ratio of solver s for experiment x. Note that, if the solver produces an error or fails to find a feasible solution to the SCC control problem, we assign f x,s = +∞. An overall performance assessment of solver s ∈ S is then obtained by deriving the cumulative distribution function

108where ρ s (τ ) represents the percentage of experiments within a factor τ of the best solution for solver s ∈ S. Figure D.1 presents the SFSCP and IPOPT solver performance profiles for n x = 36 design-for-control experiments. In addition to existing unidirectional pressure reducing valves (PRVs), these experiments involved a combination of n v = 1, . . . , 3 bidirectional dynamic boundary valves (DBVs) and n f = 0, . . . , 3 automatic flushing valves (AFVs), as described in Section 4.1 of the manuscript. From Figure D.1, we first observe that the SFSCP solver finds feasible solutions for all experiments, while IPOPT returns infeasibility errors for just over 20% of the tested cases. This is illustrated by the distance along the x-axis from the origin to the vertical segment of the IPOPT solver (blue) plot. When looking at individual experiments, we identified a few features which may be contributing to IPOPT's infeasibility errors. First, infeasibility occurs almost entirely for the larger case study network (e.g. BWFLnet), of which also has a greater range in operational demands and control features. Second, since good performance was recorded for the feasibility restoration problem (see Section 3.3.2 of the manuscript), we believe the highly nonlinear SCC objective function, in combination with the unbounded hessian of the HW model, to be a key factor in the encountered infeasibility errors. In any case, Figure D.1 shows the SFSCP solver to be within 10% of the best solution for all tested experiments, which is comparable to the IPOPT solver for experiments when no feasibility issues were present. This suggests that the SFSCP solver is appropriate for the current SCC design-for-problem study.

참고문헌 42건

  1. (제목 없음) Journal of Global Optimization · Springer Science+Business Media · 2003 10.1023/a:1021924706467
  2. Sparse Null Space Algorithms for Hydraulic Analysis of Large-Scale Water Supply Networks Journal of Hydraulic Engineering · American Society of Civil Engineers · 2015 10.1061/(asce)hy.1943-7900.0001089
  3. Explicit Power Formula for the Darcy–Weisbach Pipe Flow Equation: Application in Optimal Pipeline Design Journal of Irrigation and Drainage Engineering · American Society of Civil Engineers · 2008 10.1061/(asce)0733-9437(2008)134:4(454)
  4. Forest-Core Partitioning Algorithm for Speeding Up Analysis of Water Distribution Systems Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2012 10.1061/(asce)wr.1943-5452.0000336
  5. Discolouration in potable water distribution systems: A review Water Research · Elsevier BV · 2006 10.1016/j.watres.2006.09.028
  6. Branching and bounds tighteningtechniques for non-convex MINLP Optimization methods & software · Taylor & Francis · 2009 10.1080/10556780903087124
  7. Modeling and Field Work to Investigate the Relationship between Age and Quality of Tap Water Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2013 10.1061/(asce)wr.1943-5452.0000383
  8. Pyrosequencing Reveals Bacterial Communities in Unchlorinated Drinking Water Distribution System: An Integral Study of Bulk Water, Suspended Solids, Loose Deposits, and Pipe Wall Biofilm Environmental Science & Technology · American Chemical Society · 2014 10.1021/es5009467
  9. Decomposition Model of a General Water Supply Network Graph Journal of Hydraulic Engineering · American Society of Civil Engineers · 2008 10.1061/(asce)0733-9429(2008)134:6(822)
  10. Velocity-based self-cleaning residential drinking water distribution systems Water Science & Technology Water Supply · IWA Publishing · 2009 10.2166/ws.2009.689
  11. Bacteriology of drinking water distribution systems: an integral and multidimensional review Applied Microbiology and Biotechnology · Springer Science+Business Media · 2013 10.1007/s00253-013-5217-y
  12. In-pipe water quality monitoring in water supply systems under steady and unsteady state flow conditions: A quantitative assessment Water Research · Elsevier BV · 2011 10.1016/j.watres.2011.10.058
  13. Could we use a million cores to solve an integer program? Mathematical Methods of Operations Research · Springer Science+Business Media · 2012 10.1007/s00186-012-0390-9
  14. On the optimal design of water distribution networks: a practical MINLP approach Optimization and Engineering · Springer Science+Business Media · 2011 10.1007/s11081-011-9141-7
  15. Evolutionary algorithms and other metaheuristics in water resources: Current status, research challenges and future directions Environmental Modelling & Software · Elsevier BV · 2014 10.1016/j.envsoft.2014.09.013
  16. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming Mathematical Programming · Springer Science+Business Media · 2005 10.1007/s10107-004-0559-y
  17. Asset deterioration and discolouration in water distribution systems Water Research · Elsevier BV · 2010 10.1016/j.watres.2010.08.021
  18. Modelling both the continual erosion and regeneration of discolouration material in drinking water distribution systems Water Science & Technology Water Supply · IWA Publishing · 2013 10.2166/ws.2013.176
  19. Maximizing a Sum of Sigmoids 2014
  20. Control of water distribution networks with dynamic DMA topology using strictly feasible sequential convex programming Water Resources Research · Wiley · 2015 10.1002/2015wr017466
  21. A holistic assessment of discolouration processes in water distribution networks Urban Water Journal · Taylor & Francis · 2015 10.1080/1573062x.2015.1111912
  22. Bounding duality gap for separable problems with linear constraints Computational Optimization and Applications · Springer Science+Business Media · 2016 10.1007/s10589-015-9819-4
  23. Distribution of microbial activity and specific microorganisms across sediment size fractions and pipe wall biofilm in a drinking water distribution system Water Science & Technology Water Supply · IWA Publishing · 2016 10.2166/ws.2016.023
  24. Adaptive water distribution networks with dynamically reconfigurable topology Journal of Hydroinformatics · IWA Publishing · 2014 10.2166/hydro.2014.086
  25. Identification of Discolouration Risk Through Simplified Modelling 2005 10.1061/40792(173)26
  26. Lost in optimisation of water distribution systems? A literature review of system operation Environmental Modelling & Software · Elsevier BV · 2017 10.1016/j.envsoft.2017.02.009
  27. Quadratic head loss approximations for optimisation problems in water supply networks Journal of Hydroinformatics · IWA Publishing · 2017 10.2166/hydro.2017.080
  28. Modeling particle transport and discoloration risk in drinking water distribution networks Drinking water engineering and science · Copernicus Publications on behalf of the TU Delft · 2017 10.5194/dwes-10-99-2017
  29. Hydraulic conditioning to manage potable water discolouration Proceedings of the Institution of Civil Engineers - Water Management · Thomas Telford Ltd. · 2017 10.1680/jwama.16.00038
  30. Impact of network sectorisation on water quality management Journal of Hydroinformatics · IWA Publishing · 2017 10.2166/hydro.2017.072
  31. Decreasing the Discoloration Risk of Drinking Water Distribution Systems through Optimized Topological Changes and Optimal Flow Velocity Control Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2017 10.1061/(asce)wr.1943-5452.0000878
  32. Global optimality bounds for the placement of control valves in water supply networks Optimization and Engineering · Springer Science+Business Media · 2018 10.1007/s11081-018-9412-7
  33. Mixed-integer nonlinear programming 2018 Optimization and Engineering · Springer Science+Business Media · 2019 10.1007/s11081-019-09438-1
  34. Water Quality and Fire Protection Trade‐Offs in Water Distribution Networks American Water Works Association · Wiley · 2019 10.1002/awwa.1395
  35. An MINLP-Based Approach for the Design-for-Control of Resilient Water Supply Systems IEEE Systems Journal · Institute of Electrical and Electronics Engineers · 2020 10.1109/jsyst.2019.2961104
  36. Regularization of an Inverse Problem for Parameter Estimation in Water Distribution Networks Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2020 10.1061/(asce)wr.1943-5452.0001273
  37. Dynamics of material detachment from drinking water pipes under flushing conditions in a full-scale drinking water laboratory system Urban Water Journal · Taylor & Francis · 2020 10.1080/1573062x.2020.1800759
  38. Dynamic Hydraulics in a Drinking Water Distribution System Influence Suspended Particles and Turbidity, But Not Microbiology Water · Multidisciplinary Digital Publishing Institute · 2021 10.3390/w13010109
  39. Convex Heuristics for Optimal Placement and Operation of Valves and Chlorine Boosters in Water Networks Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2021 10.1061/(asce)wr.1943-5452.0001509
  40. Optimization-Based Selection of Hydrants and Valves Control in Water Distribution Networks for Fire Incidents Management IEEE Systems Journal · Institute of Electrical and Electronics Engineers · 2022 10.1109/jsyst.2022.3159764
  41. Bi-objective design-for-control for improving the pressure management and resilience of water distribution networks Water Research · Elsevier BV · 2022 10.1016/j.watres.2022.118914
  42. Hydraulics of Pipeline Systems 1999 10.1201/9781420050318