Constraint Suggestion – Extension of “Pair of Mutually Exclusive half days

Started by YOUSSEF HOUIET, August 03, 2025, 06:33:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

YOUSSEF HOUIET

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.


Liviu Lalescu

Hello,

Thank you for your kind words!

I am very tired now. I'll try to answer tomorrow.

Liviu Lalescu

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.

Liviu Lalescu

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.

Liviu Lalescu

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.

YOUSSEF HOUIET

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.


Liviu Lalescu

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!

Liviu Lalescu

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.

YOUSSEF HOUIET

Hi,
I will try the snapshot this afternoon and will provide results and feedback. Thank you for your implementation of the suggested feature.


Liviu Lalescu

I added a new snapshot, I only changed some strings. No need to retest.

YOUSSEF HOUIET

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.


Liviu Lalescu

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.

:)

YOUSSEF HOUIET

Yes, that's exactly what I had in mind the feature is indeed general.
Thanks again.

Liviu Lalescu


Liviu Lalescu

Thank you, @YOUSSEF HOUIET , for the suggestion and testing! I just released the new official version with this new useful constraint.