FET Forum

FET Support (English) => Get Help => Topic started by: kilindor on January 25, 2026, 03:05:42 PM

Title: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 25, 2026, 03:05:42 PM
Hi everyone.
I have a teacher who only works 8 hours a week, and a maximum of 3 days.
I want the teacher to work one day, then not work the next, and then work the third day... and so on.
I mean, I don't want to group activities on consecutive days.
thanks for help.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 25, 2026, 03:28:38 PM
Hello, kilindor,

Easy: either teacher(s) no two consecutive days, or 4 constraints teacher(s) two mutually exclusive time slots (for each pair of adjacent days).
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 25, 2026, 07:05:30 PM
Thank you Liviu for your quick reply, I'll try.


I have another question about "max half days between a set of activites" constraint wich I put to prevent teacher from working saturday evening and monday morning (morning-evening mode).
When I set weight to 100%, the table doesn't generate at all after several attempts, sometimes it reaches n-1 activity and loop for hours. BUT when I reduce weight to 70% I got a one successful table generation and the constraint was not broken.
What I mean is the table was generated as if the constraint weighed is 100%.
So WHY the table is generated with weight of 70%, BUT didn't generated with 100% Or is it just a coincidence and a stroke of luck.


Thanks a lot.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 25, 2026, 07:09:18 PM
You are welcome!

Just a stroke of luck. I advise you to generate multiple if you have a multi-core processor, and there are more chances of a solution.

Also, if you want 100%, you can use a constraint teacher mutually exclusive sets of time slots.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 25, 2026, 08:36:14 PM
Thank you very much Mr Liviu.
HHH It's really strange, by reducing the weight I got three timetables, one yesterday and two today without breaking the constraint.
It's been more than a week the table didn't generate with a weight of 100% or 99%. But with 70% it did. ;D  ;D
Anyway thank you very much.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 25, 2026, 09:28:24 PM
Quote from: Liviu Lalescu on January 25, 2026, 07:09:18 PMYou are welcome!

Just a stroke of luck. I advise you to generate multiple if you have a multi-core processor, and there are more chances of a solution.

Also, if you want 100%, you can use a constraint teacher mutually exclusive sets of time slots.

Yes I use multiple generation (4 at same time), I don't have a strong laptop but it serves its purpose, If it successfully generates a table, the generation time is approximately one hour (50 minutes - 40 minutes - 1 hour and 10 minutes)..

If you can explain me how to use "teacher mutually exclusive sets of time slots" constraint, if the teacher works on sunday evening, he will not work on monday evening.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 26, 2026, 08:01:55 AM
Teacher pair of mutually excl. sets of time slots: first slots mo evening, second set of slots su evening.

I am sorry, my health is not OK, I cannot answer too well. I'll write later.

Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 26, 2026, 12:44:59 PM
Thank you, Get well soon.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 27, 2026, 12:20:27 PM
Thank you!

You add a constraint "A teacher has a pair of mutually exclusive sets of time slots". Select the teacher, then in first set of selected time slots select all the slots of Monday evening, and in the second set of selected time slots select all the slots of Sunday evening.

Please let me know if you succeeded.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 27, 2026, 04:34:28 PM
Yes, I understand, thank you very much. I'm waiting to get a timetable with this constraint.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 27, 2026, 05:16:03 PM
Sorry I have more one question hh.

It is about morning-evening mode.

Is there a constraint preventing groups from studying only in the last two hours of the day?
For instance, studying is from 9 to 1 PM, then from 2 to 6 PM.
Some groups in some days only study from 4 to 6 PM, with the rest of the day free.

I want to prevent this.

I don't want to use "min hours 3" constraint because there is no problem for groups to study only 2 hours at day, BUT not the last two hours.

Thank you.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 27, 2026, 05:36:26 PM
Absolutely no problem!  :)

Unfortunately, this is more complicated. We already have this in the TODO, I think, and it is a kind of conditional constraint: if the students set has an activity in the last slot, it must have at least 3 activities on that real day. I'll also add your suggestion in the TODO.

It is a research problem, and I would agree to try it, but I would need financial support, which unfortunately is very low for FET.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 27, 2026, 06:08:57 PM
Yes it is a conditional constraint, and I hope will added in the future.

Right now FET has more than enough of beautiful constraints that assist us building nice timetable.

I wish you more success.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 27, 2026, 06:14:08 PM
Thank you!  :)
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 28, 2026, 02:25:21 PM
Liviu, Related to the topic, is there a constraint that prevents the teacher from having 3 consecutive days of rest?

For instance, if the teacher works on Monday, he won't work until Friday, which means 3 consecutive days of rest (sometimes FET gives this pattern).

I want to prevent this, and give him max 2 consecutive days of rest.

I tried "max gaps per week for real days for a teacher = 16 (which means 2 days)" constraint, but it didn't work.
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: Liviu Lalescu on January 28, 2026, 04:04:04 PM
Maybe you could use activities occupy min time slots from selection. All the activities of that teacher, select Tue, Wed, Thu all slots of the day, and min occupied = a suitable value (if at least a day should be occupied from these 3, make min occupied = the minimum number of hours the teacher should have daily or on that day).
Title: Re: Do not group activities on consecutive days for teacher has just 8 hours a week
Post by: kilindor on January 29, 2026, 12:51:26 AM
Thank you Liviu, I'll try.