Advertisement
Guest User

Untitled

a guest
May 27th, 2015
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. def __init__(self,rawData):
  2.     self.allROs = []        # collection of all relief opportunities aka array of ReliefOpp objects
  3.     self.allWPs = []            # all work pieces
  4.     self.allShifts = []         # all candidate shifts
  5.     self.schedule = Schedule() # creates Schedule Object, which is a list of shifts making up the schedule
  6.     self.prepData(rawData) #
  7.  
  8.   def alg_firstEncountered(self):
  9.     for w in self.allWPs:       # scan work pieces sequentially
  10.       if w.coverCount == 0:
  11.         s = w.shifts[0]
  12.         self.schedule.addShift(s)
  13.         s.selected()
  14.     self.schedule.rm_redundantShifts()
  15.     self.schedule.printSchedule()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement