Sunteți pe pagina 1din 11

Applications of Genetic Algorithm in Water Resources management

and Optimization
GarimaTyagi1
School of Computer Applications, Career Point University, Kota
garima.tyagi@cpur.edu.in
Rohit Singh2
Department of Computer Science and Engineering, KNIT, Sultanpur
rohitsingh051@gmail.com
Dr. Abid Hussain3
School of Computer Applications, Career Point University, Kota
abid.hussain@cpur.edu.in

Abstract: on earth is increasing tremendously and due to


the increasing industrialization, water
It is the need of current scenario that water
contamination is becoming very high. Due to
resource is to be retained and maintained.
all such reasons, water resources are
Different types of models have been applied
decreasing day to day and having high impact
for the optimization of Water Resource
on the life of living organism. It seems to be a
Management. Genetic Algorithm is one of the
necessity to preserve the water resource and
evolutionary algorithms, those are the part of
use it efficiently. Different evolutionary
Soft Computing, have been applied and
algorithms have used for the planning and
different researches have done for the use of
management of water resources (Evolutionary
genetic algorithm in the water resource
Algorithms and Water Resources
optimization. This paper is to review the
Optimization). Out of these different
different applications applied so far, their
algorithms one is genetic algorithm and many
usefulness and also for their scope in the
researches done on the use of genetic
development of future models for the water
algorithm for water resources optimization.
resource planning and optimization.
Genetic Algorithm
Keywords; Genetic Algorithm, GA,
optimization, soft computing, water Different optimization techniques are used for
resources,WRMO solving such type of problems and different
solutions are found to solve the problems. Out
Introduction: Water is a natural resource and
of these solutions some are found to be
it is vital for all the living organisms. For
feasible or some are not. There are many
human being, it is essential for living healthy
nontraditional search and optimization
and disease-free life. Water is essential for
methods have used to solve the optimization
every one for their survival on earth. Only 1%
problems –
of water is available in fresh form that can be
used directly without any type of filtration, 1. Stimulated Annealing
rest of the water is available either in sea or in 2. Ant Colony Optimization
the frozen form with mountains and glaciers 3. Random Cost
(Evolutionary Algorithms and Water 4. Evolution Strategy
Resources Optimization). As the population 5. Genetic Algorithm
6. Cellular Automation
Genetic algorithm and evolutionary strategies
are using the principle of natural genetics and
natural selection to develop search and
optimization procedures. Genetic algorithms
are very much different from the traditional
optimization methods. They are based on the
mechanism of natural selection and natural
genetics. In genetic algorithm it requires the
conversion of design space into genetic space.
The most important aspects in Genetic
algorithm are –
1. The definition of objective function
2. Definition and implementation of
Genetic –
3. Definition and implementation of
Genetic operators
Genetic algorithm works with the string
coding of variables, so it requires any function
value at discrete points and hence it can be
applied to a wide variety of problems. Apart
from the normal engineering problem genetic
algorithms are used in other fields like
biology, computer engineering, physical
sciences, environmental sciences, and image Genetic Algorithms defines the evolutionary
analysis and pattern recognition. nature of the algorithm as follows:

Genetic algorithms are basically exploring  Start with an initial population that is
historical information to direct the search for randomly generated, but contains the
better performance. They are better than variability parameters characteristic of
traditional algorithm as they are robust. They the population.
are having the advantage that in case of slight  The fitness of each individual in the
change in the inputs or in the presence of population is assessed according to a
reasonable noise, they do not break. fitness function.
 The probability of each individual to
survive is proportional to its fitness.
 The individuals of the next generation
are selected on probability and through
a genetic transformation process of
crossover and mutation, ensuring that
the solution is not localized within the that are already known and
solution environment applied.
 Cognisance should be taken of the
Development Framework
analysis techniques that are used in
The first step in the process of developing practice in Rajasthan. Currently an
the conceptual GA model was to define a important result that quantifies the
framework that could serve as a guide for supply capability of a water
the formulation of the conceptual model. resource system is the Firm Yield
This framework was defined by that can be abstracted. Two types
considering the current modeling of Firm Yield values are usually
environment and modeling systems determined; (1) the Historical Firm
applied in Rajasthan as well as taking Yield, which is based on analyses
pointers and suggestions from the of the historical sequence and (2)
literature. the Stochastic Firm Yield, which
also defines the reliability at which
Current modeling environment
the yield is available (DWAF,
Introducing a new procedure, the Genetic 1987). The aim with the
Algorithm (GA), into the water resource optimisation of an operating rule
analysis environment, where a large pool for a system is, in most cases, to
of knowledge is founded on present maximise the firm yield in order to
technologies, requires careful “stretch” the resource as far as
consideration. The aim is to implement the possible. Minimising the operating
GA so that a high degree of the current costs, in particular pumping costs,
knowledge and proven methodologies are is normally a secondary objective
maint ained, while also allowing for and usually opposes the objective
flexibility for accommodating future of maximising the firm yield.
analysis requirements.  In order to build confidence in the
application of GA technology it is
To this end, relevant guidelines are listed
deemed essential to introduce
below:
(develop and verify) the GA
 GA should be developed for the technology in phases. The intention
existing water resource models that is to prove the value of a GA by
are used in practice for the using basic yield analysis and
management of most of the relatively simple systems as a first
countries water resources. These step. The GA can then thereafter be
models are the WRMO and the extended to include probabilistic
Water Resources Planning Model projection analyse of complex
(WRPM). This will ensure the systems, involving changing
existing pool of knowledge system characteristics where
(methods and expertise) can demands are growing, new
benefit by adding optimisation reservoirs and transfer conduits are
functionality to the current models implemented over a planning
horizon.
 It is proposed that the GA first be water resource systems and defined
developed to only optimise the through model input data files.
operating rules of a system, and as  To implement Licensing will
a further phase, be extended to change the emphasis of water
include the optimisation of the resource analysis in Rajasthan
capacities (sizes) of water resource from yield determining
infrastructure such as convey and assessments of large systems to
capacity of water conduits and the system analysis dealing with
storage capacity of reservoirs. multiple users that are dispersed
 Although the time it will take the over the catchments of the river
GA to compute a solution is an systems. Water resource analysis
important factor to consider, the for Licensing will broadly focus on
focus should initially be on two aspects, (a) accounting for the
ensuring the viability of the interaction users have on one
technique and the validity of the another in the system and (b)
results. Once the integrity of the determining how the reconciliation
GA has been established and of water balances will be achieved
proven, resource can be employed in a fair and equitable manner. The
to reduce the computational GA design will have to take these
requirements. Within the context of requirements into account
the above guideline, the applied
Literature Survey
water resource analysis techniques
allow for different types of analysis Information from past research, as
which required different presented in the literature, indicates that
computational requirements. For the formulation of a GA consists of four
example, historical analysis, where main elements, (a) the encoding scheme,
only one hydrological sequence is (b) the GA operators, (c) the process
analysed is computationally (water resource system) that is optimised,
significantly less intensive and (d) the objective function as translated
compared to stochastic analyses into the GA fitness function. These
where up to a thousand sequences processes are described briefly in the
are analyses in some cases. The following sections.
conceptual design of the GA
Encoding scheme and initialization
should allow for both types of
process
analysis techniques.
 The basic design of the GA should Encoding involves the process where the
be to maintain the flexibility and “genes” of the GA is converted into the
generic structure that is provided input parameters of the process to be
by the network models. This will optimised. In our case the parameters are
involve making the definition of the variables defining the operating rules
the GA as generic as possible so and the process to optimise, in the water
that it can be applied to most of the resource system. An important component
of this encoding process is to ensure that
the constraints or limitations on the fitness values of each gene are used to
parameter are adhered to when assigning select which genes become parents for the
their values. From the literature it has been determination of the next generation of
noted that some form of random process is children genes.
used to generate the initial set of genes
Pairing
(Goldberg,1989; Olivera, et.al , 1997 and
Ndiritu, 2003). Thereafter the genes are Pairing is the process where pairs of genes
converted into parameter values and the are selected based their fitness (the genes
feasibility of the values verified. If a with high fitness values have a higher
parameter set is infeasible, that gene is probability of being selected) for
rejected and the process is repeated until a crossover. This selection process is also
full set of initial members (also called the referred to as “Tournament Selection” in
Initial Population) is produced. The some literature sources.
constraints and limitations that are
applicable to the operating rule parameters Crossover
of the WRMO are discussed in subsequent Working with real-values chromosomes,
sections. From the literature it was pointed as apposed to binary chromosomes, was
out that there are advantages to define an defined in the literature to be a more
encoding scheme that groups decision clearcut way for the design of the GA.
variables together, as apposed to dealing Given that real-value chromosomes will be
with each parameter individually (Olivera, use in the proposed development, two
et.al,1997). In doing this, one may also be means of crossover were suggested by
able to capture some of the constraints and (Olivera, et.al. 1997), namely, uniform and
limitation presented above. A further quadratic. Uniform crossover basically
important requirement specified in the involves the copying of parameter values
literature is that the selection of the initial from one of the parents to a child. The
population should be such that the selection of which parents parameter
parameter values must be uniformly values is copied in based on a binary
distributed over the search space (Olivera, random variable. For the quadratic
et.al,1997). The components making up crossover a weighting system is applied
the genetic algorithm are briefly described where a new values is calculate for the
in the next sections. Fitness function child chromosomes based on both the
The fitness function consists of two parent’s parameter values. The weights are
components (a) the objective function such that the parent with the best fitness
representing the yield, reliability and has the largest influence (contributes the
pumping costs, and (b) the fitness scheme most) on the child’s parameter value. As
which involves the calculation of a was the case with the initial population,
numerical value for each gene that reflect the feasibility of the children’s
how good a gene has performed relative to chromosomes or genes has to be tested.
the others. The objective function can Adjustments are then made to the
include multi objectives and typically a parameters of the infeasible cases where
needed.
weighting factor is used to represent the
importance of different objectives. The
Mutation These are described in the following
sections.
This is the process where, usually a small
number, of child chromosomes are Reservoir operating zones
changed “arbitrarily” in order to create
One of the mechanisms of defining the
somemaverick chromosome to assess the
operating rules in the WRMO is to divide
fitness of a diverse set of cases in the
the reservoir into horizontal zones with
search space. Mutated chromosomes also
each zone representing a portion of the
have to be tested for feasibility or the
storage volume of the reservoir. In the
method of mutation should be such that
WRMO each zone’s dimension is defined
the feasibility is preserved
by the bottom elevation of the zone and
Defining water resource system the volume of water is deduced from the
operating rules elevation-volume relationship. It is
proposed that each reservoir be allowed to
In order to formulate the conceptual GA
have a fixed number of zones (say ten
model it is necessary to first identify and
zones). The number of zones does not
briefly describe the variables (model input
influence the behavior of the system’s
data) that define the operating rule of
operation directly and therefore would not
water resource systems. The methods of
serve as a meaningful GA optimisation
affecting the operating rules differ in
input variable. 3.2
modeling system and the focus here is on
the variables applicable in the Water Bottom elevation level of reservoir zones
Resources Management and optimization
The difference between the bottom
(WRMO). It is not practical to provide an
elevations of two zones, that are “stacked”
in depth description of WRMO in this
on top of each other, defines (indirectly
paper and the reader is referred to the
through the elevation-volume
reports Water Resources Yield Model:
characteristics) the volume of storage that
Procedural Manual (DWAF, 2005) and
is contained in a zone. It is important to
Water Resources Yield Model: User Guide
note that, with the WRMO, different zone
(DWAF, 1999) for details on the models
levels can be defined for each of the 12
functionality, input data definitions and
months of the year. This flexibility allows
simulation capabilities.
for the design of operating rules that
There are four basic variables applied in accommodate seasonal variability.
the WRMO defining the operating rule of However, in most of the systems that are
a water resource system, namely: modelled in Rajasthan, constant zone
levels are used throughout the year
 Number of operating zones in a
reservoir. Penalty value of the water in reservoir
 Bottom elevation level of zones
reservoir zones. WRMO currently provides for the
 Penalty value of the water in definition of one penalty value per
reservoir zones. reservoir zone for all the months of the
 Channel penalties. year. This implies that the sequence of
drawdown among the zones in different For this discussion, Type (a) is a channel
reservoirs is the same throughout a that is only defined by one arc and the
particular scenario analysis. It would be (flow) direction of the arc is the same as
possible to change the input data structure that of the channel. In this case the penalty
of WRMO to accommodate different zone value represents a “unit constraint” that
penalties for the 12 months of the year. has to be overcome before water will
However, it is proposed to only consider flows in the channel. For flow to occur in
such an enhancement once the GA has the channel water must be draw or pull
been proven viable with the current through at a “unit gain” that is greater than
structure. the “unit constraint” of the channel.
There are certain constraints that have to Type (b) channel consists of two arcs, one
be adhered to when assigning values to the arc in the same direction as the channel
zone penalties. In most cases, where the (also referred to the forward arc) and the
“Rule Curve” is set to be equal to the full second arc, in the opposite direction of the
supply level of the reservoir, the penalty channel or backwards arc. The operation
values that are assigned to the zones must of a Type (b) channel is to “pull” water
be in ascending order, following the through the channel at a selected penalty
stacked sequence of the zones from top to value. The “pull” action is achieved by the
bottom. arc that is in the opposite direction of the
channel direction and that the minimum
It is important to note that the penalty
flow constrained placed on the forward arc
values assigned to each reservoir zone has
is equal to required transfer rate.
two functions. Firstly it represents the
“unit constraint” of drawing water from In summary the function of a Type (a)
the reservoir zone and secondly the, same channel in a water resource system is to
penalty value serve as a “unit gain” of serve as a conduit through which water
storing water in the particular zone. This can be drawn by means of either a
second functionality is to enable reservoir zone penalty value (unit gain) or
transferring water from one reservoir to a Type (b) channel, in other words a Type
another. The model also has a second (a) channel cannot “pull” water through
mechanism for effecting transfer between itself. However, a Type (b) channel is
reservoirs by means of a two arc channel, capable to drawing water through itself
as explained in the next section. with a “pulling force” that is equal to the
penalty value that is assigned to arc that is
Channel penalties
in the opposite direction of the channel.
A channel is the modelling element that During the operating rule optimisation
represents a conduit (links) between process the channel penalty values are
reservoirs or nodes. The penalty structure changed in relation to the penalties
of channels can be divided into two basic assigned to the reservoir zones to
types and the distinction between the types implement a particular operating rule. In
lies in the number and direction of the arcs general the type of channel (Type (a) or
that makes up a channel. Type (b)) would remain the same for all
the scenarios (test cases) with the only
change being the penalty values of the pre-defined range. This range of penalty
channels. values will be fixed for a particular system
configuration, however, the range has to
GA definition
be defined in relation to the penalty values
The processes that make up the GA and assigned to the water resource elements
their interactions with one another are best that are not optimised. Both the penalty
illustrated by the flow diagram shown in value search range and the penalties for
Figure 1. The indicated processes and the the water resource elements that are not
linkages between them were compiled optimised have to be defined by the model
using similar algorithmic flow diagrams user.
and GA descriptions found in the
Step 2: Test the feasibility of the gene
literature.
sets
Step 1: Initial gene pool generation
This procedure evaluates each gene set to
The first process of the GA involves identify if they represent feasible penalty
generating initial sets of genes that defines definitions by complying with the
the operating rule values for the intended following constraints:
water resource system elements using a
_ Penalty values should be in ascending
random selection method that results in
order from the top zone to the bottom zone
parameter values that are uniformly
for each reservoir.
distributed over the search space. In order
to be able to duplicate results across _ Penalty values for Type (b) channels
different computer systems it is required to have to be such that the penalty for the
implement a “software” random number reverse arc must always be greater than the
generator (similar to the subroutines that penalty for the forward arc. (This relative
are currently applied in the WRMO) as order of the penalty values is used by the
apposed to a computer dependant random model to define the directions of the arcs.)
number generator. These random number
Step 3: Calculate the fitness of the gene
generators make use of seed values that
sets
will be changed during the evaluation and
testing phase to illustrate that convergence This step involves three basic processes,
is achievable with different initial gene first each gene set is converted into
populations. Once it is shown that penalty values that defines an operating
convergence is achieved, the seed values rule scenario. The water resource system is
will be fixed in the production version of then analysed iteratively, with the
the model. operating rule scenario in place, to
determining the firm yield of the system.
In order to only allow penalty values that
(The iterations referred to here are
are not in conflict with the penalties of the
different runs with the same inflow
water resource elements that are excluded
sequence, historical or stochastic, where
from the optimisation process, it is
the target abstraction of the yield channel
necessary to limit the possible selection of
is changed between the runs to find the
penalty values for optimisation within a
Firm Yield value.) Other simulations
results such as the flow through pumping elitism. This involves using the genes of
channels will be extracted from the the best solution, unchanged, as one of the
simulation output (this will be for the run child genes. This ensures that the best
where the firm yield is imposed as the solution of one generation is kept
target draft) and summarised in a form unchanged to compete with the next new
required by the fitness function. generation of children genes
Additional simulation result, such as the Step 5: Crossover operation
volume of spillage from the system, may
Crossover is the GA operator that creates a
also be used as a component of the fitness
new generation of gene sets, two genes
function. The model will be developed in
from each parent pair. In the classic strain
such a way that the user can select which
representation of a gene (strain is a string
channel flows should be included in the
of zeros and ones), crossover involves
fitness function and allowances will be
exchanging (swapping) parts of the two
made to assign weights to each of the
parent genes to form the new children
selected channel flows and the firm yield
genes. Given that real value chromosomes
result.
will be used for the GA the procedure
Step 4: Tournament selection would be somewhat different. In the
context of the selection of the reservoir
This procedure uses the result of the
zone and channel penalty values, it is
fitness function of a particular gene set,
proposed to use either uniform or
relative to the sum of the fitness function
quadratic methods of crossover to produce
results of all the gene sets, to select which
the new generation as suggested by
of the parent gene sets are to form pairs for
Oliveira, et.al, 1997.
crossover. The selection procedure is
carried out by a roulette-wheel parent- In order to maintain the constraints the
selection scheme (Goldberg, 1989) which suggestion of Olivera, et.al, 1997 and
assures a higher probability of selecting others are that parameters should be
the parents that has the best fitness grouped rather than working with each
function. The operation of the roulette- parameter individually. In the context of
wheel procedure requires the generation of the WRMO this would mean that the
random numbers, and for the same reasons penalty values for the zones in a reservoir
as presented in Step 1, a software random and for the arcs in a channel would
number generator will be used for this respectively be treated as groups. Another
purpose. Olivera et.al, 1997, performed group would be the zone levels of each
tests on two selection schemes, window reservoir. The uniform crossover method
and ranking (Davis, 1991), and found that would then select one of the groups of
the ranking scheme was preferred. It is parameters of a parent as the parameters
therefore proposed to also apply the for the child. The selection process to pick
ranking scheme in the GA model. In most which parent’s parameter group is
of the GA applications presented in the transferred to the child will be based on
literature an additional feature is applied in the results of a random generator that
the selection of the child genes call produces either a one or a zero value. The
selection is then as follows, if the random presentation of how the GA can be
generator’s result is one, the parameter implemented.
group from the first of the two parents is
As indicated, the Genetic Algorithm
used and vice verse if the random
Subroutine will interact with the Yield
generator’s value is zero. The generation
Search Subroutine by imposing the
and selection process is repeated for all the
operating rule parameters onto the system
parameter groups that are part of the
and it will receive back the yield results
optimisation process.
and relevant pumping volumes. The
Step 6: Mutation purpose of the Yield Search Subroutine is
to control the Network Simulation
Mutation is the process where maverick
Subroutine through an iterative search
genes are generated to ensure the search
process to find the yield, historical firm
space is explored randomly to avoid the
yield or stochastic yield at a given
optimisation process only achieving local
reliability. The Yield Search routine will
optimum solutions. From the literature it is
output relevant simulation results to the
show that the percentage genes of each
existing output files (*SUM.OUT and
generation on which mutation should be
*PLT.OUT). The step-by-step results from
applied ranges from 0.05 to 0.20. In order
the GA will present output to a new file,
to maintain the feasibility of the operating
summarising the process and behaviour of
rules after mutation it will be required to
the GA for evaluation purposes.
only allow mutated parameter values,
penalties and zone levels, to change within What is apparent from the discussions
defined limits. A zone level and a zone presented above is that the elements
penalty value could only be changed to a (channels and reservoir zones) that should
value the lies between the values of the form part of the optimisation process are
zones above and below. The value will be dependant on the characteristics of the
calculated by using a uniform distribution particular water resource system and have
selection method. to be defined as an input to the GA
algorithm. For example, the dummy dams
Step 7: Optimum convergence
(a modeling dam representing a cluster of
The final step is to check whether an farm dams) would not form part of the
optimum answer has been found. This will optimisation process and should therefore
be based on a criteria that will indicate by be excluded from the list of elements to be
how the rate of improvement from the one optimized. The data structure of the GA
iteration to the next has changed and if the should therefore allow the system annalist
rate is large the process will loop back to to select the water resource elements for
Step 3, otherwise the iterative search will optimization. This selection based on their
stop understanding of the constraints and
flexibilities that exist in the water resource
Proposed analysis procedure system. The definition of the optimisation
Within the context of the existing structure definition will be achieved through a
of the WRMO, Figure 2 gives a schematic separate input file that will contain the
parameter for the GA Subroutine.
Water Resource
Management &

References
1. Evolutionary Algorithms and Water
Resources Optimization. Oluwatosin,
Adeyemo, Joriah and Otineo, Fred.

2. Rajasekaram, S. and Pai, G. A.


Conclusion and Recommendation Vijayalaxami. Neural Networks, Fuzzy
From the literature it was clearly identified Logics and Genetic Algorithms : Synthesis
that genetic algorithms have been used for and Applications.
optimizing the process of water resource 3. Sivanandam, S.N. and Deepa, S.N.
systems. The conceptual GA for the Principles of Soft Computing.
WRMO, analyzed in the paper and it is
indicated that the operating mechanisms of 4. Davis, L. 1991. Handbook of genetic
the WRMO are appropriate for the algorithms, Van Nostrand Reinhold, New
application of GA optimization. York

It is recommended that the research can be


taken further to develop and test a genetic
algorithm for use with the WRMO.

S-ar putea să vă placă și