CHAPTER 6 IMPROVED SHEEP FLOCK HEREDITY ALGORITHM...
Transcript of CHAPTER 6 IMPROVED SHEEP FLOCK HEREDITY ALGORITHM...
69
CHAPTER 6
IMPROVED SHEEP FLOCK HEREDITY ALGORITHM
6.1 SHEEP FLOCK HEREDITY ALGORITHM
6.1.1 Introduction
The Sheep Flock Heredity Algorithm was initially designed by
Nara et al (1999) and was applied to scheduling problems. The algorithm was
based on the natural evolution of sheep in a flock. The chromosomes
represent machine schedules.
6.1.2 Algorithm Description
Consider the several separated flocks of sheep in a field as shown in
Figure 6.1. Normally, sheep in each flock are living within their own flock
under the control of shepherds. So, the genetic inheritance only occurs within
the flock. In other words, some special characteristics in one flock develop
only within the flock by heredity, and the sheep with high fitness
characteristics to their environment breed in the flock. In such a world, let us
assume that two sheep flocks were occasionally mixed in a moment when
shepherds looked aside as shown in Figure 6.2. Then, shepherd of the
corresponding flocks run into the mixed flock, and separate the sheep as
before. However, shepherds cannot distinguish their originally owned sheep
because the appearance of any sheep is the same. Therefore, several sheep of
one flock are inevitably mixed with the other flocks as shown in Figure 6.3,
namely, the characteristics of the sheep in the neighboring flocks can be
inherent to the sheep in other flocks in this occasion. Then, in the field, the
70
flock of the sheep which has better fitness characteristics to the field
environment breeds most.
Figure 6.1 Flocks of sheep in a field
Figure 6.2 Mix of two flocks of sheep
71
Figure 6.3 New flock of sheep in field
The above natural evolution phenomenon of flocks can be
corresponded to the genetic operations of this type of string. For this kind of
string, we can define two kinds of operations. (i) Normal genetic operations
between strings. (ii) Genetic operations between sub-strings within one string.
In SFHA, special string structure and hierarchical genetic operations
(crossover and mutation) are introduced. They are (i) sub-chromosome level
genetic operation and (ii) chromosome (global) level genetic operation. This
hierarchical operation is referred to as “multi-stage-genetic operation”.
6.2 IMPROVED SHEEP FLOCK HEREDITY ALGORITHM
6.2.1 Introduction
Based on the mechanics of natural selection and genetics,
evolutionary algorithms such as genetic algorithms combine the concept of
survival of the fittest among solutions with a structured yet randomized
information exchange and offspring creation. These algorithms are naturally
parallel and exhibit implicit parallelism, which do not evaluate and improve a
72
single solution but analyze and modify a set of solutions simultaneously. The
possibility of the solution being trapped in a local optimum is considerably
reduced by the ability of the algorithm to operate on many solutions
simultaneously and gather information from all current solutions to direct the
search.
Moreover, these evolutionary algorithms can retain useful redundant
information about what is learned from previous searches by their
representation of individuals in the population. Critical components of past
good solutions can be captured, which can be combined via crossover to form
high quality solutions. Unfortunately, they may lose solutions and
substructures because of disruptive effects of genetic operators, and it is not
easy to regulate the algorithm’s convergence so that a pure SFHA may easily
produce premature and poor results. To enhance the performance of genetic
searches and improve convergence, an improved SFHA (ISFHA) is proposed.
In contrast to the classical SFHA (CSFHA), the ISFHA has superior features.
First, the pair wise mutation process is replaced by a single mutation process.
In a CSFHA, the pair wise mutation process performs a limited local search
and introduces some diversity, but it is hard to control its behavior whereas in
an ISFHA, the mutation rate of the single point mutation is much easier to
control thereby enhancing the local search behavior.
A new robust-replace (R-R) heuristic is introduced to enrich the
neighbor search templates so that a more powerful exploring ability and a
larger exploring region can be attained. This heuristic helps in improving the
solution search of the algorithm in the global domain. Thus, by the
introduction of these two processes into the algorithm, the limited local search
of mutation is enhanced as well as a constant search of solution between local
and global search domains is established. Such a procedure can also be
executed in a parallel mode to reduce serial search time. In addition, since the
73
ISFHA retains the generality of SFHA, it can be implemented easily and
applied to any combinatorial or functional optimization problems.
6.3 PROCESSES IN ISFHA
The ISFHA consists of the following processes.
i) Sub chromosomal level crossover
ii) Sub chromosomal level mutation
a. Inverse mutation
b. Single point mutation
iii) Chromosomal level crossover
iv) Chromosomal level mutation
v) Robust-Replace (R-R) heuristic
6.3.1 Sub chromosomal level crossover
In sub chromosomal level crossover, the entire chromosome is split
into sub chromosomes of equal length. These sub chromosomes are moved
randomly within the chromosome to new positions, thus forming a new
chromosome.
6.3.2 Sub chromosomal level mutation
The mutation consists of two steps, inverse mutation and single
point mutation.
74
(a) Inverse mutation
In a sequence, two random positions are selected. The portion of the
sequence between these two positions is inverted to get a new mutated
sequence.
(b) Single point mutation
A random position is selected in the sequence and moved to another
random position in the sequence. As the mutation occurs with respect to a
single point, the process is called single point mutation.
6.3.3 Chromosomal level crossover
The chromosome level crossover is performed among all the
chromosomes in the population.
6.3.4 Chromosomal level mutation
The chromosome level mutation is performed among all the
chromosomes in the population.
6.3.5 Robust-Replace (R-R) heuristic
Each schedule (chromosome) has a makespan value that refers to
the amount of robustness of that chromosome. The robustness of each
schedule is calculated from the robust factor. The robust factor is defined as
given in equation (6.1).
Robust Factor = (6.1)
From this relation, a lower makespan value gives a higher robust
factor value. The average robust factor is calculated for the population. The
schedules with robust factor values less than the average robust factor value
75
are replaced by new schedules. This mechanism allows finding new schedules
that correspond to new search regions in the total search space.
6.4 GENERAL SCHEMA OF ISFHA
Input: Set of initial job sequences
Output: Value of makespan and total flow time
Set of generated Job sequences
Set gen. = 1 and go to Start.
Start: For (gen. = 1 to gen.; max gen.; gen. + 1)
Generate random number between 0 and 1
If random number ≤ 0.7
Perform sub chromosome level crossover
End If
Generate random number between 0 and 1
If random number ≤ 0.8
Perform sub chromosome level mutation
End If
Generate random number between 0 and 1
If random number ≤ 0.8
Perform chromosome level crossover
End If
Generate random number between 0 and 1
If random number ≤ 0.9
Perform chromosome level mutation
End If
Calculate makespan and total flow time
Evaluate robust factor of job sequences
Update and maintain best job sequences for gen. + 1
End for
76
6.5 FLOW CHART OF ISFHA
The frame work of the proposed ISFHA is illustrated in Figure 6.4.
The various steps involved in ISFHA are explained in this section.
Figure 6.4 Flow chart of ISFHA
Use old sequence and corresponding
makespan
Sub chromosomal mutation
Use old sequence and corresponding makespan
Chromosomal crossover
Chromosomal mutation
No
Yes
Start
Initialize Population
Sub chromosomal Crossover
Use new sequence and corresponding makespan
R-R heuristics
Is Termination Criteria
Satisfied?
Stop
New makespan <
Old makespan
No
Yes
New makespan <
Old makespan
No
Yes
Use new sequence and corresponding makespan
Sequence for next generation
77
6.6 NUMERICAL ILLUSTRTION OF ISFHA (EQUAL SUB
LOTS)
The algorithm is illustrated with an example problem (5 jobs- 2
machines) in this section. Table 4.1 provides the data of the example
problem.
6.6.1 ISFHA for makespan criterion
The illustration of the algorithm is shown in Table 6.1 and 6.2.
Table 6.1 ISFHA - Sub chromosome Level Operations (for equal sub lots)
Seed sequence
Sub chromosomal
Crossover Probability
≤ 0.7
Sub chromosomal
Crossover
Sub chromosomal
mutation Probability
≤ 0.8
Inverse mutation
Single point
mutation
RN Y/N RN Y/N
3 4 1 2 5 0.65 Y 4 3 1 2 5 0.6 Y 5 2 1 3 4 5 2 1 4 3
5 3 1 4 2 0.5 Y 5 3 2 4 1 0.7 Y 1 4 2 3 5 1 4 2 5 3
1 2 5 3 4 0.8 N 1 2 5 3 4 0.9 N 1 2 5 3 4 1 2 5 3 4
2 3 5 1 4 0.3 Y 3 2 5 1 4 0.8 Y 1 5 2 3 4 1 2 5 3 4
2 1 5 3 4 0.6 Y 4 1 5 3 2 0.5 Y 2 3 5 1 4 2 3 1 5 4
78
Table 6.2 ISFHA - Chromosome Level Operations (for equal sub lots)
Sequence after single point
mutation
Chromosomal Crossover
Probability ≤ 0.8
Chromosomal Crossover
Chromosomal mutation
Probability ≤ 0.9
Chromosomal mutation
makespan (z)
Robust Factor (1/z)
RN Y/N RN Y/N 5 2 1 4 3 0.75 Y 5 2 1 3 4 0.8 Y 1 3 5 2 4 44* 0.022727 1 4 2 5 3 0.5 Y 1 2 4 5 3 0.7 Y 5 3 4 1 2 45 0.022222 1 2 5 3 4 0.85 N 1 2 5 3 4 0.95 N 1 2 5 3 4 45 0.022222 1 2 5 3 4 0.3 Y 1 2 5 4 3 0.55 Y 1 5 2 3 4 45 0.022222 2 3 1 5 4 0.6 Y 1 3 2 5 4 0.85 Y 5 4 2 1 3 46 0.021739
Avg.= 0.022226
6.6.2 Calculation of makespan criterion
For the 2- machine, 5- job problem provided in Ttable 4.1, the
Calculation of makespan for the sequence 1-3-5-2-4 is explained below:
Using equation (3.1),
(푠 + 푛 × 푝 ) (푓표푟푚푎푘푒푠푝푎푛)
Machine (i=1) → (for j=1) → 2+ (2×2) = 2+4 = 6
(for j=2) → 6+ 4 + (3×3) = 6+13 = 19
(for j=3) → 19+ 3 + (2×2) = 19+7 = 26
(for j=4) → 26+ 3 + (2×3) = 26+9 = 35
(for j=5) → 35+ 2 + (2×2) = 35+6 = 41
Machine (i=2) → (for j=1) → 4+2+ (2×3) = 4+8 = 12
(for j=2) → 13+ 2 + (3×3) = 13+11 = 24
(for j=3) → 24+ 4 + (2×2) = 24+8 = 32
(for j=4) → 32+ 3 + (2×2) = 32+7 = 39
(for j=5) → 39+ 3 + (2×1) = 39+5 = 44
So, the makespan value= 44
79
The final job sequence is 1-3-5-2-4, the corresponding makespan
time is 44 and it is shown in Figure 6.5.
Figure6.5 Schedule for the sequence 1-3-5-2-4 in ISFHA (makespan
objective for equal sub lots)
6.6.3 ISFHA for total flow time criterion
The method to find total flow time is illustrated in this section. The
final result is 4-5-1-3-2 and the corresponding total flow time is 140. It is
shown in Figure 6.6. Total flow time calculation for the sequence
4-5-1-3-2 = 11+19+27+38+45 = 140. The following figure shows the time
schedule of the optimal solution.
Figure 6.6 Schedule for the sequence 4-5-1-3-2 in ISFHA (total flow
time objective for equal sub lots)
80
6.7 NUMERICAL ILLUSTRTION OF ISFHA (VARIABLE SUB
LOTS)
The algorithm is illustrated with an example problem (5 jobs- 2
machines) in this section. Table 4.4 provides the data of the example problem.
6.7.1 ISFHA for makespan criterion
The illustration of the algorithm is shown in Table 6.3 and 6.4.
Table 6.3 ISFHA - Sub chromosome Level Operations (for variable
sub lots)
Seed sequence
Sub chromosome
Level Crossover
Probability ≤ 0.7
Sub chromosomal
crossover
Sub chromosome
Level Mutation
Probability ≤ 0.8
Sub chromosomal
mutation
RN Y/N RN Y/N 4 2 5 3 1 0.6 Y 4 5 2 1 3 0.6 Y 2 1 4 5 3 2 4 5 1 3 0.5 Y 5 4 2 1 3 0.8 Y 2 1 3 5 4 4 3 5 2 1 0.9 N 4 3 5 2 1 0.9 N 4 3 5 2 1 1 3 2 4 5 0.3 Y 1 2 3 5 4 0.65 Y 2 3 1 5 4 3 2 4 5 1 0.95 N 3 2 4 5 1 0.85 N 3 2 4 5 1
81
Table 6.4 ISFHA - Chromosome Level Operations (for variable sub lots)
Seed sequence
Chromosome Level
Crossover Probability
≤ 0.8
chromosomal crossover
Chromosome Level
Mutation Probability
≤ 0.9
chromosomal mutation
makespan (z)
Robust Factor (1/z)
Sub lot size
RN Y/N RN Y/N 2 1 4 5 3 0.6 Y 1 4 2 3 5 0.8 Y 3 5 1 4 2 87 0.01149 {354}{321}{46}{2313}{2321} 2 1 3 5 4 0.5 Y 2 3 1 4 5 0.72 Y 1 4 5 2 3 88 0.01136 {46}{3132}{213}{1232}{543} 4 3 5 2 1 0.4 Y 3 5 2 1 4 0.9 N 3 5 2 1 4 89 0.01124 {543}{321}{2123}{46}{1332} 2 3 1 5 4 0.3 Y 3 2 1 5 4 0.55 Y 5 4 3 2 1 90 0.01111 {321}{3231}{543}{2312}{46} 3 2 4 5 1 0.1 Y 5 2 4 3 1 0.85 Y 5 3 1 2 4 85* 0.01177 {132}{543}{46}{3212}{1233}
Average = 0.011394
82
The final result is 5-3-1-2-4, the corresponding makespan time is 85,
sub lot size is {132}{543}{46}{3212}{1233} and it is shown in Figure 6.7.
Figure 6.7 Schedule for the Sequence 5-3-1-2-4 in ISFHA (makespan
objective for variable sub lots)
6.7.2 ISFHA for total flow time criterion
The method to find total flow time is illustrated in this section. The
final result is 1-2-3-5-4 and the corresponding total flow time is 276, sub lot size
is {46} {2312} {435} {213} {3132} and it is shown in Figure 6.8. Total flow
time calculation for the Sequence 1-2-3-5-4= 28+39+53+68+88 = 276.
The following figure shows the time schedule of the optimal solution.
83
Figure 6.8 Schedule for the Sequence 1-2-3-5-4 in ISFHA (total flow time
objective for variable sub lots)
6.8 PERFORMANCE EVALUATION
6.8.1 Proposed methodology illustrated with makespan criterion
The makespan results of ISFHA algorithm for equal sub lots (Table 6.5
- Table 6.8) and for variable sub lots (Table 6.12- Table 6.14) is given in this
section.
6.8.2 Proposed methodology illustrated with total flow time criterion
The total flow time results of ISFHA algorithm for equal sub lots
(Table 6.9 – Table 6.11) and for variable sub lots (Table 6.15 - Table 6.17) is
given in this section.
84
Table 6.5 Comparison with ACO, TA algorithm for two - machine cases in ISFHA (equal sub lots)
Prob
lem
set N
o. Makespan
Number of jobs
15 25 35 50
ISFHA ACO TAP TAR TAI ISFHA ACO TAP TAR TAI ISFHA ACO TAP TAR TAI ISFHA ACO TAP TAR TAI
1 429 429 429 429 429 648 648 648 648 648 914 914 914 914 914 1258 1258 1258 1258 1258
2 363 363 363 363 363 581 581 581 581 581 772 772 772 772 772 1153 1153 1153 1153 1153
3 249 249 249 249 249 436 436 436 436 436 709 709 709 709 709 1013 1013 1013 1013 1013
4 291 291 291 291 291 489 489 489 489 489 720 720 720 720 720 1035 1035 1035 1035 1035
85
Table 6.6 Makespan value for three – machine cases in ISFHA (equal
sub lots)
Problem set number
Makespan Number of jobs
5 10 15 20 25 30 1 162 382 415 572 635 794 2 170 390 415 572 650 691 3 158 380 406 568 648 620 4 168 388 416 575 642 618
Table 6.7 Makespan value for five – machine cases in ISFHA (equal
sub lots)
Problem set number
Makespan Number of jobs
5 10 15 20 25 30 1 182 385 415 655 702 845 2 190 390 430 672 706 747 3 182 382 422 670 705 628 4 178 380 418 668 704 672
Table 6.8 Makespan value for seven – machine cases in ISFHA (equal
sub lots)
Problem set number
Makespan Number of jobs
5 10 15 20 25 30 1 200 205 462 592 714 873 2 202 208 508 604 720 745 3 204 210 510 610 728 700 4 200 200 500 598 730 689
86
Table 6.9 Total flow time value for three – machine cases in ISFHA
(equal sub lots)
Problem set number
Total flow time Number of jobs
5 10 15 20 25 30 1 436 540 3045 5725 7508 10974 2 452 558 3198 5876 7555 8545 3 450 554 3127 5542 7625 8522 4 442 550 3152 5527 7619 8161
Table 6.10 Total flow time value for five – machine cases in ISFHA
(equal sub lots)
Problem set number
Total flow time Number of jobs
5 10 15 20 25 30 1 480 2252 3156 11409 11496 12833 2 462 2298 3208 9643 11532 9730 3 500 2002 3114 9006 11512 9434 4 504 2096 3045 9400 11477 9774
Table 6.11 Total flow time value for seven – machine cases in ISFHA
(equal sub lots)
Problem set number
Total flow time Number of jobs
5 10 15 20 25 30 1 570 2204 4052 9154 9842 13541 2 600 2518 4018 9398 10043 10948 3 594 2414 4009 9332 9827 10804 4 590 2216 4025 9376 10009 10339
87
Table 6.12 Makespan value for three – machine cases in ISFHA
(variable sub lots)
Problem set number
Makespan Number of jobs
5 10 15 20 25 30 1 620 708 832 927 1015 1023 2 1048 3354 3545 4025 4198 4916 3 1006 3308 3445 4009 4175 5002 4 998 3434 3505 3998 4127 5008
Table 6.13 Makespan value for five – machine cases in ISFHA (variable
sub lots)
Problem set number
Makespan Number of jobs
5 10 15 20 25 30 1 708 854 1127 1309 1517 1709 2 3548 4009 4815 7198 7823 8302 3 4009 4152 5012 7004 7415 8334 4 4027 4109 5025 7323 7725 8125
Table 6.14 Makespan value for seven – machine cases in ISFHA
(variable sub lots)
Problem set number
Makespan Number of jobs
5 10 15 20 25 30 1 794 1018 1237 1424 1912 1934 2 4145 4934 6365 7356 9834 9989 3 4227 4917 6309 7434 10398 10509 4 4023 4952 6229 7089 10527 10424
88
Table 6.15 Total flow time value for three – machine cases in ISFHA
(variable sub lots)
Problem set number
Total flow time Number of jobs
5 10 15 20 25 30 1 3488 3972 8423 10023 24309 28002 2 15155 16152 27089 70104 92267 145236 3 15545 17409 27198 73325 145008 173878 4 15543 16434 26406 72288 132052 168104
Table 6.16 Total flow time value for five – machine cases in ISFHA
(variable sub lots)
Problem set number
Total flow time Number of jobs
5 10 15 20 25 30 1 3423 4398 8255 13009 24089 30023 2 15298 18023 25458 70034 96045 175643 3 15112 19525 27098 73508 155132 193992 4 15102 19324 28045 74302 141324 176528
Table 6.17 Total flow time value for seven – machine cases in ISFHA
(variable sub lots)
Problem set number
Total flow time Number of jobs
5 10 15 20 25 30 1 4325 5032 9312 14027 26255 28098 2 15119 20027 29398 72052 96212 165234 3 15552 21008 30155 73215 157524 165654 4 15217 19875 30009 74008 163498 167998
89
6.9 SUMMARY
The numerical illustration and computational results of proposed
ISFHA for equal size sub lots (from Table 6.5 – Table 6.11) and variable size
sub lots (from Table 6.12 – Table 6.17) are discussed.