An Improved Slime Mould Algorithm for Demand Estimation of Urban Water Resources

A slime mould algorithm (SMA) is a new meta-heuristic algorithm, which can be widely used in practical engineering problems. In this paper, an improved slime mould algorithm (ESMA) is proposed to estimate the water demand of Nanchang City. Firstly, the opposition-based learning strategy and elite chaotic searching strategy are used to improve the SMA. By comparing the ESMA with other intelligent optimization algorithms in 23 benchmark test functions, it is verified that the ESMA has the advantages of fast convergence, high convergence precision, and strong robustness. Secondly, based on the data of historical water consumption and local economic structure of Nanchang, four estimation models, including linear, exponential, logarithmic, and hybrid, are established. The experiment takes the water consumption of Nanchang City from 2004 to 2019 as an example to analyze, and the estimation models are optimized using the ESMA to determine the model parameters, then the estimation models are tested. The simulation results show that all four models can obtain better prediction accuracy, and the proposed ESMA has the best effect on the hybrid prediction model, and the prediction accuracy is up to 97.705%. Finally, the water consumption of Nanchang in 2020–2024 is forecasted.


Introduction
Water is a very precious natural resource, even called the source of life. With the continuous economic development and population growth, people's demand for water is also increasing. However, due to the long regeneration cycle of water, the contradiction between the supply and demand of water resources is more and more tense, resulting in a serious shortage of water resources. Therefore, the optimal and reasonable allocation of water resources is the key to sustainable utilization of water resources [1]. Due to the randomness of water consumption and the influence of the economy, population, and other factors, water resources demand estimation has always been a very difficult problem.
At present, the methods of water resources prediction at home and abroad are varied [2]. From the spatial and temporal scale of the forecast, it can be divided into a short-term, medium-term, long-term, global, national forecast, and so on. From the range of the forecast, it can be divided into the whole forecast and partial forecast. From the approach of the forecast, it can be divided into grey correlation model [3], regression analysis model [4], and neural network prediction model [5]. Although the traditional forecast models can predict the demand for water resources by different approaches, the low predicted accuracy of those models might not apply to solving practical problems. Choosing the appropriate parameters in the models is an effective way to eliminate the effect of sparsity and uncertainty of historical data, and improve the accuracy of predicted results. The selection of parameters among so many candidates is a challenging task and can be regarded as an optimization problem. Therefore, intelligent optimization algorithms are used to solve such parametric optimization models. In order to effectively ameliorate Mathematics 2021, 9,1316 3 of 26 For the above d-dimensional optimization problem, the initial slime mould population with n individuals is a n × d matrix called X(0) = {X 1 , X 2 , · · · , X n },. Each individual in the population is a vector with d elements, which is initialized by Equation (2).

Approach Food
Since slime mould can approach food according to the smell in the air, and this approach behavior can be expressed by the following formula, where, t represents the current iteration number, X represents the position of slime mould, X b is the individual position with the highest odor concentration, X A and X B are the two individuals randomly selected from the population. The selection behavior of slime mould is simulated by two parameters, vb and vc, and the value range of vb is [−a, a], vc decreased linearly from 1 to 0. r is a random number between [0, 1], W represents the weight of the search agent. The formula of p is expressed as follows, where, S(i) represents the fitness value of the current individual, and DF represents the optimal fitness value in all the current iterations.
The expression of vb is as follows, vb = [−a, a], a = arctanh(− 2 max_t + 1) (5) where, max_t represents the maximum number of iterations. The weight W is given as follows, W(SmellIndex(i) =    1 + r· log bF−S(i) bF−wF + 1 , condition 1 + r· log( bF−S(i) bF−wF + 1 , others where, r is a random number between [0, 1], condition represents the first half of the population. bF and wF, respectively, represent the optimal and worst value obtained in the current iteration, and SmellIndex denotes the sequence of fitness values sorted (ascends in the minimum value problem).

Wrap Food
This stage simulates the contraction mode of venous tissue structure of slime mould mathematically when searching. The slime mould can adjust its search patterns according to the quality of food. The specific mathematical formula of the slime mould updating its position can be expressed as X * =    rand·(ub − lb) + lb, rand < z X b (t) + vb·(W·X A (t) − X B (t)), r < p vc·X(t), r ≥ p where, ub and lb are the upper and lower bounds of the search space, respectively, rand and r are random numbers between [0, 1]. z is a parameter of balancing algorithm's Mathematics 2021, 9,1316 4 of 26 exploration and exploitation capability, and different values can be selected according to specific problems. In this paper, z is 0.03. Algorithm 1 gives the pseudo-code of the SMA.

Algorithm 1. Slime mould algorithm
Input: Slime mould population X i (i = 1,2, . . . ,n) and related parameters such as n, dim, max_t; Output: Optimal fitness value best_fitness and the corresponding optimal position X b . While (t < max_t) Check if solutions go outside the search space and bring them back Calculate fitness values of all individuals, update the best and worst fitness value Calculate the weight W according to Equation (6) Record the best fitness best_fitness and the corresponding X b For each search agent Update the value of vb, vc, and p Update the individual position according to Equation ( According to the idea of opposition-based learning (OBL) [27,28], in the optimization process, the current solution has a 50% probability of being far away from the optimal solution of the problem compared with its opposition solution. Therefore, selecting the better individual from the current solution population and the opposition solution population as the new generation population can accelerate the convergence to a certain extent, increase the diversity of the population, and improve the performance of the algorithm.
Suppose that the size of the population is n, then the population is represented as X = (X 1 , X 2 , · · · , X n ) , ub and lb represent the upper and lower bounds of the search agent, respectively. Let the algorithm generates n opposite solutions through the opposition-based learning, then the opposite population can be represented as X = ( X 1 , X 2 , · · · , X n ) , the specific calculation formula of opposition-based learning is The fitness values of the current solution population X and the opposition solution population X were calculated, respectively. Among the 2n individuals composed of the current solution population and the opposition solution population, that is X 2n = {X i , i = 1, · · · , n} ∪ { X i , i = 1, · · · , n}, n individuals with better fitness values were selected as the new generation population.

Elite Chaotic Searching Strategy
Opposition-based learning strategy mainly emphasizes the exploration ability of the algorithm, and to improve the exploitation ability of the algorithm, an elite chaotic searching strategy is added. Through chaotic mutation of the elite individual, the algorithm can further update the elite individual, this can improve the exploitation ability of the algorithm. The specific update process for the elite chaotic searching strategy is as follows.
Firstly, the fitness value of all the individuals (n) in the current population are calculated and sorted, and the first m(m = pr · n) individuals with better fitness value are selected as the elite individuals of the current population, where pr ∈ [0, 1] is the selected elite proportion, and pr = 0.1 in this paper. The selected elite individuals are denoted as {EX 1 (t), EX 2 (t), · · · , EX m (t)}∈ {X 1 (t), X 2 (t), · · · , X n (t)} and the upper and lower bounds of the j-th dimension are respectively: Then, the elite individuals are mapped from the search space to the interval [0, 1] according to Equation (11), and the chaotic individuals C i (t) = (C i1 (t), C i2 (t), · · · , C id (t)) are obtained, where d is the dimension of individuals.
Logistic chaotic mapping is iterated for C ij (t) according to the following equation where, i = 1, · · · , m; j = 1, · · · , d, constant µ = 4, k represents the number of chaotic iterations, and k max is the maximum number of chaotic iterations. In this paper, the maximum number of current population iterations is taken as the maximum number of chaotic iterations. When the chaotic iteration reaches k max , the chaotic individual C k max ij (t) are mapped to [Ea j (t), Eb j (t)] according to the following formula to get the i-th new elite individual Finally, a greedy selection is made between the elite individuals EC i (t) and EX i (t), and the individuals with better fitness value are selected to enter the next generation, i.e., Due to the introduction of chaotic mutation in the strategy, the randomness of the position of the elite individuals is enhanced, and the local search ability of the algorithm is improved accordingly. The greedy selection of the elite individuals can accelerate the convergence speed of the algorithm. Experiments show that this strategy can improve the exploitation ability of the original algorithm.

The Improved Slime Mould Algorithm Combining the Two Strategies
This paper improves the original slime mould algorithm by adding opposition-based learning and an elite chaotic searching strategy into the SMA. The opposition-based learning increases the population diversity, while the elite chaotic searching strategy improves the exploitation ability of the algorithm. The proposed improved slime mould algorithm is called the ESMA for short. The concrete steps of the improved algorithm are given below.
Step1: Initialize some parameters related to the ESMA, such as population size n, variable dimension dim, upper and lower bounds of variables, maximum iteration times max_t, etc.; Step2: Initialize the population randomly by Equation (2), calculate the opposition solution population of the current population according to Equation (9), and sort the fitness of the current solution population and the opposition solution population, and select the first n individuals with better fitness value as the current solution population; Step3: When t < max_t, the fitness value of each individual is calculated, the best and the worst fitness values are updated; Step4: Update the value of weight W with Equation (6), update the minimum fitness value as the optimal value best_fitness, and record the optimal individual X b corresponding to the optimal value; Step5: Update parameters p, vb, and vc for each individual, and update population position according to Equation (8); Step6: Perform opposition-based learning operation for the current population according to Equation (9), then sort the fitness of the current solution population and the opposition solution population, select the first n individuals with better fitness value as the current population, and then execute elite chaotic searching strategy according to Equations (10)- (14); Step7: Let t = t + 1, if t < max_t, returns Step3, otherwise, outputs the optimal value best_fitness and the optimal individual X b .
In addition, Algorithm 2 gives the pseudo-code of the ESMA.

Algorithm 2.
Pseudo-code of the ESMA Initialize related parameters such as n, dim, max_t, and Slime mould population X i (i = 1,2,...,n); Calculate opposition population X of current population X i (i = 1,2, . . . ,n) by Equation (9) Calculate the fitness of population X ∪ X, pick n individuals with better fitness value as the current population While (t < max_t) Calculate fitness values of all individuals, update the best and worst fitness value Calculate the weight W according to Equation ( Check if solutions go outside the search space and bring them back t = t + 1 End While Return optimal fitness value best_fitness and the corresponding optimal position X b

Comparison of the ESMA with Other Algorithms
In order to further test the performance of the ESMA, it is compared with other intelligent algorithms. In this section, the ESMA is compared with other six algorithms in twenty-three test functions, and the six algorithms are the GWO [12], WOA [11], ant lion optimizer (ALO) [29], sine cosine algorithm (SCA) [30], moth-flame optimization (MFO) [31], and the original the SMA [17], the parameters setting in the Algorithms are shown in Table 1. To get unbiased experimental result, all the experiments are carried out on the same computer, and the detailed settings are shown in Table 2. Tables 3-5 show 23 benchmark test functions-they can effectively evaluate the ability of algorithms to explore, exploit and avoid falling into local optimum. Table 3 is unimodal test functions-it is mainly used to evaluate the exploitation ability of the algorithm. Table 4 is multimodal test functions-it can test the exploration performance of the algorithm, and the fixeddimensional multimodal test functions in Table 5 can test the ability of the algorithm to jump out of local extremums in low dimensions.
In the simulation experiment of the algorithms, set the population size n = 30, dimension dim = 30, and the maximum number of iterations max_t = 500. In order to eliminate the influence of random factors on the experimental results, and to carry out better statistical analysis on the algorithms, each algorithm runs independently on each benchmark function 20 times, and gives the best value (Best), worst value (Worst), mean value (Mean), standard deviation (Std) and the Rank obtained according to the average value of each algorithm. The specific algorithms comparison results are shown in Table 6 and  From the last line of Table 7, the number of the SMA, GWO, WOA, ALO, SCA, and MFO superior to/similar to/inferior to the ESMA is 0/15/8, 0/2/21, 0/4/19, 4/4/15, 0/0/23, and 4/3/16, this shows that the ESMA is significantly better than comparison algorithm. Therefore, considering Tables 6 and 7, the ESMA shows good competitiveness.      Figure 1, for unimodal test functions, the ESMA is significantly better than other comparison algorithms in terms of convergence speed and convergence precision, except for the convergence precision of function F6, which is slightly inferior to the ALO algorithm. As shown in Figure 2, for multimodal test functions, the ESMA is also significantly better than other comparison algorithms in terms of convergence speed and convergence precision, and has good competitiveness. As shown in Figure 3, for the low-dimensional multimodal test functions, in the test function F16-F19, the difference between the seven algorithms is small, and they are basically close to the optimal value of the test function. For function F20, the ESMA is slightly inferior to the WOA and GWO in terms of convergence accuracy, while for other low-dimensional multimodal test functions, the ESMA performs better in terms of convergence speed and accuracy. In general, through the test of convergence curves, the proposed ESMA has obvious improvement in the convergence characteristics on the CEC-2005 benchmark functions.

Establishment of Water Resources Demand Estimation Model
In this section, the water resources demand forecasting model of Nanchang City, China, is established. The water resources demand of a city is related to many factors, such as ecological environment and economic development, so it is of great significance to forecast the water resources demand of a city. Table 8 shows the data of the total city water consumption, agricultural water consumption, industrial water consumption, residential water consumption, and ecological water consumption in Nanchang from 2004 to 2019.
In order to show the relationship between water resources and regional economic development level, water consumption in different areas can be connected with the corresponding economic indicators and population size. For agricultural and industrial water consumption, the water is mainly used for crop irrigation and industrial production, respectively. Therefore, the gross agricultural production, and gross industrial production are appropriate indicators for agricultural and industrial water consumption. Residential water consumption refers to the water that residents need for daily life, including drinking, washing, and bathing, which is closely related to the population size of Nanchang City. However, ecological water consumption is the total amount of water needed to maintain the integrity of an ecosystem, which is not used as social and economic water. This factor is not applicable to explain the relationship between water consumption and the national economy. On the other hand, as shown in Figure 4, ecological water use occupies the smallest proportion of the total water consumption, only 2.86%. Therefore, this   Table 3. Unimodal test functions.
[0, 10] n −10.5363   As shown in Table 6, for the unimodal test functions, namely, F1-F7, the ESMA can accurately obtain the optimal value of the test functions on both F1-F4, showing good optimization performance. The ESMA is slightly inferior to ALO on function F6, but obviously superior to it on other unimodal test functions. For the multimodal test functions, namely, F8-F13, the ESMA can also accurately obtain the optimal value of the test functions on F9 and F11, and it is obviously better than other algorithms on other test functions. For the low-dimensional multimodal test functions, the ESMA can also accurately obtain the optimal value of the test functions on F14, F16, and F18, and the optimization results of the seven algorithms on F16 and F18 are basically the same. On function F16-F19, the mean value of the ESMA and MFO algorithm is the same, but the standard deviation of the ESMA is slightly lower than that of the MFO algorithm. The ESMA is obviously better than other algorithms in other low dimensional multimodal test functions. Considering all the test functions, the standard deviation of the ESMA is small, so it is relatively stable on the test functions. According to the final ranking, the ESMA performs well in the 23 benchmark test functions.
Wilcoxon rank sum test, as a nonparametric test, can effectively evaluate the significant differences between the two optimizers. Table 7 shows the values of p obtained by the Wilxocon rank sum test for the other six algorithms under the condition of significance level α = 0.05 and taking the ESMA as the benchmark. In order to avoid Type I error, the p-value is corrected using Holm-Bonferroni correction method, and the process is as follows: First, the p-value of six comparison algorithms are sorted from small to large, if the sorting result is assumed to be p 1 < p 2 < p 3 < p 4 < p 5 < p 6 , if p 1 < 0.05/6 ≈ 0.0083, p 2 < 0.05/5 = 0.01, p 3 < 0.05/4 = 0.0125, p 4 < 0.05/3 ≈ 0.0167, p 5 < 0.05/2 = 0.025, p 6 < 0.05, it is considered that there are significant differences between the ESMA and the comparison algorithms. If a p-value is greater than the corresponding value, there is no significant difference between this algorithm corresponding to this p-value and the ESMA, and the subsequent comparison algorithm also has no significant difference from the ESMA whether the p-value is smaller than the corresponding value or not. The bold data in Table 7 are p-value data with no significant difference between the ESMA and its comparison algorithms. Combined with the data in Table 6, p-value are marked accordingly, where "+" means that the comparison algorithm is significantly better than the ESMA, "=" means that the comparison algorithm has no significant difference with the ESMA, and "-" means that the comparison algorithm is significantly inferior to the ESMA. From the last line of Table 7, the number of the SMA, GWO, WOA, ALO, SCA, and MFO superior to/similar to/inferior to the ESMA is 0/15/8, 0/2/21, 0/4/19, 4/4/15, 0/0/23, and 4/3/16, this shows that the ESMA is significantly better than comparison algorithm. Therefore, considering Tables 6 and 7, the ESMA shows good competitiveness. Figures 1-3 are convergence curves plotted by the average fitness values obtained by each algorithm running 20 times on the test functions. As shown in Figure 1, for unimodal test functions, the ESMA is significantly better than other comparison algorithms in terms of convergence speed and convergence precision, except for the convergence precision of function F6, which is slightly inferior to the ALO algorithm. As shown in Figure 2, for multimodal test functions, the ESMA is also significantly better than other comparison algorithms in terms of convergence speed and convergence precision, and has good competitiveness. As shown in Figure 3, for the low-dimensional multimodal test functions, in the test function F16-F19, the difference between the seven algorithms is small, and they are basically close to the optimal value of the test function. For function F20, the ESMA is slightly inferior to the WOA and GWO in terms of convergence accuracy, while for other low-dimensional multimodal test functions, the ESMA performs better in terms of convergence speed and accuracy. In general, through the test of convergence curves, the proposed ESMA has obvious improvement in the convergence characteristics on the CEC-2005 benchmark functions.

Establishment of Water Resources Demand Estimation Model
In this section, the water resources demand forecasting model of Nanchang City, China, is established. The water resources demand of a city is related to many factors, such as ecological environment and economic development, so it is of great significance to forecast the water resources demand of a city. Table 8 shows the data of the total city water consumption, agricultural water consumption, industrial water consumption, residential water consumption, and ecological water consumption in Nanchang from 2004 to 2019. In order to show the relationship between water resources and regional economic development level, water consumption in different areas can be connected with the corresponding economic indicators and population size. For agricultural and industrial water consumption, the water is mainly used for crop irrigation and industrial production, respectively. Therefore, the gross agricultural production, and gross industrial production are appropriate indicators for agricultural and industrial water consumption. Residential water consumption refers to the water that residents need for daily life, including drinking, washing, and bathing, which is closely related to the population size of Nanchang City. However, ecological water consumption is the total amount of water needed to maintain the integrity of an ecosystem, which is not used as social and economic water. This factor is not applicable to explain the relationship between water consumption and the national economy. On the other hand, as shown in Figure 4, ecological water use occupies the smallest proportion of the total water consumption, only 2.86%. Therefore, this paper ignores the ecological water use when establishing the water resources estimation model, and only considers the influence of industrial water use, agricultural water use, and residential water use on the total water consumption.
paper ignores the ecological water use when establishing the water resources estimation model, and only considers the influence of industrial water use, agricultural water use, and residential water use on the total water consumption. Table 8 summarizes population size, gross industrial production, and gross agricultural production from 2004 to 2019, which are used to replace industrial water, agricultural water, and residential water.  In view of the relationship between total water consumption and population, gross industrial production, and gross agricultural production, the linear model, logarithmic model, and exponential model for forecasting the water resource of Nanchang City are respectively expressed as, Linear model:   Table 8 summarizes population size, gross industrial production, and gross agricultural production from 2004 to 2019, which are used to replace industrial water, agricultural water, and residential water.
In view of the relationship between total water consumption and population, gross industrial production, and gross agricultural production, the linear model, logarithmic model, and exponential model for forecasting the water resource of Nanchang City are respectively expressed as, Linear model: Logarithmic model: Exponential model: In the above model, a i is the parameter in the model, x 1 , x 2 , and x 3 , respectively represent the population, gross industrial production, and gross agricultural production of Nanchang, and y is the water resources demand estimated by the model.
Hybrid model: By combining the above models, this paper obtains a hybrid water resources demand forecasting model based on a linear model, logarithmic model, and exponential model. The hybrid model is established as follows, y = a 11 · (a 12 · x 1 + a 13 · x 2 + a 14 x 3 + a 15 ) + a 21 · (a 22 · x a 23 1 + a 24 · x a 25 2 + a 26 · x a 27 3 + a 28 ) where, a ij is the parameter to be estimated. x 1 , x 2 , x 3 and y are consistent with Equations (15)-(17).

Optimization of Water Resources Demand Estimation Model
There are uncertain parameters in the above four water demand estimation models. The selection of parameters is closely related to the accuracy of model forecasting. Therefore, how to determine the parameters in the model is the main issue discussed in this section. The selection of model parameters can be regarded as an optimization problem. In order to evaluate the strengths and weaknesses of parameters in the water resources demand forecasting model, the sum of the squares of errors between the real value and the predicted value is used as the objective function, and its mathematical equation is as follows, (19) where, X is the parameter in the water resource demand forecasting model, k is the number of years used in the optimization model, y i is the real total water consumption in the i-th year, and y i is the estimated total water consumption in the i-th year. The smaller the value of the objective function is, the better the model parameters are, and the closer the predicted value is to the real value. Therefore, the mathematical model of the optimization problem of water demand estimation model can be defined as, where, X is the D-dimensional decision variable, D is the number of parameters in the estimation model, and u, l ∈ R D are the upper and lower bounds of parameters.

The ESMA Solves the Parameters of Water Demand Estimation Model
Section 4.2 establishes a specific mathematical model for solving water resources demand parameters. The following shows the specific steps of solving the model with the ESMA.
Step1: Initialize some parameters related to the ESMA, and take Equation (20) as the objective function; Step2: Initialize the population randomly, and perform the opposition-based learning operation; Step3: When t < max_t, the fitness value of each individual is calculated, the best and the worst fitness values are updated; Step4: Update the value of weight W with Equation (6), update the minimum fitness value as the optimal value best_fitness, and record the optimal individual X b corresponding to the optimal value; Step5: Update parameters p, vb, and vc for each individual, and update population position according to Equation (8); Step6: Perform opposition-based learning operation, and then execute elite chaotic searching strategy; Step7: Let t = t + 1, if t < max_t, returns Step3, otherwise, outputs the optimal value best_fitness and the optimal individual X b . Figure 5 shows the flow chart of the ESMA for solving water resources estimation parameters.

The Experiment and Analysis of Water Resources Demand Estimation Model
Based on the water resources data of Nanchang City from 2004 to 2019 in Table 9, different optimization algorithms are used to optimize the parameters in different forecasting models, and the performance of different models and algorithms are obtained according to the error analysis between the optimized forecasting values and the real data. Table 9. The total water, population, gross industrial production, and gross agricultural production in Nanchang city from 2004 to 2019.

Year
Total

Data Preprocessing
In order to eliminate the influence of magnitude among different data, the data in Table 9 is preprocessed firstly, and the data is normalized as follows, In the formula, x * ij is the normalized data, x ij is the j-th index in the i-th year. i = 1, 2, ..., 16 corresponds to 2004-2019, j = 1, 2, 3, 4 corresponds to the total water use, the population, the gross industrial production, and the gross agricultural production, and x jmin and x jmax are the maximum and minimum value of the j-th index, respectively. Meanwhile, seven other algorithms are employed to compare with the ESMA in solving the problem of water resources demand estimation. These comparison algorithms are the salp swarm algorithm (SSA) [32], WOA [11], HHO [13], biogeography based optimization (BBO) [33], multi-verse optimizer (MVO) [34], archimedes optimization algorithm (AOA) [35], and SMA [17]. The parameters in these algorithms are set as Table 10 shows. In this paper, the relative error (RE) and mean relative error (MRE) between the real value and the predicted value are used to evaluate the performance of different algorithms in handling different optimization models.

Algorithm Parameters Setting
The relative error is calculated by the following formula, where, y and y are the real value and estimated value of water resources demand, respectively. And the calculation formula of mean relative error is as follows, where, y i is the real value of water resources demand in the i-th year, y i is the estimated value of water resources demand in the i-th year, and k is the number of years used in the optimization model.

Result and Analysis
Tables 11-14 present the average relative error data obtained by the ESMA and seven other optimization algorithms on the four estimation models, including the optimal value, average value, maximum value, and standard deviation after 20 independent runs. The bold data represents the optimal data of all algorithms on the corresponding indexes. From the perspective of the algorithm, the ESMA performs better on different models. In the linear model (Table 11), the worst value and standard deviation solved by the ESMA are small. In the logarithmic model (Table 12) and exponential model (Table 13), the mean value, maximum value, and standard deviation solved by the ESMA are all small, and the minimum value and mean value solved by the ESMA in the hybrid model (Table 14) are superior to other algorithms. This shows that the ESMA can solve the parameters to minimize the prediction error well in different models. At the same time, the smaller mean value and standard deviation can reflect that the algorithm has good stability when solving the optimization problem and is not easy to be affected by other factors. The worst value and standard deviation of the HHO in the hybrid model (Table 14) are small, indicating that the stability of the algorithm is good, but the results of solving the mean value and the optimal value are not ideal. Overall, the results of the ESMA are better than those of other algorithms.
From the perspective of the forecasting model, the minimum error of the hybrid water demand estimation model in the experimental is 2.2954%, which is better than the error value of other models, indicating that this model can reasonably solve the problem of water resources forecasting, but its stability is slightly weaker than that of logarithmic and exponential models. Figure 6 shows the comparison between the forecasting data obtained by substituting the average value of model parameters obtained from 20 runs of different algorithms into the four prediction models and the actual value. The red curve in the figure represents the forecasting data of the ESMA, which is close to the actual data.  Figure 6 shows the comparison between the forecasting data obtained by substituting the average value of model parameters obtained from 20 runs of different algorithms into the four prediction models and the actual value. The red curve in the figure represents the forecasting data of the ESMA, which is close to the actual data. In order to forecast the demand for water resources in Nanchang in 2020-2024, the population, gross industrial production, and gross agricultural production of the above five years are first estimated based on the average annual growth rate. The results are shown in Table 15. Then, by using the parameters of different water demand estimation models obtained by the eight optimization algorithms, the predicted value of water resource demands in 2020-2024 can be obtained. The predicted results are shown in Table  16.

Forecast of Water Resources Demand for 2020-2024
In order to forecast the demand for water resources in Nanchang in 2020-2024, the population, gross industrial production, and gross agricultural production of the above five years are first estimated based on the average annual growth rate. The results are shown in Table 15. Then, by using the parameters of different water demand estimation models obtained by the eight optimization algorithms, the predicted value of water resource demands in 2020-2024 can be obtained. The predicted results are shown in Table 16. Figure 7 shows the forecast graph of water demand by different algorithms on the four models. Obviously, the prediction curves of the ESMA on each model are located between the results predicted by other algorithms, which may be more in line with the actual use of water resources.    Figure 7 shows the forecast graph of water demand by different algorithms on the four models. Obviously, the prediction curves of the ESMA on each model are located between the results predicted by other algorithms, which may be more in line with the actual use of water resources.

Conclusions
In this paper, the ESMA is proposed to estimate the water demand of Nanchang City. In the ESMA, the opposition-based learning strategy is adopted to enhance the diversity of the population and improve the convergence accuracy of the algorithm. The implementation of the elite chaos searching strategy enhances the exploitation ability of the algorithm, which enables the ESMA to better approach the theoretical optimal value of the 23 benchmark functions. According to the relationship between the total water consumption, and the population, the gross industrial production, and the gross agricultural production, four forecasting models of linear, exponential, logarithmic, and hybrid prediction for the water resources in Nanchang City are put forward.
In the experiment, based on the water demand data of Nanchang City from 2004 to 2019, the ESMA is used to optimize the parameters in the estimation models, and the models are tested. The water consumption from 2004 to 2019 is estimated by the ESMA, and the performance of the ESMA is compared with the SMA, SSA, WOA, HHO, BBO, MVO, and AOA. The experimental results show that the ESMA can predict the water consumption with good accuracy on the four models, and it can achieve the highest accuracy in the hybrid estimation model, which is 97.705%. At the end of the experiment, the prediction data of the water demand of Nanchang from 2020 to 2024 by each algorithm are given.  Data Availability Statement: All data generated or analysed during this study are included in this published article (and its supplementary information files).

Conflicts of Interest:
The authors declare that there is no conflict of interests regarding the publication of this paper.

Conclusions
In this paper, the ESMA is proposed to estimate the water demand of Nanchang City. In the ESMA, the opposition-based learning strategy is adopted to enhance the diversity of the population and improve the convergence accuracy of the algorithm. The implementation of the elite chaos searching strategy enhances the exploitation ability of the algorithm, which enables the ESMA to better approach the theoretical optimal value of the 23 benchmark functions. According to the relationship between the total water consumption, and the population, the gross industrial production, and the gross agricultural production, four forecasting models of linear, exponential, logarithmic, and hybrid prediction for the water resources in Nanchang City are put forward.
In the experiment, based on the water demand data of Nanchang City from 2004 to 2019, the ESMA is used to optimize the parameters in the estimation models, and the models are tested. The water consumption from 2004 to 2019 is estimated by the ESMA, and the performance of the ESMA is compared with the SMA, SSA, WOA, HHO, BBO, MVO, and AOA. The experimental results show that the ESMA can predict the water consumption with good accuracy on the four models, and it can achieve the highest accuracy in the hybrid estimation model, which is 97.705%. At the end of the experiment, the prediction data of the water demand of Nanchang from 2020 to 2024 by each algorithm are given.  Data Availability Statement: All data generated or analysed during this study are included in this published article.

Conflicts of Interest:
The authors declare that there is no conflict of interests regarding the publication of this paper.