Limit the maximum hours a day of a specific matter/teacher for every class

Started by Sauro, September 14, 2022, 05:02:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sauro

Is there a simple method to se a constrain to limit the maximum number of hours a day per class of a specific course/teacher (either consecutive or not), preferably not involving keys?
Thanks

Liviu Lalescu

I think the only method is to use tags: activate the constraints of type activity tag max hours daily (don't worry, they are working well) and use the constraint students/teachers activity tag max hours daily (add for each needed activity a tag).

Oh, you may also use 5 constraints of type activities occupy max time slots from selection for each teacher/students set, but it is overkill.

Sauro

Many thanks Liviu!
Actually this is the same method I implemented my own and it works.
I just wondered if this could somehow related with a very strange convergence issue I'm experiencing now.
I'm working on a timetable for a school with two buildings. I've introduced classes, teachers and activities for one building at the time and tested independently successfully.
Mostly of the teachers works in a building or in the other, while five of them are shared between the two buildings.
I properly set the classes in the rooms and the rooms in each building so Fet can evaluate to move teachers from one building to the other during the holes.
I've set constrains to allows holes for the trips between building (1 trip per day per teacher, max 5 trips per week).
So, everything seems ok in the constrains (they works properly one building at the time) but when I join the two buildings and related classes/teachers, Fet seems to loose the way... :'(  :'(  :'(
When it starts, immediately places 130 activities over 279 but after that it stops for a second, then the number of activities placed progressively come back to 100...80..50...30...16 ??? in ten seconds! :o 
I can understand if stops at a certain number (too many / too bad constrains) but I really can't understand why it should step back to only 15-16 allocated activities. This seems really a non sense to me.
If I disable activities of one entire class (whichever is it over the 11 total classes) it works perfectly and find good combinations in few seconds.
Do you have any Ideas about it?
I've attached the link OneDrive to some screenshots of the app when running.

Screenshots of the issue

Thanks in advance!
(...by the way, it would be nice to have a counter showing the number of iterations done when running, just next to the lapsed time)
Sauro

Liviu Lalescu

Hello, Sauro,

Quote from: Sauro on September 15, 2022, 01:31:36 AM(...by the way, it would be nice to have a counter showing the number of iterations done when running, just next to the lapsed time)

I don't understand. It would not be useful, just taking up the space there.

Quote from: Sauro on September 15, 2022, 01:31:36 AMbut I really can't understand why it should step back to only 15-16 allocated activities. This seems really a non sense to me.

No, this is no nonsense. It places 130, but the 131-st is impossible, so it finds that the 131-st and other 14-15 activities are together impossible. It is actually a very good indicator that the timetable is impossible.

You can try to see the partial timetable with those 15-16 activities and the next activity. I can only help you if I see your file, which you can send here or my email.

Sauro

Many thanks Liviu!
I suggested the counter of iteration not because is necessary but somehow is nice to see how much work this wonderful software is doing in our place and the human effort saved.
Coming back to my problem, I guess there are some bad constrains/mistakes not properly set, causing Fet not to find a valid solution.
I've attached below the link OneDrive to the file and I would really appreciate if you can give a look to it and provide me a feedback.
Again many thanks and my compliments for this wonderful and useful tool!

Sauro's time-table

Liviu Lalescu

Quote from: Sauro on September 15, 2022, 09:19:04 AMMany thanks Liviu!
I suggested the counter of iteration not because is necessary but somehow is nice to see how much work this wonderful software is doing in our place and the human effort saved.

You are welcome! Thank you very much for the appreciation!  :)

The iterations are hard to count or show. The time is also not very relevant, but maybe more relevant than the iterations.

Quote from: Sauro on September 15, 2022, 09:19:04 AMComing back to my problem, I guess there are some bad constrains/mistakes not properly set, causing Fet not to find a valid solution.
I've attached below the link OneDrive to the file and I would really appreciate if you can give a look to it and provide me a feedback.
Again many thanks and my compliments for this wonderful and useful tool!

I need to go now for a few hours, but I will check your file when I'll get back immediately and let you know.

Thank you for your very kind words!  :)  They push me to continue developing FET and keeping my way.

Liviu Lalescu

It is easy: I removed all teachers but TEACHER 1, and removed all the space constraints and deactivated the 3rd time constraint from the end (otherwise the timetable is not possible). See attached screenshot and .fet file. It is impossible as you want, because it would contradict max 5 hours per day for teachers.

Sauro

Yes, it's true! I did it and now I'm reaching the target quite easily.
Thankss!!!🙏

By the way...since sometimes the software runs over nighttime or unattended anyhow, expecially when runs multiple timetables, it would be nice to have the option to turn-off PC when done.

Liviu Lalescu

You are welcome!

I will add your suggestion in the TODO list, but it is complicated (because of many computer types) and maybe risky. I think the suggestion was already in the TODO, but I will also add your name.