Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
99169c7a
Commit
99169c7a
authored
Feb 23, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exit tab to work also on multiple replications
parent
c75d3973
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
11 deletions
+53
-11
dream/plugins/BatchesTabularExit.py
dream/plugins/BatchesTabularExit.py
+53
-11
No files found.
dream/plugins/BatchesTabularExit.py
View file @
99169c7a
...
...
@@ -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,13 +55,55 @@ 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
def
getConfidenceInterval
(
self
,
value_list
,
confidenceLevel
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment