FET for Employee Scheduling

Started by gour, October 27, 2013, 07:02:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gour

Hello,

I wonder if FET (can be) is used in non-educational fields?

In my instance, my wife is working in emergency and I know about the trouble of one person to put together schedule for each month.

There are two places for which they need schedule and the working shift is: 12hours day-shift (07-19h), then 12hrs night shift (19-07h) and then 2 days free, when there is new day-shift.

One place has two teams working at once (1 doctor, 1 technician and 1 driver), the other place has only one team.

Some of the constraints (of which I'm aware of) is the total number of working hours per month, it's not possible to work e.g. D-N-N, or D-N-D in three succ. days, but it's possible to schedule e.g. D-D-N in three succ. days, then the number of day & night shift should be balanced for each worker, the total number of hours should be balanced in the row of 3 months etc.

What do you think if it would be possible to tailor FET to accomplish it?


Sincerely,
Gour

Volker Dirr

Hi,

Just to understand better:
- is it allowed to have D-D-D-D in four succ. days?
- you need a constraint "D is never allowed directly after an N day"?
- why is D-N-N not allowed? (If i understood correct, then you can have "D-D-N-Free-D-D-N". So in my opinion "D-D-D-Free-D-N-N" isn't more worse (i think it is even better))

gour

Quote from: Volker Dirr on October 27, 2013, 12:45:20 PM
- is it allowed to have D-D-D-D in four succ. days?

No, because for such worker there would be some N-N-N required.

Quote- you need a constraint "D is never allowed directly after an N day"?

Right, 'cause if N-D would be allowed it would be working 24h in 24h.

Quote- why is D-N-N not allowed? (If i understood correct, then you can have "D-D-N-Free-D-D-N". So in my opinion "D-D-D-Free-D-N-N" isn't more worse (i think it is even better))

I believe, although I can check, that D-N-N would bring too many free days in succ.

As far as D-D-D-Free-D-N-N would mean 6 x 12hrs = 72 hrs per week which is too man working hours per month - above max. allowed by law.

Let's say that if we start on Monday, then the normal/regular shift is as follows:

Mon (D)- Tue (N) -Wed (free) - Thu (free) - Fri (D) - Sat (N) -Sun (free) or in total 4 x 12h = 48h per week.

Is it more clear now?

Volker Dirr

I am not 100% sure, because you didn't answer 2 of that questions perfect (or you didn't gave me enough information.)

Clear is:
"You need a constraint "D is never allowed directly after an N day"?"" -> yes.
-> sadly FET hasn't such an constraint. But it might be possible to code.

About:
"is it allowed to have D-D-D-D in four succ. days?"
Your "No, because for such worker there would be some N-N-N required." is only correct if there are as many guys working at day as at night and/or if you have only full time workers.
So there are working as many people at a D as at a N?
And there is no one working half time / part time?
If you answer one of that with no, I need to know one more time again: "is it allowed to have D-D-D-D in four succ. days?"


About:
"why is D-N-N not allowed?"
You only give an "I believe" answer. That is a typical mistake at timetabling. You might loose a lot of good results by adding unneeded constraints.
So in fact "D-N-N" is allowed?

Volker Dirr

and a 4th question:
is it allowed to have D-D-D-N-Free-...?

gour

Quote from: Volker Dirr on October 27, 2013, 02:51:11 PM
I am not 100% sure, because you didn't answer 2 of that questions perfect (or you didn't gave me enough information.)

OK...I'll try to improve.

QuoteClear is:
"You need a constraint "D is never allowed directly after an N day"?"" -> yes.
-> sadly FET hasn't such an constraint. But it might be possible to code.

OK.

QuoteYour "No, because for such worker there would be some N-N-N required." is only correct if there are as many guys working at day as at night and/or if you have only full time workers.
So there are working as many people at a D as at a N?

Yes.

QuoteAnd there is no one working half time / part time?

It might be that sometimes someone is scheduled to work part time, but for exact details I have to ask.

In general, one doctor+one tehnician+one driver form so called 'team', let's call it 'team-1' and, in general, they have the same schedule during the period of one month.

There is another team of such three persons which we can call 'team-2' and those two (team-1 and team-2) are covering emergency station A, and in emergency station B there is one such team at a time.

QuoteIf you answer one of that with no, I need to know one more time again: "is it allowed to have D-D-D-D in four succ. days?"

Well, in general it is not, but for instance, my wife, due to having small baby was allowed to work D-D-....every 2nd day 'cause she was spared of night shift.

Quote
About:
"why is D-N-N not allowed?"
You only give an "I believe" answer. That is a typical mistake at timetabling. You might loose a lot of good results by adding unneeded constraints.
So in fact "D-N-N" is allowed?

Let me say that my original question was whether FET is, in general, appropriate tool to solve such kind of problem which is not in the scope of classical timetabling required in edu institutions.

That's why I really appreacite your readiness to help with it, but I feel unhappy burning your brain-cycles with possibly not 100% correct info, so if you believe that the problem is witing FET's scope, then I'm going to provide correct info and update the thread.

Volker Dirr

#6
i just want to see if there are other missing constraints in FET.

the basic stuff is possible:
teachers -> name of employee
students -> unneeded
rooms -> need to care about teams

if you want to have fixed teams, then you should set rooms "team 1", "team 2", ...
all employees of a fixed team must be placed in the same activity.

if you don't need fixed teams, then you should set rooms "team 1 - doctor", "team 1 - driver", ...

the rooms are highly needed to get the correct number of employees per shift.
(of course you need to set home room constraints)

the real "poor" thing is, that you need the  "no D after N"-constraint.
FET doesn't have that. it look like you need to use a trick for that.
You can use "a set of activities occupie max slots per selection". But you need to it for :
(every team (if you use fixed teams) or over employee) times (number of days)
so even only 3 teams with 31 day per month are already 3*31=93 constraint you need to enter :-(
so you must add a lot of stuff.

of course it would be much nicer if there is a constraint like "teacher is only allowed in last hour if first hour of next day is free".
i think we will add this into the TODO, but i fear we won't include it the next days.


the gaps / free days stuff should be also possible; maybe with "free"-pseudo activities.
but i fear it is also a bit tricky to implement, because it look like you might need to set several min/max day between activities manualy.

so overall:
yes, it is possible, but you must do a lot of work to enter the data.



Later added:
hmmm.......
i just see that you have a very special thing: only 2 slots/shift per day.

so there might be nicer variant:
use only one day!
but set (number of needed days)*2 as number of hours.
so the hours of your one and only day are:
day 1: D
day 1: N
day 2: D
day 2: N
...

the advantage is, that you might care much more easy about gaps and the "N-D"-constraint.
you just need to add a single constraint: max 1 hour continuously with an activity tag for all teachers.
set an activity tag ("work") to all activities that a "work"-shifts.

then you need to care about the "free days".
just use pseudo-activities (without tag "work", but maybe with tag "free").

now it depend a bit of your needs:
duration must be at least 2*2=4. (maybe more if you don't want to use the next constraint).
maybe also add a set of activities have preferred staring time (activity tag "free"): select only "D (day)" shift as starting time.

you should add a "min hours between a set of activities" to this "free" activities per team/employee.

hmmm... i think this variant is easier. But maybe try both and tell us if it work or fail.

Volker Dirr