Research on the Prediction of the Water Demand of Construction Engineering Based on the BP Neural Network

The scientiﬁc and eﬀective prediction of the water consumption of construction engineering is of great signiﬁcance to the management of construction costs. To address the large water consumption and high uncertainty of water demand in project construction, a prediction model based on the back propagation (BP) neural network improved by particle swarm optimization (PSO) was proposed in the present work. To reduce the complexity of redundant input variables, this model determined the main inﬂuencing factors of water demand by grey relational analysis. The BP neural network optimized by PSO was used to obtain the predicted value of the output interval, which eﬀectively solved the shortcomings of the BP neural network model, including its slow convergence speed and easy to fall into local optimum problems. In addition, the water consumption interval data of the Taiyangchen Project located in Xinyang, Henan Province, China, were simulated. According to the results of the case study, there were four main factors that aﬀected the construction water consumption of the Taiyangchen Project, namely, the intraday amount of pouring concrete, the intraday weather, the number of workers, and the intraday amount of wood used. The predicted data were basically consistent with the actual data, the relative error was less than 5%, and the average error was only 2.66%. However, the errors of the BP neural network model, the BP neural network improved by genetic algorithm, and the pluralistic return were larger. Three conventional error analysis tools in machine learning (the coeﬃcient of determination, the root mean squared error, and the mean absolute error) also highlight the feasibility and advancement of the proposed method.


Introduction
e cost management of construction engineering is a complex problem, and different cost management strategies should be carried out according to the diverse characteristics of construction materials [1]. e cost management of construction water has the following characteristics. (1) e unit price of water is low and almost constant. erefore, the essence of cost analysis related to construction water is to analyze the construction water demand. (2) e total amount of water used for construction is huge, and ensuring the stability of the water supply during construction is, therefore, of great significance to the smooth progress of construction [2]. In addition, although the cost of construction water accounts for a small proportion of the total cost of construction projects, water plays a major role in the construction process [3]. e scientific and effective prediction of construction water consumption can not only be used to calculate the cost of construction water scientifically and effectively but can also ensure the stability of the water supply during construction as much as possible, which is also of great significance to the smooth progress of construction.
However, the prediction of construction water consumption is complex. Almost all construction operations require water. Operations such as on-site concrete construction and formwork construction are characterized by high water consumption. Moreover, construction engineering has complex stages, and the water consumption in different construction stages is very different. e traditional methods for the prediction of industrial water consumption include parametric statistics and deterministic models, which have usually been incorporated into models for engineering calculation or physical analysis after quantifying the factors that affect construction water consumption. He and Tao [4] established a coupled grey system and multivariate regression model to predict water consumption in Wuhan, which was marked by a clear concept and simple structure. Via the power function model, the linear function model, the logarithmic function model, and the parabolic function model, Zhang et al. [5] fitted the curves of water consumption in China in 2015, 2020, and 2030. e results showed that the correlation coefficient of the parabolic curve fitting was the largest, the average absolute percentage error was the smallest, and the fitting effect was the best. Buck et al. [6] used a statistical sampling method to predict residential water consumption in California. Nevertheless, these research methods were timeconsuming and prone to predict errors because they assumed that the relationship between independent and dependent variables was a simple linear process. However, regarding water consumption in construction engineering, the interaction of various variables constitutes a large and compound system with continuous and nonlinear changes. A simplified model would affect the accuracy of the analysis results, thereby resulting in the prediction accuracy of water consumption in construction engineering being unable to meet the needs of engineering practice, and posing a substantial threat to the smooth progress of engineering projects. In addition, traditional water demand forecasting methods need a large amount of complete statistical data to obtain consistent research results. However, hefty amounts of complete statistical data are difficult to obtain on construction sites.
In recent years, the emergence of artificial intelligence algorithms, such as artificial neural networks (ANNs), has provided new ideas for conducting the real-time prediction of the complex system of the water demand of construction projects [7]. e ANN method has a good self-adaptive learning ability and nonlinear mapping ability and is able to fully utilize the potential laws of input data, thereby demonstrating significant advantages for the research and analysis of complex systems with multifactor coupling. When an ANN is applied to the water demand prediction of building engineering construction, the model solves the nonlinear problem of water demand prediction by simulating the structural characteristics and action mechanism of biological neurons and uses the limited data measured in the field instead of a large amount of complete statistical data to predict the water demand by using the data-driven method. At present, relevant scholars have carried out research on water demand forecasting and have obtained rich research results.
Donkor et al. [8] summarized the research results related to urban water demand forecasting and pointed out that scientific and effective forecasting variables are the key to successfully forecasting urban water demand. ey also pointed out that the soft computing method yielded valuable research results in the short-term forecasting of water demand. Piasecki et al. [9] compared the ANN and the multiple linear regression (MLR) method, and a case study showed that the ANN method was superior to MLR. Zhang et al. [10] used the main influencing factors of the predicted daily water consumption as the input and the predicted daily water consumption as the output after noise reduction. In this work, the multiscale chaotic genetic algorithm, which is characterized by a strong global searching ability and fast searching speed, was utilized to optimize the parameters of a least-squares support vector machine. By using the ANN method, Santos and Pereira [11] predicted the urban water demand of São Paulo, Brazil. e research indicated that the ANN model could make accurate predictions with a large amount of data, and it was marked by the best performance and a small error. In addition, Santos considered the influences of weather variables on regional urban water consumption. At present, the application of artificial intelligence prediction methods to water consumption prediction mainly includes the following two ideas: a multiparameter prediction model and a time series-based model. Research on the prediction of drinking water demand in Portugal has shown that the univariate time series model based on historical data is useful and can be combined with other prediction methods to reduce errors [12]. e previously mentioned research has demonstrated that soft computing algorithms, such as ANNs, can better deal with the nonlinear problems in water resource demand management.
erefore, the complex and nonlinear mapping between the factors that affect water resource demand and construction water resource demand can be identified by ANNs.
At present, the back propagation (BP) neural network is the most commonly used neural network [13]. When applied to complex system analysis, the traditional BP neural network might contain the following shortcomings. (1) e traditional BP neural network is an optimization method of local search, and it can easily fall into the local extremum. e weights can easily converge to local minima, which leads to the failure of network training [14]. Furthermore, the BP neural network is highly sensitive to initial network weights. When the network is initialized with different weights, it tends to converge to different local minima [15]. (2) e structure of the BP neural network can only be selected by experience, and there is no unified and complete theoretical guidance for the selection of a BP neural network structure. If the selected network structure is too large, the training efficiency will not be high and a fitting phenomenon may occur [16], resulting in low network performance and reduced fault tolerance. If the selection is too small, the network may not converge [17]. Based on the preceding analysis, the traditional BP neural network should be strengthened to develop a high-precision model. Similar to other metaheuristic algorithms such as the genetic algorithm (GA), particle swarm optimization (PSO) is a population-based optimization tool that searches for the optimal solution by updating generations. PSO has no evolutionary operators such as crossover or mutation. erefore, the advantages of PSO are its very simple concept, low calculation cost, and few parameters that require adjustment [18]. In the fields of bottom hole pressure prediction, ground vibration prediction [19], and asphaltene precipitation prediction [20], PSO has been applied to optimize the initial weights and thresholds of the BP neural network, which results in higher accuracy.
In addition, most of the existing research results related to water demand forecasting have been aimed at large-scale areas, such as cities [11][12][13][14]. To the best of the authors' knowledge, research on the water demand forecasting for construction projects has not yet been reported.
Hence, in this paper, a prediction model of the water consumption of construction projects was established based on grey relational analysis and the BP neural network improved by PSO. e main contributions of this paper are as follows. (1) Previous relevant research has primarily focused on the water demand prediction of large-scale areas, such as cities. However, the present study focused on the water demand prediction of construction projects in the construction stage and presented a detailed case analysis of the construction water of the Taiyangchen Project in Xinyang City, Henan Province, China. is provided new insight for water management in construction engineering. (2) In this paper, the grey relational analysis method was adopted to identify the key factors that affect the construction water consumption of building engineering and to reduce the input variables of the BP model. By setting the threshold of the grey relational degree, it was determined that the key factors that affected the water consumption in the Taiyangchen Project were the intraday amount of pouring concrete, the intraday weather, the number of workers, and the intraday amount of wood used. (3) In view of the shortcomings of the BP neural network model, such as its slow convergence speed and easy to fall into local optimum, PSO, which is characterized by a fast convergence speed and easy realization, was adopted to optimize the initial weights and thresholds of the BP neural network, which effectively solved these problems. Additionally, the error analysis in the case study demonstrated that the calculation results of the BP neural network improved by PSO achieved higher accuracy than the classical BP neural network model, the BP neural network improved by GA, and the pluralistic return. e remaining chapters of this paper are arranged as follows. Section 2 presents the materials and methods, and the fundamental factor identification method based on grey relational analysis and the BP neural network optimized by PSO are constructed in detail to build a water demand prediction model for construction projects. Section 3 presents the results and discussion and makes a detailed case analysis of the construction water of the Taiyangchen Project in Xinyang City, Henan Province, China. ree common error analysis tools in machine learning are employed in this section to compare the computational accuracy of different models, and the influence of the topological structure of the BP network model on the calculation results is discussed. Section 4 presents the conclusion, which summarizes the research results of this paper and indicates future research directions.

Identification of Key Factors Based on Grey Relational
Analysis. Grey system theory is a systematic scientific theory put forward by Professor Deng Julong, a famous Chinese scholar. Grey relational analysis is a quantitative description and comparison method of system development and changing situations. Its basic concept is tantamount to judge whether factors are closely related by the geometric similarity of reference data columns and several comparison data columns, which reflect the correlation degree between curves. In the fields of risk assessment and prediction, relational analysis can determine the weight of each influencing factor by comparing the compactness of each index series with the benchmark series [21]. e grey correlation method is in a position to analyze the development trend of a system [22]. is method can extract the factors that have great influences on the system index in a system with poor information and small samples. Grey relational analysis can overcome the problems of the calculation amount being too large, the samples not obeying a certain probability distribution, and the calculations having different quantitative and directional results. e steps for the use of grey relational analysis to find the main factors that affect water consumption in construction projects are reproduced below.
In this paper, the interval-valued processing method is used to process the original data of construction water and its influencing factors [23].
Step 2. Calculate the grey correlation coefficient. e degree of correlation can reflect the shape of the sequence, and the coefficient of the grey correlation of water used for building engineering construction is where Δ nmax and Δ nmin are the maximum and minimum values in the water consumption data series of construction projects, respectively, and ρ is a resolution function, the function of which is to improve the significance of the difference between correlation coefficients. Generally, a satisfactory resolution result can be obtained when the value is 0.5 [24]. Moreover, m is the reference sequence, n is the comparison sequence, s is the sequence length, and Δ mn (i) is the absolute difference between the reference sequence m and point i of the comparison sequence n.
Step 3. Calculate the correlation degree. e correlation degree calculation formula is as follows [25]: where s is the length of the reference sequence, θ mn (i) is the correlation coefficient between the reference sequence m and the i value of the comparison sequence n, and λ(x m , y n ) is the correlation degree between the reference sequence m on the x curve and the comparison sequence n on the y curve.

Advances in Civil Engineering
Step 4. Rank analysis of correlation degree. e correlation degree of each factor is sorted depending on the numerical value and describes the relative changes of the reference sequence and comparison sequence. Generally, if the correlation degree between two factors is large, the changes of construction water and the influencing factors are essentially the same [25,26].

Prediction Model of Water Demand Based on the BP
Neural Network Optimized by PSO

Introduction of the BP Neural
Network. e BP neural network is an artificial neural network model with selflearning and self-adapting abilities and composes of two parts, namely, the forward propagation of input data and the backward propagation of the error value. e standard neural network topology consists of input layer nodes, hidden layer nodes, and output layer nodes that are connected, and the nodes in the same layer do not interact with each other. In this algorithm, n samples X � (x 1 , x 2 , . . . , x n ) are taken as the input nodes of the neural network, and the expected result Y � (y 1 , y 2 , . . . , y n ) is taken as the corresponding output node. e error value can be obtained by comparing the predicted result with the actual result, and the fitness function is employed to measure whether the error value is consistent. For the calculation results that do not meet the requirements, the network will use the gradient descent method to carry out error back propagation in the weight vector space, for which the correction amount of each weight of the hidden layer and the output layer [27] is shown in equation (3). e error reaches the expected value through repeated iteration, thus completing the establishment of the BP neural network calculation model.
where ψ is the error value in the BP neural network, ω, θ, and r are the input layer, hidden layer, and output layer of the neural network, respectively, N 1 and M are the weight and threshold number of nodes, respectively, y t (s) is the expected output of the neural network, y t (s) is the actual output, t is a node that needs to optimize the connection weight, and s is a node that needs to optimize the threshold.

Optimization of the BP Neural Network by PSO.
PSO was first proposed by Eberhart and Kennedy in 1995 [28]. Its basic concept originated from the study of birds' foraging behavior, and PSO was inspired by this biological population behavior to solve the optimization problem. In PSO, each particle represents a solution of the problem and corresponds to a fitness value. Particle velocity determines the distance and direction of particle motion and is dynamically adjusted by the motion of itself and other particles, thus realizing the optimization process of individuals in a solvable space.
In the process of adopting PSO, the error between the capacity output and the expected capacity output obtained by the forward learning of the BP neural network is first initialized by the PSO to determine the individual extremum and group extremum, i.e., to find the weights and thresholds in the BP neural network. e speed and position are then updated, as are the original individual extremum and group extremum after calculating the fitness. Finally, the obtained optimal neural network weights and thresholds are sent to the BP neural network for verification [29].
Supposing that the particle swarm X � (X 1 , X 2 , . . . , X n ) is composed of n particles, and the dimension of the particles is usually Q. ere are n particles in the swarm, each particle is Q-dimensional, and the swarm composed of n particles searches Q dimensions. Every particle is expressed as X i � (X i1 , X i2 , . . . , X iQ ), which represents the position of the particle i in the Q-dimensional search space and also a potential solution to the problem. According to the objective function, the fitness value corresponding to each particle position X i can be calculated [30].
(2) e optimal value P g , P g � (P g1 , P g2 , . . . , P gQ ), found by all particles. It is worth noting that there is only one P g here.
During each iteration, particles update their own velocity and position via the individual extremum and global extremum, and the update formula of position velocity optimized by the PSO is as follows [31]: where ω is the inertia weight, d � 1, 2, . . . , D, i � 1,2, . . ., n, k is the current iteration number, v id is the velocity of particles, c 1 is the particle weight coefficient that tracks its own historical optimum value, which represents the particle's own cognition and is called the acceleration factor, c 2 is the weight coefficient of the optimal value of the particle tracking group, which represents the cognition of particles to the whole group knowledge and is called the acceleration factor, and r is a random number that is uniformly distributed in the interval [0, 1]. In addition, error analysis should be carried out on the results. Based on the preceding analysis, the calculation flow chart of the proposed model is presented in Figure 1.
It can be observed in Figure 1 that, via the analysis of the data, the historical data and several factors that have the greatest influences on the water demand of building engineering construction are input into the neural network. After the neurons in each layer act on the influencing factors, they generate the output. e weights and thresholds of the neural network are optimized by PSO, and the fitness value is obtained to determine the individual with the best fitness. After taking the output error as the objective function and correcting the error to meet the requirements, the trained neural network can make predictions.
In this paper, the data of the Taiyangchen Project in May and June 2019 were collected in units of days. e data of the water use of the Taiyangchen Project was processed by grey relational analysis, and the correlation coefficient and degree were obtained. By comparing the sizes, the main factors that affected the water use of the Taiyangchen Project were determined and then used as input layers and input into the neural network to predict the water use of the project. e daily water consumption of the Taiyangchen Project in Xinyang City, Henan Province, China, is the research object in this work. e project consists of nine residential buildings with frame-shear wall structures, all of which have 18 floors above ground and 1 floor underground. e height of each building is 52.90 m, and the total construction area of each building is 13449.68 m 2 . e quantification of the evaluation factors is an important step in the selection and treatment of influencing factors. e number of workers (R 1 ), the intraday amount of pouring concrete (R 2 ), the highest temperature (R 3 ), the intraday amount of wood used (R 5 ), and the intraday amount of steel used (R 6 ) were all determined by actual field investigation and statistics. e score of the intraday weather (R 4 ) is divided into four situations, namely, sunny (0.9), cloudy (0.6), light rain (0.3), and heavy rain (0). e values of each factor are presented in Table 1. Due to the limitations of the layout, only some samples are reported in Table 1.
e correlation coefficients of the influencing factors were calculated by equations (1) and (2), and the calculation results are shown in Table 2.
It can be seen from Table 2 that the correlation degree of the influencing factors from the greatest to the least is as follows: the intraday amount of pouring concrete (R 2 ) > the intraday weather (R 4 ) > the number of workers (R 1 ) > the intraday amount of wood used (R 5 ) > the highest temperature (R 3 ) > the intraday amount of steel used (R 6 ). is order can be explained by the content and characteristics of the construction work. Concrete pouring is a typical wet operation that requires a lot of water. e weather is another significant factor that affects construction. When it rains, most of the work on the construction site will stop, and the construction water consumption will decrease significantly. e more workers there are, the more water will be used for construction and living. Timber for construction needs to be watered and wetted to ensure that its moisture content is near the optimum, which also requires a large amount of water [36].
When the correlation degree is less than 0.6, the two sequences are considered to be independent, and if the correlation degree is greater than 0.8, the two sequences have a good correlation. A correlation value between 0.6 and 0.8 is beneficial [35]. In Table 2, the factors with a correlation degree greater than 0.8 include the intraday amount of pouring concrete (R 2 ), the intraday weather (R 4 ), the number of workers (R 1 ), and the intraday amount of wood used (R 5 ), and these are, therefore, the key factors that affect the water consumption of building engineering construction.

Result of Water Demand Forecasting.
In this work, the construction water consumption of the Taiyangchen Project in Xinyang City, Henan Province, China, was taken as the research object, and the data used were sourced from the monitoring data of the municipal pipe network water consumption of the Taiyangchen Project and the on-site construction log.
After the evaluation factor is quantified, the difference of its numerical dimension slows the convergence speed of the algorithm and affects the accuracy of the model. Because all indicators are benefit-based, the data are normalized as follows [37]: where x * ij indicates the value of the evaluation index after standardization, max(x j ) represents the maximum value of indicator j, and max(x j ) represents the minimum value of indicator j.

Advances in Civil Engineering
According to grey relational analysis, four main influencing factors of water demand in the construction interval of building engineering were obtained. e number of input nodes is m � 4, and the number of hidden layer nodes is n � 2m + 1 � 9, so the structure of the BP neural network is 4-9-1 [38], as illustrated in Figure 2. It is worth noting that a variety of BP neural network topologies were constructed in this work, and the calculation results are exhibited in Table 3.
In the process of model formation using the BP neural network, the available data should be divided into two groups, which, respectively, represent training and testing sets. e data of the training set are used for training, while the data of the testing set are used for checking the network. Many researchers choose data in the respective proportions of 90% and 10%, 80% and 20%, or 70% and 30% [39]. In this study, the training set was data of the Taiyangchen Project from May 1 to June 20, 2018, including a total of 51 days of data. e testing set was the data of the Taiyangchen Project from June 21 to June 30, 2018, including a total of 10 days of data. e ratio of training set data to testing set data was therefore 83.61%-16.39%.
To achieve a better prediction effect, the best parameters of the BP neural network and the PSO were set, including the following: the number of training iterations was 1000, the learning rate was 0.1, and the training target was 0.001. e calculation parameters [40] of PSO included 1000 iterations, a population size of 50, the local learning factor c 1 � 1.49445, and the global learning factor c 2 � 1.49445. e maximum error of iteration termination was 0.00001. e convergence curve obtained after calculation is presented in Figure 3. In a case analysis, when the number of iterations reaches about 500, the requirements are met. In this study, the population number and the maximum number of iterations were set to relatively large values to ensure that the model could calculate more complex problems. Figure 3 shows the convergence curve after 1000 iterations.
Following the optimization calculation process of PSO, the error between the 498th iteration and 499th iteration was greater than the minimum acceptable precision (0.00001), while the error between the 499th iteration and 500th iteration was less than 0.00001. After that, the errors of the calculation results were all less than 0.00001. e calculation was arrested at the 1000th iteration with a very small error.
ese findings indicate that the PSO found the optimal neural network weights and thresholds at the 500th iteration, which is illustrated by both Figure 3 and Table 4. In addition, it can be qualitatively judged from Figure 3 that the GA    is is an advantage of PSO compared with GA. e prediction results obtained by using the proposed calculation model are reported in Table 5. In addition, the BP model, the pluralistic return, and the BP model improved by GA were also used to predict the results. e parameters of GA were set as follows: population size was 100, ending evolution algebra was 1000, crossover probability was 0.5, and mutation probability was 0.001.
In addition, this paper used the standard calculation method which was commonly used in engineering practice, and multivariate linear return method to calculate the quantity used in the construction site.
According to Chinese national standard (the Code for Fire Protection Design of Buildings, GB 50016-2014), the calculation process of construction site water consumption is as follows: (1) Water consumption for site operation: where q 1 (L/s) is the water consumption of construction site, K 1 is the unexpected construction water consumption coefficient, Q 1 (L/s) is the annual engineering quantity, N 1 is the construction water quota (L/m 3 ), T 1 (days) is the annual effective working day, t (hours) is the number of working shifts per day, and K 2 is the imbalance coefficient of water consumption. According to the field investigation, K 1 was 1.10, T 1 was 300, and t was 8 in this project. e calculated Q 1 and N 1 were brought into equation (6), and the q 1 was 0.52 L/s. (2) Water for construction machinery: where q 2 is the water consumption of machinery, K 1 is the unexpected construction water consumption coefficient, Q 2 is the same number of machinery, N 2 is the water quota of construction machinery machine-team, and K 3 is the water imbalance coefficient of construction machinery. According to field investigation, K 3 was 1.5. According to the construction site statistics, Q 2 and N 2 were taken into equation (8), and q 2 � (0.04 L/s) could be calculated. (3) Domestic water consumption on the construction site: where q 3 is the domestic water consumption of the construction site, P 1 is the domestic water  Advances in Civil Engineering consumption of the construction site, N 3 is the water quota of the construction site, K 4 is the imbalance coefficient of the construction site, and t is the number of working shifts per day. According to the field investigation, K 4 was 1.3 and t was 1. With equation (8), q 3 was 2.08 L/s. (4) Domestic water consumption in living quarters: where q 4 is the domestic water consumption in the living area, P 2 is the number of residents in the living area, N 4 is the daily domestic water quota in the living area, and K 5 is the unbalanced coefficient of water consumption in the living area. After field calculation, P 2 was 150 and K 5 was 2.
Bringing complex N 4 into equation (9), q 4 was 0.8 L/s. (5) Total water consumption Q: Bring q 1 , q 2 , q 3 , and q 4 into equation (10), and the Q is 3.44 L/s. It is worth mentioning that the fire water was not considered in our calculation here because the fire water was only used in the fire.
Considering that the daily construction time is 8 hours, the water consumption calculated according to Chinese construction codes was 990.72 m 3 . Comparing the data in Tables 1 and 5, the water consumption calculated by Chinese construction codes was often less than the actual water demand. is situation would easily lead to water shortage and shutdown in the construction site, which was one of the important backgrounds of the research work in this paper. In addition, under the constraints of limited time and timeliness of data collection, it took a long time to investigate the values of more than a dozen parameters by adopting Chinese national calculation standard, which had the disadvantage of low calculation efficiency.

