Max hours per day but only 1 time a week

Started by ellebi, August 04, 2019, 04:52:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ellebi

Dear all,
I've been using FET from last year with satisfaction, but since I started usign it, I have an unsolved question that I'd like to share with you:
is there a way to impose a max number of hours for a teacher per day, but for (example) only max 1 time a week?
In other words: I'd like to make a teacher work for 5 hours per day, (and I know how to do it) but only for 1 time in the week, not two...
For example:
Teacher with 15 hours in a week
4 working days max in a week for that teacher, with "potentially" 6 hours max per day.
I imposed 3 max first hours, 3 max last hours and 2 max gaps per week
but... here's the problem:
I often obtain a calendar wit 2 days filled wit 5 hours plus one gap per day, so that the teacher is in school for 6 hours a day for two days...
Is it possible to tell to FET to assign to this teacher only one day "full"?
Something like the max span per day, but for "n" times a week?
I hope it's all clear
Many thanks to all
Best regards

Liviu Lalescu

Hello, ellebi,

I might have an acceptable solution for you. It involves some work to add quite many constraints, it needs updating these constraints if you add activities for that teacher, and it might not be perfect for you, because it says that the teacher can have max 1 day with 5 hours, but not max 1 day with span 6:

You need for each teacher and for each pair of different days to add a constraint activities occupy max different slots from selection: add all activities of that teacher, day 1 and day 2 selected slots with X, max occupied = 9.

If you have 5 days per week, you add 5*4/2=10 constraints for each teacher. If you have 6 days per week, you add 6*5/2=15 constraints for each teacher.

Please let me know.

ellebi

Hi Liviu,
first of all, it's an honour for me to speak with you :): your program and your work are really useful for me. It's really difficult to find people with your willingness, and please accept my apologies because I'm late with the donation that you really deserve!
In next days I will provide with pleasure and I'll let you know.

Concerning this topic: many thanks for your prompt reply: I did know the constraint you suggest to me, and I find it very powerful, even with the problem you described (a big problem when you must reload activities for some reason: now I'll go for a while OT: It would be useful a sort of Export + Import of these rules, at least when they concern the whole activities of a teacher...)

But I didn't know the "advanced" usage you've suggested now, and I think it will help me.
Only one question: in the two days (1 and 2) I must select all hours, isnt't it?
Moreover, I will think about the possibility to add some dummy activity to obtain the gap in the day: in this case if I well understand, I must set to max occupied slots the number of 10...

Thank you and
Best regards

Luca

Liviu Lalescu

#3
Quote from: ellebi on August 04, 2019, 08:52:50 PM
Hi Liviu,
first of all, it's an honour for me to speak with you :): your program and your work are really useful for me. It's really difficult to find people with your willingness, and please accept my apologies because I'm late with the donation that you really deserve!
In next days I will provide with pleasure and I'll let you know.

Thank you for the appreciation! The honor is also mine :)

Quote
Concerning this topic: many thanks for your prompt reply: I did know the constraint you suggest to me, and I find it very powerful, even with the problem you described (a big problem when you must reload activities for some reason: now I'll go for a while OT: It would be useful a sort of Export + Import of these rules, at least when they concern the whole activities of a teacher...)

Each constraint must contain all the activities of that teacher. So if the ids of the activities remain the same, it is not a problem.

About import/export of the constraints: it is complicated for me, I am not experienced in this. But open the .fet XML file with a text editor or an XML editor, and see the section <Time_Constraints_List>. The constraints are very easy to understand. You can generate this text automatically. It is the advantage of FET open file format.

Quote
But I didn't know the "advanced" usage you've suggested now, and I think it will help me.
Only one question: in the two days (1 and 2) I must select all hours, isnt't it?
Moreover, I will think about the possibility to add some dummy activity to obtain the gap in the day: in this case if I well understand, I must set to max occupied slots the number of 10...

Thank you and
Best regards

Luca

For each teacher, select each possible pair of days. In each pair (say 2 and 5) select all slots of these two days, with X. Then add the constraint and move to the next pair of days.

Hmm, if you add dummy activities for the gaps I think it won't work. See: if you impose max 11, you may get on day 1     5 activities and 1 dummy, and in day 2    5 activities and 1 gap. If you impose max 10, it rules out day 1   5 activities 1 dummy and day 2    4 activities and 1 dummy.

Also the dummy activities (gap activities) pose problems for min days per week and min hours daily.

You are welcome, Luca!! :)

ellebi

Yes,I think It's clear...
Many thanks again, I'll let you know if I need further help...
Best regards!
Luca

Liviu Lalescu

You are welcome! Let me know if you succeed.

bachiri401

#6
Sorry to enterveen here but I think the constraint max/min hours per  day should be modified ( max / min hours per day for all days except 1/2....)

ellebi

In the meanwhile, I try to take advantage from this conversation asking to you some clarrificaton about the costraint I tried to use on this peoblem.
In Italian is "Un insegnante fa lezione in un intervallo orario massimo n giorni a settimana": I set it from 1 to 6 once a week, but I think it was in conflict with the max hour per day (5) already setted because it try ti fill the 6 hours with activities, and gaps are not considered in the count, I'm correct?
Is there a way to use this constraint, may be in association with other workarounds?
Not urgent, only if you can!! :-)
Thank you
Best regards
Luca

Liviu Lalescu

Quote from: ellebi on August 05, 2019, 08:06:23 AM
In the meanwhile, I try to take advantage from this conversation asking to you some clarrificaton about the costraint I tried to use on this peoblem.
In Italian is "Un insegnante fa lezione in un intervallo orario massimo n giorni a settimana": I set it from 1 to 6 once a week, but I think it was in conflict with the max hour per day (5) already setted because it try ti fill the 6 hours with activities, and gaps are not considered in the count, I'm correct?
Is there a way to use this constraint, may be in association with other workarounds?
Not urgent, only if you can!! :-)
Thank you
Best regards
Luca

The interval max days per week works differently: in this interval, there can be activities only n time per week. So you want the teacher to work max 1 day per week. If I say from 4 to 6 max 2 per week, in the other days the teacher has no activities from 4 to 6. Please let me know if it is clear now.

Liviu Lalescu

#9
Quote from: bachiri401 on August 04, 2019, 10:27:30 PM
Sorry to enterveen here but I think the constraint max/min hours per  day should be modified ( max / min hours per day for all days except 1/2....)

It is a very nice idea, but it is complicated to implement. I will think some more, but I will probably just add this in the TODO for now.

If there were constraints max 0 gaps or no gaps constraints, it would have been not so complicated. But the general case looks ugly.

I will consider this proposal and think of it in the future.

For other users: do you consider it useful for max hours daily allowing 1 day exception (maybe only for the teachers)?

ellebi

Quote from: Liviu Lalescu on August 05, 2019, 09:51:54 AM
The interval max days per week works differently: in this interval, there can be activities only n time per week. So you want the teacher to work max 1 day per week. If I say from 4 to 6 max 2 per week, in the other days the teacher has no activities from 4 to 6. Please let me know if it is clear now.

Ops, it's so clear that I'm asking to me why I had this doubt...

Quote from: Liviu Lalescu on August 05, 2019, 10:50:03 AM
For other users: do you consider it useful for max hours daily allowing 1 day exception (maybe only for the teachers)?
To me, it would be very useful, but only if I can choose the teacher(s) setting the general rule and the exception. If the constraint would work for all teachers, imho would not so useful (if I correctly understood your proposal!).

Thank you for all the proposals in this thread, now I "metabolize" them all and I'll proceed.
To simplify my work, I think I'll have also to work with "min hours per day", so to better distribute the hours of the teacher in the week.

Have a nice evening!

Luca


Liviu Lalescu

Quote from: ellebi on August 05, 2019, 07:17:15 PM
Quote from: Liviu Lalescu on August 05, 2019, 10:50:03 AM
For other users: do you consider it useful for max hours daily allowing 1 day exception (maybe only for the teachers)?
To me, it would be very useful, but only if I can choose the teacher(s) setting the general rule and the exception. If the constraint would work for all teachers, imho would not so useful (if I correctly understood your proposal!).

Thank you for all the proposals in this thread, now I "metabolize" them all and I'll proceed.
To simplify my work, I think I'll have also to work with "min hours per day", so to better distribute the hours of the teacher in the week.

Have a nice evening!

Luca

Teacher/teachers max hours daily with 1 day exception. So you can select a teacher or all the teachers.

Thank you! Success!

bachiri401

why don't you let the exception optional (except 1 /2 /3 ....day)

Liviu Lalescu

Because it is not useful I think and because already with 1 day exception the code looks very complicated for me. I will think of it, but I think I won't add it soon even with 1 day exception.

bachiri401

sometimes we need to make a teacher work 6 hours a day for three days for example except two days (5 times in total days)