Пример #1
0
 def initialize(self):
     Queue.initialize(self)
     # if the station shares resources and the capacity is not defined in this
     # then read it from some other of the sharing stations
     if not self.intervalCapacity and self.sharedResources:
         for stationId in self.sharedResources.get('stationIds', []):
             import dream.simulation.Globals as Globals
             station = Globals.findObjectById(stationId)
             if station.intervalCapacity:
                 self.intervalCapacity = station.intervalCapacity
                 break
     # initialize variables
     self.remainingIntervalCapacity = list(self.intervalCapacity)
     for i in range(self.intervalCapacityStart):
         self.remainingIntervalCapacity.pop(0)
     self.isLocked = True
     self.utilisationDict = [
     ]  # a list of dicts for the utilization results
     self.detailedWorkPlan = []  # a list of dicts to keep detailed data
     from dream.simulation.Globals import G
     if hasattr(G, 'CapacityStationList'):
         G.CapacityStationList.append(self)
     else:
         G.CapacityStationList = []
         G.CapacityStationList.append(self)
Пример #2
0
 def initialize(self):
     Queue.initialize(self)
     import dream.simulation.Globals as Globals
     # identify the notRequiredOperations
     # input gives only stationId, buffer and exit should be identified
     notRequiredOperations=[]
     for id in self.notRequiredOperations:
         station=Globals.findObjectById(id)
         notRequiredOperations.append(station.id)
         bufferId=station.previous[0].id
         notRequiredOperations.append(bufferId)
         exitId=station.next[0].id
         notRequiredOperations.append(exitId)
     self.notRequiredOperations=notRequiredOperations
     self.isLocked=True
 def initialize(self):
     Queue.initialize(self)
     import dream.simulation.Globals as Globals
     # identify the notRequiredOperations
     # input gives only stationId, buffer and exit should be identified
     notRequiredOperations = []
     for id in self.notRequiredOperations:
         station = Globals.findObjectById(id)
         notRequiredOperations.append(station.id)
         bufferId = station.previous[0].id
         notRequiredOperations.append(bufferId)
         exitId = station.next[0].id
         notRequiredOperations.append(exitId)
     self.notRequiredOperations = notRequiredOperations
     self.isLocked = True
Пример #4
0
 def initialize(self):
     Queue.initialize(self)
     # if the station shares resources and the capacity is not defined in this
     # then read it from some other of the sharing stations
     if not self.intervalCapacity and self.sharedResources:
         for stationId in self.sharedResources.get('stationIds',[]):
             import dream.simulation.Globals as Globals
             station=Globals.findObjectById(stationId)
             if station.intervalCapacity:
                 self.intervalCapacity=station.intervalCapacity
                 break 
     # initialize variables               
     self.remainingIntervalCapacity=list(self.intervalCapacity)
     for i in range(self.intervalCapacityStart):
         self.remainingIntervalCapacity.pop(0)
     self.isLocked=True
     self.utilisationDict=[]     # a list of dicts for the utilization results
     self.detailedWorkPlan=[]    # a list of dicts to keep detailed data
     from dream.simulation.Globals import G
     if hasattr(G, 'CapacityStationList'):
         G.CapacityStationList.append(self)
     else:
         G.CapacityStationList=[]
         G.CapacityStationList.append(self)