Using a Genetic Algorithm with a Mathematical Programming Solver to Optimize a Real Water Distribution System



Download 4,2 Mb.
Pdf ko'rish
bet31/39
Sana29.12.2021
Hajmi4,2 Mb.
#81374
1   ...   27   28   29   30   31   32   33   34   ...   39
Bog'liq
Using a Genetic Algorithm with a Mathematical Prog

P

c

)

, determines whether the crossing is carried out or not.




Water 2018, 10, 1318

11 of 17


After the crossing, the feasibility of the individuals is evaluated using EPANET. Later, the mutation is

performed on a percentage of individuals

(

P

m

)

, of the total population (Line 15). After the mutation,



the feasibility of the individuals is evaluated again. The feasible individuals (Line 17) are added to

the new population until the population size

(

T

pob

)

is obtained. The fitness of the new population is



evaluated (Line 20). The new population replaces the previous one, and the generation number N

g



increases (Line 22).



Algorithm 1 shows the genetic algorithm.

Algorithm 1

. Genetic algorithm.

1: Parameters (P

c

, P



mut

, T


pob

, N


g

, P


s

, P


m

); // Initialize input parameters

2: DataLoad(); // Load instance data

3: InitialConfiguration(); // Generate initial configuration

4: G = 0; // Number of steps

5: PopulationGenerate (P); // Initial population

6: Feasibility Evaluation (P); // Evaluation with EPANET

7: FitnessEvaluate (P); // Population evaluation (fitness = (P, T, V))

8: while G < N

g

do

9:

P

0



= 0; // Initialize population P

0

10:



Individual_best (Best

IND


, P); // Save the best individual

11:


while

N

inds



<

pob


do

12:


Selection (P, p

1

, p



2

); // Select parents p1, p2 of population P

13:

{h

1



, h

2

} = crossover (p



1

, p


2

, P


c

); // crossover of the parents p1, p2

14:

FeasibilityEvaluation (h



1

, h


2

); // Evaluation with EPANET

15:

Mutation (h



1

, h


2

, P


mut

); // Mutation of descendants h1, h2

16:

FeasibilityEvaluation (h



1

, h


2

); // Evaluation with EPANET

17:

IndividualsAdd (P



0

, h


1

, h


2

); // Insert the descendants h1, h2 into the population P

0

18:


N

inds


+ = 2;

19:


end while

20:


FitnessEvaluate (P); // Population evaluation (fitness = (P, T, V))

21:


PopulationReplacement (P, P

0

);



22:

G+ = 1; //Increase of generation number

23: end while


Download 4,2 Mb.

Do'stlaringiz bilan baham:
1   ...   27   28   29   30   31   32   33   34   ...   39




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish