Genetic Algorithms for Irrigation Optimization

Genetic Algorithms for Irrigation Optimization

Copyright © IFAC Artificial Intelligence in Agriculture. Wageningen. The Netherlands. 1995 Genetic Algorithms for Irrigation Optimization Chen Yuming...

1MB Sizes 55 Downloads 173 Views

Copyright © IFAC Artificial Intelligence in Agriculture. Wageningen. The Netherlands. 1995

Genetic Algorithms for Irrigation Optimization Chen Yuming, Ding Jing, Xiong Fanlun The Institute of Intelligent Machines Acdemia Sinica P. O. Box 1130 Hefei ,Anhui, 230031 P.R.China

Abltract:Tbe optimum management of irrigation is tbe problem of multi-goals and multl-constraill8ts. In tbis paper, tbe genetic algoritbms are applied to tbe irrigation optimization for crops. Using tbe multi-points crossover metbod ,tbe computational complexity of conventional genetic algoritbms is reduced. And at tbe same time ,a satisfactory solution can be derived.

Keywords: Genetic algorithms ,IrrigatIon Optimization

1. INTRODUCTION

In the lab, a project on the irrigation optimization applying GAs in ShiJing Irrigation N et-

Genetic algorithms (GAs) are search algo-

works is going on. The approach of multi-

rthms based on the mechanism of natural slec-

points crossover and mutation is introduced so

tion and nature genetic. It has become increas-

that the computational complexity can be de-

ingly popular in recent years as a method for

creased.

solving complex search problems in many computer application fields. The management of irri2. GENETIC ALGORITHMS(GAs)

gation plays an important role in districts lack of water, especially in some northern parts of China . It is an urgent problem how to distribute the

Genetic Algorithms have been developed by

water resources in the most reasonable way.

John Holland (Holland, 1975) ,his collegues and

Conventionally, hill- climbing method is adopt-

his students at University of Michigan of USA.

ed, but can not satisfactorily solve the problem

GAs are an example of a search procedure that

involving too many factors . Due to the complexi-

uses random choices as a tool to guide a highly

ty of the irrigation optimizaton problem, it is ap-

exploitative search through a coding of a param-

propriate to solve them with GAs which are

eter space. They combine survival of the fittest

blind ,parrallism and robustness.

among string structures with a structured yet

145

randomized information exchange to form a

As shown in the figure above, there are six ar-

search algorithm with some of the innovative

eas distributed in 13 counties which need to be

flair of human search.

irrigated on time. From March to April every

GAs differs from other optimum seeking meth-

and cotton must be made.

ods in some fundamental ways:

Originally, to made an effective irrigation plan,

year, the irrigation plan for the Spring Wheat

(1) GAs work with a coding paramater set , not

an irrigation model is intruduced. Some parame-

the parameter themselves.

ters in the irrigation model are assumed as fol-

(2) GAs search from a population of the points,

lows:

not a simple point.

Q : the total amount of water in reservoir;

(3) GAs use payoff (objective function) infor-

SI: i = 1 , ... ,6, the area of each district,

mation ,not derivatives or other auxiliary knowl-

AI: i= 1, ... ,6, the area ratio of wheat field to

edge.

cotton field in each district,

(4) GAs use probability transition rules, not de-

h, h': the price of water per unit volume,

terministic rules.

W I : i = 1, ... ,6, the ratio of loss water to the totle water quantity during the conveyance

The efficiency and the simplicity of the operation

from the reservoir to each district respec-

are two main attractions of the genetic algo-

tively,

rithme approach. A simple genetic algorithm is

Y I: i = 1, ... , 6, the total water quantities of

composed of three operations:

well irrigation which can be applied for each

(1) reproduction

distict respectively.

(2) crossover (3) mutation

Some variables, which will be used in the model of the irrigation optimization for economic profit ,are shown as following:

3. IRRIGATION PROBLEM

XII: the quantity of water distributed to each district,

ShiJing Irrigation Networks is located at the X12:

eastern foot of TaiHang Mountain ,south part of

the ratio of water distributed to wheat field and cotton field in each district,

Hebei plain. There are good soil and temperate

XI3 : the ratio of irrigated area to unirrigation are

climate which are fit for growing wheat and cot-

of wheat field in each district,

ton. This area is the important Agriculture-base

XI.: the ratio of irrigated area to unirrigation

in China. But in recent years, the reservoir wa-

area of cotton field in each district,

ter is lacking seriously due to the dry weather. How to distribute reasonably the limited water

E: econom ic profit.

resources is a much-concerned problem.

With the definition above, the model ofirrigation

Geographical distribution map of ShiJing Irriga-

optimizaton for econmic profit is expressed as

tion Networks is shown as following:

following: 6

E=~E, 1-1

reservoir

-

E =f( (XII Y)~2)A S X I A~)C'3 I I 13

