mafiavova.blogg.se

Class scheduling
Class scheduling








class scheduling

If a class is located in a classroom with enough available seats, guess what, we increment its score. If a class requires computers and it is located in the classroom with them, or it doesn't require them, we increment the score of the class. If a class uses a spare classroom, we increment its score. As I previously said, only hard requirements are used to calculate the fitness of a class schedule. Now we need to assign a fitness value to the chromosome. The program would open the default browser to well arranged the course class timetable. The result will be displayed in form of HTML table. Also, we assume that classes cannot begin before 9am, and should finish before or at 9pm (12 hours total), and working days are from Monday to Friday (5 days total). How can we represent the chromosome for a class schedule? Well, we need a slot (time-space slot) for each hour (we assume that time is in one hour granules), for every room, every day. In other words, we should be able to calculate the fitness value of our solution.

Class scheduling how to#

Also, we should know how to specify how good our solution is. The first thing we should consider when we deal with a genetic algorithm is how to represent our solution in such a way that it is feasible for genetic operations such as crossover and mutation. It also stores how many seats (sum of student groups' sizes) are needed in the classroom, if the class requires computers in the classroom, and the duration of the class (in hours). The Course class has an ID and the name of the course.ĬourseClass holds a reference to the course to which the class belongs, a reference to the professor who teaches, and a list of student groups that attend the class.

class scheduling

IDs are generated internally and automatically. If the classroom has computers, it is expected that there is a computer for each seat. The Room class has an ID and the name of the classroom, as well as the number of seats and information about equipment (computers). It also contains a list of classes that the group attends. The StudentsGroup class has an ID and the name of the student group, as well as the number of students (size of group). It also contains a list of classes that a professor teaches. The Professor class has an ID and the name of the professor. Let's start by explaining the objects which makes a class schedule. In this example, only hard requirements are implemented. Hard and soft requirements, of course, depend on the situation. Some soft requirements (can be broken, but the schedule is still feasible):ĭistribution (in time or space) of classes for student groups or professors. To place a class in a classroom, the classroom must have laboratory equipment (computers, in our case) if the class requires it. No professor or student group can have more then one class at a time.Ī classroom must have enough seats to accommodate all students. Hard requirements (if you break one of these, then the schedule is infeasible):Ī class can be placed only in a spare classroom. These requirements can be divided into several groups by their importance. When you make a class schedule, you must take into consideration many requirements (number of professors, students, classes and classrooms, size of classroom, laboratory equipment in classroom, and many others).

class scheduling

In this article, I assume that you are familiar with the basic concepts of genetic algorithms, and I won't describe them in detail because it has been done so many times before. This is where genetic algorithms come in to the game. For more complex inputs and requirements, finding a considerably good solution can take a while, or it may be impossible. The problem can be solved using a heuristic search algorithm to find the optimal solution, but it only works for simple cases. Making a class schedule is one of those NP hard problems. Making a Class Schedule Using a Genetic Algorithm with Python Introduction










Class scheduling