Lec 8
Lec 8
by
Salwani Abdullah
[email protected]
Universiti Kebangsaan Malaysia
1
Contents:
Introduction
Harmony Search Algorithm, HS
Application of the HS
References
2
Introduction
◼ HS is a population based metaheuristic algorithm
inspired from the musical process of searching for
a perfect state of harmony.
5
Harmony Search Algorithm
2
g
2
1 g2
2 ... g 2
N → f (G )
HM = ... →
HMS −1 HMS −1 HMS −1 HMS −1
g1 g2 ... g N → f (G )
g HMS g HMS ... g HMS
→ HMS
f (G )
1 2 N
Harmony Memory
14
Step 3: HM Improvisation
16
Rule (ii) Pitch Adjustment
• The obtained decision variables from the harmony memory
consideration rule is further examined to determine if it
needs to pitch adjustment (is like a mutation in the GA) or
not.
• A new random number r2 is generated within the range
[0,1].
• If r2 < PAR, then the pitch adjustment decision variable is
calculated as follows:
xijnew = xij ± rand[0,1].BW //for the continuous problem
17
Rule (iii) Random Consideration
• If the condition r1 <HMCR fails (i.e. decision
variables that are not selected from the HM),
it will be selected randomly according to their
possible range of values as follows
xijnew = lij + (uij - lij). rand[0,1] where l, u is the
lower and upper bound for the given problem.
//for continuous problems
• For example, in the gene selection problems,
the possible range value is either 0 or 1.
18
Step 4: HM Update
22
University Timetabling
Internet Routing
School Bus Routing Problem
15 10 20
5 5
8 4 10 School
9
8 7
10 5 20 4
15 10
4 4 5 6 6
5 7
5 7 10 4 5
15 5
Depot 1 2 3
3 5 8
◼ Huge Variables
◆ (454 Pipes)
◼ GA = 2.3M Euro
◼ HS = 1.9M Euro
Hydrologic Parameter Calibration
I
O
Wedge Storage
= K xI t
= K x (I - O)
St + (1 − x)Ot m
( )
n
2
Prism Storage
=KO SSQ = ˆ
Ot − O t
t =1
32
STEP 2: Harmony Memory Initialization
11101 |4
01110 |3
10101 |3
01100 |2
01010 |2
33
STEP 3: Harmony Memory Improvision
34
35
STEP 4: Harmony Memory Update
36
STEP 5: Check Termination Criterion
if yes
STEP 6
else
STEP 2
37
STEP 6: Cadenza
Return the best harmony
38
End of Presentation