Information Technology Reference
In-Depth Information
i=1
Generates a random number r in (0, 1)
No
'
Generate
v
in
r 1 <HMCR
M
+
1
i
the range (
l ,
i u
)
i
Yes
Using choosing procedure
to determine
Generates a random
number r in (0, 1)
'
v
M
+
1
i
No
'
v
=
v
M
+
1
i
r 2 <PAR
M
+
1
i
Yes
'
Adjusts
v
by eq.(9)
Yes
M
+
1
i
i< m
i=i+1
No
Stop
Fig. 6. The procedure for generating new harmony in NHS1
−≤. If this relation is satisfied, the NHS
will terminate, otherwise, set N 1 =N 1 +N 2 , hm 0 =hm g , f 0 =f g and NHS will go to Step 2.
If js<N 1 , NHS will go to Step 2.
Step 5: If js = N 1 , then check
f
f
ε
o
g
It must be noted that M /2 random numbers and the parameter cp are used to deter-
mine the number of new harmonies to be generated within one iteration step in Step 3.
An alternative procedure to determine the number of new harmonies is the use of pa-
rameter N h which is the number of new harmonies to be obtained within one iteration
step. The latter procedure is much more straightforward and is also easier to imple-
ment than the former one. In order to compare with the modified harmony search
algorithm, in which the parameter N h is adopted to determine the number of new har-
monies within one iteration step, the same parameter N h is also performed, namely,
the latter procedure is adopted in this chapter. In the following example, the value of
N h is equal to 5, and N 1 =500, N 2 =200.
Search WWH ::




Custom Search