Students (set) / teacher(s) max single gaps in selected time slots

Started by yush, July 03, 2025, 09:23:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu


yush

Quote from: Liviu Lalescu on July 03, 2025, 01:32:03 PMIt is ready: https://lalescu.ro/liviu/fet/download/custom/yushB/

Please check that src/engine/generate.cpp contains the string "Yush" twice.


Yup, got it. Actually has the string "Yush" three times. Will let you know if the result.

yush

It works! Now I need to verify that my trick actually helps with the optimization. But as far as the functionality of avoiding gap, it works!

Liviu Lalescu


yush

OK, as far as helping with the performance, not as well as I've hoped. The problem is I am adding extra "free" hours to patch up the holes so I can use this "max single gap" constraint to avoid a certain layout. In the example of a 9 hours/slots afternoon, here is another case I want to avoid:
Recap: In a 9 slots afternoon, 3+3+3 is good, 4+4 is ok. 3+5 is NOT good, 3+4 is also NOT good.

With the "max single gap" constraints, I cannot really avoid the 3+4 case since there are two open slots between 3 & 4 out of 9. I tried to get it to work by adding an extra "free hour", so to avoid a single gap would achieve what I want. The problem is, there is no exact way to add the free hour at the right place.

So, I think it would be great if we can "adjust" this "single gap". By default, it is just one hour. Is it possible to "adjust" the gap to be other number of hours? So I can avoid any kinds of gap.

*** by the way, I meant to add this whole conversation to the thread that I posted earlier that resulted in this new feature. I did a search on the forum, saw the word "gap"... thinking that this was the right thread. I just realized my mistake.***

Liviu Lalescu

No problem about the mistake! I might split this topic later - if you don't see it here, look for the redirect.

I tried to think of your problem/suggestion, but it looks quite complicated.

A good solution which is already available is the Mornings-Afternoons mode. In this mode you split a real day in morning and afternoon (FET days, half days), and the gaps are computed only for a half day. The FET days are: Monday_morning, Monday_evening, Tuesday_morning, ..., Friday evening (10 FET days for 5 real days). The min/max days between activities remain for real days, and you have also min/max half days between activities.