Constraints for avoid subjects to have lessons in 3 consecutive days

Started by LSimon, August 13, 2015, 05:11:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LSimon

My school is running 6 day cycle (Day 1 - Day 6) with each day 9 periods.

There are some subjects (2 lessons per cycle) which cannot be conducted in 2 consecutive days (including Day 6 + Day 1).
I can set the constraints (min. day between = 2 and max. day between = 4) to get what I want.

However, there are some other subjects (3 lessons per cycle) which cannot be conducted in 3 consecutive days (including Day 5 + Day 6 + Day 1 / Day 6 + Day 1 + Day 2).
I would like to know if there are any good ways to set the constraints for this situation.

Thanks a lot~~

Liviu Lalescu

I think I got it:

Firstly, observe the Advanced spread of activities menu of FET, select avoiding three activities in consecutive days and see how there are added two constraints min days between activities, between A1 and A2 (min 2 days) and between A1 and A3 (min 2 days) (if your activities are A1, A2, and A3).

About your second request, which looks more complicated, I assume A1, A2, and A3 are equivalent. Then add two constraints to order them (A1, followed by A2, and A2, followed by A3). Then max 3 days between A1 and A2 and max 3 days between A2 and A3 should exclude all wrong cases and allow all good cases. Please tell me if I am wrong here.

Edited: This answer is wrong, see below.

LSimon

Is it that I have to add the constraints  A1 & A2 (min. 2 days), A2 & A3 (min. 2 days), A1 & A2 (max. 3 days) and A2 & A3 (max. 3 days) at the same time?

If yes and all weights are set as 100%, then I may have possible combinations:
Day 1 + Day 3 + Day 5
Day 1 + Day 3 + Day 6
Day 1 + Day 4 + Day 6
Day 2 + Day 4 + Day 6

The outcomes I alslo accept are  (Day 1 + Day 2 + Day 4 / Day 1 + Day 2 + Day 5 / Day 1 + Day 3 + Day 4 / ... )

Liviu Lalescu

Sorry, you are right. The second request is more complicated.

But I hope this one works:

So, for the first request, 2 constraints min 2 days (A1, A2) and (A1, A3) or with any other isolated component.

Then, for the second request: to deny Day1, Day2, Day6, add a constraint activities occupy max time slots from selection. Activities: A1, A2, and A3. Selected slots: all of Day1 + all of Day2 + all of Day6, max occupied = 2. Similarly for Day1, Day5, Day6.

This works OK if all activities have the same duration. In other cases, we need to think some more.

Please let me know.

LSimon

Thanks a lot
I have tried the setting you suggested and the outcomes are what I want.
This software is really great!
It helped my timetable scheduling work a lot

Liviu Lalescu