How to prevent two selected buildings from being used next to each other?

Started by aofpm, May 07, 2024, 10:17:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aofpm

How to prevent two selected buildings from being used next to each other?

Liviu Lalescu

Do you mean B1 and B2, they should not appear consecutively on the same day in students' set S / teacher's T timetable? If you can use min gaps between buildings constraints, it is easy, otherwise, if you mean only these two exact buildings, you might need a customization.

aofpm

I mean, students should not study Building 3 and Building 4 consecutively.thank you

Liviu Lalescu

You are welcome!

If you have only Building 3 and Building 4 in your data, or you can reduce all your buildings to these two buildings (like ignoring Building 1, 2, 5, 6, ...), you can use the official FET with a constraint students min 1 gap between building changes.

Otherwise (if in your timetable you need to consider all the buildings, for other buildings constraints), you need a customization.

Or, another possibility to avoid the customization would be to add a tag AT3 to all the activities in Building 3 and a tag AT4 to all the activities in Building 4, if this is possible (if you know the building of each activity before generating), and use 2 constraints students min gaps between ordered pair of activity tags, one between (AT3, AT4) and the other between (AT4, AT3).