Optimization of Integrated Management to use Surface Water and Groundwater Resources by Using Imperialist Competitive Algorithm and Genetic Algorithm ( Tehran Plain )

The extensive development of activities in different areas of surface and underground water resources and the lack of sufficient attention to integrated planning and management necessitates research in this regard. Due to the imbalance in the distribution of water resources and the constraints on water resources and the constraints on the use of surface water, it is necessary to combine the use of surface water and underground water resources. In this study, the modelling is done in such a way that maximum use of surface water is achieved and the rate of utilization of groundwater reaches its minimum. In this study, imperialist and genetic competition algorithms are used for optimization. In this study, the extent of utilization of groundwater resources is limited and it has tried to use all of the surface water resources of Tehran Plain. The results of this study showed that the amount of water needed from the beginning of the year begins to decrease and then increases, and this increase is related to the warm seasons of the year. Surface water levels increase in cold seasons. In the cold seasons, the supply of water requirements was complete, but in the warm seasons, some water requirements were not met. The results of this study indicate that if the amount of groundwater resources is kept to an optimum level within 10 years, the problem of groundwater resources in Tehran plain will be solved.


Introduction
Increasing population growth has increased the need for water in drinking, industry and agriculture.For this reason, optimal utilization of surface and underground water resources has been more and more considered and accepted.Separate use of resources can lead to problems such as water shortages in droughts due to the lack of surface water resources, unsustainable impacts on production and environment, dropping of stagnant levels and the mixing of salty and sweet water in coastal areas and increasing pumping costs in the result of the wasteful use.The conjunctive use of surface and underground resources can increase available water resources, and minimize the negative effects of separate use of resources, and efficient and optimal water management.Conjunctive use is in fact the exploitation of surface and underground water resources to increase water use and the sustainable use of water resources.In general, when resources are used (reservoir, river, underground water, etc.) in conjunctive manner, better effects than separate operation are obtained.With regard to conjunctive planning, in the high-water periods in which high rainfall is used, surface resources are used to meet the needs of the region and to balance existing water resources, and its extra feeds the aquifer and increases the storage of underground resources [1].
The disparate distribution of time and place of freshwater, on the one hand the rapid growing of the world population, especially our country in recent decades, have caused increasing problems in providing water resources for various uses.One of the new and effective solutions in the management debate over the last decade is the optimal use of surface and underground water resources so that all existing needs can be met in all critical conditions.Optimization techniques are useful and powerful methods in determining management and design strategies for the development of optimal combination of surface and underground water resources [2].
The wide range of activities in different areas of surface and underground water resources and lack of attention to integrated planning and management necessitates research in this regard.Due to imbalance in distribution of water resources and restrictions on the use of surface water, it is necessary to combine the use of surface and underground water resources [2].
Considering the importance of studying the critical regions with specific political, social and regional sensitivity, the study area in Tehran has been selected due to the strategic conditions in providing water needs.This area has suffered a lot of population density in recent years because it's the capital of Iran.This has led to an increase in the harvesting of underground reserves, resulting in a significant drop in the aquifer in Tehran-Karaj Plain.Similarly, wasteful use in other sectors, such as agriculture, are increasing rapidly.In this study, in order to manage the conjunctive exploitation of the study area, it's divided into five urban areas, a rural area, an agricultural area and an industrial area.In the area of groundwater level, according to the data recorded over the past years, it's dropped to 11.38 meters and the underground reservoir faced a deficit of 682.8 million cubic meters.
A number of studies on integrated water management are presented below.
In 2006, Polydo et al.Provided an economic-hydrological model to optimize the conjunctive use of surface and underground resources [3].Diwakar et al.Provided a model for the optimal allocation of available water to the four sectors of agriculture, household, industry and hydropower to maximize net economic profit for the Chao Phraya River Basin in Thailand [4].In this regard, Babel et al.Developed the Integrated Water Resources Allocation Model with three repository performance modules, economic analysis, and water allocation along with the goals of maximizing satisfaction and net profit in the CHANG BOORI District of East Thailand, which was designed to maximize the satisfaction of the water allocation ratios which was applied to the normal demand of each sector [5].In 2007, Silva and Honey presented a regional water management model for coastal aquifers, the optimization methods used in this, determine the best location for wells with economic considerations and Water demand supply [6].Katsifarakis and Potala in a computational process presented an optimized conjunctive model and a flow simulation tool for optimizing the management of the coastal aquifer with the aim of maximizing water use from the aquifer with the condition of preventing saltwater advancement [7].
Silva and haiee have proposed a logistical management model for water supply for coastal aquifers, the optimization technique used to determine the best location of wells with respect to economic considerations and water demand supply [8].Katsifarakis and Petla, during a computational process, presented an integrated optimization model and a flow simulation tool for optimizing the management of coastal aquifers with the aim of maximizing water use from the aquifer with the condition of preventing the advancement of saline water.The simulation process of the above process is carried out by a boundary element program and validated by an analytical path and an optimization of the answer is done with a genetic algorithm program [9].Deepak hare and colleagues presented the economic optimization model in the agricultural region of Span in Indonesia, and considered conjunctive use of surface and underground water resources using linear programming, taking into account the hydrological and managerial constraints in the region, to achieve optimal cropping pattern and the maximum net income from agriculture [10].Safavi et al.Developed simulation modeloptimization of conjunctive use of surface and groundwater resources in Najaf Abad plain.In this model, an artificial neural network is used to simulate the interaction between surface and underground waters and the genetic algorithm has been used as an optimization model [11].Shamsai and Forghani have studied the issue of conjunctive use in drought areas that only have a transitional surface water source and no other surface water resources [12].
Safavi and Enteshari studied conjunctive use of surface and ground water resources in a basin-wide scale, by using a simulation/optimization model based on artificial neural networks (ANNs) and an ant system (AS) optimization.The main objective of the developed conjunctive use model was to minimize the water deficit.They showed that the simulation model is capable of predicting the behavior of the studied aquifer and that it may be used as a decision support system [13].
Tian et al. used integrated surface water (SW)-groundwater (GW) models in their research.A visualization tool named IHM3D was designed and developed specifically for integrated SW-GW modeling.In IHM3D, spatially distributed model inputs/outputs and geo-referenced data sets are visualized in a virtual globe-based 3D environment.They showed that visualization tools like IHM3D can promote data and model sharing in the water resources research community, and make it more practical to perform complex hydrological modeling in real-world water resources management [14].
Zhang and Guo studied the quantification of agriculture water savings under water integrated optimal management and analyzed the economic increment of agriculture water savings.Resilience of water utilization and saving inside agriculture have been fully developed through detailed expressions of demand process of multi crops and the interaction and transformation between surface water and groundwater.The results show that water saving potential and agriculture benefit demonstrate a negative correlation and that the optimization model for agricultural water transfer is an efficient way to analyze economic value of irrigation water and provide agriculture water transfer strategies [15].
In this research, imperialist and genetic competition algorithms are used for optimization.In this study, optimization is carried out in such a way that maximum utilization of all surface water resources is used, while at the same time it achieves maximum water requirements.The optimization algorithm is used to display the exchange curve between these goals.

Exploitation of Underground Water in Iran
Investigating existing figures and data on the state of exploitation of groundwater in the main areas of the country shows that, compared to 7/57 billion cubic meters of groundwater evacuation, about 7/50 billion cubic meters of recharge has been done.In other words, about 7 billion cubic meters more than the amount of recharge from groundwater exploited, so that in most parts of the country the level of groundwater aquifers is greatly reduced and its level is negative.
At present, the status of groundwater aquifers in most parts of the country from Urmia to the Zayandeh rood basin, and the provinces of Fars, Khorasan, Yazd and Kerman, are worrying and disturbing.However, the use of new technologies should be in service to human beings, but the excessive use of it can turn into a pitfall for human society.Unfortunately, managers did not make proper use of the technology of digging deep wells in the country.The equilibrium of groundwater aquifers, which had been preserved for centuries, has now collapsed into agricultural section and now due to the great number of deep wells, there are many problems in the Underground water sector of the country.
At a historic turning point in the country, the government was designated as responsible for the conservation of water resources, and by regulating laws and regulations, status of aquifers would be improved and the rights of legitimate exploiters would not be violated.But in practice, the laws that were laid down expanded the agents to the disaster, and the condition of the groundwater table became a catastrophe.In addition, after the forbidden publication of the plains, the number of wells licensed in those areas multiplied.
The current situation in the exploitation of the country's aquifers, namely the drainage of the underground water table in a progressive manner, regardless of its recharge status, only results in a lower annual level of the country's aquifers.However, re-feeding a groundwater aquarium needs up to thousands of years to reach the initial level of equilibrium.
The average drop in groundwater level in Iran is 20 centimetres per year, and according to news published in 2001, groundwater level in some Iranian alluvial aquifers has fallen by eight cubic meters [16].Based on the country's water resources balance sheet prepared by Iran Water Resources Management Company, in 1998-1999, the water deficit of the country's underground water reservoirs amounted to the considerable value of 7.9 billion cubic meters, which is about one percent of the world's total underground water reservoir deficit [14].Based on the results of the measurements and the calculations, the average deficit of the aquifers reservoir volume covered by the area of operation of the regional water company of Tehran during the 11 years period (1996)(1997)(1998)(1999)(2000)(2001)(2002)(2003)(2004)(2005)(2006)(2007) is 265 million cubic meters, and the highest average decrease with the cultivar Two meters is related to the alluvial aquifer of the Varamin Plain in the south east of Tehran.

Imperialist Competition Algorithm
In this study, the method of imperialist competition algorithm has been used.Further, the imperialist competition algorithm has been further studied.What is clear is that human intellectual and cultural evolution is much faster than its physical and genetic evolution.Therefore, cultural evolution and human perspective are also not ignored and a series of algorithms, called cultural algorithms, have been introduced.Cultural algorithms are not really a whole new category of algorithms.But the main idea is that these algorithms increase their convergence speed by increasing the ability of cultural evolution (by adding the possibility of sharing information among members of the population) to existing algorithms.
The developed algorithm, as well as other evolutionary optimization methods, starts with a number of primary population.In this algorithm, each element of the population is called a country.Countries are divided into colonies and colonizers.Each imperialist, depending on his power, controls a number of imperialist countries.The policy of absorption and imperialist competition is the core of this algorithm.In accordance with a recruiting policy that was historically applied by imperialist countries such as France and England in their colonies, Imperialist Countries, using methods such as the construction of schools in their own language, try to modify the colony, by destroying their language, culture and traditions.In presenting this algorithm, this policy is carried out by moving an empire's colonies according to a particular relationship.Figure 1 shows this move.If a colony during movement get a better position than imperialist, their positions will be change.In addition, the total power of an empire is defined as the total power of the imperialist country, plus the percentage of the average power of its colonies: Where, TC is the total power of an empire,   (colonies) mean Cost  is the average power of empire's colonies and () Cost imperialist is the total power of the imperialist country.As already mentioned, imperialist competition is another important part of this algorithm.During imperial imperialist competition, the weak empire gradually lost its strength and disappeared over time.The imperialist rivalry will, over time, reach a state where there is only one empire in the world that manages it.This is the time when the imperialist competition algorithm stops at the optimal point of the objective function.Figure 2 shows the general scheme of imperialist competition.-Quick find of optimal answer Figure 3 shows the flowchart of imperialist competition algorithm.Like other evolutionary algorithms, this algorithm starts with a number of random primitive populations, which is called a country.Some of the best elements of the population (equivalent to the elites in the genetic algorithm) are chosen as imperialists.The remainder of the population are considered as colonies.Imperialists, depending on their power, pull themselves into these colonies with a particular process that follows.The total power of each empire depends on both its constituent parts, the imperialist state (as the core) and its colonies.In mathematical terms, this dependence is modelled on the definition of the power of the empire as the total power of the imperialist country, plus a percentage of its average imperialist power.
With the formation of primitive empires, imperialist rivalry begins between them.Any empire that cannot succeed in imperialist competition and increase its power (or at least reduce its influence), will be removed from the imperialist competition.Therefore, the survival of a empire will depend on its power to capture the colonies of rival empires, and to dominate them.As a result, during the imperialist rivalries, the power of the larger empires will be gradually increased and the empires will be weaker.Empires will be forced to increase their colonies to increase their power.Over time, the colonies will be closer to empires in power and will see a kind of convergence.The ultimate imperialist rivalry is when we have a single empire in the world, very close to the imperialist countries with the status quo.In the next section of this chapter, different sections of the algorithm are examined.
The algorithm continues until a congruity condition is fulfilled, or until the total number of repetitions is completed.After a while, all the empires will fall, and we will have only one empire, and the rest of the nations will be under the control of this single empire.In this ideal world, all colonies are governed by a single empire, and the imperialist positions and costs are equal to the situation and cost of the imperialist state.In this new world, there is a difference not only between the colonies, but also between them Colonies and imperialist countries.In other words, all countries, at the same time, are colonies and imperialists.In such a situation, the imperialist rivalry is ended and stopped as one of the conditions for stopping the algorithm.The code for the proposed algorithm is presented below: 1. Select some random points on the function and create the first empires.
2. Move the colonies towards the imperialist country (policy of alignment).
3. If there is a colony in an empire that has a lower cost than the imperialist, replace the imperialist and imperialist places together.
4. Calculate the total cost of an empire (taking into account the cost of imperialism and their colonies).5. Choose a colony from the weakest empire and give it the empire that has the most probability of taking possession.6. Remove the weak empires.7. If only an empire is left, stop, otherwise, go to the other.
The general schema of the algorithm is graphically depicted in Figure 4.The study of this form of algorithm begins with the random primitive population and the formation of primitive empires and is repeated in a policy of absorption and imperialist competition.

Genetic Algorithm
More than three decades has passed from introducing the optimization idea using the genetic algorithm.Over the course of these three decades, the basic idea of this method has been developed with the modelling of the natural evolution process.The reason for the development of this approach is to optimize its flexibility in solving problems with discrete and continuous decision variables with linear and nonlinear objective functions without the need for information about their derivatives.Efforts have been made to develop this method over the past three decades, mainly focusing on increasing the speed of convergence of the algorithm and increasing its ability to solve problems with a large number of variables.
Optimization addresses the problems in which we seek to minimize or maximize one or more real functions.Computer programs today have become highly effective tools for optimizing issues that can be numerically numerable.One of the questions that arises when dealing with optimization issues is whether there is only one optimal answer for each particular issue?In many cases, yes, and in some of them, no.Is the answer the best answer?Optimization methods are tools that can be used to answer such questions.The main search methods used to solve optimization problems are explained below: In numerical methods, only one point is searched at a time.Although the implementation of these methods is simple, the number of points that a direct search may have is very high.In simple terms, the amount of objective function is computed in all the spatial points, and therefore these methods have inefficiently sought out the decision-making space in relation to the other methods discussed in this section.
Mathematical methods in which search space is considered as a continuous multidimensional function and the optimal responses are determined using the derivation of the desired function.Indirect methods use the principle that the derived derivative of a function in its extremities is equal to the queue.Direct mathematical methods like the Newton method use the values of the function and its derivatives to estimate the position of the extremum point.These methods and similar methods are known as uplifting methods, since these methods estimate where the maximum point is located, and then create a new estimate.And move towards it, so as to reach the peak (optimum point).These methods are suitable for well-behaved functions or functions that can be converted into a well-behaved function.
Randomized search methods using exploratory methods use the information obtained in the selected search method as guidance for choosing the probability of a point or the next suitable point.These methods attempt to strike a balance between exploration in the search space and the quality of the answers.Although this capability allows for the detection of local optimizations, it does not guarantee the exact values of optimal responses, and in principle these methods do not provide a means to ensure the optimal response is found..These methods are capable of solving many complicated problems and, therefore, they have certain advantages over both numeric and mathematical methods.
Evolutionary methods are based on Darwin's natural selection evolution theory.In these methods, a population is improved by choosing better members and eliminating lower members during the reproductive process and evolution.Each point in the search space is represented by a vector of real values.In the initial evolutionary strategies, the next search point is obtained by adding random Gaussian disturbances to the current point.The new point is evaluated.If the new point is capable of improving the target function, the search continues based on the new value; otherwise, the algorithm will continue its search according to the previous value.Typically, the disturbances will be adjusted to allow an average percentage (say, 20%) of the new points to be acceptable.
The collection of optimization and search methods in the category of evolutionary algorithms has been used in recent decades.Evolutionary algorithms are a set of innovative methods that are used in a variety of forms with varying levels of complexity, under the general name of evolutionary computing.The main advantage of these methods lies in their flexibility in optimizing various functions.These algorithms are classified into three broad categories: genetic algorithms, evolution planning, and evolutionary strategies, in which the other two categories of genetic programming and classification systems are also important because in learning the machine and discovering the rules in the legal systems, they fall into this category.In this study, imperialist and genetic competition algorithms are used for optimization, both of which are evolutionary.

Difference of Genetic Algorithm with other Optimization Methods
The genetic algorithm is a search and optimization method based on the principles of natural evolution.This method is in the category of optimization algorithms that are able to find general optimal solutions or solutions that are close to them.The genetic algorithm allows a population consisting of a large number of individuals under special selection rules to optimize the fitness function during the evolution process.This method was developed by Jhon Holland in 1975.In his early studies, he sought to identify the process of evolution and adaptation to nature, and simulate it in the form of an artificial process with similar properties.
Holland's findings were then publicized by one of his students, Goldberg, in 1989 to solve problems such as exploiting gas pipelines.In the book published by Goldberg, which is one of the most comprehensive references in the field of genetic algorithm, he summarizes the advantages of the genetic algorithm in comparison with other optimization methods as follows:  Ability to optimize in continuous or discrete spaces;  No need for information about the derivative of the function;  Ability to work with a large number of decision variables;  Optimization of very complex target functions can be done using this algorithm;  At the start, instead of a certain amount of a population of potential answers,  Provides the possibility of using encoded values of variables instead of using them themselves;  Works with data generated by numerical, empirical, or analytic functions;  Use probabilistic rules to guide the search process instead of definitive rules.
The genetic algorithm begins by creating a primitive population of chromosomes.In other words, chromosomes are strings of the proposed values for problem-solving variables, each representing a probable answer to the problem.In the next step, these chromosomes are evaluated according to the optimization goal, and the chromosomes that provide better responses to the problem are more likely to reproduce the problem.It is important to formulate the chromosome assessment function in a way that helps to accelerate the convergence of calculations towards the optimal public response.Because in the genetic algorithm, for each chromosome, the value of the evaluation function must be calculated, and since in many cases, with a significant number of chromosomes, we are faced with, the timing of the calculation of the evaluation function can actually use the genetic algorithm in Some problems make it impossible to use.

