FET Forum

FET Development => Suggestions => Topic started by: Liviu Lalescu on August 12, 2025, 07:21:21 PM

Title: A suggested new type of constraint
Post by: Liviu Lalescu on August 12, 2025, 07:21:21 PM
Hello, forum,

I received from Youssef Bourdha (via GUEFFAZ REDA, on Facebook) a suggestion to constrain the students to begin either at the first hour or at the third. This is what I understood they need, but they suggested probably wrong:

To implement students begin early max beginnings at third hour. They wanted to use both 0 beginnings at second hour so that the students wouldn't start the day at the second hour, but only at the first and third. This is what I understood.

But it won't work. 0 beginnings at second hour means the students must begin at the first hour.

However, I thought of a conditional constraint: if the students set has activities at second hour, it must have activities also at the first hour. It might work, but I don't know exactly how to name it and organize it.
Title: Re: A suggested new type of constraint
Post by: Benahmed Abdelkrim on August 13, 2025, 11:58:13 AM
But why this constraint is needed? If there is a need to begin at 3 hour, it is enough to simply not use the constraint of begin earlier max at 2 hours, specially in the complex timetables(number of rooms < number of groups of students).
 I
Title: Re: A suggested new type of constraint
Post by: Liviu Lalescu on August 13, 2025, 12:03:17 PM
Dear Benahmed,

They would like a students set to begin their days either at the first hour or at the third hour (but not at the second hour).

Maybe a new constraint named just like that, students (set) begins at first or at third hour.

Or other complex constraint, like: students (set) if has activities in slots X (x1, x2, x3, x4, x5) then it has activities in slots Y (y1, y2, y3, y4, y5), respectively.
Title: Re: A suggested new type of constraint
Post by: YOUSSEF HOUIET on August 13, 2025, 12:07:30 PM
I think this is a special case that can be handled with a custom version, since the required constraint will be used only in this case. In principle, adding constraints should be general so they can be used by a large number of users.
Title: Re: A suggested new type of constraint
Post by: Liviu Lalescu on August 13, 2025, 12:10:53 PM
Yes, I agree, but I think I had other requests in the past that students begin in 1st or 3rd hour, not in the 2nd.

And a general conditional constraint might be useful for more users...
Title: Re: A suggested new type of constraint
Post by: Benahmed Abdelkrim on August 13, 2025, 01:32:49 PM
Quote from: Liviu Lalescu on August 13, 2025, 12:03:17 PMDear Benahmed,

They would like a students set to begin their days either at the first hour or at the third hour (but not at the second hour).

Maybe a new constraint named just like that, students (set) begins at first or at third hour.

Or other complex constraint, like: students (set) if has activities in slots X (x1, x2, x3, x4, x5) then it has activities in slots Y (y1, y2, y3, y4, y5), respectively.


Or maybe a smart and complex constraint like: if activities cannot be scheduled at second hour they are scheduled at third hour.

Or it can be added as an option in the existing constraint: students (set) begins earler (max beginnings at second hour) ...
Title: Re: A suggested new type of constraint
Post by: Liviu Lalescu on August 13, 2025, 01:34:55 PM
Thank you! I will think about it.
Title: Re: A suggested new type of constraint
Post by: Benahmed Abdelkrim on August 13, 2025, 02:46:15 PM
QuoteOr it can be added as an option in the existing constraint: students (set) begins earler (max beginnings at second hour)

as a selection box: allow beginnings at third hour.
Title: Re: A suggested new type of constraint
Post by: Liviu Lalescu on August 13, 2025, 02:48:03 PM
Maybe, I'll think about it.
Title: Re: A suggested new type of constraint
Post by: Aboulhamid on August 17, 2025, 06:38:39 PM
First of all, I would like to sincerely thank the team for your outstanding efforts.
Currently, the program includes two categories of constraints depending on the scope: one that applies to an individual teacher, and another that applies to all teachers.
If possible, it would be highly appreciated to add a third category of constraints that applies specifically to a selected group of teachers.
Thank you in advance.
Title: Re: A suggested new type of constraint
Post by: Liviu Lalescu on August 17, 2025, 07:17:59 PM
Thank you for your kind words!

Unfortunately, such a feature was not thought of from the start. It would be a very complex task to make it now.

I will add your suggestion in the TODO. It was suggested by more users in the past.

But if sponsored, I would consider it.
Title: Re: A suggested new type of constraint
Post by: Aboulhamid on August 17, 2025, 11:06:17 PM
Thanks a lot for replying my message
Title: Re: A suggested new type of constraint
Post by: Vangelis Karafillidis on August 17, 2025, 11:57:58 PM
Liviu.

I think that there might be some kind of misunderstanding...
There are two variants.
1) The "literal" variant: The user needs to define a group of teachers and then apply the necessary constraints to this group of teachers.
2) The "functional" variant: The user can select the teachers they need (let's say by clicking on the respective checkbox for each one of the teachers), and then add the constraint to the selected teachers (practically: add multiple constraints at once... one constraint for each one of the selected teachers).

The 1st variant seems to be what Aboulhamid suggested, and most likely it's difficult and tricky to code.
The 2nd variant, seems (at least to me) to be primarily some kind of UI "manipulation", which most likely does not need some "tricky" code for defining groups teachers, plus some "exotic" code for applying constraints to groups of teachers. Maybe... the 2nd variant (regarding the functionality part) is a good option, without severe implications regarding the coding part. What do you think Liviu? And... what do other users think about these variants?

Vangelis.

Title: Re: A suggested new type of constraint
Post by: Liviu Lalescu on August 18, 2025, 05:29:53 AM
Vangelis, I considered the first variant (defining groups of teachers).