Keywords

2.1 Introduction

Optimization is widely used in water resources management today. Rao (1984) divided optimization methods into two main categories. The first category is the classical mathematics-based method, and the second is the search or numerical methods, which include direct and indirect search. In classical and indirect search methods, the objective function must be continuous and derivative, and indirect search methods such as random jump, various algorithms are used to search point by point in the space of variables (Rao 1984). In many engineering problems, the target function has several local and global optimal point of reference that the classical methods are not able to distinguish between them and find the optimal national point easily. Also, in the form of practical problems, the target function may be separate or accompanied by sudden changes that classical and indirect methods are generally unable to solve. Direct search methods may also be useful in small problems with a limited number of variables. However, in practice, they will not work well when there are many decision variables, and their scope is broad (Rao 1984). To this end, in recent years, many researchers have turned to artificial intelligence to solve this problem. These methods include evolutionary calculations such as Anil simulation algorithm (SA), GA, and PSO. Inspired by nature, these methods consider a set of points or populations in the space of answers and lead the model in different directions to find the optimal answer. To this end, in recent years, many researchers have turned to artificial intelligence to solve this problem. These methods include evolutionary calculations such as Anil simulation algorithm (SA), GA, and PSO. Inspired by nature, these methods consider a set of points or populations in the space of answers and lead the model in different directions to find the optimal answer. Although water resources are renewable, their volume is constant, and in contrast to human demand for it is increasing. Over the past 100 years, global water demand has increased six-fold. Unfortunately, pollutants, including industrial effluents, agricultural wastewater, and urban and rural wastewater, pollute water resources and exceed consumption standards (Ghanbari et al. 2014). In water resources management and planning, scientific decision-making is the key to future scientific action. For this purpose, optimization is one of the appropriate tools in the field of water resources. In mathematical sciences, optimization provides the best answer from the set of available answers with the presence or absence of different constraints or constraints (Bozorg-Haddad et al. 2016). Optimization is one of the applied sciences in mathematics, economics, and management, and its tools have been widely developed in various fields. Also, due to the increasing development of optimization methods in the field of water resources management, there is a need for modern methods regarding the optimization of water resource systems (Rao 1984). Belaineh et al. (1999) examined the simulation and optimization of a hypothetical area model with a greater focus on joint water management and reservoir management under different scenarios. The results showed that more details are used in the model, the better the joint water management would be, so that in a model with more detail, 13% more water was provided. Shangwan (2001) study revealed the use of appropriate techniques in optimization could save up to 50% of water and minimize damage. The study aims to compare the various techniques of linear programming optimization (NLP), collective intelligence (PSO) and genetic algorithm (GA) in managing agricultural water allocation in drought conditions by maximizing income. Kumar and Reddy (2007) used GA, EMPSO, and PSO methods to derive operating policies in multi-purpose tanks. This technique was used for the Bhadra multi-purpose tank in India. According to the objectives of this reservoir, the goal is to maximize electricity generation and minimize water and PSO shortage compared to EMPSO irrigation. The results showed that it has better results in extracting reservoir exploitation policies. Mayer and Muñoz-Hernandez (2009) reviewed the optimization of aggregated models of water resources. Matsukawa et al. (1992) presented a simulation-optimization model for a strategic plan to develop the exploitation of the Mad River in California. The river’s watershed consisted of a multi-purpose pond and a free aqueduct that are hydraulically connected. Nikkami et al. (2012), applied multi-objective linear programming model, found that the total profitability of the Abol Abbas Basin before optimization was 127601 million Rials and after optimization of land use optimization with 3687 percent increase has reached 299.89 million Rials. Azamathulla (2013) used soft computing techniques Water resources study, namely radial radiant performance (RBF), adaptive neural-fuzzy inference system (ANFIS), expression gene programming (GEP), and linear genetic programming (LGP) in engineering. The scope of application is more in optimizing the prediction of cascading phenomena that occur in pipelines placed under the sea or river, bridge or waterfall piers, ponds, and overflows. Zeinali et al. (2020) focused on unknown sorting genetic algorithm II with a coupled surface water–groundwater model in the southwestern region of Iran. The advantage of this structure is that considering various limitations, it achieves and maintains a balance between surface water output and groundwater. The optimal outflow of surface and groundwater in humid and dry areas is achieved by linking the optimization algorithm with the Cooper model. Fatehi and Beauty (2010), in their research results in a case study in the Firoozabad region, Pakistan, showed that using multi-objective linear programming, farmers’ profits, and water abstraction from underground aquifers can be optimized simultaneously.

2.2 Definitions and Terms

In the Water Resources Management System, some of the following term is used to refer (Gleick 1993).

Management: The process of effective use of human and material resources is used in planning, organizing, resources and tools, guiding and controlling the system to achieve specific organizational goals or objectives.

Planning: Planning is organizing various activities, such as “deciding on the time and place of activities, visualizing the desired status of the system in the future and creating appropriate tools and methods to achieve this desired situation.”

Analysis: To be analyzed, the system is first divided into smaller components, and after reviewing and, analyzing the problem, the conclusion is made on well-defined system. This comprehensive approach to all the components of the system is done with the help of analysis so that all the components of the system can be reviewed.

Decision: Decision-making in water resources systems is scientifically possible to select the best option for management and planning purposes.

The objective function: The objective function is a goal that is considered through the optimization process, or in other words, finding the optimal value for the objective function is defined. Such as maximizing profits, minimizing costs, maximizing the reliability efficiency of the system, he pointed out. In a numerical solution, a problem may have several different answers, and to compare them and choose the optimal answer, a function is defined as the objective function. Therefore, it can be said that choosing the optimal answer through the objective function is one of the most important and basic optimization steps.

Decision variables: These types of variables are variables whose value determines the objective function. These variables can be controlled and managed in the system to achieve optimal optimization in the system. It is important to find the optimal value for decision variables so that the objective function is maximized or minimized.

Mode variables: These types of variables are dependent variables, the value of which determines the overall status of the system, and the value of which is determined by independent decision variables and by the system simulation method.

Decision space: All the answers to an optimization problem are called decision space. The space of decision itself is divided into two parts, the space of final and infinite decision. The finite decision space is created by the intersection of the allowable value of the decision variables of that problem, whereas in the infinite decision space there is no allowable value for one or more variables in the domain.

Justified and unjustified answers: Justified answers are answers for which the limitations of the problem are met. But unjustified answers are called violations of the limitations of the problem.

Optimal Solutions: Optimal Solutions are values that are in the possible decision-making space. The optimal Solutions is divided into three parts: absolute optimal, local optimal, and near-optimal.

Absolute optimization: If the response to an optimization problem reaches its best value, it is called the absolute optimal Solutions. The point in the decision space that for each value of that point, the target function occupies the peak (maximum value) and the door (minimum value). So that there is no other peak above or no other valley below it. In fact, in maximization problems, the value of the target function for the absolute optimal answer is greater than or equal to all the values of the target function for different decision variables, and in minimization problems, the value of the optimal objective function for the absolute optimal answer is the highest. The values of the target function are less than or equal to the variables of different decisions.

Local optimization: Local optimization is solutions the best answer for the objective function around its neighborhood. Optimal localized responses are superior to those around them but will lose their superiority if performed on a larger scale.

Close to optimal: In most optimization problems, there are situations where there is no absolute optimal Solution to the problem and the probability of achieving the absolute Solution is very low, in this case the near-optimal answer is considered the best value for the objective function. It is worth noting that there is a very little gap with the absolute answer to the problem. For this reason, in many optimization methods, the search process stops after reaching the Solution close to the problem.

Optimization: Selects the desired options from a set of available options. Or rather, finding the most appropriate possible values for the desired variables in a problem, so that for the amounts obtained, the desired value is achieved for the problem.

Modeling: A natural phenomenon in the form of physical components or mathematical relations, which includes two types of physics modeling and mathematical modeling. Physical modeling can be implemented in cases where there is the possibility of laboratory construction of components and systems related to that problem. But in physical water management, physical modeling is not very practical because building such a model in a laboratory requires a lot of money and is still time-consuming. In modeling, the greater the number of components, the more accurate the modeling.

Mathematical modeling: It is the expression of a system and or a system in mathematical language and its theorems and symbols. Mathematical modeling is an attempt to develop a mathematical model for a specific system.

Simulation: Is one of the methods to solve programming models when it is not possible to use algebraic analysis methods and not possible to experiment in the real world. Simulation relies on test and error to examine the effect of different conditions on the system and evaluate its results.

System: The system relates each building, device, method, or method of actual operation to a given time, input, cause, or stimulus of material, energy, or information to output, effect, or response to the form of information, energy, or material. In other words, the system-defined a set of related components that convert multiple inputs to multiple outputs. But all the said compliments have been given to different definitions of scholars, which have common points in connection with the compliments of the system, examples are given below (Modarresizdi and Asif Vaziri 2003).

  1. 1.

    System components are independent of each other but may be interconnected.

  2. 2.

    A system is a combination of the logic of its constituent components.

  3. 3.

    The system establishes a connection between output and input, or cause and effect.

  4. 4.

    The input and output of a system do not necessarily have the same nature.

2.3 Fundamentals and Logic

We always been looking for the best option and path. The concept of optimization derives from this concise phrase. we are looking for the best route or the best option for different life issues. The goal of optimization is to find the best acceptable solution, given the limitations and needs of the problem. For example, a farmer’s target is to increase the economic profit from the sale of products (target function) according to restrictions such as cultivation area, amount of water resources, number of workforces, planting costs, and so on. That we can maximize product sales, given existing constraints, is to optimize our target function. Optimizing water resources systems is one of the practical solutions to improve the status of existing water resources. Being able to minimize significant profits in the agricultural sector by minimizing water resources (target function) means optimizing (the simple concept of optimization). In general, optimization occurs when one or more available resources (which can be water, land, financial resources, labor, etc.) limit development. In the presence of abundance in terms of all the resources needed for development, the importance of optimal use of resources is not so much discussed. Therefore, optimization often occurs when it is not possible to use one or more resources freely and without worries, or when harvesting from a certain amount can cause severe damage to the water system or reduce the economic efficiency of the project. In Iran, water is a limiting source of development in some areas. In most parts of Iran, water shortage is a severe problem, and the optimal use of water resources is a national issue, so using optimization methods is a way to manage water resources better.

The choice of the appropriate optimization method depends on the circumstances and characteristics of the problem under consideration. Each of the optimization methods, depending on the characteristics of each problem, is used for a specific type of problem. Therefore, it is necessary to acquire enough knowledge of the problem as well as the existing solution methods to choose the right optimization method.

Types of optimization methods:

  1. (A)

    Optimization by linear programming method

  2. (B)

    Optimization by nonlinear programming method

  3. (C)

    Optimization with a definite discrete classical method

  4. (D)

    Continuous optimization (linear stochastic programming)

  5. (E)

    Optimal discontinuous optimal optimization (dynamic stochastic programming)

  6. (F)

    Optimization by modern methods (evolutionary and meta-exploration algorithm).

Optimization by linear programming is one of the most common mechanisms for formulating a wide range of problems. A linear programming problem consists of several linear relationships describing the structure of the problem and its physical characteristics. Decision) and indexes and constraints are a set of relations of equality or nonlinear inequality of unknowns and indexes (Bozorg-Haddad et al. 2014).

The word line means that all mathematical relationships (objective function and constraints) of this model are necessarily linear functions, so LP means planning activities to obtain an optimal result.

It is worth noting that the linear method is one of the most practical optimization methods in the field of water resource planning and management, the popularity of which is mainly due to the available software packages that can be used to solve the desired problems easily.

Here is a standard and classic form of a linear optimization problem according to Eq. (1.1).

$$ \begin{aligned} {\text{Maximize F }} = c_{1} x_{1} + c_{2} x_{2} + \cdots + c_{n} x_{n} \hfill \\ {\text{Subject to }}:a_{11} x_{1} + a_{12} x_{2} + \cdots + a_{1n} x_{n} \, \le \,b_{1} \hfill \\ a_{21} x_{1} + a_{22} x_{2} + \cdots a_{2n} x_{n} \, \le \,b_{2} \hfill \\ a_{m1} x_{1} + a_{m2} x_{2} + \cdots a_{mn} x_{n} \, \le \,b_{m} \hfill \\ x_{1} ,x_{2} , \ldots x_{n} \ge 0 \hfill \\ \end{aligned} $$

in which, F = the objective function of xn, = the decision variables of cn, = the corresponding coefficients xn in the objective function of amn the coefficients in the constraints and bm the negative values to the right of the constraints. The number of m is the first constraint (ie, those with the \( a_{m1} x_{1} + a_{m2} x_{2} + \cdots a_{mn} x_{n} \) function) are called functional constraints. The constraints of the xn ≤ 0 constraints, the variables xn, the decision variables and the fixed data cn, bn, amn are the model parameters (Bozorg-Haddad et al. 2014).

Assumptions of linear models: Linear models, like any other modeling, have predetermined assumptions. These assumptions include:

Assumptions are proportionality, aggregation, separability, and definiteness.

Proportionality assumption: The proportionality assumption means that the amount of consumption from each source is independent of the amount of consumption from other sources.

Conclusion Assumption: The assumption of appropriateness alone is not enough for the linearity of the objective function and the definition of constraints. The assumption of aggregation means that the total consumption is equal to the sum of the consumption values from each source.

Assumption: Decision variables Some physical problems are just integers. However, the answer to n from LP is not necessarily integers. Therefore, the assumption of forgiveness means that each unit of activity can be divided into any desired number. However, even when the correct answer is necessary, LP can still be used sequentially (Hillier and Lieberman 1980).

In this case, if the answer is not an integer, they can be rounded to the nearest integer. This usually does not cause problems when the decision variables are significant numbers. However, in some cases, there are problems with rounding up the answers. In such cases, linear programming with the correct number must be used.

2.3.1 Categorization of Optimization Methods

The choice of each of the following methods depends on the conditions and characteristics of the optimization model in each problem, and each of the options is briefly described (Hillier and Lieberman 1980).

  1. 1.

    Linear methods—nonlinear methods

  2. 2.

    Definitive methods—Random (probable)—Stochastic

  3. 3.

    Continuous methods

  4. 4.

    Explicit fuzzy methods

  5. 5.

    Modern Classical Methods

  6. 6.

    Simulation and search methods

  7. 7.

    Random sampling method

  8. 8.

    Targeted test and error method

  9. 9.

    How to solve the device of equations

  10. 10.

    The method of using partial derivatives of the objective function.

In Linear models decision space are polygons surrounded by constraints (direct lines) and the objective function moves as a straight line within it, but in nonlinear models of decision space, the form of enclosed space is with constraints or lines. The curve or space of the linear enclosure is a function of the nonlinear target or a combination of both.

There are several ways to solve such (linear) models, such as drawing methods and the Simplex method, but in the nonlinear method it is possible to have an optimal answer at any boundary point, and the derivative of nonlinear curves can be used. It should be noted that due to the complexity of some models, it is sometimes not possible to calculate the models by derivative method, so we use the numerical calculation method.

2.3.1.1 Definite-Random Method

Using a definite method to solve an optimization problem will certainly ignore the possible nature of the problem phenomena and may not lead to logical and correct answers to the problem. But stochastic linear programming (SLP) and stochastic dynamic programming (SDP) methods that help us find optimal solutions to the problem.

2.3.1.2 Classical-Modern Methods

The classical method of optimization is often based on mathematical concepts, and solving them numerical solution methods used to achieve the absolute optimal method. In some optimization problems, when the details of the problem increases, it leads to a more complex mathematical model, which sometimes makes it impossible to solve engineering problems with these methods.

Modernization and optimization, such as evolutionary and meta-exploration algorithms in the engineering sciences, are widely used to cover the weaknesses of the classical method. The basis of this method and the mentioned algorithms are the use of simple processes and concepts in nature, and by performing many attempts and errors, they achieve the optimal solutions. It is worth mentioning that in the classical method, it is possible not to have access to the absolute optimal answer, therefore, by solving the modern method, we will be able to access the answer close to the optimal, and therefore it is superior to the classical method.

2.3.1.3 Simulation and Search Methods

The basis for this method is the consecutive selection of points from the whole decision space, simulation of each point, control of the experimental answer and control of the presence of the desired point (answer) in the justified decision space.

2.3.1.4 Random Sampling Method

This method is presented to address the problem of reliability between achieving the optimal solution and the time required to solve optimization problems. Sampling can be done both from network points and all available points. However, sampling from network points increases the calculation speed and reduces the volume and accuracy of the calculation, and in sampling from all existing points, the calculation speed decreases, and the volume and accuracy of the calculations increase. In this method, one point is randomly selected each time, so it is possible that in subsequent sampling, one of the measured points will be re-selected, so two solutions are created:

In the first approach, the new answer is measured regardless of the previous choice, and in the second approach, each new answer can be compared with all the previously measured responses. We will pay for another new one. Therefore, the second approach has an advantage over the first approach due to the reduction of the volume and amount of repetitive simulation and the time of calculations is less (Bozorg-Haddad et al. 2014).

2.3.1.5 Targeted Trial and Error Method

In the trial and error method, the next point is selected in the direction and a path that the user is likely to get a better answer in that direction. In other words, explaining the problem, the designer chooses the next examples in a direction that is likely to occur if the problem is solved to the most positive change in the value of the target function. will give. Reaching the optimal answer in this way is entirely based on the decision of the problem designer and experience in this field.

Of course, such methods are often referred to as user-friendly, and the final answer obtained from problem-solving is completely in the direction intended by the designer, but there is no always a guarantee that the final answer is optimal or even optimal for moving the chosen path.

2.3.2 How to Use Minor Derivatives of the Objective Function

This method complements the targeted test and error method. In this method, trial, and error used, except that identifying the direction of movement in the decision space has a mathematical logic. There is no guarantee that the selected direction will be optimal in the target test and error method, so we use partial derivatives to eliminate this defect and problem.

In this method, according to the gradient and slope of the target function and the path to be moved and tested, the next point is selected and the direction of the highest slope facing the objective function is at the current point. In this way, it can be claimed that the selected path to the cut will have the most positive effect on the objective function.

The problem with this method is that it calculates the partial derivatives of the objective function, which may be easy to calculate in this partial derivative and problematic in some cases according to the parameters of the problem. To solve this problem, it is possible to change the shift margins of each of the decision variables.

2.3.3 Challenges and Opportunities in Using Optimization Models

One of the basic pillars of water resources management in present situation is the optimal use of available water resources. To this end, considering the diverse dimensions and complexities of water resource systems, managers and planners today have resorted to using optimization models as an efficient tool to achieve optimal decisions (Navid Nejad 2014).

The development of human knowledge and the creation of modern tools and their combination with existing optimization models, new opportunities for “better decision making” have been provided in water resources planning and development.” (Soltani 1994).

Create tools and access to modern technology, such as the World Wide Web and geographic information systems. Value of new data and information due to behavioral changes in watersheds and the importance of using this information quickly for analysis, design and information in emergencies, as well as public education for consumption. And water-saving has created new coordinates in water resources management (Zahraei 2016).

Nowadays, with the rapid expansion of information technology, a new space has been created for the development of new tools for analyzing, planning and managing water resources systems. By accessing the Internet, infinite space of information and science is provided to the user, which can be used to make decisions as effectively as possible. Useful tools that have been widely used include remote sensing and geographic information systems. Using remote sensing, quantitative and qualitative variables can be identified, and effective parameters about them can be measured and interpreted. For example, using sensors on aircraft and satellites, valuable information such as soil moisture, snow cover and flood expansion can be obtained, which is of great importance in water resources management (Zahraei 2016).

2.3.4 Applications of Optimization in Water Resource Management

To understand the problem of water resources management and the purpose of which is predetermined, after explaining the conceptual and mathematical model of the problem, optimization methods can be used to solve and find the optimal solution For this purpose, a specific definition of the system must first be provided. A system is a set of related sections and components that pursue a specific goal, and specific inputs lead to access to the corresponding outputs (Bozorg-Haddad et al. 2016).

A system feature can be divided into inputs and outputs, which can be controlled or uncontrollable. Also, system inputs include primary data, relationships are the constraints of constraints, and decision variables are needed to determine the status or performance of a system.

Figure 2.1 shows an overview of the components of the blue system, in which each system (S) consists of a set of relationships and equations with some data and indexes that are given as inputs (U, P, L, D, O), the output (R) is obtained.

Fig. 2.1
figure 1

General outline of the components of water resources systems (withdrawal from Bozorg-Haddad et al. 2014)

Uncontrollable inputs to a set of data related to natural phenomena and processes in a system whose selection and change of values is beyond the control of the system analyst. In this system, there are uncontrolled inputs (UP). In mathematics, computer science and economics, optimization selects options from a set of justifiable or unjustifiable selections. In general, in the optimization process, assuming that R is unknown as the output of the water resources system, the overall goal is to find the best value for R by determining the values for the inputs and controllable variables. According to the issues raised, in optimizing water systems, the system should be introduced by developing a suitable conceptual and mathematical model (Bozorg-Haddad et al. 2014). The simplest and most common problem of water resources management, which can be solved using a variety of optimization methods, is the issue of dam operation.

Example:

Consider a barrier that is exploited during a monthly T-period. The operation of this dam in different months depends on the volume of needs in downstream agricultural fields, the amount of volume required for each period is determined every month during a period of T months. If the shortage index is defined as the difference between the release of the dam and the volume of downstream needs, the purpose of solving this problem is to manage water resources management to achieve the maximum total supply of downstream needs or to achieve the minimum total deficit volume in the T-period in planning. Therefore, the decision-making variables in solving this problem are the monthly release volumes during the operation period.

Figure 2.2 shows the different parts of the dam system for optimal operation.

Fig. 2.2
figure 2

General diagram of the components of the operation model of the dam system harvesting from the great (Bozorg-Haddad and Saifollahi-Aghmioni 2013)

It should be noted that a dam can be exploited for different purposes such as industry or agriculture, maximizing hydropower production, minimizing the shortage of drinking, shipping, and environmental needs on a daily, monthly and annual basis. As mentioned, each optimization problem has two main components, the objective function, and the constraints, which are identified in the modeling process, and their mathematical structure is formed. The goal of any optimization problem is to achieve the desired value for the objective function by observing all the conditions of the problem and identifying the absolute optimal solution among the justified answers to the problem.

2.4 Importance and Necessity

Due to the breadth and complexity of water resources systems, policy determination, selection of options, and appropriate strategies for the proper functioning of water resources systems in different situations are necessary and require a comprehensive optimization process.

The World Water Commission predicts that water use will increase by about 50 percent in the next 30 years. Therefore, the use of simulation and optimization techniques in decision-making and management strategies for the principled use of water resources will be inevitable.

2.4.1 Significance of Consumption Optimization and Technological Strategies for Water Consumption Optimization

Rapid population growth and urban development in the third millennium, especially in developing countries, have significantly increased water demand to meet population needs. This is especially true in areas of the world that are naturally plagued by water scarcity. In our country, too, the situation of water resources is not very favorable, Per capita water divides the world’s countries into five categories, which are shown in Fig. 2.3.

Fig. 2.3
figure 3

Per capita renewable water in the world (cubic meters per year)

  • The first group of countries with a per capita capacity of more than 5,000 cubic meters per year, most of the countries of South and North America, parts of Europe, Africa and Russia

  • The second group of countries with per capita water between 1700 and 5000 cubic meters per year, China, Afghanistan, Kyrgyzstan, Tajikistan, Turkmenistan, Iran, Iraq, Turkey, and Syria.

  • The third category of countries that have a per capita renewable water between 1000 and 1700 cubic meters per year, India, Pakistan, Ethiopia, Somalia.

  • The fourth category of countries that have a per capita renewable water of 500 to 1000 cubic meters of water per year, countries such as Sudan, Egypt, South Africa, and Morocco.

  • The fifth category of countries that have a per capita renewable water of less than 500 cubic meters per year, Saudi Arabia, Oman, Yemen, Libya, Algeria, Tunisia.

2.4.2 Modernization and Optimization of Irrigation Systems

Modernization and optimization of irrigation systems in the management of irrigation systems are often used as a tool to improve irrigation efficiency, produce more agricultural products with less water consumption. The options available to solve the problem of water scarcity in the community include the following:

  1. 1.

    Using more virtual water

  2. 2.

    Improving the economic efficiency of water

  3. 3.

    Improving the technical efficiency of water. Allan (1997, 1999).

Discussions on modernization and optimization activities can be considered in both the farm and irrigation areas.

In farm water management, the selection and use of irrigation equipment and irrigation planning are influenced by a person’s decision.

Much research has been done to evaluate the quantitative impact of irrigation modernization and optimization programs on the use of surface water in the basin. However, it is necessary to assess the effects on the socio-economic stability of agricultural communities and water quality in the river basin, so that analysis Suitable for the benefits and costs of improving water efficiency (Playán and Mateos 2006).

2.4.3 Lack of Water Resources and Compensation Strategies

Providing sustainable freshwater resources has become a problem in many countries around the world. World population growth and industrialization, on the one hand, and changes in global warming, which has led to increased droughts, storms and floods around the world, are fueling water shortages. Despite these shortcomings, it seems that we need to look for different ways to compensate for these shortcomings. Water shortage compensation strategies can be divided into three main categories:

2.4.4 Wastewater Treatment and Gray Water

Wastewater treatment is a process in which wastewater is converted into water that can be reused or left in the environment without harm or danger.

Clean and healthy water is one of the most basic human resources for life on Earth. One way to access safe water is to treat wastewater. Sewage is one of the most valuable and essential sources of water today. In the past, sewage was considered a useless waste for various reasons.

One way to solve the water shortage problem is to recycle gray water. Gray water refers to recyclable water from sewage from homes or office buildings, which includes effluents other than sanitary water.

Due to daily activities such as washing clothes, washing dishes and bathing, it can be recycled and reused.

2.4.5 Water Desalination

Given that more than 95% of the world’s water is in the form of saltwater, water supply from this source has always been of human interest. Accordingly, various methods have been developed for water desalination. The main methods in the process of desalination are saltwater, reverse osmosis and thermal methods.

2.4.6 Optimizing Water Consumption

The daily increase in water consumption has had consequences such as increased demand, reduced supply, drought, floods and pollution of human resources.

To increase the demand for water, we can pay attention to reducing consumption and increasing resources. Meanwhile, reducing water consumption not only helps to maintain limited resources but also reduces the need for water treatment. Water consumption can be classified into three categories: household, industrial and agricultural, depending on the source of consumption. In the following, we will review some new technologies in optimizing water consumption.

2.4.7 Optimizing Domestic Water Consumption

Research by Angelin has shown that the more customers are aware of their consumption in different parts of the home, the more controlled their consumption pattern will be. This helps consumers consciously reduce water consumption.

In this regard, the company tried to provide a new solution to inform and increase customer awareness of its consumption pattern. Recently, Angelin, in partnership with Advisor, a behavioral software company, has tried to study the water consumption strategy of its customers.

2.4.8 Optimizing Water Consumption in the Industry

One of the places where we need to pay attention to the control and optimization of water consumption is an industry. The use of water is common in all industries, and without the presence of this vital substance, it will be impossible to carry out industrial activities.

The increase in the price of water used by industrial processes on the one hand, and the application of environmental standards on the permissible concentration of pollutants during effluent, on the other hand, have doubled the importance of controlling water consumption in industries. Accordingly, various strategies for optimizing water consumption in industries are recommended, and we will examine some of them in the following.

2.4.8.1 Dry Machining

Ford Machinery has found a new way to reduce water consumption by focusing on the amount of water consumption in the machining sector. The basis of this method was later considered as the basis of dry machining. In this method, a composite lubricant containing some oil and a small amount of water was used, which was sprayed directly on the tip of the tool. Studies have shown that this method, in addition to having the necessary efficiency and uniformity with conventional solutions, has drastically reduced the amount of water consumed.

2.4.8.2 Integrate Steps in the Color Line

In the painting process, it is necessary to apply a phosphate coating on the metal to increase the adhesion of the original color to the metal. At this stage, a large amount of water is used to regulate humidity as well as washing. The painting process at Ford consisted of three main steps. In the first stage, the phosphate coating was applied, in the second stage, the underlayer paint was sprayed, and finally, the main paint was applied to the part in the third stage.

By changing the design of the painting process, Ford was able to integrate the first and second stages, reducing water consumption to one-third.

2.4.8.3 Sewer Recycling and Treatment

It is important to note that reducing water consumption can also help reduce energy consumption. There are several ways to reduce water consumption in the industry. One of the issues that need to be considered more in the industry is that in many heavy industries, the quality of water consumed does not have to be the same as that of drinking water. One way to reduce water consumption is to use purified and recycled water.

Cascade Tishou Company has been able to purify the consumed water as much as possible by using the filtration process. Recycled water is used instead of freshwater for various processes. This has led to a significant reduction in water consumption. The result of these processes is a reduction of 9.84 billion liters of water consumption and $ 24 million in annual storage for the company.

2.4.8.4 Water Recovery from Raw Materials

Using the recycling process, Nestlé has been able to supply its water from milk. In this factory, fresh cow’s milk, which contains 88% water, is heated at low pressure to remove some of its water. As a result of this process, the water vapor produced in the next stage is subjected to the condensation process and after a series of preparation processes, it can be used for steam washing and cleaning machines. The effluent from this stage returns to the cycle after reassembly and is used a second time. This water is used for agricultural irrigation and washing processes. Nestlé Company receives 1.6 million liters of cow’s milk per day, which has been used to reduce the amount of water consumed annually by 15% by designing these processes.

2.4.8.5 Use Recycled Materials

One of the processes that reduce water consumption in the paper industry is the use of recycled paper. Recycled paper, due to its fibrous structure, consumes less water than fresh and ready-to-use paper.

2.4.9 Optimizing Water Consumption in Agriculture

Global statistics show that 70% of the world’s water is used in the agricultural industry, which is a high volume. Rising demand for food and water, on the one hand, and population growth, on the other, are forcing us to control the amount of water consumption in the agricultural industry. To do this, we can use different systems, some of which are discussed below.

2.4.9.1 Variable-Rate Irrigation System (VRI)

Irrigation is the most important issue of water consumption in agriculture. One of the most common methods of irrigation is the use of a central control system in which water is distributed 360 degrees everywhere. The problem with this method is the blind irrigation of agricultural land, which means that all parts of the land are irrigated equally, regardless of its conditions.

2.4.9.2 Water Pressure Control

By reducing the water pressure in a irrigation line, more control can be exercised over the amount of water consumed in that area. Farmers can use low water pressure to keep moisture close to the surface and reduce soil erosion. Also, with this operation, the irrigation line is controlled and does not leave the agricultural land.

2.4.9.3 Irrigation Planning

The use of soil moisture control sensors makes it possible to monitor wireless systems. By monitoring the amount of soil moisture depending on the day and time, irrigation can be planned completely automatically. By adding these features, the group is trying to reduce and optimize water consumption as much as possible.

2.4.9.4 Use of Intelligent Irrigation Systems

