Effacer les filtres
Effacer les filtres

How do I create an optimal MULTI-day work schedule using mixed integer linear programming?

8 vues (au cours des 30 derniers jours)
Hi,
In this blog by Loren Shure Generating an Optimal Employee Work Schedule Using Integer Linear Programming, she showed how to solve a complicated scheduling problem. I am trying to recreate this but I want to do a weekly optimization with the constraint that an employee can work maximum 40 hours a week and one can work only one shift a day. Sean de Wolski made a comment that I could just duplicate the constraints to look at a longer time period at once but I do not know how to formulate it. Can someone please help me?
  9 commentaires
Serien Ali
Serien Ali le 14 Sep 2018
Hi Mai, were you able to get a hold of your laptop? Thanks

Connectez-vous pour commenter.

Réponse acceptée

David Ding
David Ding le 27 Sep 2017
Hi,
As per the blog, the constraints are captured in A and b where: Ax <= b.
Now, you need to look at how to change the values of A and b to match your scenario. The call to the function "intlinprog" is likely still going to be the same:
[x, cost] = intlinprog(f,1:nVars,A,b,[],[],lb,ub);
The difference will be the values of the input arguments. For starters, just by quickly glancing your description and the blog, for the inequality matrix A:
"...There are two parts to the inequality constraint matrix A, which are clearly visible. The top portion has 24 rows (because there are 24 hours in a day) and each row represents the constraint that at a particular hour, you need a minimum number of staff..."
Now, perhaps, if you wish to extend this to a week and following the above example, you can make the top portion of A to be of 168 rows, since there are 168 hours in a week?
Best of luck,
David
  4 commentaires
Mee
Mee le 28 Sep 2017
Thanks a lot David. I will try this.
Serien Ali
Serien Ali le 30 Août 2018
Hi David,
I am having trouble setting up weekly constraints. I have turned the example into 168 hours instead of 24, and have min/max hours per shift for each employee. However I am having trouble setting up min hours per week for each employee. How can I go about doing this? How can i add this constraint into the existing matrix that I am setting up?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by