FET Forum

FET Support (English) => Get Help => Topic started by: mbarsan on September 16, 2008, 10:36:32 PM

Title: Min hours daily for all teachers
Post by: mbarsan on September 16, 2008, 10:36:32 PM
I have a school where teachers must work 5 of 6 days weekly, and at least 2 hours daily.

If I use constraints 1) Max days per week for a teacher and 2) Min hours daily for all teachers, I dont get  what I want.

It happens that FET, for some teachers put activities in less than 5 days. I have to avoid this. All teachers MUST work at least 2 hours daily all 5 days...

Can I get this?   :(

Thanks!
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 17, 2008, 07:14:37 AM
There are two possibilities:

1) Use constraint teacher max hours daily for each teacher with a suitable value for each teacher.

2) I will make you a special version with non-intelligent teachers min hours daily. That means each day will necessarily have at least 2 hours. Then, add a dummy activity for each teacher, no students set, duration=n_hours_per_day. This will not work if you have constraints teacher not available in certain days -> FET will not be able to put there this dummy activity, so timetable will be more difficult to make in this case or even impossible.
Title: Re: Min hours daily for all teachers
Post by: mbarsan on September 17, 2008, 07:53:28 AM
Hi!
Thank you for the first suggestion. I think that it can work.

Thanks also for the second one... but it's difficoult for me to imagine a non-intelligent version of FET...  [smiley=2vrolijk_08.gif]

I haven't understood why I need a dummy activity in this case. Can you explain?
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 17, 2008, 09:00:55 AM
QuoteHi!
Thank you for the first suggestion. I think that it can work.

Thanks also for the second one... but it's difficoult for me to imagine a non-intelligent version of FET...  [smiley=2vrolijk_08.gif]

I haven't understood why I need a dummy activity in this case. Can you explain?

The min hours daily can be intelligent (adaptive): there can be empty days, and non-intelligent (non-adaptive), which means all days must be non-empty. Official FET has intelligent min hours daily for teachers and non-intelligent for students. This is because if I add intelligent for students, some timetables are not solvable.

You need a dummy activity for each teacher, because one day must be empty. And non-intelligent constraint requires all days to be non-empty.

I prefer also the first solution. The second solution means that I must modify FET, and I am afraid not to mix this feature with the official FET on my hard disk. Also, some teachers might not be available sometimes and the dummy activity might not be put there (as I wrote previously). But I could do this variant for you.
Title: Re: Min hours daily for all teachers
Post by: Chafik Graiguer on September 17, 2008, 12:21:44 PM
QuoteI have a school where teachers must work 5 of 6 days weekly, and at least 2 hours daily.
how many hours per week each teacher has ??
this value is very important to determine if we need any dummy activities or non-intelligent version at all
suppose, a teacher has 14 hours per week
we will set
maxmmum hours per day ---> 3
minimum hours per day ---> 2
in the worst case, FET can put
3+3+3+3 +2 -----> = five days    :)
we will easily avoid :
4+4+4+2 -----> four days   :(
So no need to create  any dummy activity
Quote
Thanks also for the second one... but it's difficoult for me to imagine a non-intelligent version of FET...  [smiley=2vrolijk_08.gif]
intelligent means: teacher has minimum 2 hours per day or nothing (o hours/free day):
possible figures:
0, 2, 3, 4, 5,....

Non-intellugent means:
teacher must have minimum 2 hours No 0 hours
possible figures:
2, 3, 4, 5....
Quote2) I will make you a special version with non-intelligent teachers min hours daily.
FET already has a "Maximum days per week" for teacher
So is it possible/easy to make a constraint like this:
"Minimum days per week"
If such constraint exists, there will be no need to swich between intelligent/non-intellignet version
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 17, 2008, 12:31:15 PM
Quote

suppose, a teacher has 14 hours per week
we will set
maxmmum hours per day ---> 3
minimum hours per day ---> 2
in the worst case, FET can put
3+3+3+3 +2 -----> = five days    :)
we will easily avoid :
4+4+4+2 -----> four days   :(
So no need to create  any dummy activity


But this legal situation: 4, 4, 2, 2, 2 is made impossible by max hours daily=3.

Quote

FET already has a "Maximum days per week" for teacher
So is it possible/easy to make a constraint like this:
"Minimum days per week"
If such constraint exists, there will be no need to swich between intelligent/non-intellignet version


It is not easy. It might be very difficult. It might be possible.
Title: Re: Min hours daily for all teachers
Post by: Chafik Graiguer on September 17, 2008, 03:12:40 PM
Quote
But this legal situation: 4, 4, 2, 2, 2 is made impossible by max hours daily=3.
Yes !! you are right
So He will need a non-intelligent version ( with dummy activities)
Now is it possible that a  switch intelligent/non-intelligent be available to user interface transparentely !?
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 17, 2008, 03:28:47 PM
I thought of this.

No, I won't do it. The users will of course select intelligent (adaptable) even for students, without reading too much about it. I have a sample file, which can be solved if you add non-intelligent min hours daily for students, but cannot be solved if you add intelligent min hours for students. Here is why FET cannot find a solution in the second case: he might fill n-1 days, and then he gets another activity which must be placed on day n, because in other days it cannot fit. Then, he needs to take a lot of activities from days 1..n-1, so that day n has more activities. This will be difficult. But if FET uses non-intelligent min hours daily for students, it will know that each day will need at least mH hours and also he cannot put too many activities in the days 1..n-1, because he "thinks" about respecting also the n-th day. So, when activity A comes that cannot be put into days 1..n-1 and must be put in day n, he already has some activities in the n-th day or he has some more activities available to put in the n-th day, without emptying the days 1..n-1.

:-)
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 17, 2008, 06:09:00 PM
QuoteI have a school where teachers must work 5 of 6 days weekly, and at least 2 hours daily.

If I use constraints 1) Max days per week for a teacher and 2) Min hours daily for all teachers, I dont get  what I want.

It happens that FET, for some teachers put activities in less than 5 days. I have to avoid this. All teachers MUST work at least 2 hours daily all 5 days...

Can I get this?   :(

Thanks!

I have thought about this, mbarsan.

I think I can make you a custom version which allows to specify the minimum number of days in which the teachers must have minimum hours daily, so exactly what you need.

Please let me know your answer.
Title: Re: Min hours daily for all teachers
Post by: mbarsan on September 17, 2008, 11:01:01 PM
Thanks, but for now I prefer to work with original version of FET. I've understood very well why I need a dummy activity in the second solution.

I think that the first solution may fit and solve the problem. This case too may take advantage of a dummy activity to avoid an empty day: think about a teacher with 11 hours weekly. I will set a constraint min hours daily=2 and max hours daily=3. But I may get a 3+3+3+2 (= 4 days instead of 5). I will add a dummy activity (no students and no subject)= 3 hours weekly and 1 day between activities (100%).

The limit is that I can't get a 2+3+4+3+5, for instance. I'll ask a custom version of FET if I can't solve the problem in any other way!


Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 18, 2008, 07:13:39 AM
QuoteThanks, but for now I prefer to work with original version of FET. I've understood very well why I need a dummy activity in the second solution.

In my previous answer, I was meaning that it is possible to make a custom version to allow non-adaptive constraint min hours daily for teachers, but constraining a day to have 0 hours (without using dummy activities - so it will always solve well).
Title: Re: Min hours daily for all teachers
Post by: mbarsan on September 18, 2008, 08:01:36 AM
Ok, that would be great!   :)
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 18, 2008, 08:12:10 AM
So, I'll try this.

You still need to add constraint teacher max days per week for each teacher. Then add constraint teachers min hours daily.

I assume that each constraint min hours daily must be respected such that n_days-1 days will have at least min hours, and one day may be free. United with the max days per week, this will solve your problem.

Could you please send me a test file? It is important to test my code. Also, I would prefer you to send it soon, because in one hour I'll start coding.
Title: Re: Min hours daily for all teachers
Post by: Liviu Lalescu on September 18, 2008, 10:57:13 AM
Good news: I have made you a special version, please see the Custom section on FET web page or the Forum entry.

Please let me know.

I tested with trivial file and it seems to work. But I might be wrong, so if you cannot obtain a good timetable please let me know.