0

I'm not sure what kind of approach is needed but let me describe the problem:

  1. Given an arbitrary number of workers (2 or more) are scheduled to work in any given month (including weekends).
  2. Only one worker may work that assigned day. 2a. This worker may not work the day before or after.
  3. Workers also work weekends and if possible equally distributed to the number of workers. 3a. Saturdays and Sundays are weighed equally.
  4. Allot for possible vacations taken 4a. No restriction on sequential days 4b. May not take so much vacation that will interfere with rule(s) #2 and #3

What is the most flexible way to sort these criteria. What is this type of problem called?

Can someone to point me to the right direction so I can read and learn about it. Obviously if this is something that is already been solved with an algorithm, point me to the right paper or book so I can read and understand it.

Clarification: I'm not looking for how many [total] days and weekends each worker would work but a way to [evenly] distribute the days worked in that month.

E.g. Workers A B C; A requested vacation 17 to 20

Obviously there are other permutations than the example I listed below.

        M  T  W  Th F  Sa Su
        ====================
October 1  2  3  4  5  6  7
2012    A  B  C  A  B  C  A

        8  9 10 11 12 13 14
        B  C  A  B  C  A  B

       15 16 17 18 19 20 21
        C  A  B  C  B  C  A

       22 23 24 25 26 27 28
        B  A  C  A  C  B  C

       29 30 31
        A  B  A
Steve L
  • 69
  • 5

1 Answers1

0

Use the simplex algorithm. You can program constraints as thus:

Each day needs to be filled by exactly one person For each day and for each worker, they should work at least one out of every three day block Nobody should work on their vacation days The max number of weekends a worker has in a month should be no more than 1+floor(weekend shifts/workers)

argentage
  • 2,758
  • 1
  • 19
  • 28
  • I read about Simplex method but I don't think I formed my answer correctly, I've updated my question with an example and clarification. – Steve L Sep 04 '12 at 03:04