Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Scheduling FMS Using Heuristic and Search Techniques

A. 10

Appendix III

GA FOR OPTIMAL INITIAL WEIGHT VECTOR IN GCID3

A3.1 SCHEMA OF GAOIWV()


# define p cross, pmui /* p cross: prob of cross over, pjnut: prob of mutation */
start:
{
input : (i) data of training examples,
(ii) population size 'pop size',
(Hi) number of iterations 'no it';
calculate : chromosome length 'chrlen' = No.of attribute x 8 ;
for (c - 1 to pop size) /* Generation of initial population */
{
REPEAT:
for (j = 1 to chr len)
generate: chromosome (randomly);
convert: chromosome into weights;
if feasible continue else goto REPEAT;
}
set: iteration number ' it no' = J;
BEGIN: /* Generation of new population V
fitjn (); /* Fitness value determination */
store the best 'c (it no)';
selJn (); /* Selection offittest chromosomes */
crojn (); /* reproduction of offspring module */
mutjn (); /* mutation module */
if (it no < max it) then
{
it no ++; goto BEGIN;
}
scan: best out of the best c(itjio);
}
end:
Scheduling FMS Using Heuristic and Search Techniques
A.l 1

/* Fitness value determination */


fitjn ()
{
for (c ~ 1 to pop size)
{
classify the examples (equation l & 2);
calculate: information entropy 'F(c)';
information entropy gain 'EG(c)
findfitness parameter(F(c)) = e5*EG(c);
}

return the best 'c(itno)';


}

/* Selection offittest chromosomes V


seljn ()
{
calculate: Totalfitness(TF) = P<Y“ F(i) ;

for (i = I to pop size)

{
c = i;
calculate: probability (P(c) = F(c)/TF;
cumulative probability CP(c) = P(j);

}
for(i = / to pop size)

{
generate a random no. V' (float range of 0 - I);
for(j=l to pop size)
if( r < CP(j)) then select jth chromosome;
}

}
Scheduling FMS Using Heuristic and Search Techniques A. 12

/* reproduction of offspring module */


crojn ()
{
for(i =1 to pop size)
{
generate a random no. rl (float range of 0 - 1);
if(rl < p cross)
{
put c(i) into the set for cross-over ;
count+ + (no. of chromosomes for cross-over);

}
}
if count is odd
for(i =1 to pop size)
i
generate rl;
if(rl < p cross)
{ add c(i) into crossover set;
count++;
break;
}

}
for(j = 1 to count, increment by 2)

{
REPEAT1:
generate : r2 and r3 in the range of 1 - chrjen;
interchange: c(j), c(j+l), bet. r2 & r3'h position
check : feasibility of the offspring generated;
if not feasible goto REPEA Tl;
replace: c(j), c(j+1) with new offsprings ;
}
update the new population with the offspring ;
}
Scheduling l;MS Using Heuristic imd Search Techniques A. 13

/* mutation module */
mutjn ()
{
for( i =1 to pop size)

{
REPEAT2:
for(j=l tochrjen)

{
generate: r4 (float range [0 — I]);
if (r 4 < pjnui)
getterate a digit randomly (integer);
}
check for feasibility of the mutated chromosome;
if not feasible goto REPEA T2;
}
}

