Copyright 0 IFAC Artificial Intelligence in Real-Time Control, KuaIa Lumpur, Malaysia, 1997
Genetic Algorithm with Adaptable Changing Genetic Operators And Its Application to Project Scheduling Tomoya Ikeuchi, Yoshitomo Ikkai, Dai Araki, Takenao Ohkawa and Norihisa Komoda Department of Information Systems Engineering Faculty of Engineering Osaka University 2-1, Yamadaoka, Suita, Osaka 565, Japan email:
{ikeuchi.ikkai.araki.ohkawa.komoda}@ise:~ng.osaka-u.ac.jp
probabilities of inefficient operators is reduced, so that effective operators are selected. This method can select effective genetic operators, so that it can eliminate the parameters' tuniilg task that is done by the GA designer. In this paper, we will briefly describe the genetic algorithm. Then, we will describe the method for changing operators. Finally its application to the Project Scheduling Model(PSM) and the result will be analyzed.
ABSTRACT Genetic Algorithm(GA) has been widely used to solve planning problems. In order to use it, one must determine the optimal values of many genetic parameters, such as crossover and probability, mutation probability, and so on. To make matter worse, the optimal combination of parameters for one problem is not always the optimal one for others. Therefore, these parameters must be tuned whenever the problem changes. In this paper, we have proposed G A with adaptable genetic operators, which frees us from the need tune parameters. The combination of parameters can be fitted to the problem by raising the probability of the operator that created a better individual than its parent. This method was verified by applying to a Project Schduling Model(PSM).
2.
In GA, a solution is regarded as an individual. A population consists of a set of individuals. The number of individuals included in a population is called the Population Size. Individuals are produced by genetic operators - crossover and mutation. The new generated individals are called children, and the individuals from which the children in a generation are created are called parents. From the children, the individuals which suited for the environment are selected as the next generation's parents. The characteristics of individuals that are suitable for an environment are inherited by the next generation. This inheritance helps individuals to evolve so that they are suitable for an environment and makes the solution search go forward. This is shown in Fig.l as Normal GA. GA, however, has the following problems: they are the decision of genetic operators and the tuning probabilities of operators. There are various kinds of crossover and mutation. It takes a large amount of time to decide the kinds of operators and their probabilities by sensitivity analysis. The lack of suitability of the parameters causes an increase in calculation time and deterioration of solution quality. In particular, because G A repeats the application of genetic operators by trial and error in order to solve a problem, the parameter decision requires an enormous amount of time.
Copyright© 1998IFAC
1.
Genetic Algorithm
Introduction
Due to its simplicity, Genetic Algorithm(GA)[lJ is used for various problems. Therefore, recently, GA has been frequently used[2, 3, 4J in regards to scheduling. There are, however, two problems in regards to searching efficiency in GA: they are the decisions of genetic operators and tuning probabilities, by which the genetic operator is selected when new generation is generated. This probability is called the "probability of genetic operator" in the following section. These cause deterioration in search efficiency, because the genetic operators improve individuals and perform searching solutions in GA. In this paper, we have proposed a new method that adapts the probabilities of genetic operators to solving problems. This method finds effective operators in order to look for a solution, and raises their probabilities when the next generation is created. By using this method, the
53
3.
Adaptable Changing Method of Genetic Operators
population in the evolutionary process. TE is defined by the degree of improvement. It indicates the maximum of the evaluations' difference between every individual that is created by the operator and its parents. If operators could not improve individuals, the TE of the operator is given as O. Fig.2 shows an example of TE calculations. In this figure, the numerical value is the evaluation difference between each individual and its parents.
In this paper, we will propose an adaptable GA method
which has an autonomic parameter tuning method for the composition of generic operators' probabilities. This mechanism raises the probability selecting effective genetic operators. As a result, effective operators are selected from a group of prepared operators. Therefore, this method enables us to solve the above problems. Fig.1 shows an outline of Adaptable Changing Method of Genetic Operators. First, this method creates individuals as an initial solution set at random. At the same time, it assigns each operator a probability by which an operator is selected in order to create individuals of the next generation. This is an initial probability. The following are two definitions of effective operators.
~
Tentative EffecUvene.. of Operator a : 5
1. The operator which can improve individuals con-
~
Tentative Effectlvene•• of Operator p: 0
Figure 2: Definition of tentative effectiveness.
stantly is effective. 2. The operator which can improve individuals greatly is effective.
An operator with a lower probability creates less individuals, so that the possibility of creating excellent individual is lower. Therefore, if an operator with low probability creates an excellent individual, the operator is very effective. Therefore, E(i) which is the E of operator i can be calculated by the following formula. T E( i) is the TE of operator i, and Pr.:(i) is the probability of operator i in creating the kth generation.
Although the operators that are based on the first definition can often provides a local minimum solution, constantly improvement is important in regards to evolving which is the main GA concept. On the other hand, the operators based on the second definition do not fall into a local minimum. The probability changing procedure which uses the above two definitions is shown in the following paragraph.
(1)
pr.:(i)2 is used as the denominator, because an operator with a smaller probability is more effective when the TE of those some operators is equal. The next formula is a basic formula to enables us to increase the probability of operator in regards to its effectiveness: (2) where a is a fixed number that makes the P scale be in accordance with the E scale. When an individual who is better than the current tentative solution is created, the operator that creates this individual is the most effective one. For G A, this is based on the idea that it is essential to create a solution that renew tentative a solution. Therefore, a Bonus Point(BP = const.) is added to the probability of this operator as a special case. This is expressed by the next formula. Pr.:+l (i) of every operator can be calculated by using this formula.
Figure 1: Structure ofthe Normal GA and the Adaptable Changing method of Genetic Operators. We have defined Effective value (E) and Tentative Effective value (TE) in regards to each genetic operator in order to evaluate them. A genetic operator improves the
54
PIc(i) + oE(i) + BP ; create new best ~+1 (l) = PIc(i) + oE(i) { ; else
.
The project scheduling chooses a plan whose finish time is the smallest, using these conditions. (3)
Table 1: Task data.
I Task-ID I Process time I Ro I R" I Rc I Rd I
Finally, the probability of each operator at next generation Plc+! (i) is calculated by normalization of the probabilities of all operators.
PIc+l (l
P~+ 1 (i)
.) _ -
A B C
D E F
(4)
LP~+l(l)
15 5 10 60 20 10
I
Fig.3 explains the above described concept by means of a diagram. In this example, three operators - 'a', 'b', and 'c' - are used, and their probabilities at the kth generation are Plc (a), Plc (b), Plc (c). BP is also added to PIc(b) extra using the assumption that operator 'b' created an individual better than the tentative solution.
Table 2: Task order.
I Predecessor I Successor I A A B C D E
t--------l.Of-------t·1 The k th generation
Pk(a)
Pt (b)
1 0 0 1 0 0 1 0 0 2 1 1 0 1 0 2 1 0 R. : Resource name 0 2 1 0 0 1
Pt(c)
B C D E
F F
Table 3: Resource conditions.
I Resource name I Capacity I Resource.Ra Resource.Rb Resource.Rc Resource.Rd Figure 3: Changing genetic operators
4. 4.1
4.2
2 2 2 1
Coding & Reproduction
The order of task-ID is defined as an individual. This order is the task's priority. A task with a task-ID that is more on theleft side has a higher priority. The plan is created by repeating of the assignment of a task. We have assumed that the state of task assignment by the chosen individual is in Fig.4. In this figure, task 'A' has been assigned and the tasks which can be assigned are 'B' or 'C'. Task 'B' is assigned, because it appears to be more on the left than task 'c' in the individual in Fig.4. Each individual supplies one plan. An individual is evaluated by project finish time, i.e. the finish time of the last task. A smaller evaluation value indicates a better solution. We used Elite Preserving Selection as the reproductive method. When a new generation was created, the four individuals that were the best four in the previous generation are reproduced. A better individual is selected for the parents in a higher probability, when crossover is finished.
Application to Project Scheduling Model Project Scheduling Model
We applied GA combined with the proposed method to the Project Scheduling Model(PSM). The project is constructed from tasks which have certain conditions. In project scheduling, all of the tasks that are involved in constructing the project are assigned and project finish time is calculated. Table 1, 2 and 3 indicate one of the example PSM expressions. In this example, there are five tasks and four resources. Table 1 shows the process time, the resources required for performing of each task. The latter is specified by task-ID. Table 2 shows a predecessorsuccessor relationship among the tasks. Table 3 shows the capacity of each resource.
55
Assigned task \
Po•• lble ta.k to
~: Aaalgnment
()4. •
••
Individual I=F:-r.=IB.-m~ ·: Jr.-A=ID=IE=1
Figure 5: CenterX.
Figure 4: Coding.
4.3
Crossover Figure 6: CenterX-d
Crossover is a manipulation which does a direct exchange of parts of two individuals. It gives the better priority part for the parents of the next generation. Ordered crossover is a useful method when an individual is expressed by the order of tasks[5). It does not exchange a target part, but rearranges task-IOs that are in the target part according to the order of the partner. The prepared crossover methods are the following.
..clhidual A
laclltidual B
~mD~
1a::dua1 A~
IDclhidual B'
lA BED F cllB F A E c DI Figure 7: UniformX
• Two-point crossover
4.4
Two cutting points are selected. This crossover rearranges task-IOs between the two cutting points (Fig.S). However, this operation cannot rearrange the heads and tails of an individuals. We have also proposed a crossover that rearranges both of the sides which are heads and tails. We named these crossovers SideX and CenterX respectively.
Mutation
IT operators are made from only crossover, individuals lose variety. Mutation is a random operator which enables individuals to make new combination which cannot be created by crossover. We supplied the following five mutation methods.
Inversion Two loci are selected at random. All jof the ob-IOs between them are reversed.
Ordered crossover can rearrange task-IDs with two individuals whose cutting points are different (Fig.6). We prepared CenterX-d and SideX-d by using this concept. They are the crossover operators whose cutting points of two parents are different on CenterX and SideX.
Advance A task-IO that is selected at random is inserted forward. The inserted point is also selected at random. Swap Two task-lOs are selected and exchanged. ShufBing A section is selected at random, and the taskIOs are shufBed in the section. IT the section is too long, it is almost the same as creating a new individual at random. The section length is defined by a normal distribution whose average is 5 and whose variance is
• Uniform crossover(UniformX) It makes every locus masked in a SO% probability. According to the order of the partner, task-lOs which are not masked are rearranged(Fig.7) .
1.
Replacement Certain task-lOs are selected and are rearranged. The number of task-lOa is defined by a normal distribution whose average is 5 and whose variance is 1.
We prepared UnifonnX-d whose mask positions of parents are different like CenterX-d.
56
4.5
as that for normal GA. Therefore, changing operators requires a small amount of time. Two GAs with fixing operators cannot generate as many best solutions as a GA with changing operators. The GA with changing operators can generate solutions that are good in a variety of problem without parameters tuning which requires a large amount of time. GA with the proposed method generated the best 'Average' values in 7 problems, and the best 'Worst' values in 8 problems. Therefore, it has been confirmed that our proposed method generates good solutions.
Result
Through the PSM simulation, we verified the usefulness of the proposed method as compared with normal GA whose parameters were manually tuned. The population size was 200 and 1500 generations were created. The initial value of every operator's probability is equal, and et in Formulation(3} is defined as 1 x 10-5 • Table 4 shows a PSM specification. Table 4: Generating problem specifications. Number of Task Process Time Resource Successor
Normal Distribution (Average:100, Variance:49) Normal Distribution (Average:100, Variance100) 5 (Capacity:5 for all Resource) Normal Distribution (Average:3, Variance:1)
Table 6: Simulation result. Problem Number 1
Inversion Advance Swap Shuffling Replacement CenterX-d SideX-d CenterX SideX UniformX UniformX-d
3
Probabilities Pattern 6.0% 6.0% 6.0% 6.0% 6.0% 11.7% 11.7% 11.7% 11.7% 11.7% 11.7%
I
6105 6261.1
M9a
Table 5: Probability pattern.
1
mu ~
2
I Operator
GA with proposed method 8100
2 2.5% 2.5% 20.0% 2.5% 2.5% 10.0% 10.0% 10.0% 10.0% 20.0% 10.0%
4
5
6
3838 3873.6 3953 8609 8771.6 8912 5897 5976.5 6097 5446
Ma!& MQa ~
7
4462.6 ~
8
5723 5839.9
m2 lli8
We simulated 10 problems that were based on Table 4 by three types of GA - a GA with changing operators and two GAs with fixing operators(Probability Patternd 1 and 2 on Table 5). These patterns were decided by human sensitivity analysis. Each problem was simulated ten times with different initial individuals. Table 6 shows the results of the simulations. The upper rows are 'Best' values, middle rows are 'Average' values, and lowers ace the 'Worst' values of the 10 results. Values that are underlined indicate the best of problem in the three GAs. We performed these simulations using Workstation INDY(CPU: MIPS R4600, 100Mhz, 64MB) of Silicon Graphics and spent 200-240 minutes createing 1500 generations per problem. This calculation time was the same
9
10
7411.4 7557 W!§ ~
!lW
Operators Fixing GA Pattern 1 Pattern2 8176 8207 8320.4 8353.4 8525 8536 6112 6064 6293.2 6281.7 6632 ~ 3824 3793 3870.4 3864.0 ID.Q 3972 8561 ~ 8818.6 8782.1 9123 9129 5926 5886 Q[lQd 6033.5 6161 6119 5392 5537 5536.4 5598.7 5761 5668 4410 4405 4499.2 4496.9 4532 4584 5725 ill! 5875.5 5847.2 6094 6043 7234 7353 7453.8 ~ 7548 7560 8803 8829 8980.5 9011.4 9229 9195
Best Average Worst Fig.8 shows an example in a change of operators' probabilities when the GA with changing operators is being
57
Final section: to the 1500th generation
o
ThIrclldea
.~~ 0
This section is like the second one because there was little change in probabilitiy combination. The combination is suitable for this search .
@1'IaaJ MdI... @
•
5.
FI
We proposed an genetic algorithm that added a function that adaptively changed the probabilities of genetic operators. This method makes it possible to automatically create suitable parameter for a problem. We verified the effectiveness of this method. It generated a better solution than did normal GA.
Urti/o""x-tl
C
R.,u.c._1II \
lh
0.5
~
J F""
'IlL
0.3
~
%
~
~\C
0.1 '-.
0.0
0
,
Uti lfomrX
r.,-r
II 1::
0.4
Conclusion
SilUX
---
~
Inversion
SItufJ1U!8 CntU,X
Sid.X
~
(.,1fkrX-4
REFERENCES
I
[1] D. E. Goldberg: Genetic Algorithms in Search Optimization & Machine Learning, Addison-Wesley Publishing Company (1989)
I I I
I
"'dl'dltC' 1000
500
1500
SWIIp
Genaratlon
[2] M. Gen, Y. Tsujimura and E. Kubota: "Solving JobShop Scheduling Problem," in Proc. of 1994 IEEE Int. Conf. on Systems, Man and Cybernetics, pp.15771582 (Oct. 1994)
Figure 8: Change of operators probability. [31 L. Tautou and H. Pierreval: "Using Evolutionary Algorithms and Simulation for The Optimization of Manufacturing Systems," in Proc. of the IEEE Symposium on Technologies and Factory Automation, pp.509-516 (Oct. 1995)
performed. The horizontal axis indicates generation and the vertical axis indicates cumulative probability. The graph in Fig.8 is made up of 4 sections.
[4] S. Uckun, S. Bagchi, K. Kawamura and Y. Miyabe: "Managing Genetic Search in Job Shop Scheduling," Intelligent Systems & Their Applications, IEEE EXPERT, pp.15-24 (Oct. 1993)
First section: from initial generation to the past 50th generation
This section is the start of the search. Probabilities are fluctuating towards an effective combination of probabilities.
[51 Wu Ying and Li Bin: "Job-shop Scheduling using Genetic Algorithm," in Proc. of the IEEE Int. Conf. on Systems, Man and Cyberentics, pp.1994-1999 (Oct . 1996)
Second section: to the past 250th generation
This section is stable, because we cannot observe large probability change except for an increase in UnifonnX-d at about the 200th generation. The search is progressing with nearly optimal probabilities in this section. Third section: to near the 400th generation
UnifonnX-d's probability is steadily increasing. This change is caused by the fact that UniforrnX-d's probability in the second section is smaller than the suitable probability. At about the 400th generation, Advance's probability increases from about 0.03 to over 0.15. This section is the relay section from a temporary probability combination to an optimal one.
58