# Bernardo Palma

• Total activity 11
• Last activity
• Member since
• Following 0 users
• Followed by 0 users
• Subscriptions 2

## Activity overview

Latest activity by Bernardo Palma
• Bernardo Palma created a post,

### Constrains to a shift start

Hello!   I have this code to assign shift to a set of nurses:   from gurobipy import *numday = 15num_nurses = ["a","b","c","Telly","e"]multis = { "a":[1,3],"b":[1,3],"c":[3,6],"Telly":[3,4],"e":[2,...

• Bernardo Palma commented,

Hi Riley, This is exactly what i was looking for!  You're right, it looks like shift balancing is not needed. Thanks a lot! Cheers! Bernardo

• Bernardo Palma commented,

Oh! I was thinking that we get back to the first approach because i dont see how the dictionary for multis enters with your redefinition. But lets get back to your way.  If i follow you: if you hav...

• Bernardo Palma commented,

Hi Riley, Your logic for the spacing between shift is just what i want, but the RHS needed a fix:  m.addConstrs(    quicksum(x[i,k] for k in range(j-multis[i][0]-multis[i][1]+1, j+1)) <= multis[i][...

• Bernardo Palma commented,

Thanks!  My objective function doesn't make sense with the actual constrains, but i have an additional constrains (nurses vacations and spaces between shifts) that makes me want maximize the days s...

• Bernardo Palma commented,

Hello Riley, thanks for your response. How can i build that variable definition? I am not sure, how to put "start a 3 shift sequence" in my var definition. And i want to ask you: if i decided to ...

• Bernardo Palma commented,

I forgot to add: all nurses have to work just in three days consecutive (our shift are by days). One day shift and 2 days shift nurses are treated separately

• Bernardo Palma created a post,