Algorithm for creating a school timetable

后端 未结 16 1706
暖寄归人
暖寄归人 2020-12-04 04:57

I\'ve been wondering if there are known solutions for algorithm of creating a school timetable. Basically, it\'s about optimizing \"hour-dispersion\" (both in teachers and

16条回答
  •  不知归路
    2020-12-04 05:11

    It's a mess. a royal mess. To add to the answers, already very complete, I want to point out my family experience. My mother was a teacher and used to be involved in the process.

    Turns out that having a computer to do so is not only difficult to code per-se, it is also difficult because there are conditions that are difficult to specify to a pre-baked computer program. Examples:

    • a teacher teaches both at your school and at another institute. Clearly, if he ends the lesson there at 10.30, he cannot start at your premises at 10.30, because he needs some time to commute between the institutes.
    • two teachers are married. In general, it's considered good practice not to have two married teachers on the same class. These two teachers must therefore have two different classes
    • two teachers are married, and their child attends the same school. Again, you have to prevent the two teachers to teach in the specific class where their child is.
    • the school has separate facilities, like one day the class is in one institute, and another day the class is in another.
    • the school has shared laboratories, but these laboratories are available only on certain weekdays (for security reasons, for example, where additional personnel is required).
    • some teachers have preferences for the free day: some prefer on Monday, some on Friday, some on Wednesday. Some prefer to come early in the morning, some prefer to come later.
    • you should not have situations where you have a lesson of say, history at the first hour, then three hours of math, then another hour of history. It does not make sense for the students, nor for the teacher.
    • you should spread the arguments evenly. It does not make sense to have the first days in the week only math, and then the rest of the week only literature.
    • you should give some teachers two consecutive hours to do evaluation tests.

    As you can see, the problem is not NP-complete, it's NP-insane.

    So what they do is that they have a large table with small plastic insets, and they move the insets around until a satisfying result is obtained. They never start from scratch: they normally start from the previous year timetable and make adjustments.

提交回复
热议问题