how to optimize school timetable with student *subgroups* (option courses)

Viewed 17

I'd like to optimize timetable in optaplanner where a class of students is split among some elective options for a few courses.

Eg the 4th grade class all get joint trunk lessons (maths, languages, sports...) but a subpart of the group (4S) gets science+ , while the other part (4E) gets science- and economics+. I don't want to consider 4S and 4E as distinct groups, as they should have all trunks courses jointly.

How best model such a situation in optaplaner? Thanks.

1 Answers

In the examination example in optaplanner-examples, there's the notion of a LeaderExam (which both selects a timeslot and a room) and a FollowerExam (which follows a LeaderExam for the timeslot and only selects a room). Maybe such advanced models fit your needs.


Maybe a simple model suffices. Have each Lesson have a Set<StudentGroup> so 2 lessons conflict if they share a studentGroup.

Those trunk lessons have a studentGroupSet of {4S, 4E}, but the science lessons have a studentGroupSet of {4S} only.

The only problem with all this is that we don't support a Joiners.notDistinct(Lesson::getStudentGroupSet) yet, so it would have to go through a filter(ing), which is slower.

Related