EXISTING ALGORITHM
HARMONIC SEARCH ALGORITHM
begin
Objective function f(x), x=(x1,x2, ,xd)T
Generate initial harmonics (real number arrays)
Define pitch adjusting rate (rpa), pitch limits and bandwidth
Define harmony memory accepting rate (raccept)
while ( t<Max number of iterations )
Generate new harmonics by accepting best harmonics
Adjust pitch to get new harmonics (solutions)
if (rand>raccept), choose an existing harmonic randomly
else if (rand>rpa), adjust the pitch randomly within limits
else generate new harmonics via randomization
end if
Accept the new harmonics (solutions) if better
end while
Find the current best solutions
GRAPH COLORING ALGORITHM
Step 1. Assign the first color c1to the first vertex v1
Step 2. Vertex v2 is assigned color c1 if it is not adjacent to v1 otherwise
it gets assigned color c2
Steps3..n Vertex vi is assigned the first possible color in the priority
list of colors (i.e. the first color that has not been assigned to one of
the already colored neighbors of vi).
[Link]
ADAPTATION FOR OUR PROJECT
HARMONIC SEARCH ALGORITHM
begin
1. Assign each subject code students separately in separate arrays.
2. Mention limit of groups in each hall and adjusting rate of groups.
3. Calculate accepting rate (i.e.,)No of students can occupy each hall in arrays.
4. Initialize each hall seating arrangement randomly from each group.
5. while (temp<=no of halls)
Check initial arrangement whether it satisfies the condition(same
subject code students should not sit near)
Adjust limit of groups by looping and allocate arrangement using
GRAPH COLORING ALGORITHM till satisfy all constraints
end
6. Display efficient seating arrangement for each hall.
end
GRAPH COLORING ALGORITHM
STEP1: Assign first group first number to the first seat of the hall.
STEP2: Next seat is assigned by next number if it not nearer to same subject code
students otherwise next group next number
STEP3N: ith place is assigned by first possible group in the priority list of
groups.
[Link]