+

+f
)

+g ( Fig. 1.

X (1-A , )SIX '4

-g (0) (l-A , )S,(1-X,4 )

- (xlI+Y I)h-

1

~Zvl XW,Xh'

with constraint condition

146

6

that there is only one district requires irrigation.

~ l~WI I ~Q 1-1

Local optimum solutions will be included in the initial population.

where f(x) and g (x) are the economic profit function of wheat and cotton when x is the ir-

In the sub - problem. the conventional genetic

rigative water per unit area. According to the analysis of statistical data in previous years. f

algorithms can be used to get the local optimum

(x) and g (x) are approximately an quadratic

solutions. Usually the follOWing steps are need-

curve:

ed· i) First. n experience values of previous years. each representted as (Xn ••••• XI.) • are selected to form initial population of the local optimization problem. ii) Each decision variable Xli' •••• ~4 in initial

population is coded as a binary unsigned string with length

Ilj.

The solution strings are con-

structed to link all the coded variables together. 6

So. the length of the solution string is



Fig.

Thus. the solution set that includes

2.

2~a,

~Ilj. I-I

possi-

ble solutions is obtained. ill) T he operator of the genetic algorithm con-

4. GAs-BASED IRRIGATION OPTIMIZATION

sists reproduction. Crossover and Mutation.

It is difficult to satisfactorily solve the irrigation

a) Reproduction

optimization

conventional algo-

Reproduction is a process in which each string is

rithms. here. GAs as a searching algorithm is

copied according to their objective function val-

model

using

suitable to such kinds of problems.

ues ( El)' that is strings with a higher value have a higher probability contributing. one or

Applying a genetic algorithm to solve the irriga-

more offsprings in next generation.

tion problem is firstly to initialize population and

For example:

code the decision variables as some finit-length

Let AI' A2 are the two members of the initial

string.

population. El =the fitness of Al E2=the fitness of A2

4. 1 Initialize popuation

nl=the offspring number of Al n2=the offspring number of A2

In this problem. the search space of irrigation

then in the next generation after reproduction

optimization model is very large. which involves

nl/n2=EJE 2·

24 variables (among 6 districts. there are 4 variables in each district) and a constraint. The con-

The reproduction operator may be implemented

ventional GA appears to be incompetent in ac-

by creating a biased roulette wheel where each

tural operating when confronting so many vari-

current string in the population has a roulette

ables . Since. the increasing of useful information

wheel slot sized in proportion to its fitness (El).

in every generation will be very slow and the

In this way. strings with higher fitness have a

number of genetic generations will increase in

higher number of offspring in the succeeding

searching optimum solutions. In order to reduce

generation .

the searching time and the complexity of the problem. the whole problem will be divided into

Once a string has been slected for reproduction.

six local sub-problems in which it is considered

an exact replica of the string is made. This

147

string is then entered into a mating pool.a tenta-

particular locations), even though reproduction

tive new population. for further genetic operator

and crossover effectively search and recombine

action .

extant notions. In artificial genetic systems, the mutation operator protects against such an irrecoverable loss.

b) Crossover Crossover may be processed in two steps. First. the members of the new strings in the mating

iv) In every new generation the unresonable so-

pool are freely met and combined. When two

lutions which have contradicti onwith constraints

mates are selected. the pair of strings undergo

are wiped off.

crossover as following: Following reproduction. crossover. and muta-

an integer position k along the string is selected

tion, the new population is obtained and ready to

uniformly at random base. the valu of k is in the 6

range [1.

~al -lJ . By

be tested. By decoding the new strings and calswapping all characters

culating the fitnes function values • it is found

1=1

6

between position k

+ 1 to ~al inclusively

that the population average fitness and the maxitwo

mum fitness has increased. So, a local optimum

1=1

new string are created

solution can be obtained while the operation of

For example:

the algorithm repeat.

the pairs of strings we slected is A I and A z. A I =10100··I · 11011

A z =01110· .1.01100

4.2 Muti- paerts
Suppose in choising a random number between 1 6

and

~al- l.the

The local optimum solution of each district,

value k is obtained (as indicat-

which has been obtained are selected to form the

1=1

ed by the separator symbol in Al and A z ). After crossover operation, the resulting string are as

initial population of the whole problem • and views of some experts that are adopted as a

following:

heuristic information are also included in it . Re-

Al = 10100 ... 01100

coding and reproduction are similar to the opera-

A z =01110 ... 11011

tions mentioned above (here. each string contains six sub-strings), but crossover and muta-

c) Mutation

tion are different. In the whole irrigation opti-

Mutation is the occasional (with small probabili-

= O. 01 ) random

mization model. multi-points crossover and mu-

alteration of the value of a

tation method has been intruduced. That is. not

string position. that means changing a 1 to a 0 or

a single point but many points in the string

ty M

vice versa.

which

For example:

crossover • and even more points will be selected

will

be

selected

to

participate

in

Suppose. A I is an arbitrary string in the popula-

in mutation process. Suppose. the crossover slec-

tion .

tion probability is PI.and the mutation probabili-

Al = 10100 .. . 01100

ty is QI' In addtional, during the multi-points

the 3rd position is selected randomly among the

crossover and mutation process of every genera-

string • and assuming mutation occur according

tion, some new constraints are put forward to

to the mutation probability M. the string after

restrain the strings resonably. The example of

the action is:

this multi-points crossover is shown as follow-

A l '= 10000 ... 01100

ing: BI and Bz in the mating pool are selected to crossover

Mutation plays a decidely secondary role in the operation of genetic algorithms. Beause occasion-

Suppose:

ally they may become overzealous and lose some

Bl = (101.. ,.100)(100 ... 100)(010... 011)

potentially useful genetic material (1 's or O's at

(101. , .. 111)(000... 110)(011. . . 101)

148

B 2 =(001.. 1.111)001. .. 010)001. . . 101) OIl. 1.. 000)001. . . 010)(100 ... 001)

initialize population of sub- problem i

the first and the forth sub-string are selected (according to selecting probability P J ) to crossover.

code

The randomly choised positions in the selection of sub-strings are indicated by the separator symbols

u

I"

sub-problem

reproduction

in BI and B 2 • After the crossover

the reSUlting strings are shown as following: crossover

B 1 '=001. .. 111)000 . . . 100)(010 .. . 011) 001. . . 000)(000 ... 110)(011. . . 101) B 2 '= (001. .. 100)(101. . . 010) (101. .. 101)

mutation

011. . . 111)001. . . 010)(100 . . . 001)

Idecode and constraint I

t

The last operator. mUlti-points mutation. is performed as following: Cl is the arbitrary string

Yes

No

which is going to mutation. Cl = (101. .. 100)(100 ... 100)(010 ... 011)

001. .. 111)(000 .. . 110)(011. . . 101) the first and the third sub-string are chosen ac-

Yes

cording to selecting probability QJ. Assuming that the 3rd position in the first sub-string and

!recoding the whole problem

the 2nd position in third sub-string are selected

t

randomly to mutation . On the basis of the muta-

reproduction

I

No

tion probability • mutation takes place in the first sub-string . the new string are created as fol-

! multi - points crossover

I

t

lowing:

I multi-points mutation I

Cl' = (lOO . .. 100)(100... 100)(010 ... 011)

001. .. 111)(000 .. . 110)(011. .. 101)

t decode and constrain

The new population is obtained and ready to be tested. The new strings is decoded and the fit-

No

ness function values are calculated.

~ Yes

With the implementation of the above algo-

end

rithm. it is found that the max and average economic profit values

Fig. 3.

have a gradually increasing

tendency as searching generation by generation. Through several of generations , the satisfied results are obtained while the operation of the algorithm repeat.

5. CONCLUSION T he irrigation optimization problem using GAs

4. 3 program's flow

are described in this paper . The method that divide the whole searching space into several subspace is adopted . In the process of the searching

The problem of irrigation optimization in ShiJing Irrigation Network has been solved using C lan-

algorithm approach, the slection of constraints

guage in the lab. the flow of the program is

in the multi-points crossover process is impor-

shown in the right figure .

tant to the reasonableness of the solutions. And

149

it has shown that the searching agorithm is con-

Grefenstette, John J. (1989).

A system for

vergent under certain limited constraints. More

learning control strategies with genetic algo-

fields-knowledge and heuristic information are

rithms.Proceedingsof IJCAI'89. Fairfax,

going to be introduced to make the system per-

V A :Morgan Kanfman

fect. In the next step ,and we will go further into

K. A. DeJong , W. M. Spears and D. F. Gordon.

the genetic algorithm applications ,for examples,

PP. 161- 188. Cl sing Genetic Algorithms for Concepts Learning. Liepins, G. E, &. Wang, L. A. (1991). Classifer

applying GAs to extract rules from database.

system learning of Boolean conepts.

REFERENCE

Prcr

ceedings of IJCAI'9l(PP. 318- 323) San Mateo, CA :Morgan Kaufman

David, E. Goldberg. (1989). Genetic Algorithms in Search ,Optimization

&.

Tcherg,D., Lambert,B. ,Lu, S. ,&RendeU, R. (1989). Building robust learning syliems

Machine Lea ring

Fun-Lun Xiong, Knowledge Engineering for A-

by combining induction and optimization,

griculture in China. Proceedings of IFAC-

proceedings of IJCAr89 (PP. 806-812)

workshop on expert syliems in agriculture.

Detriot, MI:Morgan Kaufman

(pp. 4-8)

150