Main Menu

Teacher begins early

Started by math, November 08, 2019, 09:47:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

math

Hi!

This evening I talked with my brother in law and told him about my previous post regarding tag constraints. We're both amazed about the variety of features that FET is offering. However, while talking about FET we discovered one thing that we both think is not possible at the moment:

Using "Time -> Students -> A student set begins early" it is possible to get a schedule where each student is each student of that set starts in the first block.

As far as we can see this is not possible for teachers. And we both have teachers that demand for an early start, e.g. they have to be back home at noon, carpooling with other colleagues or personal preferences. At the moment we're playing around with teacher availability times, forcing FET to use the early hours for the respective teachers. However, this is suboptimal.

Is there any reason why there's no "Teacher begins early" constraint? Or did just nobody ask, yet?

Liviu Lalescu

#1
Yes, I think nobody asked this until now (only for Algeria/Morocco custom versions, teacher(s) begin afternoons early max beginnings at second hour).

This is a fundamental constraint and all interactions between this and min/max hours daily and max gaps per day/week should be considered in order to obtain a perfect treatment.

As you can see, the students max gaps per day is implemented not perfectly. This is because the constraint was suggested later than I designed students max gaps per week / min/max hours daily / early max beginnings at second hour. So I did not want to take the risk of making critical mistakes and I designed it not perfectly (but in practice it works very well).

Thus, it is very difficult to consider to add your suggestion now, perfectly. The interactions between the constraints are very difficult to handle.

However, it could be implemented not perfectly or, I think nearly the same, you could use the magic constraint activities occupy max time slots from selection. Open that constraint and read the Help on how to constrain a teacher to have say at least 3 activities at the first hour out of 5 days (one constraint), and/or say at least 7 activities in the first two hours (another constraint).

Unfortunately, I think you cannot obtain exactly teacher(s) begin early max beginnings at second hour in this way, and the constraints occupy max must be updated each time you change the activities of that teacher (in the constraint you need to add all the activities of that teacher). But I hope these problems are not critical.

There are important differences between teacher(s) begin early max beginnings at second hour and occupy max, but maybe they won't bother you.

Please let me know if you can use this occupy max constraint or you want me to add your suggestion in the TODO and think about implementing it not perfectly.

Also, if you want two teachers (or more) to have similar timetables (carpooling?) you can use this same occupy max constraint (select all slots, all activities of both teachers, occupy max = max of durations of each teacher).

Also, don't forget about teacher(s) interval max days per week. You can use 3 such constraints for each teacher, and you can specify for instance the last 4 hours out of an 8 hour day, max days per week = 1 or 2.

Volker Dirr

#2
The problem of that constraint is that:
a) it is (nearly always) impossible at schools, because schools have got much more teachers than classes. For example my school has 25 classes, but over 50 teachers. So max 25 teachers can begin in in the first hour, the other over 25 must have free the first hour! And that each day! So since more then half of the teachers must have free the first hour it mean in average a teacher will have free at least 5*0,5=2,5 times per week free the first hour!
b) since it is impossible (see a)) it mean as soon as you add such a constraint for a few teachers you will force the other teachers to have hours late! of course a few part time teachers with small kids will like it, but nearly all others will hate it. So you will prefer a few teachers with such a constraint and kick the other teachers indirectly by that. Pretty unfair.
c) if you have got a few part time teachers that need to have free the 1st hour (because they must bring their kids to the kindergarden, school, ...) you will indirectly already force the other teachers to have the 1st hour. So in other words: if you have got teachers that need the first hour free, you will care about your request automatically. If you don't have such teachers, then it is impossible to place them all early and/or you will "punish" the other teachers, since you can't give all of them the constraint.

bachiri401

hello
in my school i have 29 classes and 62 teachers we can't have all the teachers begin early
suppose we have only 58 teaches    * if we use max beginings second hour we can make 29 teachers come early the first hour then the other 29 will come the second hour making gaps for the first 29 teachers.
i think this feature if added  will work with only few selected teachers

Volker Dirr

#4
exactly, so it will/might be very unfair to the other teachers.

But even with the "come second hour" feature i think it will be a very bad idea to add this feature.
Because half time teachers have only around half of the hours per week (compared to full time teacher), but because of the  min day constraint for subjects/students it will be impossible to give all half time teachers only half of the days per week. At my school most half time teachers must work 4 days per week (because of the min day constraint of the main subjects.)
So if all those teachers will all come for the 1st and 2nd hour already, then it mean there won't be enough teachers anymore in the last hour if you want to have a low number of gaps. So you need to increase the number of gaps.

So overall: The idea of teachers early sounds fine, but it will be impossible at most schools, it will increase the number of gaps and it will be unfair to teachers that don't get that privilege.
@math: Did you thought about all of that? Maybe it is different at university (You are working at a university, don't you?). Won't you run into the same problems at a university as we will get by that at a normal school?

math

Hi!

I fully agree with Volker and Bachiri that this feature might result in unfairness in some (most?) application scenarios. If you have a school where everybody wants to start early, you hardly can't please everybody. However, there are also scenarios where this requirement perfectly makes sense. In our university most teachers HATE starting early. Half of them strictly reject giving lectures in the first block. Similar situation in my wife's school with a large number of part time teachers that prefer having the first block off.

And even if you're in a situation where the majority of teachers would like to start early, using that feature does not necessarily result in unfairness. If more teachers would like to start early than possible, you could have an agreement that half of the teachers could start early this year, the rest of them could have the delight next year.

At the bottom line, I don't see the point in mixing a technical discussion with subjective remarks concerning fairness in its application. If FET would provide that feature, the responsible person has to keep aspects on fairness etc. in mind. But this is the same situation as with all the other features of FET. Fulfilling somebody's wishes always could imply rejecting somebody else's wishes. But this has to be solved inside the institution among the colleagues and not at this place. At least this this is my personal opinion on this.

Coming back to the technical discussion:

The most flexible thing would be if FET would offer a "A teacher works in an hourly interval MIN days a week". For teachers that want to start early, I could add such a constraint, eg. MIN=3 for the first block. This way FET would generate a schedule where the teacher is working at least three times a week in the first block.

If somebody wants to start at noon, I would add a MAX=0 constraint for the first and second block and a MIN=4 constraint for the third block.

Liviu Lalescu

#6
Please try the constraint activities occupy max time slots from selection. It can be used to force a teacher to start at the first hour in 3 out of 5 days, or to have at least 3 occupied slots in the first 3 hours in 3 out of 5 days, and you can also impose that the teacher is not available in the first 2 hours with a teacher not available constraint. Read the occupy max constraint's help for how to do this.

Let me know if it works.

Volker Dirr

#7
i already told myself that some teachers don't want 1. hour, but you forgot the gaps problem that will be produced by your request.

BTW: AT my school 12 teachers with 2nd hour starting request. So still 13 teachers too less. But even with those 13 teachers more it will be impossible because of the gaps (or i need to increase gaps, but teachers also don't want that.)

Of course there might be a school where it work, but i don't think there will be many (just because i know a few datasets from other schools very well and they are in that point not much different. Except of a primary school with a lot of half time teachers, but in that case setting the teachers not available will automatically force the others early. So no need to add a special constraint for that, since it will happen automatically in that case).

i don't think that your idea of changing the teachers each year will work fine, since you can't randomly select teachers. in worst case you have got an activity planning where (nearly all) all teachers that have free 1sh (or not free) in the same class. In that case you will have got problems, since students won't have teacher in the 1sh hour (last hour). Similar problem to special rooms. It will be very difficult to select the correct teachers and even it it work in one year (with higher gaps) you will run into problems with your activity planning the next year, since you need to care about those conflicts also the next year (so conflicts with students and rooms). That will be impossible to care about manually.

the only variant - i think - that will be fair: as soon as a teach have got such a request and get such a constraint, all other teachers need a lower max gaps constraint then that teacher.

math

Hi Liviu!

Thanks for the hint. I never thought about handling that problem this way, but it's actually working.

However, it's kind of unintuitive modeling it this way. Instead of defining a minimum of allocated time slots for the first block from Monday to Friday, I have to define a maximum of time slots for the remaining blocks. It's quite easy to define the wrong max occupy number. And if the assignment of teachers to activities changes during the planning process, I would not only have to remove/add an activity from this constraint, but also to recalculate the max number.

From the technical perspective, I'm amazed about FET one more time. I can perfectly live with that constraint.

If there's space on my christmas wishlist, I would wish for a "activities occupy min time slots from selection" constraint. But since it's just an inverted "activities occupy max time slots from selection" constraint, I'm pretty sure you dislike the idea of adding it since it introduces redundancy in constraints.


Volker Dirr

#9
hmm.. i think it is not a "simple" inversion. it will be coded different. The max variant should be more simple to code. Maybe it also behave much different and generating might be much faster. So i think that might be a good variant. The "bad" thing is that constraints like "max in an hourly intervall" are special versions then, but i think that is ok (or we can remove that "old" ones.)

Modification 1:
We have it already. See FET -> Data -> Activities. You can of course select all activities of a special teacher there.

Modification 2:
But it is complicated to use it if you are still working on the activity planning. So you might miss/modify always that constraints. So it will be a good idea to add it also with a teachers (and students) variant.

Liviu Lalescu

Hello, math,

There were debates in the past on this. I think it is complicated/impossible. I would have liked to add what you suggest, but it won't work in the general case, if some activities can overlap (do not share teachers/students).

math

Hi Liviu! Hi Volker!

Sorry, last view days were kind of nightmare, did not have the time to reply. Thanks a lot for considering my suggestion. However, I don't understand your remark regarding overlapping activities. What is an overlapping activity? Is it possible to share a teacher/room/student group with multiple activities?

I really thought that the min variant is just the opposite of "Activities occupy max time slots from selection". For instance:

  • Teacher A is assigned to 10 exercises.
  • I want to have him scheduled in the first block (8:00-10:00) at least four times a week.
  • So I add a constraint a "A set of activities occupies max time slots from selection", specifying:

    • All 10 exercises
    • Selecting remaining time slots from Monday 10:00 until Friday 20:00
    • Specifying max occupied as 6
This way FET schedules at least four of these exercises to Mo-Fr 8:00-10:00 slots.

I thought that the min variant is really just the opposite of this:

  • Adding a constraint a "A set of activities occupies min time slots from selection", specifying:

    • All 10 exercises
    • Selecting time slots from Monday until Friday 8:00-10:00 (first slot of each day)
    • Specifying min occupied as 4
So I see three advantages compared to the current solution: First it's more intuitive, because I don't have to model the opposite of what I'm striving for. Second, it's less error prone, since I would be able to directly specify the min number instead of substracting that number from the number of activities in that set.

The third advantage is the most important one that comes into play if I'm deleting or disabling activities. At the moment I have to check all the defined constraints and recompute the max occupied number. In the example above I have to change the max occupied number from 6 to 5. Otherwise FET would only be forced to schedule min 3 exercises to the first block.

So I see real benefit in such a constraint, not just a redundant way of doing something.


(posting #100, yay  :D)

Liviu Lalescu

Hello, math, and many new posting to be added to these 100!  :)

Yes, we wanted in the past to add this constraint. I think we talked with Vangelis Karafillidis. It would be useful.

But (a big problem):

You min only works if the activities cannot overlap. In your case it works, because they share a teacher, so they cannot overlap.

But think that there are 10 activities (each duration 1 hour), each having a different students set and teacher. And you want minimum 4 in the first two slots of the days. You add maximum 6 occupied slots in the rest of the times. But you can have all the 10 activities in say a single third slot. The maximum 6 slots is respected (in fact there is only 1 occupied slot in this extreme example). The minimum of 4 in the first two slots is not respected.

So I cannot add it as a general constraint for any activities. It works only for non-overlapping activities (like those sharing a teacher). I think we discussed this on the forum and the idea was that for this general case the behavior is difficult to model and the occupy min constraint would be inefficient. But we can talk some more about this, maybe we develop better ideas and the constraint can be implemented in the general case.

Liviu Lalescu

I thought a bit and it might be possible (occupy min). It is very important to obtain an efficient implementation. I will think tomorrow, and let you know.

I will invite Vangelis Karafillidis to watch this topic.

math

Ah, ok, now I see the problem. Thanks for the clarification. Seems to be (much) more problematic than I thought...

I'm fully open if you want to start the discussion on this feature again. However I guess that there were good reasons to reject it back then.