University Timetable Scheduling Project using Genetic Algorithm (JAVA) -



personal info: hello everyone, i'm computer science student; (unfortunately) has work on np-complete problem final year project. not experienced in programming beyond assignments , things learned in university. apologies ignorant questions might ask.


university timetable scheduling project using genetic algorithm:

this topic final year project of university. have gathered information needed , wrote proposal , progress report aware of fact that, topic np-complete. goal of project not create golden timetable, optimal , no problem instead have make sure acceptable , not break of rules.

regarding methodology , way want create application, have decided use 2 main artificial intelligence techniques solve problem; genetic algorithm , constraint satisfaction. came rules , divided them in 2 main groups; soft constraints , hard constraints. algorithm should work way:

assuming have our inputs (classrooms , capacities, subject names, lecturers , amount of students signed them). application starts generating random timetables. decided implement hard constraints, 1 cannot ignored (such having same lecturer teaching more 1 classes @ same time or classroom being occupied more 1 subject @ given time) @ stage. generating random timetables creating them, apply hard constraints them. call guided randomly generated timetables. next stage find best possible timetable. using previous technique talked about; know generated timetables acceptable in terms of hard constraints using genetic algorithm find best possible (most optimal) timetable , result. soft constraints ( such having break between classes, avoiding same subject having more 1 class everyday , such) used in ga's fitness function.


all of these approach solve problem, until started programming. looked on paper, programming skills holding me finish project.

i have questions regarding coding part, appreciate if guys can me.

questions: 1. tutorial , guideline, manual genetic algorithm libraries in java ? decided use jgap, people's suggestions on other threads cannot find tutorial on internet , unfortunately after ours of looking @ examples provided in jgap library still cannot figure out happening there.


  1. for constraint programming part want apply, have use specific library on java or can if/else or switch statements ? if please let me know of name , details.

most important question: 1. how create timetable? ok, said not programmer. can assume i'm stuck @ first step of project, creating timetable. have treat object? , sort of data structure guys use create such timetable? array, linklist, queue ?

here attempt on creating timetable:


                              **updated** 

after working on project. managed create timetable. here update classes shared.

public class subject {   public string name; public int students; public string nameoflecturer; public classvenu addvenues;  public subject(string argname, string argnameoflecturer, int  argstudents)  { name = argname; nameoflecturer=argnameoflecturer; students=argstudents;  }  public string tostring() { return name;}} 

public class classvenu {   public string classname; public int classcapacity;  public classvenu(int argclasscapacity, string argclassname) { classname = argclassname; classcapacity = argclasscapacity; }      } 

public class days extends hours{  public days(subject a, subject b,subject c, subject d,subject e, subject  f,subject g,subject h, subject j) {int i=0;    timeslot[i]=a;     timeslot[i+1]=b;      timeslot[i+2]=c;       timeslot[i+3]=d;        timeslot[i+4]=e;         timeslot[i+5]=f;          timeslot[i+6]=g;           timeslot[i+7]=h;            timeslot[i+8]=j;     } 

package fyp_small_timetable; public class hours { public subject [] timeslot = new subject[9]; 

}


 package fyp_small_timetable;    public static void main(string[] args) {     //creating subjects subject = new subject("human computer interaction", "batman" , 49); subject b = new subject("artificial intelligence", "batman" , 95); subject c = new subject("human computer interaction", "batman" ,180); subject d = new subject("human computer interaction", "batman" , 20); subject e = new subject("empty", "no-one", 0);     //creating class venue classvenu class1 = new classvenu(100,"lecturertheater1"); classvenu class2 = new classvenu(50,"lecturertheater2"); classvenu class3 = new classvenu(200,"lecturertheater3");      //creating days days day1 =new days(a, a, e, b, b, e, e, a, a); days day2 =new days(c, c, e, d, d, e, e, a, a); days day3 =new days(e, e, e, b, b, e, e, a, a); days day4 =new days(c, c, e, c, c, e, e, a, a); days day5 =new days(a, a, e, b, b, e, e, a, a);   //creating timetable timetable t1 = new timetable(day1, day2, day3, day4, day5);  list<subject> answer = t1.showtimetable(t1); system.out.println(answer);   }  } 

please keep in mind that, code shown above, prototype (my attempt create timetable).

if willing me can provide full documentation of have done far in project.


thanks helps me , wish can others hirad

i have used genetic algorithms solve university timetable scheduling problem in production application.

do not worry library use there many great java ga libraries out there.

what should focus attention on way in encode candidate timetables. typically use numeric representation, example ['math', 'chemistry', physics] = [1, 4, 6] each number represents unique class while index of number represents time class offered. fitness function take multidimensional array of values representing population of candidate schedules, population compared student listing , constraints applied such clashing , possible fitness calculated.

you may want think of fitness normalization .

most importantly not use objects store timetable information instead use simple integer arrays, dramatically increase speed of generic algorithm.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -