Commit bb397bb2 authored by Georgios Dagkakis's avatar Georgios Dagkakis

productivity metric in exit statistics. only in one replication for now

parent dc4b62d1
...@@ -47,6 +47,15 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin): ...@@ -47,6 +47,15 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
data['result']['result_list'][0]['exit_output'].append(['Average Cycle Time', data['result']['result_list'][0]['exit_output'].append(['Average Cycle Time',
timeUnit, timeUnit,
"%.2f" % avgCycleTime]) "%.2f" % avgCycleTime])
# output the productivity metric
# ToDo, this currently works only for one replication
totalOperatorHours=self.getTotalOperatorOnShiftHours(data['result']['result_list'][0]['elementList'],maxSimTime)
if totalOperatorHours:
productivity=unitsThroughput/totalOperatorHours
data['result']['result_list'][0]['exit_output'].append(['Productivity',
"Produced Units/Operator Hours",
"%.2f" % productivity])
elif numberOfReplications>1: elif numberOfReplications>1:
# create the titles of the columns # create the titles of the columns
data['result']['result_list'][0]['exit_output'] = [['KPI','Unit','Average','Std Dev','Min','Max', data['result']['result_list'][0]['exit_output'] = [['KPI','Unit','Average','Std Dev','Min','Max',
...@@ -112,3 +121,11 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin): ...@@ -112,3 +121,11 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
"%.2f" % avgCycleTimeCI['ub']] "%.2f" % avgCycleTimeCI['ub']]
) )
return data return data
def getTotalOperatorOnShiftHours(self,results,maxSimTime):
totalOperatorOnShiftHours=0.0
for element in results:
if element.get('family',None)=='Operator':
totalOperatorOnShiftHours+=maxSimTime*(1-element['results']['off_shift_ratio'][0]/100.0)
return totalOperatorOnShiftHours
\ No newline at end of file
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