Smart Druplt is a small robot used to irrigate small gardens and farms. The robot can control the irrigation schedule based on the type of plant, the weather and the conditions and type of soil. The operating range of each robot is about 10 meters and it can supply any pot, plant or tree that is in this range.

2.4.9.5 Web Automation Systems

The system provided by Rachio is a smart web and automation software. This software allows you to control the irrigation process through smartphones and smart personal assistants such as Alexa (Amazon’s smart assistant). This software can regulate the amount of irrigation based on rainfall or drought by collecting climate information in the area. One of the accompanying systems of this software package is the wireless water flowmeter. By measuring the amount of water passing through the pipes, this flowmeter controls and manages the leakage or bursting of the pipes online.

Water resource management activities can be divided into three categories: developing water resource management policies, managing measures to achieve policy goals, and evaluating their effects. The macro policies of water resources management determine the relationship between development and how these resources are exploited for national development purposes. The first step in formulating macro-policies for water resources management is to propose different options based on the pervasive and comprehensive limitations and goals of water resources development and management. Nowadays, due to the growing need for water resources, which is the result of a growing population and agriculture, it is not possible to plan only with enough and unreliable water resources. For this reason, we will briefly examine some of the necessities of this system.

  1. 1.

    Restriction of available water resources and heterogeneous distribution of resources

  2. 2.

    Increasing population growth

  3. 3.

    Increasing the vulnerability of various water supply systems due to their more complex nature

  4. 4.

    Increasing the per capita water consumption due to the high level of welfare and health of the people

  5. 5.

    Increasing the need in various industrial and agricultural sectors according to the development process of these sectors

  6. 6.

    Climate change and the need for long-term forecasts

  7. 7.

    Pollution of water resources

  8. 8.

    Destruction of resources, especially groundwater, due to over-disposal and lack of proper management.

2.5 Practical Examples

Due to the multiplicity of optimization methods used in water resources management, and the breadth and complexity of water resource systems and the need for optimization in its various sections, successful applications of genetic algorithms are examined in this section.

Genetic Algorithm: The genetic algorithm (GA) is one of the first and most successful evolutionary algorithms, and its successful applications have been reported in various sciences. GA is inherently suitable for solving specific predisposition problems and can be applied by making changes to solve continuous optimization problems and nonlinear combinations under nonlinear constraints of equality and inequality (Halland 1975; Goldberg 1987). To improve the performance of this algorithm, several improved versions have been invented so far, the most important of which are series genetic algorithms, turbulent genetic algorithms, hybrid genetic algorithms, self-organizing algorithms, genetically modified zygomatic (1999) and algorithms.

Structure of genetic algorithms: GA includes coding, evaluation, selection, composition, mutation, and decryption operators. First, the problem variables are coded and the algorithm deals with its encrypted form. In the evaluation stage, the evaluation function from the objective function evaluates each string with a numerical value and determines its quality. The higher the quality of the answer string, the higher the value of the answer, and the higher the possibility of participation for the next generation. In the selection process, a pair of chromosomes are selected to be combined.

The interface is the choice between two generations. The selection process is random and is the criterion for selection. In practice, the combination of the old generation of chromosomes is mixed, and the new generation of chromosomes is formed. The combination operator in the genetic algorithm eliminates the scattering or genetic diversity of the population and allows good genes to be combined. The mutation generator produces other possible responses. In the operator, the mutation is applied with a certain probability to the strings of the previous generation mating stage, and the strings obtained from the next generation strings are added. The result of the mutation operation will increase the likelihood of escaping from local optimal points. Mutations lead to the search for intact spaces in the problem, and its most important task is to prevent convergence in the local optimal. Mutations occur based on the probability of a mutation, and if the mutation steps are significant, the search for the genetic algorithm will be completely random.

The image decoding operator is the coding operator. After the algorithm provides the best answer to the problem, the decryption operation is applied to the answers so that the answer appears as a real function. Usually, the share of each of these operators in the production of a new series of strings is determined before the implementation of the program. After generating each new set of binary strings, the appropriateness of each string is calculated, and the condition required for the termination of the algorithm is examined. In case of non-fulfillment of the condition considered for the implementation of the algorithm, by repeating the above steps, new sets of fields are produced, and the corresponding proportional values are calculated. After obtaining convergence or providing the termination condition, the algorithm is stopped, and the best string obtained in the last generation is introduced as the optimal answer. The flowchart or trend of this optimization method is as shown in Fig. 2.4.

Fig. 2.4
figure 4

Flowchart of the genetic algorithm method

Some examples of optimization are as following:

2.5.1 First Example

2.5.1.1 Pumping Program Problem

The purpose of this problem is to find the most economical pumping program from different pumps to meet the needs of different uses. Suppose there is a pumping of water by n different pumps and the cost of electricity consumption of pump I am at the unit price. Also, the need to form different consumption daily equivalent is bj to j for each consumption. Finally, it is assumed that the amount of supply from each pump I to j consumption is equal to said.

If xi is the pumping equivalent of each of the I pump, The problem would be to find the best values of xi to achieve the lowest cost and satisfy the various uses as follows:

$$ \begin{aligned} {\text{Maximize F }} = c_{1} x_{1} + c_{2} x_{2} + \cdots + c_{n} x_{n} \hfill \\ {\text{Subject to }}:a_{11} x_{1} + a_{12} x_{2} + \cdots + a_{1n} x_{n} \, \le \,b_{1} \hfill \\ a_{21} x_{1} + a_{22} x_{2} + \cdots a_{2n} x_{n} \, \le \,b_{2} \hfill \\ a_{m1} x_{1} + a_{m2} x_{2} + \cdots a_{mn} x_{n} \, \le \,b_{m} \hfill \\ x_{1} ,x_{2} , \ldots x_{n} \ge 0 \hfill \\ \end{aligned} $$

As can be seen, all relationships are linear. Therefore, this is an example of linear programming. Of course, it is assumed that the mathematical model of the problem is not in the form of standard linear programming, because the problem is minimization. Also, the constraints are even more significant, and this is the case with many linear programming problems.

2.5.1.2 Drawing Method for Solving Linear Optimization Problems

This method can be used to solve linear optimization problems with two or at most three decision variables as well as with a linear target function. The advantages of this method include the ability to visualize the visual and tangible presentation of concepts and definitions of linear issues in it. Also, helping to quickly understand the process of solving the model and understanding many points that do not exist in linear programming are other advantages of the drawing method. In this method, by drawing the model constraints on the coordinate system, the justified (available) decision space is determined, and the optimal answer can be selected from within this space according to the value of the target function. The steps of the drawing method are as follows:

Step 1: According to the decision variable sign, the desired quarter is selected in the coordinate system.

Step 2: Each of the constraints is considered equal and is drawn as an equation and as a line.

Step 3: For unequal constraints, a point is selected at the desired end of one of the two sides of the line drawn for that constraint, and its coordinates are placed in the inequality. In the event of an unbalanced setting, the justified level is the same direction as the selected point on the other side.

Step 4: For all the constraints, step (3) is performed, and the standard level of the selected (justified) levels for each constraint is considered as the justified level of the problem.

Step 5: The objective function is plotted linearly for each of the hypothetical values ​​of the decision variables.

Step 6: The target function line is moved in the right direction according to the type of optimization problem (maximization or minimization). The point of intersection of the justified surface, which is the last point of contact of the line of the target function moving in the right direction with the justified surface, is the optimal point.

Step 7: The equations of the constraints whose optimal intersection point is formed are considered in the equation device, and the optimal point coordinates are calculated. The following example clarifies the above description and drawing method (Bozorg-Haddad et al. 2014).

2.5.2 Second Example

It is essential to properly manage water and reservoir systems, plan to design and operate the reservoir, and optimize to maximize productivity and maximize profits. To this end, in 2008 to use the tank in real-time in a chiller tank system in Madhya Pradesh, India, two models of genetic algorithm (GA) and linear programming (LP) to obtain the appropriate time and amount of water released from the tank for Different goals, such as downstream irrigation, etc., have been developed and compared and analyzed. Finally, the results showed that the GA model is superior to the LP model (Azamathulla et al. 2008).

2.5.3 Third Example

Consider the following optimization: advise must take from a consulting engineering company to build or not to build a dam. The consulting engineer has taken over the project on 100 rivers. They know on which rivers the dam will be built or not, if it has a maximum economic benefit, maximum water storage, (Multi-Objective). When we consider all of this, we define an optimization problem.

However, how many choices do we have? In other words, the number of selected cases in this optimization problem is to decide which river the dam will be built on or not. If we have 100 rivers, we are faced with 100 decision-making options, which are called decision variables.

However, what does the answer to this optimization mean? That is, the results are obtained after those decisions, such as the maximum amount of economic profit or the maximum amount of water storage, and so on, which are called the answers to the objective function. If we have a function of a goal, our problem will be a single goal, and if we have several goals, there will be several goals.

2.5.4 Forth Example

Suppose that the design diameter of the pipes of an urban water distribution network is considered. In this example, finding the most appropriate values for the diameter of the network pipes is such that in addition to complying with the hydraulic constraints, the cost of running the network is also minimized. If we consider a network that has only 20 pipes and ten commercial diameters for it in the market, 1020, different modes or options for designing this network are possible.

The question is that if this optimization problem is solved by trial and error, there is no choice but to search among the 1020 different design modes. In each step of this search, in addition to calculating the cost of the pipes used in the construction of the network, it is necessary to consider the compliance with the hydraulic limitations of the network. So, if it takes only one second for each search to perform the calculations, it will take several centuries for the overall assessment of the possible states and the assurance of a possible optimal answer to this optimization problem. So, what can be done to solve this optimization problem?

Optimal answers to this example are easily obtained using a variety of evolutionary and meta-exploration optimization methods.

2.6 Summary

The primary purpose of this chapter is to review Berkeley and the details of the optimization theme with a focus on water resources management. In this regard, first the introduction and review of the studies conducted in the field of optimization in water resources, then a definition of keywords and terms related to optimization was presented to determine their general meaning. In the following, the basics and logic of the subject were mentioned in order to determine its basis. In this section, the types of models and the concept and logic of each of them were mentioned, and their nature and structure were determined. the importance and necessity of the issue were pointed out, and the reason for optimization in water resources management was stated, and its advantages were identified. the method of optimizing the genetic algorithm, which is one of the practical methods of optimization in water resources management, was examined a flowchart of the optimization process was presented. Finally, after presenting all the essential and required materials to clarify the issue for the readers, four examples in the field of optimization were mentioned, and it was shown that optimization in sustainable management. Water resources are a fundamental and essential factor in decision-making and policy-making that cannot be ignored.