Genetic Glossary and Original Idea
At the beginning of the discussion, a brief description of the usual glossary of genetic algorithms is presented:  Gene: Contains a property or a variable, for example, the amount of operation from different wells  Chromosome: a set of variables or genes  Population: A set of chromosomes  Parents: Next Generation Candidate  Reproduction: Applying a mutant and crossover operator to parents and creating new chromosomes To begin, the chromosomes must be formed from the existing variables, and the engine of the genetic algorithm creates a heterogeneous initial population of the chromosomes.Then each chromosome is tested.The most suitable chromosomes have a greater chance of surviving during other periods and re-production, and the weaker are condemned to destruction.The next step is to create the second generation of the original population.The most suitable individuals are crossover (crossover) and random change (mutation) and a new generation is created.This process creates a new population of chromosomes that are more suitable than the previous generation.The whole process is repeated for subsequent generations, and this continues until the termination condition of the algorithm is reached.Terms of termination are:  The algorithm reaches a fixed number of generations  Find the right member  The algorithm enters uniformity in generations  Manual inspection Given the variable and random nature of the genetic algorithm, the final solution of a problem in a variety of performances is usually different but close to each other.This difference is due to the difference in the internal factors of the genetic algorithm.The main factors to be considered are: the ratio of interfere with the operators of the algorithm in the re-production, the size of the primary population and the number of reproductions.
In this study, the presence of a crossover in the production of the next generation of 0.25 interference ratio has been used and the size of the initial population is equal to the number of optimal variables.

Making the Initial Population of the Genetic Algorithm
The first input of a genetic algorithm is to construct an initial population of problem variables.When the actual model is used for optimization, it must be ensured that the received responses are valid by the algorithm.This means that the variables must be constrained within the correct constraints to prevent unrealistic responses.Some recent studies have shown that for moderately complex problems, the most suitable population is equal to the number of variables [17].

Crossover
The main generator of the new generation is crossover.Each of the children from this practice has a part of the information on the parent chromosomes.This is what makes the child inherit some of the characteristics of the father and some of the characteristics of the mother together and prevent the child from simulating the child to only one of the parents.The simplest type of crossover is the crossover of a point (Figure 5).In this crossover, the two parent chromosomes break from one point, then the new chromosomes are formed from the displacement of the first part of the two parents [17].Another type of crossover is a double crossover that is selected for the crossover of two points.In this research, double crossover is used.

Mutation
The second operator is a mutation in which a part of a chromosome is randomly changed (Figure 6).With the help of this operator, it is hoped that good generations will be removed and regenerated in generations.Also, this operator ensures that, without regard to the dispersion of the initial population, the probability of searching for any point in the problem space is never zero.

Fitness function
The goodness of each chromosome is measured using the fitting function value.

Stages of Genetic Algorithm
First, it is determined by the question of the variables to be determined.We then display them as chromosomes.Based on the fitness function, the goodness of each chromosome is determined, and the arbitrary initial population is randomly selected.Subsequently, the value of the fitness function for each chromosome is calculated.Then proceed as in Figure 7.

Introduction of Tehran-Karaj Plain
The aquifer of Tehran-Karaj Plain with a geographical position of 6º 28' 35" to 42º 49' 35" is the northern latitude and 37º 6' 51" to 13º 33' 51" is located east.This aquifer is from the north to the southern slope of the Alborz Mountains, from the south to the Arad and Fashafiyah mountains, from the east to the Tripod elevations, Quchak, Bibi Shahrbanoo, and to the key River to the Mahmoud Abad and to the west is restricted to the eastern plain of Karaj [16].The plain area is over 2250 km2, about 350 km2 of that foothills and the outcrops of the plain and 1900 km of plain.The average altitude of the plain is 1100 meters and the maximum altitude at the peak of the resort is 3933 meters [16].The density of groundwater resources and the type of operation (deep and semi-deep wells and springs) vary from place to place.So that the highest percentage and density of semi-deep wells in the Shemiranat area, deep wells in the west and south of Tehran plain and Qanat (most of them dried up), have been excavated in Tehran [16].
The 19-year unit hydrograph (water Year 65-64 to 83-82) is used to determine the variation in the reservoir of groundwater reservoir, using the piezometric wells and the Tyson map.Based on this hydrograph, the surface of the groundwater table has a downward trend, which has fallen from 9.25 m to 66-65 to 83-82.During these years, only a rising uptrend from the water 71-70 to 74-73 hydrographs, is coming back from the water of 1974-75.The surface of the aquifer was about 5.3 m from 70-71 to 83-82 and an average of 40 centimetres a year.Using the Simpson Law of 3.8, the volume change between the aquifer surface during the course was 6,378 -6 cubic km, indicating a change of about 0.08 meters.In this method, the average annual static drop is about 39 cm, which is consistent with the calculated number based on the unit hydrograph [16].

