language agnostic - Algorithm for computing timetable given restrictions -


i'm considering hypothetical problem, , looking guidance on how approach solving problem, algorithmic point of view.

the problem:

consider university. have following objects:

  • teaching staff. each staff member teaches 1 or more papers.
  • students. each student takes 1 or more papers.
  • rooms. rooms hold number of students, , contain types of equipment.
  • papers. require type of equipment, , amount of time each week.

given information enrollments (i.e.- how many students enrolled in each paper, , staff allocated teach each paper), how can compute timetable obeys following restrictions:

  1. staff can teach 1 thing @ once.
  2. students can attend 1 paper @ once.
  3. rooms can hold number of students.
  4. papers require type of equipment can held in in room provides type of equipment.
  5. hours of operation monday friday, 8-12 , 1-5.

discussion:

in reality i'm not concerned situation outlined above - it's general class of problem i'm curious about. @ first glance seems me fit genetic algorithm, fitness function such algorithm incredibly complex.

what's approach trying solve kind of constraint-satisfying problem?

i guess there's no way solve perfectly, since students may take combination of papers leads impossible situations, number of students & papers grows.

staying on genetic algorithms, don't think fitness function complex, quite opposite.

you check candidate solution (whatever encoding) each of constraints (you have 5) , assign weight them when constraint not satisfied weight added total score represent fitness.

in such scenario minimize fitness function (because best fitness possible 0, meaning constraints satisfied) , let ga crunch numbers.

the encoding take bit of figuring out, once that's done should straightforward, unless missing something, of course :)


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -