Search code examples
algorithmgenetic-algorithmoptaplanner

Modeling a Score Constraint for optimizing schedules towards repeated weeks in OptaPlanner


I have a scheduling problem for schools. Lectures will have to planned, each taking into account a teacher, a curriculum and a room. These have hard constraints.

The next most importing thing is that the schedule has as much continuity as possible, i.e. every week should be as similar as possible. This will often not be possible, as the number of lectures required for a year will not divide into the number of weeks, in this case, weeks that are bi-weekly similar will be preferable.

Is there anywhere I can find work that deals with this problem? Is this known problem that I just miss the terminology for?


Solution

  • For your base problem I assume you had already seen the OptaPlanner course scheduling example?

    As for the continuity issue I would suggest the following:

    Figure out what criteria you want to be similar between weeks: Same Course Same Time Same Course Same Room and etc....

    Set up a rule for each criteria where if the criteria is not met in two consecutive weeks (for example the room was changed from week 1 to week 2) deduct one point from the soft score.

    This will guide OptaPlanner to creating a schedule where there is consistency between weeks.

    Hopefully this give you some idea on what you can do. (If I understood the problem correctly)