I'm considering a hypothetical problem, and looking for guidance on how to approach solving the problem, from an algorithmic point of view.
The Problem:
Consider a university. You have the following objects:
- Teaching staff. Each staff member teaches one or more papers.
- Students. Each student takes one or more papers.
- Rooms. Rooms hold a certain number of students, and contain certain types of equipment.
- Papers. Require a certain type of equipment, and a certain amount of time each week.
Given information about enrollments (i.e.- how many students are enrolled in each paper, and what staff are allocated to teach each paper), how can I compute a timetable that obeys the following restrictions:
- Staff can only teach one thing at once.
- Students can only attend one paper at once.
- Rooms can only hold a certain number of students.
- Papers that require a certain type of equipment can only be held in in a room that provides that type of equipment.
- Hours of operation are Monday to Friday, 8-12 and 1-5.
Discussion:
In reality I'm not too concerned with the situation outlined above - it's the general class of problem that I'm curious about. At first glance It seems to me like a good fit for a genetic algorithm, but the fitness function for such an algorithm would be incredibly complex.
What's a good approach for trying to solve this kind of constraint-satisfying problem?
I guess there's probably no way to solve this perfectly, since students may well take a combination of papers that leads to impossible situations, especially as the number of students & papers grows.