Optimization of Urban Water Consumption in Residential Buildings

: Water scarcity is a global issue that is rapidly worsening. Many researchers have explored various approaches to promote sustainable uses of water, with Greywater (GW) recycling and utilization of innovative plumbing ﬁxtures being among the methods presented to reduce freshwater consumption for domestic usage. Nonetheless, previous studies have dealt with both means independently, without studying the integrated effect of utilizing both GW recycling and innovative plumbing ﬁxtures together both on the quality of supplied water, as well as on the cost of the integrated system. Accordingly, this research aims at improving the efﬁciency of water usage in residential buildings through the development of a mathematical optimization model that utilizes a constructed database in order to select the most appropriate GW recycling system, plumbing ﬁxtures and system components with the aim of improving the water quality, minimizing the water usage and reducing the cost. The developed model is divided into three main modules: input, water ﬂow and annual worth quantiﬁcation. The model was veriﬁed on a case study, and sensitivity analysis was performed to explore the impact of changing major input factors on the total annual cost. A factorial design examining both two-and three-factor interactions was used. The number of residents and the annual increase in water tariffs factors had the most signiﬁcant impact on the total annual worth, accounting for 55% and 43.7% of the total variability, respectively. Furthermore, the model was validated by comparing its results with a previous study conducted in the United Kingdom, where the developed model presented a signiﬁcant reduction of the lifecycle cost of the decentralized water system in residential buildings and attained freshwater savings of 58.17%.


Introduction
Nowadays, due to enormous population growth, the misuse of water and an increase in pollution, many countries are facing water scarcity.The author of [1] claims that "water becomes the new oil as the world runs dry".The UN reports that, currently, around three billion people are living in countries that suffer from water shortages, and this serious problem is expected to expand affecting more than five billion people by 2050 [2].Water withdrawal can be classified per sector usage: the agriculture sector consumes 70% of global water usage, followed by the industrial sector, which accounts for 19%, and then the domestic industry, which accounts for 11% [3].However, the growth rate of the household sector increased by more than 600% from 1960 to 2014, which substantially exceeds the rates of other sectors [4].Accordingly, landscape irrigation and domestic uses account for a significant portion of freshwater consumption.Thus, many sustainable approaches have been introduced to preserve this valuable resource.Some of the current approaches are promoting efficient water utilization and conservation techniques, as well as utilizing other water sources such as water desalination and the reuse of rainwater or recycling wastewater.The efficiency usage accounts for a good allocation based on the concept of "doing more with less water" such as using water-saving devices.These water-efficient fixtures can Sustainability 2023, 15, 7952 2 of 16 achieve the required task with less water, such as using less water for flushing.According to [5], it can be generally said that water is efficiently utilized if its quality and quantity are fit for the purpose, while conservation strategies typically include programs that persuade consumers to minimize their water usage.Moreover, wastewater is an immense resource that is not utilized efficiently, as around 80% of the world's wastewater is not recycled [6].A considerable share of the generated wastewater is greywater (GW), which includes all water produced from household sources, except from toilet flushing and kitchen discharges.GW is currently recycled to cut domestic water consumption, accounting for 12% of the world's annual water usage [7].It is recycled and reused in applications such as flushing, garden irrigation and others.
Some studies on the water management problem have been reviewed.Previous research can be categorized under four primary areas of concentration: methods used to calculate the end-use water demand, assessments of various GW system types, investigation of the efficiency of water systems and decision tools developed to solve the water management problem.The water consumption value of each water appliance is usually determined by three methods: mathematical technique [8], Artificial neural network (ANN) [9] and the stochastic approach [10].Each of these consumption calculation techniques has its pros and cons.One is that they support the average water usage as a static consumption over the day.Others emphasize the prediction of future usages based on statistical data, which requires a lot of data to be constituted.Nonetheless, these methods have provided logical and reliable water demand calculations.
In addition, many GW treatment systems have been reviewed.There are many types of GW systems, such as simple, physical, chemical, biological and advanced treatments.GW treatment studies usually examine the efficiency of treating water at a certain level.Water quality is expressed through several quality indices.Moreover, the authors of [11] attempted to assess four GW treatment systems using Analytical Hierarchy Process (AHP) by evaluating the criteria of treatment cost, automation of the system and compliance with meeting the reuse standards.Furthermore, some studies have investigated the economic viability and social acceptance of reusing the GW in several reuse appliances [12][13][14].For example: the authors of [12] conducted a questionnaire, and the results showed that the respondents support the reuse of GW in many practices; all reuse options received higher than 75% acceptance.
The last part explored was the previously developed optimization tools to solve the integrated urban water management problem (IUWM).The authors of [15] developed a mathematical static model, which determines the lifecycle cost (LCC) of two greywater systems and analyzes some factors that affect the cost by conducting a sensitivity analysis.Appling a different technique, a dynamic model was developed by [16] to calculate water consumption and water savings for green buildings.The dynamic calculation may reflect a close behavior to the real situation because some of the variables such as the number of occupants and frequency of uses change over time.The model utilizes Stella simulation software to account for the variability in the different parameters and compares the determined water saved with the LEED assumption for water savings of a certain building.Furthermore, the authors of [17] developed a genetic algorithm (GA) model, Urban Water Optioneering Tool (UWOT), to optimize the sustainability indicators, either quantitively or qualitatively, of the urban water management problem.In this context, the authors of [18] upgraded the UWOT to solve the whole urban water supply and demand problem from determining the supply considering various water sources to fixtures used in each dwelling.In a recent study, the authors of [5] developed a mathematical model to optimize the GW reuse within the household level to minimize freshwater usage and operating cost.Table 1 summarizes the reviewed papers in terms of the research purpose, parameters considered in each study, evaluation criteria and the level of the study.For instance, the purpose of the research highlighted the objective or methodology adopted, such as developing an optimization model, performing an analysis on a case study or building a prediction tool.

