Presentation is loading. Please wait.

Presentation is loading. Please wait.

Genetic Algorithms D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 Advanced Topics.

Similar presentations


Presentation on theme: "Genetic Algorithms D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 Advanced Topics."— Presentation transcript:

1 Genetic Algorithms D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 Advanced Topics

2 Objectives D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 2  To introduce the concept of genetic algorithms (GA)  To explain the basic steps in a simple GA  Parent Selection  Cross over  Mutation  To introduce Multiobjective GA’s (MOGA)  To apply MOGA in reservoir operation

3 Introduction D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 3  Real world optimization problems mostly involve complexities like discrete- continuous or mixed variables, multiple conflicting objectives, non-linearity, discontinuity and non-convex region  Global optimum cannot be found in a reasonable time due to the large search space  For such problems, existing linear or nonlinear methods may not be efficient  Various stochastic search methods like  simulated annealing,  evolutionary algorithms (EA),  hill climbing can be used in such situations

4 Introduction D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 4  Among these techniques, the special advantage of EA’s are  Can be applied to any combination of complexities (multi-objective, non- linearity etc) and also  Can be combined with any existing local search or other methods  Various techniques which make use of EA approach  Genetic Algorithms (GA), Evolutionary Programming, Evolution Strategy, Learning Classifier System etc.  EA techniques operate mainly on a population search basis.

5 Basic Concept of EA D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 5  EAs start from a population of possible solutions (called individuals) and move towards the optimal one by applying the principle of Darwinian evolution theory i.e., survival of the fittest  Objects forming possible solution sets to the original problem is called phenotype  The encoding (representation) or the individuals in the EA is called genotype  The mapping of phenotype to genotype differs in each EA technique  In GA, variables are represented as strings of numbers (normally binary)  Let the number of design variables be n  Let each design variable is given by a string of length ‘l  Then the design vector will have a total string length ‘nl’

6 Basic Concept of EA… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 6  For example, if the string length be 4 for each design variable and there are 3 design variables,  Then the chromosome length is 12 as shown  An individual consists of a genotype and a fitness function  Fitness Function:  Represents the quality of the solution  Forms the basis for selecting the individuals and thereby facilitates improvements

7 Basic Concept of EA… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 7 i = 0 Initialize population P 0 Evaluate initial population while ( ! termination condition) { i = i+1 Perform competitive selection Create population P i from P i-1 by recombination and mutation Evaluate population P i } Pseudo code for a simple EA

8 Basic Concept of EA… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 8 Flowchart indicating the steps of a simple genetic algorithm Generate Initial Population Start Encode Generated Population Evaluate Fitness Functions Meets Optimization Criteria? Best Individuals Yes Stop Selection (select parents) Mutation (mutate offsprings) Crossover (selected parents) No REGENERATIONREGENERATION

9 Basic Concept of EA… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 9 Initial population is randomly generated Individuals with better fitness functions from generation ‘i' are taken to generate individuals of ‘i+1’ th generation New population (offspring) is created by applying recombination and mutation to the selected individuals (parents) Finally, the new population is evaluated and the process is repeated The termination condition may be a desired fitness function, maximum number of generations etc

10 Parent Selection D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 10 Individuals are distinguished based on their fitness function value According to Darwin's evolution theory the best ones should survive and create new offspring for the next generation Different methods are available to select the best chromosomes Roulette wheel selection, Rank selection, Boltzman selection, Tournament selection, Steady state selection

11 Parent Selection : Roulette wheel selection D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 11 Each individual is selected with a probability proportional to its fitness value In other words, an individual is selected depending on the percentage contribution to the total population fitness Thus, weak solutions are eliminated and strong solutions survive to form the next generation  Consider a population containing four strings shown CandidateFitness valuePercentage of total fitness 1011 0110 1101 100110928.09 0101 0011 1110 11017619.59 0001 0001 1111 1011 50 12.89 1011 1111 1011 110015339.43 Total388100

12 Parent Selection : Roulette wheel selection… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 12 Each string is formed by concatenating four substrings representing variables a, b, c and d. Length of each string is taken as four bits First column represents the possible solution in binary form Second column gives the fitness values of the decoded strings Third column gives the percentage contribution of each string to the total fitness of the population Thus, the probability of selection of candidate 1, as a parent of the next generation is 28.09% Probabilities of other candidates 2, 3, 4 are 19.59, 12.89 and 39.43 respectively These probabilities are represented on a pie chart Then four numbers are randomly generated between 1 and 100

13 Parent Selection : Roulette wheel selection… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 13 The likeliness of these numbers falling in the region of candidate 2 might be once, whereas for candidate 4 it might be twice and candidate 1 more than once and for candidate 3 it may not fall at all Thus, the strings are chosen to form the parents of the next generation The main disadvantage of this method is when the fitnesses differ very much For example, if the best chromosome fitness is 90% of the entire roulette wheel then the other chromosomes will have very few chances to be selected

14 Parent Selection: Rank Selection D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 14 Population is ranked first Every chromosome will be allotted with one fitness corresponding to this ranking The worst will have fitness 1, second worst 2 etc. and the best will have fitness N (number of chromosomes in population) By doing this, all the chromosomes have a chance to be selected But this method can lead to slower convergence, because the best chromosomes may not differ much from the others

15 Parent Selection D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 15 Through selection new individuals cannot get introduced into the population Selection cannot find new points in the search space New individuals are generated by genetically-inspired operators known are crossover and mutation.

16 Crossover D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 16 Crossover can be of either one-point or two-point scheme One point crossover: Selected pair of strings is cut at some random position and their segments are swapped to form new pair of strings Consider two 8-bit strings given by '10011101' and '10101011' Choose a random crossover point after 3 bits from left 100 | 11101 101 | 01011 Segments are swapped and the resulting strings are 10001011 10111101

17 Crossover… D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 17 Two point crossover: There will be two break points in the strings that are randomly chosen At the break-point the segments of the two strings are swapped so that new set of strings are formed If two crossover points are selected as 100 | 11 | 101 101 | 01 | 011 After swapping both the extreme segments, the resulting strings formed are 10001101 10111011

18 Mutation D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 18 Mutation is applied to each child individually after crossover Randomly alters each gene with a small probability (generally not greater than 0.01) Injects a new genetic character into the chromosome by changing at random a bit in a string depending on the probability of mutation Example: 10111011 is mutated as 10111111 Sixth bit '0' is changed to '1‘ In mutation process, bits are changed from '1' to '0' or '0' to '1' at the randomly chosen position of randomly selected strings

19 Real-coded GAs D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 19 GAs work with a coding of variables i.e., with a discrete search space GAs have also been developed to work directly with continuous variables In these cases, binary strings are not used Instead, the variables are directly used After the creation of population of random variables, a reproduction operator can be used to select good strings in the population.

20 Areas of Application in Water Resources D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 20  Water distribution systems  Hydrological modeling  Watershed Management  Groundwater modeling  Reservoir Operation

21 Advantages and Disadvantages of EA D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 21 Advantages  EA can be efficiently used for highly complex problems with multi-objectivity, non- linearity etc  Provides not only a single best solution, but the 2 nd best, 3 rd best and so on as required.  Gives quick approximate solutions  Can incorporate with other local search algorithms Disadvantages  Optimal solution cannot be ensured on using EA methods  Convergence of EA techniques are problem oriented  Sensitivity analysis should be carried out to find out the range in which the model is efficient  Implementation requires good programming skill

