Bernardo Palma

  • Gurobi-versary
  • Conversationalist
  • First Question
  • Total activity 11
  • Last activity
  • Member since
  • Following 0 users
  • Followed by 0 users
  • Votes 1
  • Subscriptions 2

Activity overview

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

    Constrains to a shift start

    Answered

    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,

    consecutive shifts constrains

    Answered

    Hi, i have a schedule problem in which i need to assign consecutive shift: if nurse "Telly" is assigned to day 3, she must work on "multis"  consecutive days. 3,3+1,3+2,...,3+multis-1. I need to bu...