Shift Rotation Perfromance Equations

Discussion created by Scott Champion on Feb 2, 2010
Latest reply on Feb 3, 2010 by hanyong



I am trying to create a PI tag that represents our current mine schedule.  I have used the Legacy DevNet "Shift Rotation Calculations" to create the appropriate tags for a 21 day rotation, they work great.  However, our mine works 10 hour shifts and we have 6 crews, A-F.  These crews will work either Wednesday - Saturday, or Sunday - Monday.  Here is the part I am struggling with.  Every President's Day, Memorial Day, Labor Day and Thanksgiving they swap from the Wednesday - Saturday schedule to the Sunday - Wednesday schedule or Sunday - Wednesday schedule to Wednesday - Saturday.  An example of one of these swaps is shown below.


Week Of M T W T F S S M T W T F S S M T W T F S S M T W T F S S M T W T F S S M T W T F S S
2/8/2010 D D D  -  -  - S S S S  -  -  - G G G G  -  -  - D  -  - D D D D  -  -  - S S S S  -  -  - G G G G  -
2/15/2010  -  - S S S S  -  -  - G G G G  -  -  - D D D D  - S S S  -  -  - G G G G  -  -  - D D D D  -  -  - S


Swapping like this creates 2 different 21 day rotation cycles.  If the mine would swap every 13 weeks, no problem.  But they swap on the holidays above, resulting in an irregular swap schedule.  I have created the tags necessary for the 2 different 21 day rotation cycles.  Now I need some help figuring out the best way to define these 4 periods:


President's Day - Memorial Day


Memorial Day - Labor Day


Labor Day - Thanksgiving


Thanksgiving - President's Day




I think that if I can define these periods, a simple if..then can be used to choose the appropriate 21 day cycle.


Any ideas?