LCA Cost Analysis
Water Saved [1] • Where S: Simulation; AHP: Analytic Hierarchy Process; LP: linear programming; GA: Genetic Algorithms; SQP: Sequential Quadratic programming.• highlights or categorizes the purpose/parameters used for each research.
As previously presented, previous research is limited in integrating the effect of utilizing GW recycling with advanced plumbing fixtures, both on the quality of supplied GW water and the cost of the integrated system.Additionally, evaluating the balance between the cost of the GW treatment system with satisfying the reuse needs requires further investigation.Additionally, the previously developed urban water management models are limited in estimating the building surrounding's irrigation demand based on the irrigated area, plant type and location.Accordingly, developing a comprehensive optimization model that considers all these parameters would be of great benefit to developers and communities.
Therefore, the primary objective of this research is to improve the efficiency of water usage in residential buildings.This is achieved by developing and applying a mathematical model that selects: the plumbing fixture types for each use, the GW sources to be recycled and the GW treatment type that balances cost and efficiency.

Model Development 2.1. System Description
The water system in a residential building consists of various components, such as fixtures, GW system types, and its required subsystem, such as tanks, pumps and additional pipping, if required.The adopted water flow network is shown in Figure 1.The model tracks the water flow supplied by the municipalities, and then passes through several uses inside the building.As shown, some water uses can be recycled for reuse.While others, such as kitchen sinks and flushing, are excluded and dumped directly into the sewage system after their first use as they are considered to be highly contaminated.The selected GW is separated and collected for regeneration.The treated GW is reused in specified applications such as irrigation and/or flushing.In addition, the GW system includes storage tanks prior to tank A and a post-treatment unit to provide a constant flow and offer a prompt supply.Additionally, the post-treatment tank, tank B, is assumed to be located on the roof.Regarding the subsystem, it contains piping and connections used to collect and transfer water for treatment and reuse, as well as a pump that supplies recycled water to the post-treatment tank.
others, such as kitchen sinks and flushing, are excluded and dumped directly into the sewage system after their first use as they are considered to be highly contaminated.The selected GW is separated and collected for regeneration.The treated GW is reused in specified applications such as irrigation and/or flushing.In addition, the GW system includes storage tanks prior to tank A and a post-treatment unit to provide a constant flow and offer a prompt supply.Additionally, the post-treatment tank, tank B, is assumed to be located on the roof.Regarding the subsystem, it contains piping and connections used to collect and transfer water for treatment and reuse, as well as a pump that supplies recycled water to the post-treatment tank.