22 Multi-objective Evolutionary Algorithms D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 22 Genetic algorithms are efficient in solving multiobjective problems Considerations in Multi-Objective Evolutionary Algorithms (MOEAs) implementation are 1. Preserve non-dominated points – elitism 2. Progress towards points on Pareto front 3. Maintain diversity of points on Pareto Front (phenotype) and/or Pareto Optimal solutions (genotype) 4. Provide decision maker a limited number of Pareto Front (PF) points. Non-dominated solutions are always better than 1st-level dominated solutions, which are always better than 2nd-level dominated solutions, etc. Within the same level of dominance, solutions which are isolated are better than solutions that are clumped together.

23 Flow chart of Multi- objective Genetic Algorithm with Elitism D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 23

24 Multi-objective reservoir system optimization – Case Study D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 24 Bhadra Reservoir –Multipurpose reservoir Location - Chickmangalur Dt, Karnataka state, India; 75 o 38 ’ 20 ’’ E longitude and 13 o 42 ’ N latitude Schematic diagram of Bhadra reservoir Project Left bank canal Irrigated area 6, 367 ha Irrigated area 87, 512 ha PH1 PH2 PH3 Bhadra river Reservoir Left turbine capacity=2,000 kW Bed turbine capacity=24,000 kW Right turbine capacity=13,200 kW Right bank canal River Water Quality

25 Multi Objective Reservoir Operation Model D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 25 Subject to constraints on System dynamics Storage bounds Maximum power production limits Irrigation demands and Water quality requirements 1.Minimize Irrigation deficit (f 1 ): 2.Maximize Hydropower production (f 2 ):

26 Multi Objective Reservoir Operation Model: Constraints D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 26 Reservoir storage continuity constraints for all t=1, 2,…,12 Storage bound constraints S min ≤ S t ≤ S max Turbine capacity Limits p R 1,t H 1,t ≤ E 1,max p R r,t H 2,t ≤ E 2,max p R 3,t H 3,t ≤ E 3,max Canal capacity limits R 1,t ≤ C 1,max R 2,t ≤ C 2,max for all t=1, 2,…,NT Irrigation demands D1 min, t ≤ R 1,t ≤ D1 max, t D2 min, t ≤ R 2,t ≤ D2 max, t for all t=1, 2,…,NT Water Quality Requirements R 3,t ≥ MDT t for all t=1, 2,…,12

27 Pareto optimal solution for reservoir operation D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 27 Improvement in Pareto optimal front over the iterations. f1 is annual squared irrigation deficit; f2 is hydropower generated MkWh f1f1 f2f2

28 Model Application D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 28 MOGA model is solved for three different inflow scenarios into the reservoir Scenario 1: Mean monthly inflows – 0.5 * SD Scenario 2: Mean monthly inflows Scenario 3: Mean monthly inflows + 0.5 * SD where SD is the standard deviation of monthly flows

29 Pareto optimal front D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 29 Pareto optimal front, showing the trade-off between irrigation ( f 1 ) and hydropower ( f 2 ) for different inflow scenarios. f 1 = sum of squared irrigation deficits, (Mm 3 ) 2 ; f 2 = hydropower generated, (MkWh)

30 Reservoir operating policies D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 30 Reservoir operating policies for different inflow scenarios, showing the initial storages for different situations, viz., equal priority case, irrigation only priority case and hydropower only priority case.

31 Optimal release policy D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 31 Optimal release policy obtained for equal priority case, showing releases in Mm 3 for Left bank canal (R1), Right bank canal (R2) and River bed (R3) for different inflow scenarios.

32 Advantages of MOEAs D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 32  MOEAs are easy to adopt and can provide efficient solutions for multi-objective problems  MOEAs are capable of handling nonlinear objectives/ constraints, disconnected Pareto-fronts, non-convex decision space  MOEAs can find solutions to extremely complex and high dimensional real-world applications in reasonable computation time  MOEAs have high potential for multi-objective optimization of hydrological & water resources problems

33 D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 Thank You


Download ppt "Genetic Algorithms D Nagesh Kumar, IISc Water Resources Planning and Management: M9L2 Advanced Topics."

Similar presentations


Ads by Google