Algorithm

download Algorithm

of 2

description

Harmonic search

Transcript of Algorithm

EXISTING ALGORITHM

HARMONIC SEARCH ALGORITHM

beginObjective function f(x), x=(x1,x2, ,xd)TGenerate initial harmonics (real number arrays)Define pitch adjusting rate (rpa), pitch limits and bandwidthDefine harmony memory accepting rate (raccept)while ( traccept), choose an existing harmonic randomlyelse if (rand>rpa), adjust the pitch randomly within limitselse generate new harmonics via randomizationend ifAccept the new harmonics (solutions) if betterend whileFind the current best solutions

GRAPH COLORING ALGORITHM

Step 1. Assign the first color c1to the first vertex v1Step 2. Vertex v2 is assigned color c1 if it is not adjacent to v1 otherwiseit gets assigned color c2Steps3..n Vertex vi is assigned the first possible color in the prioritylist of colors (i.e. the first color that has not been assigned to one ofthe already colored neighbors of vi).

ADAPTATION FOR OUR PROJECT

HARMONIC SEARCH ALGORITHM begin1. 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