Model Formulation
The model is divided into three modules: input module, water flow module and life cycle cost module.The water flow module is divided into three sub-modules: consumption calculation, GW collection, GW treatment and reuse.A library was also established, which includes various fixture types, GW system types, and their related specifications.
Each module represents a certain part of the water system in the buildings, as previously shown in Figure 1.To develop the mathematical model, we utilize the notations and terms listed below to describe the water network elements depicted in Figure 1 and their related costs.

Model Library
A library was built, including 10 types of fixtures for each use and 5 technologies of GW systems.The database is built using previous studies, as shown in Table 1 and Table   Figure 1.Schematic diagram of the water system in a building presenting various modules used.

Model Formulation
The model is divided into three modules: input module, water flow module and life cycle cost module.The water flow module is divided into three sub-modules: consumption calculation, GW collection, GW treatment and reuse.A library was also established, which includes various fixture types, GW system types, and their related specifications.
Each module represents a certain part of the water system in the buildings, as previously shown in Figure 1.To develop the mathematical model, we utilize the notations and terms listed below to describe the water network elements depicted in Figure 1 and their related costs.

Model Library
A library was built, including 10 types of fixtures for each use and 5 technologies of GW systems.The database is built using previous studies, as shown in Tables 1 and 2. There are many fixture types in the market with different specs.The governing parameters of cost are the fixtures' material types, water flow rates, durability and energy consumption for machines or even for some micro-component taps that might use energy during operation.As previously mentioned, the only elements that are taken into consideration are the flow rates and the corresponding cost.The following Table 2 defines the fixtures' flow rates inputs.Type 1 was utilized by the model in [23], assuming that these are the conventional installed fixtures in residential buildings.In addition, the related costs were inputted.References: [8,18,23,24].
Similarly, each GW system is defined by its efficiency and cost.GW costs were divided by system-related expenses of installation and cost per treated m 3 , consumables, energy, repairs and yearly monitoring costs, which include labor and desludging costs.For instance, the consumables cost includes the chemical used for treating 1 m 3 of GW, such as chlorine or others.The cost of each system in the year 2021 was determined from the literature and was updated using the United Kingdom's inflation rates that were adopted from [25].
Moreover, the average removal efficiency of each GW system was collected from the literature for each quality indicator, as shown in the Supplementary Materials.The average efficiency was calculated by comparing the input water and the outputted effluent after treatment by providing the treatment system's purification levels for each quality index.These quality indicators were selected as they are used to describe various physical, chemical and biological characteristics of water.In addition, many institutions/countries have set certain limits for these indicators in order to ensure the safe reuse of recycled wastewater.One of the most known regulations is the EPA standard, which classified urban reuse into unrestricted reuses and restricted reuses by defining the applications of both of them [26].

Input Module
The user has to specify the problem, which comprises defining building parameters, expected residents, residents' average frequencies of uses including weekends or seasonal variations, water charges costs and average quality produced from each water appliance, in addition to some irrigation and economic parameters.

Water Flow Module
The water flow module tracks the flow of water through the system from the building's inlet to the sewer lines.Thus, it was divided into different sub-modules of the water demand calculation, GW collection, treatment and reuse.Each sub-module is expressed mathematically, as presented in the following sub-modules.

Water Consumption Sub-Module
The consumption sub-module determines the expected consumption per capita (a it ) for each water use, including irrigation demand.The consumption per capita was calculated for an average user based on the frequency of use per day (F it ), average use duration for each water source (ED it ), the flow rate of each fixture type (r ij ) and was multiplied by a binary decision variable (∂ ij ) to determine the type of fixture.The consumption estimation was adopted from [8] and the Building Research Establishment's Environmental Assessment Method (BREEAM) demand calculator, yet it was modified by a binary variable and ( Fv t ) to account for the seasonal and weekend variations, as shown in Equation (1).Additionally, the landscape coefficient method was used to calculate the irrigation demand (Irr t ).The model can estimate the needed irrigation demand for only two types of plants and one turf grass type based on several factors, such as evapotranspiration rates, the plant coefficient factor and the irrigation method.In order to select only one fixture for each use, a constraint was added, as presented in Equation (2).

GW Collection Sub-Module
Regarding the collection sub-module, it defines which source should be used for recycling and monitors its flow in the pre-treatment tank A. The decision mainly depends on the quantity and quality of GW produced from each source.As previously presented in Figure 1, the water consumption of each source could be fully or partially collected for recycling ( Gws it ) or dumped into the sewer (SG it ) as represented in Equation ( 3).Gws it is constrained to be less than (M), which is a big number as mentioned in the list of notations that is multiplied by the collection binary variable (β i ) as presented in Equation ( 4).This results in collecting only the required GW quantity, while dumping the excess supply.Accordingly, the collected quantity (RG t ) is stored in tank A before entering the treatment unit.
The water flow is monitored through the system, so the tank is represented by the material balance in Equation ( 5).(I A t ) is the quantity of water stored in the tank by the end of period t, which is equal to the remaining quantity from the previous day ( IA t−1 ) plus the received GW (RG t ) minus the processing water flowing into the treatment system during period t ( P tbefore ).The initial inventory in the tank is set to zero.Accordingly, the model determines the capacities of the tanks based on the maximum inventory level per day.

GW Treatment Sub-Module
The treatment sub-module is concerned with selecting the GW treatment system and providing water of an adequate quality for reuse.The water quality can be expressed in terms of a weighted average of the water inflow to the raw GW tank.The assumption that the inflow water quality is constant over time is valid only if the resident time in tank A is too short [27].The developed approach uses Equation (7) to avoid nonlinearity, and also, ensure that the required quality is met daily.The indicated constraint checks the efficiency of all treatment system types (h).However, it will be ineffective in case the binary variable H h is equal to zero as it is multiplied by a big number ( M), as specified in the notation list.In other words, it ensures that this constraint is met in case of no GW system utilization.Moreover, there is another quality constraint that assures the raw GW quality is not degraded during storage.Therefore, the supplied GW quantity ( P tafter ) is set to not exceed the required reuse demands per day, as represented in Equation ( 8), which limits the storage residence time in tank A to be less than 24 h.Furthermore, similar to tank A, the material balance equation was used to track the flow and the contents of tank B.

Reuse Sub-Module
The reuse sub-module is used to keep track of the treated water inventory inside tank B and calculate the amount of recycled or freshwater required for reuse applications.The supplied treated GW quantity ( GU) is controlled by the required demand.In case of recycled water shortage, freshwater ( Qf t ) is utilized as a backup supply, as shown in Equation ( 9).The utilization factor (uf) is a binary input based on the user's intended reuse appliance selection.For instance, it is equal to 1 in case the recycled water can be used for flushing only or both flushing and irrigation uses.While for irrigation, it is set to be zero if the recycled water is intended to be reused for irrigation only.

Cost Calculation Module
The life cycle cost in the model is represented by the total annual worth (TAw c ).The capital includes the initial cost of acquiring the three elements: the fixtures, GW system and needed subsystem.The required subsystem is the additional piping used to supply water after its first use to the treatment system and supply it to the reuse appliances.It also comprises the costs of the raw GW tank, the pump required to deliver treated GW and the treated GW storage tanks.For instance, the capital cost ( Cc h ) of the treatment system is represented by a step function based on the treated quantity and the capacity of the system.
In order to determine the GW capital cost ( Cc h ) using Equation (11), a new variable was defined, the maximum treated quantity (Tc h ), to avoid quadratic or cross-product functions, as presented in Equation (10).It is used to determine the maximum treated water flow per day (Pmax t ).Then, the capital cost per m3 (U h ) is multiplied by the maximum treated quantity ( Tc h ) over the lifetime of the treatment system to calculate the total capital cost.For instance, the capital cost ( Cc h ) of the treatment system is represented by a step function based on the treated quantity and the capacity of the system.The capacity is defined to ensure that the corresponding costs are closely relevant to the incurred cost and the capital cost/m3 is not directly increased with the treated quantity.
where Pmax t ≥ P tbefore .for all t The piping cost is calculated based on the additional links installed to collect GW from the bathroom and/or the kitchen.Thus, the piping cost depends on the sources selected to be recycled and the building height.The piping includes the dual piping installed to collect the GW from the source to the storage tanks.Thus, the pipe's length inside the building is assumed to be constant, while the diameter varies based on the quantities collected.If the GW system is utilized, the piping cost is added by introducing two binary variables (X 1 and X 2 ) multiplied by the additional piping cost.This method was devised to avoid the use of any logical constraints.The dual piping cost of bathrooms' sources is multiplied by X 1 , which is presented mathematically in Equation ( 12).
The operational and maintenance costs include energy consumption of each system, pumping and the required consumables of each alternative.Moreover, the repair cost (Cr) is performed in a certain year.For each treatment type (h), there are two-component replacements that are assumed.For instance: NPV component 1(Cr1 h ) is expected to be replaced every Z years depending on the component's service life; hence, it is computed using the following Equation ( 13):

