Primary/Secondary On Call Rotations

130 Views Asked by At

I'm trying to setup a primary and secondary on call schedule with 6 people.

I'm trying to schedule people to be on call, so that they will be paired with everyone and they have the longest "break" between their schedules.

Ex for one rotation:

week:      1 2 3 4 5 6 7 8 9 10 11 ... 
primary:   1 2 3 4 5 6...?
secondary: 3 4 5 1 2 4...?

Week 1 has people are {1,3}
Week 2 has people are {2,4}

Person 1 has a two week "break" before they're on shift again.
Person 2 has a two week "break" before they're on shift again.

Also, a person can't be both primary and secondary on the same week, ex: {3,3}.

What's the best way to generate a sequence like this, for any number of people so that they have the longest "break" between their shifts, and they are paired with someone different as much as possible?