Is there an algorithm that creates of university timetable for the whole semester?
Asked Answered
D

4

6

I have to implement an algorithm that generates a timetable for a university. I've searched and found a lot of algorithms. But here is the problem. I need an algorithm that generates a timetable for the whole semester, not on a weekly base. It should also consider the predefined order of the course's parts, e.g. exercise 1 should be after lecture 2 and before lecture 3. Do you have any suggestions?

Thanks.

UPDATE:
I have the following hard constraints:
H1: Only one course part is assigned to each room at any time slot.
H2: The room can host all attending students and satisfies all features required by the event.
H3: No student attends mode than one course at the same time (at least the obligatory courses)
H4: No teacher teaches more than one course part at the same time.

The soft constraints are:
S1: A course part should be not allocated to a time slot inconvenient for a lecturer.
S2: There should be a minimal number of gaps between classes of a teacher.
S3: There should be a minimal number of gaps between classes for student.
S4: Classes should satisfy lecturer preferences - days and time slots.
S5: Course parts should be scheduled to predefine order.

Example:
Course "Software architecture"

Week No   Course    Room    Course Part   Day       Time
--------+---------+-------+--------------+----------+-----
Week 1:   SA        435     Lecture 1     Wednesday  8.15-11
Week 2:   SA        435     Lecture 2     Wednesday  8.15-11
Week 3:   SA        47      Lab 1         Monday     13-15
Week 3:   SA        436     Lecture 3     Wednesday  11-14
Week 4:   SA        243     Exercise 1    Monday     13-15
Week 5:   SA        436     Lecture 4     Wednesday  8.15-11
Discriminating answered 20/6, 2010 at 6:38 Comment(2)
Hi. I have added the constraints and an exampleDiscriminating
Dude, every time it comes time to enrol in units I wish there was a prorgam/script to do this for me.Bunkum
D
0

I ended up with a modified algorithm of the one suggested here. I used the Iterative Forward Algorithm and then applied the simulated annealing for the soft constraints. I changed the timeslots set, so that it contains the whole set of timeslots for the semester without the weekends and the holidays. For example, if the semester has 6 weeks and for each week I have 40 hours, then my set of timeslots will contain the whole 240 timeslots.

I also added a constraint for the order. When this constraint is not satisfied then it put a high weight for the current solution. In this way I prevent the algorithm to choose a solution with courses that are not in the with order.

Discriminating answered 12/8, 2010 at 8:18 Comment(0)
C
1

You might want to look into interval scheduling. It sounds like you would need a modified version that added some constraints such as where the exercises are allowed to be placed. Greedy algorithms are usually rather easy to modify, and there's a whole bunch of already modified versions of the basic IS algorithm.

Chladek answered 20/6, 2010 at 6:47 Comment(0)
D
0

I ended up with a modified algorithm of the one suggested here. I used the Iterative Forward Algorithm and then applied the simulated annealing for the soft constraints. I changed the timeslots set, so that it contains the whole set of timeslots for the semester without the weekends and the holidays. For example, if the semester has 6 weeks and for each week I have 40 hours, then my set of timeslots will contain the whole 240 timeslots.

I also added a constraint for the order. When this constraint is not satisfied then it put a high weight for the current solution. In this way I prevent the algorithm to choose a solution with courses that are not in the with order.

Discriminating answered 12/8, 2010 at 8:18 Comment(0)
P
0

I am working on similar kind of project and using Adapted Genetic Algorithm to solve the problem at hand.

Study genetic algorithm in detail and then using your constraints design a flowchart to solve your problem, taking into account all of the constraints you've mentioned.

Physiotherapy answered 12/4, 2013 at 9:17 Comment(0)
S
-1

IIRC such a problem is not entirely solveable by algorithm.

Shallop answered 20/6, 2010 at 15:34 Comment(1)
In any case you could do a full search.Exurb

© 2022 - 2024 — McMap. All rights reserved.