A3.2 ILLUSTRATION
The proposed methodology is illustrated with the data that has been used by Wang et al.
to show potential of the proposed GCID3 algorithm for scheduling FMS. TABLE A3.1 gives
the data used by Wang et al. (1995). The pop size and no it have been fixed as 10 and 100
respectively. Step by step solution results of an iteration is given below.
The initial population of chromosomes 'c' generated along with their information entropy
gains 'EG(c)\ probability of survival 'P(c)' and cumulative probabilities 'CP(c)', which are
given in TABLE A3.2. The chromosomes, which have been selected based on the cumulative
probability values of the old population, represent the new population. The respective data are
given in TABLE A3.3. The random numbers generated and the chromosomes selected with
p eross value of 0.4 for cross over are given in TABLE A3.4. Since number of
chromosomes selected during the first pass became one (odd i.e. 3' only), the process is
repeated for the second time until one more chromosome (9') is selected. The random cut
points generated for first pair of chromosomes selected for cross-over are: 38 and 63. The
chromosomes 3 and 9 are interchanged between 38th and 63th position and lead to offspring
Scheduling FMS l (sing Heuristic and Search Techniques
A. 14

3" and 9". After they are crossed, the reproduced new population becomes: 1' - 2' - 3" - 4' - 5' -

6'- 7'- 8' - 9" - 10'. Then the entire elements of the reproduced new population undergo
mutation with pmut value of 0.05 and the new population for next generation is obtained.
This is given in TABLE A3.5. The optimal weight vector, which has been obtained after fifty
genetic iterations, is given below. The information gain with that vector is 0.373748
Opt weight: (-5.624420; 5.028290; 3.674408; 5.304962; -2.292969; -3.378693; -4.791229; -5.236176; 3.858643)

TABLE A3.1 Training examples set


Bias input SYSTEM ATTRIBUTES Corresponding priority
SA, dispatching rule
SA, SAj SA, SA, SA, sa6 sa7 sa8

1 30 12.5 6 76.8 1 2 5.7 0.3 SPT


1 30 12.6 5.3 43.5 3 5 9.7 0.1 SPT
1 31 11.7 4.8 48.7 3 4 8.5 0.1 SPT
1 34 13.6 5.4 53.9 3 5 2.2 0.1 SPT
1 37 13 5.6 60.9 2 5 8.1 0.1 SPT
1 23 11.8 4.3 53.2 3 2 9.2 0.4 LPT
1 25 11.5 4.2 56,2 1 3 8.3 0.3 LPT
1 28 11.5 4.1 96.1 2 1 7.1 0.1 LPT
1 23 14.1 6.5 78.1 2 4 12.6 0.6 LPT
1 31 13.3 4.5 96.3 3 2 6.3 0.2 LPT

TABLE A3.2 : GIVEN IN PAGE A. 15

TABLE A3.3 New population after selection for next generation


Chromosome s of new pope' r 2' 3' 4' 5’ 6' 7 « 9' 10'

Random number *rl* 0 439270 0.947113 0.520386 0.947693 0.35734 0.250549 0.209503 0.82836 0.323585 0.78701

Selected chromosomes 'c' 3 9 3 9 3 2 1 5 2 5

TABLE A3.4 Chromosomes selection for cross over


Chromosome r 2' y 4’ V 6' 7 «• O' 10’

Random munber (1) 0.770996 0.429352 0.330536 0.64o342 0500793 0.518097 0.540558 0.727631 0 654321 0.944153

Selected YES/NO no no yes no no no no no no no

Random number (H) 0.453949 0.440582 0.608154 0.732483 0.676117 0.683472 0.833771 0.706512 0.379059

Selected YES/NO no no no no no no no no yes


Scheduling FMS Using Heuristic and Search Techniques
A. 15

TABLE A3.2 Initial population


WEIGHT Chromosome rx> C

1 2 7 4 7 « 7 8 9 10

Weight 1 1 t l 1 2 2 t I 2 2

0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0

2 7 7 4 3 0 a 4 8 7

ft 3 6 t 4 1 2 a 9 2

7 7 7 6 2 4 7 3 9 7

t 9 2 7 0 4 3 7 2 «
7 « 3 0 1 3 7 1 s
W*.g«2 2 2 t 2 \ 2 2 2 2 I

0 0 0 0 0 0 0 0 0 0

l t 0 0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7 a 3 7 7 0 7 4

3 * 7 4 a 4 * 7 * 4
E<*e> 0413*20 0*104)2 0 *09996 0108011 0*09981 0 107492 0 112?** 02S1243 0 244108 0 124328

PM 0 09499} 0 24)365 074871! 0 020204 0 248744 00(994$ 0 020*16 0017)77 0019895 0 021941

CPM 0 09499) 0 342)78 0 79107* Oft!1279 0 879823 0 8797)2 0 900408 09181*5 0 9)8059 1 00000
Scheduling FMS Using Heuristic and Search Techniques A.16

TABLE A3.5 New population for next generation


wHOJfr Ororrwtome e"

1 2 7 4 1 6 7 • 9 10

1 2 1 2 1 1 1 2 1 2

0 0 D 9 0 0 0 0 0 0

0 0 0 0 0 0 0 S 1 0

5 8 5 9 5 7 7 7 3

« 9 4 9 4 3 7 4 1 4

5 9 1 9 5 7 7 2 7 2

2 2 2 2 2 * 9 0 9 0

4 7 4 3 4 7 7 0 7 0

Weight 2 1 2 1 2 1 2 2 1 2 1

0 0 0 0 0 a 0 0 0 0

0 0 0 0 0 i 1 1 1 1

7 5 7 5 7 4 ft 4 • 3

0 S 0 7 0 3 2 9 3 9

9 : « e 9 S 1 4 ! ft
7 0 7 1 7 7 3 2 1 2

8 i 9 i 9 7 7 4 7 5
Weirf*3 1 2 t 2 1 2 2 1 2 1
0 0 0 0 0 0 0 0 0 0

0 l 0 1 0 1 1 0 1 o

5 9 5 9 5 9 8 2 9 4

4 2 6 2 6 4 6 5 4 2

9 7 8 3 9 1 I 9 ! 6

8 5 8 4 * 4 6 ft ft 4

J 2 1 9 7 4 4 2 9 3

Weight 4 1 2 ! 2 1 1 I 1 i I

0 0 0 0 0 o 0 o 0 0
t 1 1 1 1 0 0 1 0 1

7 9 7 9 9 4 4 4 4 4
9 9 9 « 9 1 3 7 1 3

7 9 7 * 7 7 1 7 1
9 2 9 2 9 1 1 9 1 9

9 7 8 7 6 7 7 7 7

Wfi,ghti 2 ! 2 l 2 1 1 2 1 2

0 0 0 0 6 0 0

e 0 I i t 1 t

6 4 0 0

4 9 2 2

4 2 8 9

0 0

9 9

Weight« 2

0 0 0 0

0 1 1 0 0 0

$ 7 6 7 5 6 3 ft
* * 7 5 6 * 0 6 7
0 J 8 7 7 8 8 7 4
7 9 7 9 7 7 3 7 4

8 < 1 * 8 S 1 4 8 1

Weight 7 1 2 1 2 1 1 I 2 1 2

0 0 0 0 0 0 0 0 0 0

1 0 1 0 1 0 I 0 1 0

* 1 9 9 1 I 1 8 5

0 6 1 6 o t I 0 0 0

4 9 « * 4 4 ft 2 4 4
7 4 5 4 7 5 % 9 7 9

* • 6 4 4 6 4 8 4 8

Weight! 2 1 I 1 2 2 l 2 t

0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

2 6 9 6 2 9 9 8 2 9

7 * 9 4 7 7 9 2 7 2
1 J 0 » 7 0 0 9 7 9

« 5 9 7 4 7 7 4 7

4 9 4 9 4 8 8 9 8 3
Weijgt 9 1 2 t 2 2 2 2 2 2

0 0 0 0 0 0 e 0 0 0
ftharattilar Untvarsity
0 n
Library
0 0 0 0 0 0 0 0

4 •
9 7 i 1 1 i t 0 1 0
73615
7 7 9 9 7 2 2 1 2 1
ENGG
1 7 5 7 5 2 2 7 2 1

7 8 4 6 4 4 • 4 *

You might also like