Nurse scheduling problem with breaks and time intervals

Visto 123 veces
Saltar al primer mensaje no leído

Alvaro Ruiz Molledo

no leída,
21 oct 2021, 6:00:4821/10/21
a or-tools-discuss
Hello,

I have the nurse problem where only one shift is assigned to one employee on one day, but additionally I have these constraints:

1 - One employee have to rest between 12 and 24 hours between shifts.
2 - One employee can request to take days off between shifts (the first constraint is not forced then)

The shifs for the day are like these [start, end]:

Shift 0: rest
# Shift 0: [8:00, 15:00]
# Shift 1: [15:00, 22:00]
# Shift 2: [8:00, 22:00]
# Shift n: ...

I have tried modelling the problem with booleans as the example:

shifts = {}
for n in all_nurses:
    for d in all_days:
        for s in all_shifts:
            shifts[(n, d, s)] = model.NewBoolVar('shift_n%id%is%i' % (n, d, s))



But when I need to add constraints related to time and intervals, I find it very difficult to express the restrictions above.

Any suggestion? Could it be modelled in another way?

Thanks!

Alvaro Ruiz Molledo

no leída,
21 oct 2021, 10:56:5921/10/21
a or-tools-discuss
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos