Commit 99169c7a authored by Georgios Dagkakis's avatar Georgios Dagkakis

Exit tab to work also on multiple replications

parent c75d3973
...@@ -33,19 +33,19 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin): ...@@ -33,19 +33,19 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
data['result']['result_list'][0]['exit_output'].append(['Number of units produced','Units', data['result']['result_list'][0]['exit_output'].append(['Number of units produced','Units',
unitsThroughput]) unitsThroughput])
lineThroughput=batchesThroughput/float(maxSimTime) lineThroughput=batchesThroughput/float(maxSimTime)
data['result']['result_list'][0]['exit_output'].append(['Line throughput','Batches/'+timeUnit+'s', data['result']['result_list'][0]['exit_output'].append(['Line throughput','Batches/'+timeUnit,
lineThroughput]) "%.2f" % lineThroughput])
unitDepartureRate=unitsThroughput/float(maxSimTime) unitDepartureRate=unitsThroughput/float(maxSimTime)
data['result']['result_list'][0]['exit_output'].append(['Average Unit Departure Rate', data['result']['result_list'][0]['exit_output'].append(['Average Unit Departure Rate',
'Units/'+timeUnit+'s', 'Units/'+timeUnit,
unitDepartureRate]) "%.2f" % unitDepartureRate])
avgCycleTime=record['results']['lifespan'][0] avgCycleTime=record['results']['lifespan'][0]
data['result']['result_list'][0]['exit_output'].append(['Average Cycle Time', data['result']['result_list'][0]['exit_output'].append(['Average Cycle Time',
timeUnit+'s', timeUnit,
avgCycleTime]) "%.2f" % avgCycleTime])
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', data['result']['result_list'][0]['exit_output'] = [['KPI','Unit','Average','Std Dev','Min','Max',
str(float(confidenceLevel)*100)+'% CI LB ', str(float(confidenceLevel)*100)+'% CI LB ',
str(float(confidenceLevel)*100)+'% CI UB']] str(float(confidenceLevel)*100)+'% CI UB']]
for record in data['result']['result_list'][0]['elementList']: for record in data['result']['result_list'][0]['elementList']:
...@@ -55,13 +55,55 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin): ...@@ -55,13 +55,55 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
batchesThroughputList=record['results']['throughput'] batchesThroughputList=record['results']['throughput']
batchesThroughputCI=self.getConfidenceInterval(batchesThroughputList,confidenceLevel) batchesThroughputCI=self.getConfidenceInterval(batchesThroughputList,confidenceLevel)
data['result']['result_list'][0]['exit_output'].append(['Number of batches produced','Batches', data['result']['result_list'][0]['exit_output'].append(['Number of batches produced','Batches',
self.getAverage(batchesThroughputList), "%.2f" % self.getAverage(batchesThroughputList),
self.getStDev(batchesThroughputList), "%.2f" % self.getStDev(batchesThroughputList),
min(batchesThroughputList), min(batchesThroughputList),
max(batchesThroughputList), max(batchesThroughputList),
batchesThroughputCI['lb'], "%.2f" % batchesThroughputCI['lb'],
batchesThroughputCI['ub']] "%.2f" % batchesThroughputCI['ub']]
) )
unitsThroughputList=record['results']['unitsThroughput']
unitsThroughputCI=self.getConfidenceInterval(unitsThroughputList,confidenceLevel)
data['result']['result_list'][0]['exit_output'].append(['Number of units produced','Units',
"%.2f" % self.getAverage(unitsThroughputList),
"%.2f" % self.getStDev(unitsThroughputList),
min(unitsThroughputList),
max(unitsThroughputList),
"%.2f" % unitsThroughputCI['lb'],
"%.2f" % unitsThroughputCI['ub']]
)
lineThroughputList=[x/float(maxSimTime) for x in batchesThroughputList]
lineThroughputCI=self.getConfidenceInterval(lineThroughputList,confidenceLevel)
data['result']['result_list'][0]['exit_output'].append(['Line throughput','Batches/'+timeUnit,
"%.2f" % self.getAverage(lineThroughputList),
"%.2f" % self.getStDev(lineThroughputList),
"%.2f" % min(lineThroughputList),
"%.2f" % max(lineThroughputList),
"%.2f" % lineThroughputCI['lb'],
"%.2f" % lineThroughputCI['ub']]
)
unitDepartureRateList=[x/float(maxSimTime) for x in unitsThroughputList]
unitDepartureRateCI=self.getConfidenceInterval(unitDepartureRateList,confidenceLevel)
data['result']['result_list'][0]['exit_output'].append(['Unit Departure Rate',
'Units/'+timeUnit,
"%.2f" % self.getAverage(unitDepartureRateList),
"%.2f" % self.getStDev(unitDepartureRateList),
"%.2f" % min(unitDepartureRateList),
"%.2f" % max(unitDepartureRateList),
"%.2f" % unitDepartureRateCI['lb'],
"%.2f" % unitDepartureRateCI['ub']]
)
avgCycleTime=record['results']['lifespan']
avgCycleTimeList=record['results']['lifespan']
avgCycleTimeCI=self.getConfidenceInterval(avgCycleTimeList,confidenceLevel)
data['result']['result_list'][0]['exit_output'].append(['Cycle Time',timeUnit,
"%.2f" % self.getAverage(avgCycleTimeList),
"%.2f" % self.getStDev(avgCycleTimeList),
"%.2f" % min(avgCycleTimeList),
"%.2f" % max(avgCycleTimeList),
"%.2f" % avgCycleTimeCI['lb'],
"%.2f" % avgCycleTimeCI['ub']]
)
return data return data
def getConfidenceInterval(self, value_list, confidenceLevel): def getConfidenceInterval(self, value_list, confidenceLevel):
......
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