Objective Function, Decision Variables and Criteria
In this optimization, the goal is to compensate for a fraction of that plain.In this plain, there are 682.8 million cubic meters of resource deficit.On the other hand, the level of utilization of groundwater resources is done in such a way that all surface water is used and the water needs of the plain is provided.The amount of surface water to be used on a monthly basis is presented in Table 1.The goal is to maximize the supply of water to the plain.The water requirements of the plain are presented in Table 1.The decision variables are the monthly utilization of underground water resources.Decision variables are shown in Table 2.

Month
September October November December January February March February April May June July Level of operation of underground resources

Objective Function
Y: The number of years is considered in this modeling; M: The number of months that is considered as 12; W: Records from surface water and underground water sources D: The water requirement of the plain on a monthly basis; S: The rate of harvesting of surface water resources F: Percentage of the need for water supply each month to be maximized.
Where, G1 to G12 are the limitations for groundwater exploitation through September to July.
The optimization process is as follows: 1. Determine the total water needs of Tehran-Karaj plain (variable D); 2. Determine the amount of available surface water resources (variable S); 3. Determination of the scarcity of groundwater resources (extracted from articles); 4. Purpose of function: meeting the water requirement of Tehran-Karaj Plain; 5. Specifying the limits; 6.After optimization, it will be determined how much of the groundwater resources (variable G) should be taken.

Define fitness function First
The fitness function of the optimization problem and how it is calculated is written in MATLAB language in a m-file and stored in the name of its fitness function.The fitting function of the problem is written in the following text file.To introduce the vector of problem-solving variables, the X argument is placed for my function.Fourth Roulette Option: In this method, firstly, a scaled fit, each chromosome, is subdivided into the total fit of all the chromosomes in the population, then the roller wheel is simulated, with the area of each part corresponding to this standard fit Each chromosome is present.A random number with a uniform distribution is selected and in each area of the wheel that is placed, the chromosome is selected with that area.

Mutation
For mutation, the Uniform function is used.This function has two steps.In the first step, a fraction of the desired chromosome genes is selected, with a default value of 0.01, and a 0.47 is considered in this study.These genes have the same chance of muting.The algorithm then replaces the values of the genes with a random number whose value is within the range of the genes of the selected genes.

Crossover Function
In this section two points are selected.

Stop Criterion
The benchmark for stopping the 100th generation is considered.

Final Result
The results of exploitation of each of the surface water and underground water resources are presented in Table 3.For better comparison, the results are presented in Figure 8.As the figure shows, the amount of water needed from the beginning of the year begins to decrease and then increases, and this increase is related to the warm seasons of the year.Surface water levels increase in cold seasons.In the cold seasons, all of water needs have been met, but some water needs have not been met in the warm seasons.Z The requirement is met.For better comparison, the results of both optimizations are presented in Figure 9.As in the figure, the results of both modelling are almost similar.For most months, the results of the genetic algorithm competition the imperialist algorithm

Solutions
The table below shows the optimal utilization rate and available water volume to overcome the problem of groundwater resources in Tehran plain.As it is shown in the figure below, there is no shortage of resources in the months of November to June, but there is a shortage of resources in the months of October, January and August.If extracted from groundwater resources is optimal, there will be about 209.8 million cubic meters of excess water, which will be reduced by water supply in the months of September to December, and additional water can be used to provide Artificial Nutrition in Tehran Plain to be used.As already mentioned, groundwater resources in Tehran's plain face a shortage of about 682 million cubic meters.If the amount of harvesting from underground resources is kept to an optimum level, with the surplus of water, the problem of groundwater resources of Tehran plain can be solved within 10 years.If the amount of surface water is reduced by up to 10% due to dehydration, extra harvesting and excess water for artificial nutrition will be as follows.As it is shown in the table below, if 10 per cent of the water resources are depleted from October to December, we will be in deficit from July to August.The excess water in a blue year will also be about 175.98 million cubic meters, which will be used to offset existing water shortages, and excess water will remain for artificial nutrition.Therefore, it can be concluded that there will be no surplus water for artificial nutrition in the years to come and the problems of groundwater resources will be doubled.If the year is high level water and the amount of surface water resources is increased by 10%, at the end of the year, 246.293 million cubic meters of excess water will be stored, which if used for dehydrated months in 2 to 3 years, the problem of groundwater resources in Tehran plain Will be resolved.As shown in the table below, there will be a dearth of problems in the months of October, December and August.

Conclusion
Increasing population growth has increased the need for water in drinking water, industry and agriculture.For this reason, optimal utilization of surface water and underground water resources has been more and more considered and accepted.Separate use of resources can lead to problems such as water shortages in droughts due to the lack of surface water resources, unsustainable environmental impacts on production, stagnant levels and the mixing of salty and sweet water in coastal areas and increasing pumping costs in the result of the withdrawal should be overcome.The combined use of surface and underground resources can increase the availability of available water resources, minimizing the negative effects of separate use of resources, and efficient and optimal water management.Consolidated use is in fact the exploitation of surface and underground water resources to increase water abstraction and the sustainable use of water resources.In general, when using resources (reservoir, river, underground water, etc.) in combination, better effects than separate operation are obtained.With regard to integrated planning, in the long-term periods in which high rainfall is used, surface resources are used to meet the needs of the region and to balance existing water resources, and its surplus to feed the aquifer and increase the storage of underground resources used.
The disparate distribution of time and place of freshwater, on the one hand, and the rapid and growing growth of the world population, and especially our country in recent decades, have caused increasing problems in providing water resources for various uses.One of the new and effective solutions in the management debate over the last decades is the optimal use of surface and underground water resources so that all existing needs can be met in all critical situations.The use of optimization techniques is a useful and powerful way in designing management and design strategies for the development of an optimal combination of surface water and underground water resources.In this study, colonial and genetic competition algorithms are used to optimize groundwater harvesting.The results of this study indicate that if the level of harvesting from underground resources is kept to an optimum level, the problem of groundwater resources in Tehran plain can be solved with water surplus within 10 years.
The results of this study show that if the amount of surface water is reduced by 10% due to dehydration, we will have a shortage from October to December and from July to September.The excess water in a blue year will also be about 175.98 million cubic meters, which will be used to offset existing water shortages, and excess water will remain for artificial nutrition.Therefore, it can be concluded that there will be no surplus blue water for artificial nutrition in the years to come and the problems of groundwater resources will be doubled.If the year is blue and the amount of surface water resources is increased by 10%, by the end of the year, 246.293 million cubic meters of surplus water has been stored, which if used for dehydrated months in 2 to 3 years, the problem of groundwater resources in Tehran plain Will be resolved.

Figure 1 .
Figure 1.Movement of the colonies towards the imperialist (policy of absorption) [18]

Figure 2 .
Figure 2. The overall scheme of imperialist competition -Newness of the basic idea of the algorithm: As the first optimization algorithm based on a socio-political process -Ability to optimize equilibrium and even higher in comparison with different optimization algorithms, in the face of a variety of optimization problems.

Figure 3 .
Figure 3. Process of Imperialist Competition Algorithm

Figure 4 .
Figure 4.The overall design of the algorithm developed

Figure 5 .
Figure 5.One point Crossover of the fourth variable [19]

Figure 6 .
Figure 6.Creates a mutation in the fifth variable [19]

Figure 9 .
Figure 9.Comparison of the results of colonial competition algorithm and genetic algorithm