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):
data['result']['result_list'][0]['exit_output'].append(['Number of units produced','Units',
unitsThroughput])
lineThroughput=batchesThroughput/float(maxSimTime)
data['result']['result_list'][0]['exit_output'].append(['Line throughput','Batches/'+timeUnit+'s',
lineThroughput])
data['result']['result_list'][0]['exit_output'].append(['Line throughput','Batches/'+timeUnit,
"%.2f" % lineThroughput])
unitDepartureRate=unitsThroughput/float(maxSimTime)
data['result']['result_list'][0]['exit_output'].append(['Average Unit Departure Rate',
'Units/'+timeUnit+'s',
unitDepartureRate])
'Units/'+timeUnit,
"%.2f" % unitDepartureRate])
avgCycleTime=record['results']['lifespan'][0]
data['result']['result_list'][0]['exit_output'].append(['Average Cycle Time',
timeUnit+'s',
avgCycleTime])
timeUnit,
"%.2f" % avgCycleTime])
elif numberOfReplications>1:
# 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 UB']]
for record in data['result']['result_list'][0]['elementList']:
......@@ -55,12 +55,54 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
batchesThroughputList=record['results']['throughput']
batchesThroughputCI=self.getConfidenceInterval(batchesThroughputList,confidenceLevel)
data['result']['result_list'][0]['exit_output'].append(['Number of batches produced','Batches',
self.getAverage(batchesThroughputList),
self.getStDev(batchesThroughputList),
"%.2f" % self.getAverage(batchesThroughputList),
"%.2f" % self.getStDev(batchesThroughputList),
min(batchesThroughputList),
max(batchesThroughputList),
batchesThroughputCI['lb'],
batchesThroughputCI['ub']]
"%.2f" % batchesThroughputCI['lb'],
"%.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
......
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