Model Objectives
The proposed model provides the decision maker with the flexibility of selecting the criterion of optimization.The user may select to minimize the freshwater consumption, minimize the total lifecycle cost of the systems, or both by inputting certain weights, w 1 and w 2 for each option as presented in Equation ( 14).For the freshwater minimization, the goal is to minimize the freshwater quantity, as presented in Equation ( 15), used by considering the trade-offs among the fixtures types used and the GW system selected to substitute for the required freshwater consumption in toilet flushing and/or irrigation, while meeting the stipulated quality standards.The objective is to minimize the total annual worth (TAw c ) presented in Equation ( 16).The equivalent annual worth is used to evaluate various alternatives based on the life span of each option.The Net present value (NPV) of each option is calculated, and then distributed uniformly over the life span of each alternative.
Min w 1 × TQf+w 2 × TAw c ( 14) The model is considered to be a mixed-integer linear problem (MILP), as it includes a variety of integers and continuous variables.The quadratic terms arise in some constraints, such as quality constraint, GW cost calculation and others, have been linearized or eliminated.The linearization was performed to facilitate the optimization problem and to examine a different solution approach to the water management problem in buildings.The model was coded on CPLEX software, version 12.10.This platform was selected as it offers a high capability mathematical solver since it tackles a wide range of problem domains and produces competitive results compared to those of GuroBI and Xpress solvers [28].In addition, it can be connected with Microsoft Excel, MATLAB, GAMS and other programs [29].Consequently, in order to make the model user friendly, the model is integrated with Microsoft Excel as the user's interface to insert the input data and analyze the model results.

Model Verification
The model was verified using a hypothetical case and analyzes the sensitivity to variation in major parameters.A hypothetical project was used to investigate the various effect of each factor on the overall optimization.The building, with an area of 550 m 2 , is located in the city of Manchester, UK, and consists of six floors which have three apartments per floor.The assumed occupancy rate is 3.5 residents per flat, so the total number of residents is 63 persons.The majority of buildings located in the city are less than 20 m in height.The average usage frequencies per capita from the previously studied case, [23], have been utilized.The adopted inflation rate and other related costs are based on recent UK costs in the year 2021.Additionally, consumption behavior is assumed to increase on the weekends and vary based on the season.The periodic variation was collected from [30] about seasonal consumption variations patterns.
The residential building is surrounded by a 250 m 2 landscaped area.The plants and landscape types are of the regularly used types, and it is assumed that 75% of the area is grass and the other 25% is composed of shrubs and tree types.Both plant types are considered to be medium-level water-demanding plants, while the Zoysiagrass, a turfgrass type, is low-level water-demanding type.The water quality indices have been set in the library representing a variety of biological, physical and chemical characteristics.Thus, the average water source's quality is adopted from [31].
The model was run with three objective functions: minimize the lifecycle cost, minimize the freshwater usage and minimize both of them.The lifecycle cost minimization determines no GW system utilization with minimum freshwater conservation quantity based only on the water efficient fixtures selected.However, freshwater minimization determines the highest saving quantity of 61.35%.Additionally, the equally weighted objectives determine the same GW system type and are relatively similar to the freshwater minimization in terms of saved quantity as shown in Table 3.

Sensitivity Analysis
There are many influential factors in the water management optimization problem, such as residents' capacity, consumption behavior, fresh and sewage water costs, inflation rates and others.Each of these factors can affect the model outputs.Figure 2 evaluates the sensitivity of some factors on the total annual worth.It can be noticed that the inflation rates and garden irrigation demand are inversely proportional with the total annual worth, which illustrates that at a certain point the water saved outweighs the incurred costs of sustainable options.For instance, the inflation rate variations presented in Figure 2a demonstrate that the TAW increased until a certain threshold, at 1.46 percent, at which point, it decreased.This occurred because at this rate the optimum solution utilizes the recycling option which maximizes the savings and reduces the overall lifecycle costs.However, the increase in sewage costs, number of residents and freshwater tariffs are directly proportional with the total annual worth.The increase in freshwater cost was examined by studying three scenarios, which are the nominal case of no implementation of the GW system, RBC greywater system usage and the optimum result calculated.Figure 2e illustrates that the total annual worth of the nominal case increased gradually with the increase in potable water prices.As demonstrated, the RBC GW system has attained feasibility at 1.87 GPP.The determined optimum system matched up with the lowest cost scenario of both.Thus, the verification case results show that the model works efficiently.

Factorial Design
Factorial design is concerned with studying the interacting effect of two or more factors on the outcomes.Factorial design was applied by categorizing each factor into two categories, either high or low ones.Previously implemented sensitivity was utilized as a guide to classify each factor based on the selection of GW systems or the economic viability of the GW.For instance, the freshwater tariff studied in the sensitivity was attained utilizing the GW at a 20% increase from the base case, which is equal to 1.79 GBP.As a result, freshwater charges were classified as high if they were greater than or equal to 1.79 GBP, and they were low otherwise.The adopted methodology simply assesses the effect of two or three factors at a time.The explored factors and their classification are presented in Table 4.Each case run depicts the effect of a certain factor in relation to the others.Consequently, all the cases are considered to examine the effect of each factor on the objective.For instance, the effect of the number of residents, factor A, is calculated based on the average values from all cases utilizing statistical equations [32] (Montgomery, 2013).The contribution percentage defines the effect of each factor on the total sum of squares.The results present that the number of residents and the annual increase in water charges accounted for about 55% and 43.7% of the total variability, respectively.Therefore, it may be inferred that the number of residents had the greatest impact on the lifecycle cost.Furthermore, the verification case shows that the model is providing a logical solution and working efficiently.So, it was validated by comparing it was a previously developed assessment as presented in the next section.

Model Validation
A model was validated by comparison with that in [23] collected from the literature.The authors of [23] provide a financial and environmental assessment of applying the GW system in mixed-use buildings.This project has been selected because it offers considerable details about the consumption behaviors, fixtures applied, GW systems and their components.It offers a case study of mixed-use blocks that contain a residential building and a commercial building.The collected GW is shared between the two buildings to utilize the excess supply of residential GW in the commercial demands.However, it provides analysis for many scenarios considering both individual and combined buildings.Thus, only the multi-story residential building was studied to compare it the results with the proposed model.The building has 10 floors with an area of 10,240 m 2 and contains 18 flats per floor.Each flat area is 57 m 2 .The occupancy rate of 2.4 residences per apartment was assumed [23] according to UK standards.Consequently, the number of residences was equal 432 residents.The case study inputs of the residential building are presented in Table 5.As shown, the average frequency of uses and expected use duration are adopted according to the case study data.The model was run for two scenarios.The first scenario assumed the same assumptions as the assessment case of excluding the effect of micro-component options and evaluating only two types of GW systems, MBR and CW, to investigate the effect of the water flow, GW savings and the equivalent cost.However, in the second scenario, all the model's database, fixtures and GW treatment types were taken into account to evaluate various conservation factors and their impact on consumption, savings and cost.The model objective was to minimize the total annual worth.The result of the model run is presented in Table 6.In the first case, the results show that the model provides the same quantity of freshwater uses and savings of 19% as the assessment case does.The obtained recycled demand (GU) for flushing, as shown in Table 7, is similarly equal to the case study results of 12.4 m 3 /day.However, in the second case, the model provides much higher savings of 58.17% due to selecting the advanced micro-components and GW recycling.It can be shown that the optimum combination of fixtures accounts for higher freshwater savings than treated GW does because the efficiency types reduce the flow rate, energy and treated quantity with a short payback period and relatively negligent operational costs.According to the literature, the savings could vary significantly based on the utilized micro-component types, the consumption behaviors, the objective function used, the benchmark case considered and the intended reuse options for recycled water.
Regarding the cost results, it can be demonstrated that the model results attained higher savings in both cases.There is a variance in the results between the first scenario and the assessment.The total NPV, on the other hand, differs from the model's output, owing to differences in the estimated pipping cost, tank capacity and some operational costs.The piping cost in the case study was calculated by taking into account all of the piping used in the water system, which may vary in size.However, the optimization evaluation in the developed model calculates the piping costs for the building by assuming constant diameter usage of 4 inches for drainage pipes and 3  4 inch for water supplies pipes.The case study assumed tanks' capacities based on accounting for 10% losses over the demanded GW per day, 12.4 m 3 / day, assuming that tank A is an underground tank.This was a huge difference, yet based on the considered resident time of water, less than 24 h, in tank A. The determined capacity of 1 m 3 was considered to be valid and compatible with both [33] Dixon et al.'s (1999) findings that the sufficient GW tanks capacities could range between 0.15 and 1 m 3 for many residential buildings.Unfortunately, the detailed cost specification of the piping and tanks costs for each building individually was not mentioned in the assessment.In order to clarify the difference in cost calculation, an approach was applied to assign the cost of piping and tanks for the residential building only.The total water usage per capita for the residential and office building was calculated.The percentage of the residential from the total usage was determined, as shown in Table 8.This percentage was used to determine the cost of piping and tanks for the residential building only.Thus, the NPV is adjusted by adding the cost of piping and GW tanks to both the assessment and model results, as presented in Table 9.By comparing both the adjusted NPVs, the results show that the developed optimization model and optimized GW system lead to a 15.37% value-added compared to that of the assessment cost.The second scenario utilizes advanced fixture types.There was a significant saving that was attained due to using the RBC system, an NPV cost of 55,918 GPP, compared to that of the MBR system, which has an NPV of 112,390 GPP.The cost difference between the two systems more than doubled.In addition, the significant difference in savings can be justified as the selected combination of advanced fixture types offers a huge reduction of the freshwater quantity.Due to the high cost of potable water and its annual increase compared to the cost of fixtures utilized, the cost savings could be justified.

Conclusions
The model is considerable of merit and provides logical solutions for water management problems in residential buildings.The following are some highlights of research findings and contributions: a.
We created a database of several water conservation parameters, including various fixtures and GW system types.b.
We developed a mathematical optimization model able to define the water conservation aspect in buildings better than a nominal scenario based on the user's objective.c.
We used mathematical linearization approaches to eliminate the nonlinearity of some constraints, which facilitated the optimization process and reduces the running time.
d.We integrated user-friendly software, EXCEL for Microsoft 365 version 2302, with the coding platform CPLEX, version 12.10, which can make it easy to use and flexible for any form of adjustments or upgrading.
The limitation of the developed model is that some of the inputted data, such as consumption of water and quality, are based on the average values, which may vary in real life.Another shortcoming of this study is that the water variation over time was not considered.Regarding the recommendation, it is suggested that the model be upgraded by considering other recycling alternatives, such as rainwater harvesting and centralized treatment options.Researchers are also be encouraged (Reword) to explore the effect of the daily timing of consumption patterns on the model solutions.Moreover, it is recommended in future research to evaluate the saving outputted by the model and compare it with the green standards for water conversions, such as LEED and BREAM.Further exploration to assess the risk that the recycled quality does not strictly meet the intended reuse standards.

Figure 1 .
Figure 1.Schematic diagram of the water system in a building presenting various modules used.

Figure 2 .
Figure 2. Result of sensitivity analysis of factor: (a) inflation rates, (b) plant irrigation demand, (c) sewage cost, (d) number of residents and (e) fresh water tariffs.

Figure 2 .
Figure 2. Result of sensitivity analysis of factor: (a) inflation rates, (b) plant irrigation demand, (c) sewage cost, (d) number of residents and (e) fresh water tariffs.

Table 1 .
Summary of the reviewed research related to the water management problem.

Table 2 .
Fixtures types flow rates.

Table 3 .
Verification case results with comparing various objectives.

Table 4 .
Three factorial design matrix and its contribution percentage.

Table 5 .
Case study input parameters.

Table 8 .
Residential building contribution percentage of the assessment case.

Table 9 .
Calculation of adjusted NPV.