Min hours daily for teachers between certain days

Started by Cyrus Ireri, April 25, 2025, 11:26:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cyrus Ireri

Hi,i have a question.I have a scenario where on Mondays,only form 4 s are taught.Form 1-3 have exams same day.All classes are on sessions as from Tue to Fri.Due to that,teachers can have session on Mon or not depending on whether they teach form 4.Is it possible to have min hours/sessions that a teacher can have between tue and Fri so that we don't have a scenario like i have attached of a teacher having 2 sessions in a day and others have many.If this can happen,it can help in balancing.Will appreciate feedback

Liviu Lalescu

Hello, Cyrus,

I think you can add min 4 hours daily for all teachers, and min 5 days per week for those who teach on Monday and min 4 days per week for those who only teach from Tuesday to Friday.

Cyrus Ireri

If i add min 4 hours daily for all teachers, it will not generate since on Monday, some teachers don't have sessions.

Liviu Lalescu

The min hours daily for teachers allow empty days.

Cyrus Ireri

The only challenge is on Monday,those teaching form 4 can only have max 2 sessions and other days have min 3.I thought there is a way of having min 3hours for all teachers between Tue and Fri because on Monday,teachers can't have 3

Liviu Lalescu

Oh, I see. Then you can use activities occupy min time slots from selection. 4 constraints for each teacher, so there are many constraints, unfortunately. For a constraint, select all activities of a teacher, select with X (red) all the slots of Tuesday, min occupied = 3, then another constraint Wed, Thu, Fri, then another set of constraints for other teachers.

Cyrus Ireri

Thats the tedious step i was trying to avoid.I have 59 teachers.Those are 236 constraints 😱

Liviu Lalescu

Hmm... it is a very specialized constraint; I cannot see a way to add it into the official FET - maybe "teacher(s) min hours daily with exception of one day". But even if it could be added, the code is critical considering the other constraints' interaction.

Even as a customization it is difficult.

Would you like me to add it in the list of suggestions?

Cyrus Ireri


Liviu Lalescu


Cyrus Ireri


Cyrus Ireri

Can Min hours daily in an hourly interval be a solution more so when every day can be treated individually?

Cyrus Ireri

Just wondering though i know we only have Max hours daily in an hourly interval for all days

Liviu Lalescu

I am not sure I understand exactly the reason you could use the constraint min hours daily in an hourly interval for your problem. But it is an interesting suggestion, which I will also add in the TODO. Indeed, we only have max, not min, available.

I would be interested in researching the possibility/feasibility of making teacher(s)/students (set) min hours daily in hourly interval, but financial support (or rather lack of) is a big problem for FET.