Commit e48170e5 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

addition of a method (countDailyThroughput) in globals to be called by...

addition of a method (countDailyThroughput) in globals to be called by generator and calculate the daily throughput. Also minor additions to Exit so the  the method works
parent c7edb5ca
......@@ -66,7 +66,8 @@ class Exit(CoreObject):
self.totalLifespan=0
self.totalTaktTime=0 # the total time between to consecutive exits
self.TaktTime=[] # list that holds the avg time between to consecutive exits
self.TaktTime=[] # list that holds the avg time between to consecutive exits
self.dailyThroughPutList=[]
def run(self):
......@@ -212,6 +213,8 @@ class Exit(CoreObject):
json['results']['throughput']=self.numOfExits
if self.totalNumberOfUnitsExited!=self.numOfExits: #output this only if there was variability in units
json['results']['unitsThroughput']=self.totalNumberOfUnitsExited
if len(self.dailyThroughPutList):
json['results']['dailyThroughputList']=self.dailyThroughPutList
json['results']['lifespan']=self.Lifespan[0]
json['results']['takt_time']=self.TaktTime[0]
......
......@@ -170,3 +170,14 @@ def setWIP(entityList):
entity.schedule.append([object,now()]) #append the time to schedule so that it can be read in the result
entity.currentStation=object # update the current station of the entity
def countDailyThroughput(argumentDict={}):
for obj in G.ObjList:
if obj.type is 'Exit':
totalExited=obj.totalNumberOfUnitsExited
previouslyExited=sum(obj.dailyThroughPutList)
currentExited=totalExited-previouslyExited
obj.dailyThroughPutList.append(currentExited)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment