FYP Progress Presentation

16
FYP Progress Presentation Genetic Algorithm (GA) Presented By: Oluwaseun Akintimehin

description

FYP Progress Presentation. Genetic Algorithm (GA). Presented By:. Oluwaseun Akintimehin. Project Goals. Develop / apply a GA search algorithm to a basic timetable scenario. Visually display results and incorporate low level user interface. - PowerPoint PPT Presentation

Transcript of FYP Progress Presentation

Page 1: FYP Progress Presentation

FYP Progress Presentation

Genetic Algorithm

(GA)

Presented By:

Oluwaseun Akintimehin

Page 2: FYP Progress Presentation

Project Goals

Develop / apply a GA search algorithm to a basic timetable scenario.

Visually display results and incorporate low level user interface.

Define full New Engineering Building (NEB) timetabling model and fitness criteria.

Test a range of scenarios and verify correctness. Define limitations of the system.

Page 3: FYP Progress Presentation

Develop / apply a GA search algorithm to a basic timetable scenario.

Develop a series of diagrams illustrating each project phase.

Define a basic timetabling problem. Develop a solution to the timetabling problem. Apply GA search algorithm to the timetabling

solution.

Page 4: FYP Progress Presentation

Illustration of Project Phase

Page 5: FYP Progress Presentation

A Basic Timetabling Problem

A program is asked to read the following input data, and to generate a suitable fitness without taking into account the GA process.

• Number of Modules: 8• Number of Staffs: 8• Number of Groups: 2• Number of Room: 3• Number of Periods: 12(4 for each room)• Number of Days: 1

Page 6: FYP Progress Presentation

Rules

1 1 1 2

2 3 2 1

3 1 3 2

4 2 4 2

5 2 5 2

6 3 6 1

7 3 7 1

8 3 8 1

GroupModule Staff Nos. Hours

Page 7: FYP Progress Presentation

Limits

• A staff can not give more than one lecture at the same time period.• Teaching group can not learn more subjects at the same time period.• Room can be devoted to only one module in the same time.• Module can not be assigned time period different from the times stated.• Group and staff should be assigned to the right module based on the rules.

Page 8: FYP Progress Presentation

Solution For Timetabling Problem

• Initialise variables according to problem definition.Mmax = 8 //Max value of ModulesGmax = 2 //Max value of GroupsSmax = 8 //Max value of StaffsRmax = 3 //Max value of RoomsTmax = 4 //Max value of Time periodsF = Fitness

Page 9: FYP Progress Presentation

for(r=1 to r=Rmax){ for(t=1 to t=tmax) {

cell[r,t,m] = RandomNumb(1 to Mmax)cell[r,t,g] = RandomNumb(1 to Gmax)cell[r,t,s] = RandomNumb(1 to Smax)

}}

Module is represented as 1 in three dimensional arrayGroup is represented as 2 in three dimensional arrayStaff is represented as 3 in three dimensional array

Page 10: FYP Progress Presentation

E.g. cell[1,1,1] represents the value of m where r =1and t =1. cell[3,2,3] represents the value of s where r = 3 and t = 2.

Page 11: FYP Progress Presentation

Rules

Modules Groups Staff Nos. Hours1 1 1 2

2 3 2 1

3 1 3 2

4 2 4 2

5 2 5 2

6 3 6 1

7 3 7 1

8 3 8 1

cell(ref)[m,g] allows the checking the group with respect to the module.cell(ref)[m,s] allows the checking the staff with respect to the module.nh(ref)[m] allows the checking of the number of hours assigned to the module.

Page 12: FYP Progress Presentation

• Run first test to see that the right module, group and staff are assigned according to the problem definition. Increment fitness as applicable.

for(r=1 to r=Rmax){ for(t=1 to t=Tmax { F = 2 (default) cell[r,t,1] = m if(cell[r,t,2] |= cell(ref) [m,g]

tempFit = 1 if(cell[r,t,3] |= cell(ref)[m,3]

tempFit = 1else

tempFit = 0}F = F + tempFit

}

Page 13: FYP Progress Presentation

• Run second test to make sure the modules are assigned the right number of hours. Increment or decrement fitness according the difference in error.

for(r=1 to r=Rmax){ for(t=1 to t=Tmax) {

Diff = | Nh[r,t,m] – Nh(ref)[m] |tempFit = Diff

Fit = Fit + tempFit }

F = F + Fit}

Page 14: FYP Progress Presentation

• Run test to prevent group and staff clashes between time periods.

for(t=1 to t=Tmax){ for(r=1 to r=Rmax) { for(s=r+1 to s=Rmax) {

if(cell[r,t,2] = cell[s, t, 2]tempFit++F=tempFit

} } }The same code will be used for testing the staff (cell[r,t,3]).

Page 15: FYP Progress Presentation

The following are different scenarios of the timetable and their fitness.

Scenario 1

1, 1, 1 5, 2, 5 2, 3, 2

4, 2, 4 6, 3, 6 1, 1, 1

3, 1, 3 5, 2, 5 8, 3, 8

7, 3, 7 4, 2, 4 3, 1, 3

Fitness = 0Scenario 2

1, 1, 1 5, 3, 5 2, 3, 2

4, 2, 4 6, 3, 6 1, 1, 1

3, 1, 3 5, 2, 5 8, 1, 8

7, 2, 7 4, 2, 4 3, 1, 3 Fitness = 6

Scenario 4

1, 2, 2 5, 2, 3 2, 1, 2

4, 3, 1 6, 3, 2 1,2, 1

3, 3, 5 5, 1, 5 8, 3, 2

7, 1, 4 4, 3, 4 3, 2, 3

Fitness = 24

Page 16: FYP Progress Presentation

Project Objective Timeline

Goal Target Date Length of Time

Code Sample Design 1st February 2006 10 days

Develop / Apply GA 13th February 7 days

Define full NEB Design 23th February 7 days

Develop / Apply GA 1st March 13 days

Quality Testing / Research

15th March 7 days

Final Report 22nd March 10 days