Irrigation Management Based on Reservoir Operation with an Improved Weed Algorithm

Water scarcity is a serious problem throughout the world. One critical part of this problem is supplying sufficient water to meet irrigation demands for agricultural production. The present study introduced an improved weed algorithm for reservoir operation with the aim of decreasing irrigation deficits. The Aswan High Dam, one of the most important dams in Egypt, was selected for this study to supply irrigation demands. The improved weed algorithm (IWA) had developed local search ability so that the exploration ability for the IWA increased and it could escape from local optima. Three inflows (low, medium and high) to the reservoir were considered for the downstream demands. For example, the average solution for the IWA at high inflow was 0.985 while it was 1.037, 1.040, 1.115 and 1.121 for the weed algorithm (WA), bat algorithm (BA), improved particle swarm optimization algorithm (IPSOA) and genetic algorithm (GA). This meant that the IWA decreased the objective function for high inflow by 5.01%, 5.20%, 11.65% and 12% compared to the WA, BA, IPSOA and GA, respectively. The computational time for the IWA at high inflow was 22 s, which was 12%, 18%, 24% and 29% lower than the WA, BA, IPSOA and GA, respectively. Results indicated that the IWA could meet the demands at all three inflows. The reliability index for the IWA for the three inflows was greater than the WA, BA, IPSOA and GA, meaning that the released water based on IWA could well supply the downstream demands. Thus, the improved weed algorithm is suggested for solving complex problems in water resources management.


Introduction
Water resources management is an important area of hydrological sciences that deals with the sustainable allocation and utilization of water as a valuable resource [1].Water scarcity has been identified as a major problem for water resource managers in different regions throughout the world.Technologies and innovative ideas need to be explored and embraced to resolve this practical challenge through strategic decisions made about water utilization [2,3].Optimizing reservoir operation is one of the most important approaches to solving water scarcity.In this regard, a suitable optimization algorithm that allows core decision-markers to generate optimal operating rules for water utilization and to minimize perceived gaps between water release and demand is practical for water resources management [4].A primary aim for controlling a reservoir's operation is to develop a set of rules that govern the controlled release of water for downstream users that lead to a reduction in water shortages [5].It is also imperative to ensure that the amount of water stored in the reservoir is not less than the permissible range used in the dry season and during critical conditions [6].Consequently, new measures implemented for the controlled release of water and to provide a sustainable water supply to the different water users (e.g., those engaged in industrial activities and in agricultural practices), must be identified through an appropriately selected optimization algorithm to resolve the issues faced in the operation of a reservoir [7,8].
Over the last two decades, evolutionary and meta-heuristic optimization methods have been developed and explored to solve complex engineering-based optimization problems.A major advantage of these approaches lies is their simplicity for adjusting the objective function and the system constraints within the method's mathematical process.On the other hand, attaining the global optima that allow a universal solution can be a time-consuming process and thus, it is undesirable for real-time operation purposes.It has been shown that evolutionary and meta-heuristic methods involve less computational time in solving a complex problem and therefore may be useful for core decision-makers who need to attain an optimal solution for real-time problem-solving [4].

Background
Fallah Mehdipour et al. [9] applied genetic programming for reservoir operation to reduce irrigation deficits.The released water for downstream was considered as decision variables and different arithmetic and mathematical operators were tested for the genetic programming.The results indicated that the irrigation demands were met with the highest reliability index compared to the genetic algorithm (GA) and particle swarm optimization (PSO).The decision variable for the study was the released water as an unknown value.
Ostadrahimi et al. [10] applied PSO for multi-reservoir operation to generate different rule curves to reduce irrigation deficits for a case study in Iran.The applied PSO acted based on modified inertia weight as new version of PSO algorithm to increase the convergence rate.The results were compared with the GA and nonlinear programming.The PSO had greater convergence velocity than the GA and based on PSO, the released water could meet irrigation demands.
Afsahr [5] optimized reservoir operation with a modified and adapted version of PSO with the aim of increasing the benefits of power generation.This version of PSO adapted with the hydrological and hydraulic boundary condition of problem so that the algorithm could model the reservoir operation during the drought years.The new version of PSO had average solutions that were close to the global solution of the problem and annual generated power was greater than that calculated by the GA and harmony search algorithm (HA).
Ant colony optimization (ACO) was used for the optimal operation of multi-reservoir systems and results indicated that the applied algorithm could meet irrigation demands with the least risk so that the average irrigation deficit was reduced to a probable minimum value [11].Also, Moeini and Afshar [11] developed the ACO based on mutation operator to increase the diversity for the initial population of algorithm.
Zhang et al. [12] applied a new dynamic programming method and GA for the operation of a multi-reservoir system with the aim of increasing of power generation in the China.The GA had a better performance than dynamic programming although the power generation for the dry years accorded with the limitation so that a rationing process could be good strategy for dry years.
The water cycle algorithm (WCA) was used for reducing power deficits based on the movement of drops in the environment and with the positions of drops considered as the initial population [13].The position of drops in the environment was considered as a decision variable and the algorithm acted based on movement of drops to the rivers.The computational time of the WCA was decreased compared to the GA and PSO and the averages of deficits were decreased by the WCA to the probable minimum value.
Bozorg-Hadad et al. [14] applied the bat algorithm (BA) with the aim of decreasing of power deficits for a case study in Iran.The algorithm is based on the received frequencies of bats from their surroundings.The position of bats were considered as decision variables and they were updated based on velocity and frequency value.The convergence velocity for the BA based on a random walk and local search process was more than the GA and PSO and the BA power generation process had a higher reliability index.
Different orders of nonlinear rule curves based on the GA were used for the operation of a reservoir [15].Results indicated that the third order rule curve could meet irrigation demand based on the high value obtained for the reliability index so that the released water met demands well and irrigation deficits were minimized.
Biogeography based optimization (BBO) was used for decreasing power deficits for a case study in Iran [16].The algorithm was based on environmental habitats and migration processes in the environment.Results indicated that the algorithm could generate solutions which were close to the global solution based on less iteration.The process of the algorithm was simple and based on an initial population of species in the environment.
Asghari et al. [17] applied the weed optimization algorithm (WA), based on weeds growing in the environment, for multi-reservoir operation with the aim of increasing power generation.The results were compared with the GA, PSO and WCA and indicated that the WA had the greatest convergence rate and highest values of the generated benefits.
Fixed length genetic programming (FLGP) was used for the operation of a multi-reservoir system with the aim of decreasing irrigation demands [18].Results indicated that the demand for irrigation could be supplied based on FLGP, which had a higher reliability index than GP and a greater convergence velocity than other algorithms.
The gravity search (GS) algorithm was used for a multi-reservoir system with the aim of decreasing power generation [19].The results indicated that the GS needs to the accurate sensitivity analysis for the random parameters in the algorithm.Annual power generation based on GS had a higher value and greater convergence velocity than the GA and PSO.
The shark algorithm (SA) based on shark life and rotational movement was applied to reservoir operation to reduce irrigation deficits [20].The rotational movement was considered as having powerful ability to avoid trapping in the local optimums.Results indicated that the SA could supply the irrigation demands based on a higher reliability index compared to the PSO and GA.The SA also had a greater convergence speed than the GA and PSO.
Ehteram et al. [21] applied monarch butterfly optimization algorithm for the multi reservoir systems in the China.The algorithm acted based on migration operator for the butterflies.The results indicated that the annual average for power production based on monarch algorithm was 12% and 14% more than GA and PSO.
Mousavi et al. [22] applied the crow algorithm for the extraction of rule curves for the irrigation management for a case study.The algorithm acted based on ability of crows for the finding and hiding of food.The results indicated that the vulnerability index based on crow algorithm was decreased significantly by the crow algorithm.
Karami et al. [23] applied the krill algorithm for reservoir operation and irrigation management.The initial position of krill was considered as decision variable and the results indicated the average annual for irrigation deficits based on krill algorithm was 20% and 23% less than PSO and genetic algorithm.
The kidney algorithm (KA), based on the way a kidney performs in the body, was used for the operation of a reservoir with the aim of decreasing power generation [24].The KA had a simpler optimization process than the GA, PSO and HA and the vulnerability index for power generation was decreased 10%, 12% and 14% by KA compared to the PSO, HA and GA, respectively.Ehteram et al. [25] applied the spider monkey algorithm based on monkey life.The local and global leaders were considered as important future of these algorithms and the method was used for irrigation management for multi reservoir in Iran.The results indicated that spider monkey algorithm could the downstream demands based on higher reliability index compared to the genetic algorithm and particle swarm algorithm.
Karami et al. [26] applied the simple weed algorithm for irrigation management for a case study in Iran.The results indicated that the annual average of deficits based on WA was more than PSO and the algorithm did not have the good convergence velocity.

Innovation and Objectives
One of the known algorithms in the field of optimization is the weed algorithm (WA).This algorithm acts based on weed life and the processes of generating weeds and seeds in the environment.One of the main advantages of the WA is related to its simple architecture in the optimization process and the simple method of setting the random parameters.The WA has been used in different fields such as training controller robots [27], designing recommender systems [28], optimization of mathematical benchmarks [29], optimization of power plant performance [23] and optimization of reservoir performance [17].Asghari et al. [17] applied the weed algorithm for reservoir operation based on increasing of power generation for downstream power plant.The results indicated that the weed algorithm needed to high computational time compared to the PSO.Karami et al. [23] applied the weed algorithm for the decreasing of irrigation deficits and the results indicated the annual average deficits for the WA was 20% PSO and also, the algorithm could not obtain the global solution for the benchmark with some local optimums.
One of the main weaknesses of the WA is a tendency to get trapped in local optima.Another challenge is related to the exploration ability, which allows the algorithm to search a large volume in the problem space and find the best solution (close to the global solution) in the least computational time [17].Thus, it is necessary that the WA be improved based on new operators in the local search section of algorithm.The new algorithm is defined in this study based on an elite weed.One level and an operator are added to the algorithm to search the space around the elite weed within a specific radius [23].This ability causes new weeds to be generated during the WA optimization so that the algorithm can exit from the local optima and the diversity of population is added with the improved WA (IWA).The increased population diversity and the improved ability of the WA search, results in better potential for finding the best solution based on a more accurate search around of global solution.Thus, the paper address these issues: (1) prepare improved weed algorithm based on new operators, (2) formulate the mathematical weed algorithm for the reservoir operation, (3) introduce comprehensive study based on comparing of new weed algorithm with other evolutionary algorithms, (4) examine the new weed algorithm based on different inflows to the reservoir with the aim of irrigation deficits.In fact, the IWA has more ability to avoid trapping in local optimum and experienced less computational time compared to the classical WA.These two advantages provide the IWA the ability to search for the global optima and better suitability over the other algorithms to be proposed for real-time application.In addition, the IWA has experienced good balance between exploration and exploitation ability.
The Aswan High Dam in Egypt, an important dam for increasing water storage for irrigation demand in areas downstream of the dam, is used as a case study.This dam plays an important role in Egyptian economics.Reports showed that the monetary benefit generated after dam construction was 255 million USD of which 180 USD was related to agricultural production and indicates the importance of the Aswan High Dam for meeting irrigation demands.In our study, the IWA is used for optimal operation of this dam with the aim of reducing irrigation deficits and results are compared with the weed algorithm (WA), bat algorithm (BA), improved particle swarm optimization algorithm (IPSOA) and the genetic algorithm (GA).The reliability index, vulnerability index and resiliency index are used to evaluate the new weed algorithm relative to the other evolutionary algorithms for its performance in meeting irrigation demands.The output of this paper will show the amount of water storage required at different inflows to meet water demands of the IWA compared to the other algorithms for this important problem in water resources management.The main innovation of this paper is related to the improvement of the WA and its application in water resources management.

Weed Algorithm (WA)
The WA acts based on weed behavior in the environment and each weed is considered one solution.The initial weed population for the algorithm is NP 0 .The weeds produce seeds with a normal distribution and these seeds can grow and become offspring weeds; the offspring weeds and the parent weeds generate the next population for the WA.The weed with the best value for the objective function is selected and the iteration cycle continues until the convergence criteria are satisfied.The following assumptions are considered for the algorithm [17]: A limited number of seeds can grow in the environment.

2.
The seeds can grow and become weeds to continue the next generation.

3.
The growth process and generation of seeds and weeds continue until the number of seeds reaches a maximum number.The algorithm is considered based on the following levels: The size of the initial population equals NP 0 .Each weed is considered as a solution candidate so that the accurate size of the population and the value of NP 0 are determined based on sensitivity analysis.

Reproduction
Reproduction is a process where the weeds generate seeds and the maximum and minimum number of seeds, N 0 S max and NS min , are generated based on the quality of parent weeds.Weeds that live in one location are known as a colony [17].Reproduction is important because although plants of lower quality have a smaller chance of continuing of their presence in the next generation, the process allows even the low-quality plants (weeds) to generate seeds because they may contain important information.Figure 1 shows the production level of the WA.
The number of generated seeds is computed based on the equation where, Fit j is the jth objective function, Fit min is the minimum value of the objective function, Fit max is the maximum value of the objective function and Nseed j is the number of seeds in each level.
Water 2018, 10, x FOR PEER REVIEW 5 of 22

Weed Algorithm (WA)
The WA acts based on weed behavior in the environment and each weed is considered one solution.The initial weed population for the algorithm is NP0.The weeds produce seeds with a normal distribution and these seeds can grow and become offspring weeds; the offspring weeds and the parent weeds generate the next population for the WA.The weed with the best value for the objective function is selected and the iteration cycle continues until the convergence criteria are satisfied.The following assumptions are considered for the algorithm [17]: 1.A limited number of seeds can grow in the environment.2. The seeds can grow and become weeds to continue the next generation.3. The growth process and generation of seeds and weeds continue until the number of seeds reaches a maximum number.
The algorithm is considered based on the following levels: The size of the initial population equals NP0.Each weed is considered as a solution candidate so that the accurate size of the population and the value of NP0 are determined based on sensitivity analysis.

Reproduction
Reproduction is a process where the weeds generate seeds and the maximum and minimum number of seeds, N0Smax and NSmin, are generated based on the quality of parent weeds.Weeds that live in one location are known as a colony [17].Reproduction is important because although plants of lower quality have a smaller chance of continuing of their presence in the next generation, the process allows even the low-quality plants (weeds) to generate seeds because they may contain important information.Figure 1 shows the production level of the WA.
The number of generated seeds is computed based on the equation ( ) where,

Spatial Dispersal
The seeds generated by weeds are distributed randomly.The generated offspring weeds are distributed according to a mean 0 and a standard deviation.The standard deviation is considered a large positive value and it decreases as the number of iterations increases.This results in the combination of the global search and local search to get the optimal search space.The standard deviation is computed based on the equation where σ iter is the standard deviation for each level, It max is the maximum number of iterations, Iter is the number of iterations in each level, σ initial is the initial standard deviation, σ f inal is the final standard deviation and t is the nonlinear modulus

Competitive Selection
Weeds do not go extinct as long as they can generate offspring weeds.There is a limit to the number of weeds that could live in the environment.When the weeds generate offspring weeds, they constitute the next generation for the population.If their number is not more than NP 0 , there is not a specific problem; otherwise, the NP 0 weed with the better objective function based on a competition is selected for continuing the algorithm.The weed with the best value for the objective function is then selected in the new population; if it is better than the best weed computed so far, the new weed will replace the previous best weed.

Improved Weed Algorithm (IWA)
Local search ability is added to the WA to increase the searches of the problem space and give the algorithm more exploration ability to obtain optimal solutions.First, the weed with the best value for the objective function is selected as the elite weed.N es seeds are then produced by the elite weed.The new seeds grow around the elite weed and generate new weeds, which grow within a radius S r from the elite weed.Each new weed, as one of the decision variables, can be defined based on where x (new)s,i is the new value of the weed for the ith variable, x s,i is the value of ith weed and S r is the radius.Then, the computed value for the weeds is checked with the upper and lower values of the decision variables where x min is the lower limit for the decision variable and x max is the upper limit for the decision variable.
Figure 2 shows the IWA process.

Bat Algorithm (BA)
Bats have a powerful ability to receive sounds from their surroundings.They generate sounds, which are echoed back and allow the bats to distinguish obstacles from food based on the received frequencies.The BA acts based on the following assumptions [21]: 1.The echolocation ability is used by all bats so that they can identify an obstacle in their surroundings.
2. Bats have random velocity ( l v ) at a random position (yl) and the frequency, wavelength and loudness for the BA are l f , λ and A, respectively.
3. The loudness varies for the bats from a large positive to a small positive.
The sounds generated by the bats have a pulsation rate (rl), which is between 0 (minimum) and 1 (maximum).The position, pulsation rate and frequency are updated based on the equations ( ) ( ) ( ) ( ) where min f is the minimum, max f is the maximum frequency, Y * is the best solution, ( ) , β is the random vector and l f is the frequency.
The random walk is used as a local search strategy ( ) ( ) ( ) where ε is a random value between −1 and 1 and ( ) A t is loudness.
The loudness and pulsation rate are updated for each level.When the bats find prey, the pulsation rate increases and the loudness decreases and also, there is this condition vice versa.The pulsation rate is updated based on ( ) where α and γ are constant parameters.The BA process is shown in Figure 3.

Bat Algorithm (BA)
Bats have a powerful ability to receive sounds from their surroundings.They generate sounds, which are echoed back and allow the bats to distinguish obstacles from food based on the received frequencies.The BA acts based on the following assumptions [21]: The echolocation ability is used by all bats so that they can identify an obstacle in their surroundings.

2.
Bats have random velocity (v l ) at a random position (y l ) and the frequency, wavelength and loudness for the BA are f l , λ and A, respectively.

3.
The loudness varies for the bats from a large positive to a small positive.
The sounds generated by the bats have a pulsation rate (r l ), which is between 0 (minimum) and 1 (maximum).The position, pulsation rate and frequency are updated based on the equations where f min is the minimum, f max is the maximum frequency, Y * is the best solution, v l (t) is the velocity, t is time interval, y l (t − 1) is position at time (t − 1), β is the random vector and f l is the frequency.The random walk is used as a local search strategy where ε is a random value between −1 and 1 and A(t) is loudness.The loudness and pulsation rate are updated for each level.When the bats find prey, the pulsation rate increases and the loudness decreases and also, there is this condition vice versa.The pulsation rate is updated based on where α and γ are constant parameters.The BA process is shown in Figure 3.

Improved Particle Swarm Optimization Algorithm (IPSOA)
The optimization process in this algorithm starts with the collection of particles.Each particle is considered as a candidate solution of the optimization problem and contains three vectors: the current position of the particle (xi), the best-obtained position of each particle in the previous iteration (yi) and the velocity vector.A central aim of each cycle in the algorithm is the identification of the best position of each particle [18].Following this, the best position of the particle (Xi iter+1 ) is considered as the new position of the new particle for the purpose of continuance in such a way that it yields two main equations [23] ( ) ( ) where V + is the new velocity vector for each particle, c1 is the personal learning coefficient, 2 c is the global learning coefficient, rnd is a random value between 0 and 1, * iter Y is the current best solution and w is the inertial coefficient.
Past experimental results have shown that it is better to consider high values for the inertia coefficient at the start of the process because the algorithm is able to search the solution space with a higher accuracy and its value can be reduced linearly.In this study, an improved version of the

Improved Particle Swarm Optimization Algorithm (IPSOA)
The optimization process in this algorithm starts with the collection of particles.Each particle is considered as a candidate solution of the optimization problem and contains three vectors: the current position of the particle (x i ), the best-obtained position of each particle in the previous iteration (y i ) and the velocity vector.A central aim of each cycle in the algorithm is the identification of the best position of each particle [18].Following this, the best position of the particle (X i iter+1 ) is considered as the new position of the new particle for the purpose of continuance in such a way that it yields two main equations [23] where V iter+1 i is the new velocity vector for each particle, c 1 is the personal learning coefficient, c 2 is the global learning coefficient, rnd is a random value between 0 and 1, Y iter * is the current best solution and w is the inertial coefficient.
Past experimental results have shown that it is better to consider high values for the inertia coefficient at the start of the process because the algorithm is able to search the solution space with a higher accuracy and its value can be reduced linearly.In this study, an improved version of the PSOA (denoted as IPSOA) was used for solving the optimization problem where the following equation shows the linear reduction in the inertial coefficient w iter+1 = w iter × w damp (12) where w damp is a reduction (damping) coefficient bounded by (0.9-1).
In order to optimize the given problem, the particles in the algorithm spread in the search space and they are improved by the best solutions, which are found in each iteration of the search space.The second term in Equation ( 10) is the internal knowledge of each particle, which compares its current position to the previous best position.The third term in this equation shows the social interaction among the particles, which is used to measure the difference between the current and the best position of each particle.

Genetic Algorithm (GA)
Decision variables in the GA are defined based on a random population and its chromosomes.A particular code is considered for each variable and the fitness function is then computed based on the initial value of each chromosome assigned to the problem of interest [23].Each chromosome has an objective function and the operator selection chooses the best chromosome.These superior chromosomes are considered for crossover operators to generate new chromosomes based on the parents' characteristics.Following this, the mutation operator is used for the change of one or more genes for the generation of better chromosomes.Figure 4 shows the schematic diagram of the GA.
Water 2018, 10, x FOR PEER REVIEW 9 of 22 PSOA (denoted as IPSOA) was used for solving the optimization problem where the following equation shows the linear reduction in the inertial coefficient where wdamp is a reduction (damping) coefficient bounded by (0.9-1).
In order to optimize the given problem, the particles in the algorithm spread in the search space and they are improved by the best solutions, which are found in each iteration of the search space.The second term in Equation ( 10) is the internal knowledge of each particle, which compares its current position to the previous best position.The third term in this equation shows the social interaction among the particles, which is used to measure the difference between the current and the best position of each particle.

Genetic Algorithm (GA)
Decision variables in the GA are defined based on a random population and its chromosomes.A particular code is considered for each variable and the fitness function is then computed based on the initial value of each chromosome assigned to the problem of interest [23].Each chromosome has an objective function and the operator selection chooses the best chromosome.These superior chromosomes are considered for crossover operators to generate new chromosomes based on the parents' characteristics.Following this, the mutation operator is used for the change of one or more genes for the generation of better chromosomes.Figure 4 shows the schematic diagram of the GA.

Case Study
The case study site, Aswan High Dam (AHD), located on the Nile River, is the highest dam in Egypt (Figure 5).

Case Study
The case study site, Aswan High Dam (AHD), located on the Nile River, is the highest dam in Egypt (Figure 5).Minimizing the water deficit downstream from the dam is considered as an objective function in terms of the optimization problem that needs to be solved for core decision-making and for optimal water resources management.The AHD is one of the largest dams in the world and has a relatively large reservoir, namely Lake Nasser that lies between latitudes 22°00″ and 23°58″ N and longitudes of 31°07″ and 33°15″ E. Lake Nasser has a maximum width of 60 km and a mean width of 10 km.Data of monthly inflow to the reservoir is extracted from 1989 to 1999 because there is a real water scarce for this period.Inflow is classified based on the United State Geological Survey (USGS).A value on a scale of 100, known as a percentile, indicates inflow distribution.For example, when river discharge on a specific day is in the 70th percentile, it means that this discharge is equal to or greater than 70% of discharge recorded on this day of the year during all years that measurements have been made.The USGS suggests that a percentile of more than 75 is high inflow and a percentile below 25 is low inflow.Normal inflow means the percentile is between 25 to 75.Table 1 shows the classification of average monthly inflows into the reservoir during 1989 to 1999.Minimizing the water deficit downstream from the dam is considered as an objective function in terms of the optimization problem that needs to be solved for core decision-making and for optimal water resources management.The AHD is one of the largest dams in the world and has a relatively large reservoir, namely Lake Nasser that lies between latitudes 22 • 00 and 23 • 58 N and longitudes of 31 • 07 and 33 • 15 E. Lake Nasser has a maximum width of 60 km and a mean width of 10 km.Data of monthly inflow to the reservoir is extracted from 1989 to 1999 because there is a real water scarce for this period.Inflow is classified based on the United State Geological Survey (USGS).A value on a scale of 100, known as a percentile, indicates inflow distribution.For example, when river discharge on a specific day is in the 70th percentile, it means that this discharge is equal to or greater than 70% of discharge recorded on this day of the year during all years that measurements have been made.The USGS suggests that a percentile of more than 75 is high inflow and a percentile below 25 is low inflow.Normal inflow means the percentile is between 25 to 75.Table 1 shows the classification of average monthly inflows into the reservoir during 1989 to 1999.Several parameters of the AHD reservoir were limited to satisfy the optimization model.Eleven values were considered for the initial reservoir storage and the model was then executed for each storage value and three inflow scenarios (i.e., high, medium and low).This yielded a total of 36 rule curves for a one-year period.The required information was extracted from the study of El-Shafie et al. [30] where the seepage value for the reservoir was set at 0.08 billion cubic meters (BCM) and the water level was to be maintained over the range 147-183 m.The permissible range in storage was approximately 32-162 BCM and the maximum value for water release was approximately 7.5 BCM.For this dam, the water level at the end of July was expected to be less than 175 m (122 BCM).The objective function for this reservoir is where Z is the objective function, D t is the water demand (BCM) and R t is the water release (BCM).
The constraints for this problem are explained in the following equations.Continuity equation: where S t+1 is the storage at the end of the period t, S t is the storage at the beginning of the period t, I t is the inflow to the reservoir, R t is the release volume and L t is the evaporation loss from the reservoir.Storage constraint (for all months except July): S July ≤ 122 (16) Storage constraint for July is: If the above-mentioned constraints are not satisfied, the penalty functions are considered to be: where S max is the maximum storage, S min is the minimum storage, S July is the storage in July and C 1 is the penalty coefficient.
Finally, the objective function can be written as

Model Performance Indicators
Different indices were used to investigate the ability of the various algorithms to simulate the dam-reservoir operation.
Volumetric Reliability: This index aimed to explain the ratio of the released water volume over the total period compared to the total demand values and it can be stated as [23] where α V is volumetric reliability.A higher percent for this index shows the demands are well supplied based on released water.Vulnerability: This index aimed to explain the maximum ratio of the generated failures of the system during the total period and can be stated based on [23] where λ is the vulnerability index.A low value for this index indicates a low intensity of failure occurrences in the system based on the difference between released water and demands.
Resiliency: This index aims to investigate the exit speed of the system from a failure based on where ) is the number of reservoir consecutives to meet the demands well and N T t=1 (D t > R t ): number of periods in which the demands are not met.When the system has higher value for the resiliency index, the system the system can rapidly recover from failures.The mathematical model is considered for reservoir operation based on the following levels: 1.
The released water is considered as a decision variable and is defined based on the initial population of weeds.

2.
The continuity equation is computed and the reservoir storage is computed for each release decision variable.

3.
The constraints for each variable are computed and the penalty functions are computed if the constraints are not satisfied.

4.
The objective function is computed for each member.

5.
The number of seeds generated by each weed is computed.6.
The standard deviation for spatial dispersal is calculated.7.
A local search for an elite weed is carried out.8.
The best weed is updated 9.
If the convergence criterion is satisfied, the algorithm finishes; otherwise, the algorithm returns to the second step.

Sensitivity Analysis
The random parameters in the evolutionary algorithms have an important effect on the final results of the optimization process.An accurate determination of parameter values is therefore required, based on a sensitivity analysis.Sensitivity analysis means that the variation of parameter values is considered versus the variation of the objective function value.For example, the objective function of this problem was related to the minimization of irrigation deficits and was computed for the different intervals of the value of each parameter.When the objective function reached the minimum value versus the value of the random parameter, that value was considered the best value for that parameter.For example, the results of the sensitivity analysis for all the algorithms tested are shown in Tables 2-5.The initial size (NP min ) of the IWA population is 10 because the objective function at this size had the least probable value.NP max the maximum size of the population, was 50 because at this size the objective function was 0.985 BCM, the lowest value among other population sizes.Following this logic, NS max , the maximum number of seeds was 10 and NS min was 2. For the BA (Table 3), the optimum population size at high inflow was 50 with an objective function of 1.039 BCM.The maximum frequency was 5 Hz, the minimum frequency was 2 Hz and the maximum loudness was 0.60 Db.However, the sensitivity analysis based on this section shows the variations of value of parameters for the accurate of value of parameters.The optimum population size for the IPSOA was 30 for high inflow (Table 4) with an objective function of 1.115.At the same objective function value; the best value of c 1 = c 2 equaled 2 and the best value of w was 0.6.For the GA (Table 5), population size at high inflow was 30 with an objective function value of 1.121.Also, the mutation probability and the crossover probability were 0.6 and 0.4, respectively, with the lowest objective function at 0.121.

Analysis of 10 Random Results for Different Algorithms
Table 6 shows ten random results for different algorithms for high inflow.The average solution for IWA was 0.985 while it is 1.037, 1.040, 1.115 and 1.121 for the WA, BA, IPSO and GA, respectively.The IWA decreased the objective function by 5.01%, 5.20%, 11.65% and 12% compared to the WA, BA, IPSOA and GA, respectively.The computational time for IWA was 22 s, which was 12%, 18%, 24% and 29% less than the WA, BA, IPSOA and GA, respectively.The variation coefficient for the IWA was also less than the GA, IPSOA, BA and WA.Table 7 shows the average of 10 random results for medium inflow.The average solution for IWA was 1.021, which was 8.01%, 8.20%, 9.4% and 10.5% less than the WA, BA, IPSO and GA, respectively.Computational time for the IWA was 22 s and was 3, 5, 7 and 9 s less than the WA, BA, IPSO and GA, respectively and the variation coefficient was also lowest for the IWA.Table 8 shows the low inflow results.The average solution for the IWA was 1.121, which was 0.30%, 0.90%, 2.9% and 5.4% less than the WA, BA, IPSO and GA, respectively.Computational time for the IWA was 21 s and was 3, 2, 6 and 7 s less than the WA, BA, IPSO and GA, respectively.The variation coefficient for the IWA was less than other evolutionary algorithms which proves that one computer run can be reliable because the variation coefficient has a small value.The average value of the objective function for the high inflow was 0.985, which was 3.5% and 12% less than the medium and low inflows, respectively.This suggested that the square of the difference of released water and demand based on high inflow was less than that based on low and medium inflow and that the reservoir based on the IWA and high inflow had the best performance.Similar results were found for the other evolutionary algorithms.6), after 1800 iterations, the IWA had converged while the WA, BA, IPSOA and GA converged after 2000, 2500, 3000 and 3000 iterations, respectively, indicating the IWA has the fastest convergence process among all the tested algorithms.The IWA converged after 3900 iterations for medium inflow while the WA, BA, IPSOA and GA converged after 4200, 4380, 4600 and 4800 iterations, respectively, (Figure 4). Figure 4 shows the fastest convergence was also for the IWA at low inflow.
convergence process among all the tested algorithms.The IWA converged after 3900 iterations for medium inflow while the WA, BA, IPSOA and GA converged after 4200, 4380, 4600 and 4800 iterations, respectively, (Figure 4). Figure 4 shows the fastest convergence was also for the IWA at low inflow.

Analysis of Monthly Rule Curves for Reservoir Operation
Table 1 shows the average monthly inflows and demand during 1989 to 1999.July is the month with the greatest demand and therefore a critical month for analysis and avoiding of repetition of the same results.Figure 7 shows the average released water versus reservoir storage in July for 1989 to 1999 at high inflow.When the reservoir storage was 41 BCM, the released water could meet the demand (5.8 BCM) based on the IWA while the reservoir storage was 46, 47, 50 and 55 BCM for the WA, BA, IPSOA and GA, respectively, to meet the same demand.The IWA could therefore decrease reservoir storage at high inflow by about 10%, 14%, 18% and 25% compared to the WA, BA, IPSOA and GA, respectively.When the reservoir storage equaled 110 BCM at the high inflow using the IWA, the released water was greater than the demand (5.8 BCM) and could be used for the other needs such as power generation.At medium inflow (Figure 8), the IWA indicated that released water could meet demands with storage of 47 BCM, while the storage was 49, 52, 56 and 58 BCM for the WA, BA, IPSOA and GA, respectively.The IWA reduced storage for the demand supply by about 4.08%, 9.9%, 16% and 18% compared to the WA, BA, IPSOA and GA, respectively.In fact, the IWA can meet the demands earlier than WA, BA, IPSOA and GA.When storage calculated by the IWA at medium inflow was 112 BCM, the released water was greater than demand.For low inflow (Figure 9), the IWA indicated storage of 52 BCM was required to meet demands while the storage was 54, 55, 56 and 60 for the WA, BA, IPSOA and GA, respectively.The IWA reduced the storage for water supply at low inflow by about 3.7%, 5.4%, 7.6% and 14% compared to the WA, BA, IPSOA and GA, respectively.Figure 10 shows the released water for the different algorithms during 1989-1999 and the results indicated that the IWA met the demands more frequently than the GA, IPSOA, BA and WA.The reservoir storage for high inflow using the IWA was 41 BCM while for low and medium inflows it was 52 and 47 BMC, respectively.Thus, the storage should be increased for the low and medium inflows to satisfy the demands.A similar trend was noted for the other algorithms.Table 9 shows the root mean square error (RMSE) between average released water with the demand

Analysis of Monthly Rule Curves for Reservoir Operation
Table 1 shows the average monthly inflows and demand during 1989 to 1999.July is the month with the greatest demand and therefore a critical month for analysis and avoiding of repetition of the same results.Figure 7 shows the average released water versus reservoir storage in July for 1989 to 1999 at high inflow.When the reservoir storage was 41 BCM, the released water could meet the demand (5.8 BCM) based on the IWA while the reservoir storage was 46, 47, 50 and 55 BCM for the WA, BA, IPSOA and GA, respectively, to meet the same demand.The IWA could therefore decrease reservoir storage at high inflow by about 10%, 14%, 18% and 25% compared to the WA, BA, IPSOA and GA, respectively.When the reservoir storage equaled 110 BCM at the high inflow using the IWA, the released water was greater than the demand (5.8 BCM) and could be used for the other needs such as power generation.At medium inflow (Figure 8), the IWA indicated that released water could meet demands with storage of 47 BCM, while the storage was 49, 52, 56 and 58 BCM for the WA, BA, IPSOA and GA, respectively.The IWA reduced storage for the demand supply by about 4.08%, 9.9%, 16% and 18% compared to the WA, BA, IPSOA and GA, respectively.In fact, the IWA can meet the demands earlier than WA, BA, IPSOA and GA.When storage calculated by the IWA at medium inflow was 112 BCM, the released water was greater than demand.For low inflow (Figure 9), the IWA indicated storage of 52 BCM was required to meet demands while the storage was 54, 55, 56 and 60 for the WA, BA, IPSOA and GA, respectively.The IWA reduced the storage for water supply at low inflow by about 3.7%, 5.4%, 7.6% and 14% compared to the WA, BA, IPSOA and GA, respectively.Figure 10 shows the released water for the different algorithms during 1989-1999 and the results indicated that the IWA met the demands more frequently than the GA, IPSOA, BA and WA.The reservoir storage for high inflow using the IWA was 41 BCM while for low and medium inflows it was 52 and 47 BMC, respectively.Thus, the storage should be increased for the low and medium inflows to satisfy the demands.A similar trend was noted for the other algorithms.Table 9 shows the root mean square error (RMSE) between average released water with the demand value based on values in Table 1 for each month during the study period.Table 9 shows an RMSE for the low inflow using the IWA of 12.382 BCM, which was 4.1%, 18.21%, 18.69% and 28.3% lower compared to the WA, BA, IPSOA and GA, respectively.For the medium inflow (Table 9), the RMSE for the IWA was 11.38 BCM, which was 4.51%, 24.44%, 25.71% and 29.16% lower than the WA, BA, IPSOA and GA, respectively.Table 9 shows the same trend for high inflow.In other words, Figure 10 shows that the operation rule generated using IWA experienced more match between water released and demand.
Water 2018, 10, x FOR PEER REVIEW 17 of 22 value based on values in Table 1 for each month during the study period.Table 9 shows an RMSE for the low inflow using the IWA of 12.382 BCM, which was 4.1%, 18.21%, 18.69% and 28.3% lower compared to the WA, BA, IPSOA and GA, respectively.For the medium inflow (Table 9), the RMSE for the IWA was 11.38 BCM, which was 4.51%, 24.44%, 25.71% and 29.16% lower than the WA, BA, IPSOA and GA, respectively.Table 9 shows the same trend for high inflow.In other words, Figure 10 shows that the operation rule generated using IWA experienced more match between water released and demand.value based on values in Table 1 for each month during the study period.Table 9 shows an RMSE for the low inflow using the IWA of 12.382 BCM, which was 4.1%, 18.21%, 18.69% and 28.3% lower compared to the WA, BA, IPSOA and GA, respectively.For the medium inflow (Table 9), the RMSE for the IWA was 11.38 BCM, which was 4.51%, 24.44%, 25.71% and 29.16% lower than the WA, BA, IPSOA and GA, respectively.Table 9 shows the same trend for high inflow.In other words, Figure 10 shows that the operation rule generated using IWA experienced more match between water released and demand.In addition, even though the proposed model could be generalized to be applied for different case studies, it is recommended to the adaptation for the new case study constraints with the procedure of the IWA.

j
Fit is the jth objective function, min Fit is the minimum value of the objective function, max Fit is the maximum value of the objective function and j Nseed is the number of seeds in each level.

Figure 1 .
Figure 1.Production levels in the weed algorithm (WA).

Figure 1 .
Figure 1.Production levels in the weed algorithm (WA).

Figure 5 .
Figure 5. Location and characteristics of Aswan High Dam.

Figure 5 .
Figure 5. Location and characteristics of Aswan High Dam.

Figure 6 .
Figure 6.Convergence curve for low inflow, high inflow and medium inflow.

Figure 6 .
Figure 6.Convergence curve for low inflow, high inflow and medium inflow.

Figure 7 .
Figure 7. Released water for high inflow.

Figure 8 .
Figure 8. Released water for medium inflow.

Figure 7 .
Figure 7. Released water for high inflow.

Figure 7 .
Figure 7. Released water for high inflow.

Figure 8 .
Figure 8. Released water for medium inflow.

Figure 8 .
Figure 8. Released water for medium inflow.

Table 2 .
Sensitivity analysis for IWA.

Table 3 .
Sensitivity analysis for BA.

Table 5 .
Sensitivity analysis for GA.

Table 6 .
Ten random results for high inflow.

Table 7 .
Ten random results for medium inflow.

Table 8 .
Ten random results for low inflow.
4.3.Convergence Curves for Different AlgorithmsFigures 6-8 shows the convergence curves for the different algorithms and inflows.At high inflow (Figure