FET Forum

FET Development => Suggestions => Topic started by: YOUSSEF HOUIET on August 03, 2025, 06:33:31 PM

Title: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 03, 2025, 06:33:31 PM
Hello, I hope you're all doing well.

First of all, thank you for the great work on FET.

I'd like to suggest an extension of the existing constraint:
"Teacher(s)/Students (set) – Pair of mutually exclusive time slots"

The idea is to create a similar constraint that works at the half-day instead of individual time slots.

Suggested new constraint:

"Teacher(s) – Pair of mutually exclusive half-days"

Purpose:

To make it easier to define rules such as:

A teacher works either on Friday morning or on Saturday, not both. A teacher works either on Saturday morning or on Monday morning, not both.

This would provide more flexibility and simplicity, especially compared to manually selecting many time slots to achieve the same result.

Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 03, 2025, 07:49:24 PM
Hello,

Thank you for your kind words!

I am very tired now. I'll try to answer tomorrow.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 04, 2025, 08:28:36 AM
Hello, Mr. Youssef,

First of all, please clarify first Saturday - which, morning or afternoon?

I'll add your suggestion in the TODO, but maybe this is more general:

teacher(s)/students (set) - pair of mutually exclusive sets of time slots, so that you select two sets of slots and they are mutually exclusive. You will add a teacher, and select in set 1 -> Friday morning (all slots on this day) and in set 2 -> Saturday (? morning or afternoon) all slots of this day.

I will add these in the TODO, for now. If I were sponsored for them, I think I would do them right away. My requested financial support for this is 2000 euros.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 04, 2025, 01:52:22 PM
Hello again, Mr. Youssef, and everybody,

I decided to try this now, even if not sponsored. It is for the benefit of the FET program and of all the users.

I think I'll try the general option, a pair of mutually exclusive sets of time slots.

I'll let you know if I progress.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 04, 2025, 07:18:21 PM
I did the most difficult part, the engine. It compiles (but it is not tested, because I need to add the interface also). It should work. I hope later tomorrow I'll have it ready for a test from you. @YOUSSEF HOUIET , please stay tuned for the snapshot announcement.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 05, 2025, 04:15:09 AM
Thank you for your quick response and continued development of the program despite limited financial incentives.
I remain available to test the new feature as soon as it's ready for testing.

Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 05, 2025, 12:31:30 PM
I have a working program, I checked a bit. Now I need to double-check and test, and I estimate that in 2-4 hours I'll put a working snapshot.

Thank you as well!
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 05, 2025, 04:03:24 PM
The snapshot is ready. Download from here:

https://lalescu.ro/liviu/fet/download/test/

Thank you, Mr. YOUSSEF HOUIET, for a good suggestion!

Please test! I hope to release in 2-3 days.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 05, 2025, 04:26:26 PM
Hi,
I will try the snapshot this afternoon and will provide results and feedback. Thank you for your implementation of the suggested feature.

Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 05, 2025, 05:35:54 PM
I added a new snapshot, I only changed some strings. No need to retest.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 05, 2025, 07:45:47 PM
First, thank you for implementing this important new constraint.
The interface is clear and intuitive.

Currently, the program allows setting two mutually exclusive time slots of different durations. However, I think the two mutually exclusive slots should have the same duration.

When testing mutually exclusive time slots with different durations, I observed that the constraint does not apply to the extra duration in the longer slot.

Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 05, 2025, 07:59:30 PM
Thank you for the report!

I think it is correct as it is now. You just need to select two sets of slots. It is very general - the slots don't need to be continuous. You can select in a set Monday 8 and Monday 11 and Tuesday 8, and in the other set any values different from these.

The teacher/students set can have activities in set 1 XOR set 2.

I am too tired now. I'll revisit your post tomorrow morning.

:)
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 05, 2025, 08:04:10 PM
Yes, that's exactly what I had in mind the feature is indeed general.
Thanks again.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 05, 2025, 08:09:10 PM
You're welcome! Thank you!
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 08, 2025, 07:17:51 AM
Thank you, @YOUSSEF HOUIET , for the suggestion and testing! I just released the new official version with this new useful constraint.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 08, 2025, 02:08:49 PM
Thank you my friend
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 08, 2025, 02:11:14 PM
You are welcome, and thank you, my friend!  :)
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Vũ Ngọc Thành on August 09, 2025, 03:16:33 AM
It would be nice to build constraints that apply to group ID: id=1, id=2, id=10,....
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 09, 2025, 03:36:29 AM
Do you mean that the constraint should be more general and apply to activities, with the activities being selected by filtering based on teacher, students, subject, or activity tag?

Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Vũ Ngọc Thành on August 09, 2025, 04:21:03 AM
That's right
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 09, 2025, 07:13:16 AM
I will try.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 09, 2025, 11:22:36 AM
Vu Ngoc, I began it, and I am confident that it will work. Please stay tuned for a test version. I hope I can do it the latest in 8 hours from now (I think tonight 21 Romania time should be ready, the latest). But it might take more, please excuse me if so.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 09, 2025, 04:37:05 PM
The code is done. I need to intensively test and check. I will let you know.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 09, 2025, 07:58:37 PM
It is ready. Please test!

Link: https://lalescu.ro/liviu/fet/download/test/

Or you can see the Snapshot board here on the forum.
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: YOUSSEF HOUIET on August 10, 2025, 04:53:22 AM
Hi liviu
I tested the new constraint,
and it works well, producing the expected results.
I tried it on teachers' activities, students, activity tags, and subjects, and no issues appeared.
I also tested leaving one of the interface components empty — the alert messages worked correctly.
I further tested modifying the constraint, and no problems occurred.

Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 10, 2025, 04:58:19 AM
Oh, thank you, Youssef! :-)
Title: Re: Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days
Post by: Liviu Lalescu on August 10, 2025, 05:46:34 AM
I added a new snapshot, minor things. Now I allow a single activity in the new constraints.