|
Step 1: Initialize population of fireflies |
| Random population of N solutions using LD constraint sorting |
| Each exam is placed in non-conflicting slot |
| Initialize all variables |
|
while
t < MaxGeneration
do
|
|
for
i = 1: n (all n fireflies)
do
|
|
for
j = 1: n (all n fireflies)
do
|
|
Step 2: Evaluation |
|
if
then
|
| move firefly in relation to i using the Kempe move;
|
|
while
count
5 & Ii = Inew
do
|
| move firefly in relation to i using the Kempe move;
|
|
end
|
|
end
|
|
Step 3: Stepping ahead
|
|
if
Stepping ahead is activated
then
|
| move firefly in relation to j using the Kempe move;
|
|
while
count
5 &
do
|
| move firefly in relation to
using the Kempe move 1 & 2;
|
|
end
|
|
end
|
|
end
|
| nothing |
|
end
|
| Rank fireflies and update best using threshold and probability; Preference utilized; |
|
if
No improvement
then
|
| Stepping ahead is activated; |
|
else
|
| Stepping ahead is deactivated; |
|
end
|
|
if
No improvement due to stepping ahead
then
|
| restart 10 steps back where there was improvement; |
|
end
|
|
end
|
|
Post processing the results and visualization;
|