Conditional unavailable time

Started by yush, March 10, 2025, 03:13:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yush

I have a situation where I need to make a certain time slot unavailable only under some condition. Here is the situation:
- We have a 8 days cycle
- Lessons are in variable lengths of 30 (rare), 45 (more common), 60 (most common), 75 and more (rare) minutes
- We want to have the first 45 minutes of each day as free/coummunity time where no lessons happen
- We want to be able to swap this 45 minutes with the last lesson of the day on every Friday so we can end the school day early on every Friday (or any adhoc day for that matter)
- Due to the 8 days cycle, Friday could land on any random one day of the eight
- Easy solution would be to have only 45 mins class to end the day, than we can always swap
- Problem is we don't have enough 45 minutes lessons to cover that
- We also don't want the subjects with mostly 45 minutes lessons to end the day always
- So, we need to sometimes end the day with 45 minutes lessons, sometimes 60 minutes lesson
- We can still swap the 60 min lessons with the 45 minutes morning free time as long as there is a 15 minutes gap immediately after the free period
- There are gaps in the timetable for all students, however, we cannot affort to block out that extra 15 minutes across the bord

- Here comes my need: a constraint for timeslot (on the same day) not available ONLY when the last lesson is 60 minutes long

Is this even possible with a custom version?

yush

Turns out I can use "A set of activities have preferred start time" to achieve what I needed to do.

Liviu Lalescu

I'm sorry, but I don't understand how you solved your problem, which seemed much complex.

yush

You are right, I didn't solve the original problem. I just got around it. The number of 45 mins and 60 mins lessons are fixed. So, I just figured out where I want them to go get a solution. Hence, the set of activities has preferred time slots contraint came in to help.

Yes, my original hope was far too complex. Don't think it's worthwhile to tackle it.