Skip to main content

Column generation with employee shift scheduling

Awaiting user input

Comments

3 comments

  • David Torres Sanchez
    Gurobi Staff Gurobi Staff

    Hi Bhartendu,

    I can spot several improvements.
    First, the cost of the \(\texttt{s_t}\) variables needs to be something higher than the cost of the future variables (currently this is not the case as some shift patterns have a cost higher than 100).
    You can update the master problem, instead of creating a new one from scratch when you create a new shift.
    The main issue is coming from the subproblems; the shift patterns that you are producing are always the same, you can think about how this can be changed. Does the formulation allow for other solutions (i.e. what happens if you force the shift to start at the first hour)?

    Cheers, 
    David

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Bhartendu,

    Don't forget as a commercial customer you are welcome to submit a Support Request through our Help Center. Those requests are prioritized and we provide them faster responses.

    - Riley

     

    0
  • Bhartendu Awasthi
    Gurobi-versary
    Conversationalist
    First Question

    Thanks Riley for the advice. 

    Thanks David for your response. Regarding your question :

    The main issue is coming from the subproblems; the shift patterns that you are producing are always the same, you can think about how this can be changed.

    The problem was with:

    diff = sp.addVars(range(1, 24), vtype=GRB.BINARY

    diff is supposed to hold the consecutive difference between hours in a shift pattern. So for a pattern like
    0,0,01,1,1,0, the difference will be 0,0,1,0,0,-1, but in the above definition of the variable I had incorrectly declared it as binary, which lead the solver to give the same pattern every time. I have rectified it and have added some randomisation interns of shift pattern start times, and length of the shift pattern.

    I will take it forward in a separate ticket. 

    Thanks again,

    Bhartendu

    0

Please sign in to leave a comment.