(11)
Bring the data of the test set into equation (11), and the prediction result is as shown in Table 5.

Analysis and Discussion of Calculation Results.
Error analysis was conducted to verify the accuracy of this algorithm, and the relative error value was obtained according to the predicted and actual values. e formula is as follows: where E is the relative error, c p is the predicted value, and c a is the true value. According to equation (12), the relative error value can be calculated by the values present in Table 6. Compared with the actual water consumption, the error of the calculations of the proposed method was less than 5%, and the average error was only 2.47%. e average error of the GA-BP model was 4.06%, and the maximum error was 8.36%. In contrast, the error of the calculations of the BP model was larger, the maximum error was 46.56%, and the average error was 22.39%. e maximum error of the results calculated by multivariate return analysis was 75.47%, and the average error was 41.61%.
is proves that the proposed method is effective and advanced in predicting the water demand of construction projects. e four calculation results of PSO-BP with the biggest error appeared in the last four times. at was to say, the first six predictions were very accurate, and the last four predictions had large errors.
To better compare the prediction results of the two methods and highlight the advantages of the proposed PSO-BP neural network model, three common error analysis tools in machine learning were used to compare several algorithms.  8 Advances in Civil Engineering e determination coefficient (R 2 ) indicates the degree of correlation between the measured value and the predicted value. e closer R 2 is to 1, the higher the correlation. On the contrary, the closer R 2 is to 0, the lower the correlation. As listed in Table 3, the R 2 values of the BP model, the PSO-BP model, the GA-PSO model, and the pluralistic return were found to be 0.7921, 0.9959, 0.9853, and 0.3767, respectively, thereby demonstrating that the PSO-BP model is better than the BP model, the GA-BP model, and the pluralistic return. e root mean square error (RMSE) is an important standard by which to measure the prediction results of machine learning models. e RMSE of the PSO-BP model was 96.0900, which is notably less than the BP model, the GA-BP model, and the pluralistic return. e mean absolute error (MAE) is the average of absolute errors, which can better reflect the actual situation of predicted value errors. e RMSE of the PSO-BP model was 15.7467, which is notably less than the BP model, GA-PSO, and pluralistic return. e comparative analysis of calculation errors indicates that the PSO-BP model achieved better prediction accuracy and optimization performance. is excellent calculation result is also consistent with previous benchmark test results [41]. e number of hidden layers is another important factor that affects the accuracy of the BP neural network [42]. erefore, the influences of the topological structures of different network models on the prediction results were also analyzed [38].
Referring to the classical research results in related fields [43], the topological structures of six different network models were designed, and the related calculation results are shown in Table 7.
It can be seen from Table 3 that the calculation accuracy of the PSO-BP neural network model was significantly higher than that of the BP model or GA-BP model when the same network model topology was adopted. Regardless of the topology of the network model, the average error of the calculation results of the PSO-BP neural network model was very small. e calculation results demonstrate the effectiveness and advancement of the PSO-BP neural network model in forecasting the water demand of construction projects. In addition, overfitting or underfitting is a qualitative phenomenon that occurs in artificial neural network algorithms, and there is no tool with which to quantitatively describe them. Referring to the details of previous research studies [41,44], it is believed that the prediction accuracy of the PSO-BP neural network model is higher than the calculation accuracy of the BP neural network model, which also demonstrates that the proposed model reduces the phenomenon of overfitting or underfitting. After overfitting or underfitting, the prediction accuracy is often inadequate [45].
Regarding the PSO-BP neural network model, with the increase of the number of hidden layers, the average error was considered to be further reduced. ere are two hidden layers, and the model with the 4-9-5-1 network structure achieved the highest calculation accuracy. e accuracy of calculation with a hidden layer model was 2.47%, which was the lowest in the PSO-BP neural network model and can also meet the needs of engineering practice [46]. is paper discussed the influence of the number of input variables on the calculation results. e analysis here adopted the calculation model of PSO-BP, and the number of hidden layer was 1. e average error and maximum error are shown in Table 8.
When there were three input variables, the calculation error of the PSO-BP model was obviously larger than that of four input variables. When the input variables were increased to 5 or 6, the calculation accuracy was not significantly improved. Considering the availability of construction site data, the field investigation time would increase significantly if there were 5 or 6 input variables. erefore, it could be considered that the four input variables obtained by grey relational analysis in this paper were reasonable.

Conclusions
e purpose of this research was to use the BP neural network to accurately predict the water consumption of

Input variables
Average error (%) Maximum error (%) r 1 , r 2 , r 4 , and r 5 4.06 4.74 r 1 , r 2 , and r 4 7.43 10.15 r 1 , r 2 , and r 5 9.55 14.28 r 1 , r 4 , and r 5 8.90 15.69 r 2 , r 4 , and r 5 7.05 12.73 r 1 , r 2 , r 3 , r 4 , and r 5 3.67 4.21 r 1 , r 2 , r 3 , r 4 , r 5 , and r 6 3.31 3.96 construction projects. First, via the use of the data, it was found that there are four factors that affect the water consumption in construction projects, namely, the intraday amount of pouring concrete, the intraday weather, the number of workers, and the intraday amount of wood used. en, after taking these four key factors as the input layer and using the optimal neural network weights and thresholds obtained by PSO, a predictive model of construction water consumption based on the neural network model was constructed. Finally, a case study of the construction water consumption of the Taiyangchen Project in Xinyang City, Henan Province, China, revealed that, compared with the actual water consumption, the error calculated by the proposed method was less than 5%, and the average error was only 2.47%. In addition, the three common error analysis tools used in machine learning (the coefficient of determination, the root mean squared error, and the mean absolute error) all highlighted that the calculation accuracy of the proposed method was significantly higher than the BP algorithm, the GA-BP, and the pluralistic return. ere were two hidden layers in the PSO-BP neural network model, and the model with the 4-9-5-1 network structure was found to have the highest calculation accuracy. e calculation accuracy of the model with a hidden layer and a network structure of 4-9-1 was 2.47%, which can also meet the needs of engineering practice. e model proposed in this paper can effectively predict the water consumption of building engineering construction and determine abnormal water in a timely manner to rationally dispatch the water supply and ultimately achieve the purpose of saving water. In future research, the sample set can be expanded, the learning effect of the model can be improved, and a more perfect prediction model of construction water consumption can be trained.

Data Availability
e case analysis data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.