The application of Genetic Algorithms (GAs) Planning Design and Management of Water Supply Systems S J van Vuuren GA’s - not a solution to all problems ! Layout • What is a GAs? • An Example of a GA • Programming of network problems • GAs in the Planning Design and Management of Water Supply Systems • The road ahead What is a GA? GA = Search procedure based on the mechanics of natural selection and natural genetics – survival of the fittests. Human Evolution Natural Evolution A different view Processes of a GA • Production • Select randomly • Crossover • Pairs change (Random process) • Mutation • Protects against loss of useful genetic material (secondary mechanisms to prevent local optimum) • Reproduction • Select according to objective function (Best remain) How do GAs differ from traditional methods (Goldberg) • Coding of the parameter set, not the parameters themselves. • Search for a population of points, not a single point. • Use objective functions (payoff) information, not derivatives or other auxiliary knowledge, to determine the fitness of the solution. • GAs use probabilistic transition rules not deterministic rules 3 Main types of search methods • Calculus - Enumerative • Random • Genetic algorithm Comparison of Optimization Methods Example Example of a chromosome string Basics of a GA An Example of a GA MAXIMIZE f(x) = x2 (0 < x < = 31) CODE x as a finite-length string Length = 5 in the binary basis (1x24 + 1x23 + 1x22 + 1x21 + 1x20 = 31) Select population size - say 4 strings Crossover and mating STRING x f(x) 01101 11000 01000 10011 13 24 8 19 169 576 64 361 f (x) f (x) 0,14 0,49 0,06 0,31 f ( x ) 1170 1,0 Average = 0,25 f (x) f ( x ).Ave 0,58 1,97 0,22 1,23 Copies inmating pool 1 2 0 1 Crossover Mating string 1 with 2, and 3 with 4 and crossover at positions 4 and 3 results in: Mutation PROBABILITY OF MUTATION BITS TO MUTATE IN A GENERATION = 0,001 = 20 X 0,001 = 0,02 No mutation ! Summary after one generation Start Sample Average fitness 293 Maximum fitness 576 Next * generation 439 729 Note: *Values after one generation and one crossover Programming procedure of Genetic Algorithms (GAs) An Example 1. Problem for the application of Genetic Algorithms in water supply systems 2. Computer Program Example Problem - Genetic Algorithms in water supply systems: Layout 902 14 12 15 10 11 13 Legend 901 Demand Reservoir Pump Solution objective For a given demand it is required that we have to: Determine the pipe diameters that will result in the minimum life cycle cost. Calculations procedures Optimum solution through the use of the GA, while the pressure/energy requirements be determined through the use of hydraulic relationships. Flow diagram Start Possible solution Hydraulic solution New Results Report Crossover mutation Cost Calculation Reproduction Fitness test Computer program • Two problems can be analyzed : • Gravity line • Pump line • Determine the optimal diameter and pumping time • Overview of input screens • Results Gravitation and Pumping Systems – Selection Screen Pumping System – Screen P1 Pump line details – Screen P2 Pump line energy cost – Screen P3 Pump line economic analysis Capital data - Screen P4 Pump line design parameters Screen P5 Results from the GA analysis Pumping Pipeline – Results 1 Results from the GA analysis Pumping Pipeline – Results 2 Results from the GA analysis Pumping Pipeline – Results 3 Results from the GA analysis Pumping Pipeline – Results 4 Network Optimization Use EPANET to set-up system •Define pipes that can be changed •Define a penalty structure/cost on routes which are difficult to change •Conceptually develop procedure EPANET to set-up system The application of Genetic Algorithms in the Planning Design and Management of Water Supply Systems •WRSM 2000 •Water Resources The application of Genetic Algorithms WRSM 2000 Automate calibration of WRSM 2000 parameters WRSM 2000 – Current process The application of Genetic Algorithms WRSM 2000 • Optimise calibration on selected monthly flood size • Procedure will select monthly flood size based on exceedance probability • Obtain from this, a parameter set that will represent the calibrated flow record • Develop criteria applicable for this optimisation The application of Genetic Algorithms WRYM Optimize water Resources Analyses Procedures How the GA can be implemented Genetic Algorithm (Subroutines) Simulation Results • Yield • Pumping Volumes Operating Rule Yield Search Subroutine Target Draft Simulation Results & Files *SUM.OUT *PLT.OUT Supply Results Network Simulation Subroutines Water Resources Yield Model (WRYM) Genetic Algorithm Results • Step-by-step output • Fitness function results • Optimum solution WRC has funded the conceptual assessment of the application of GAs The application of Genetic Algorithms in the Planning Design and Management of Water Supply Systems – December 2004 Gas = Where from here ? Development of routines to be included in existing modeling procedures Thank You
© Copyright 2025 Paperzz