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
c75d3973
Commit
c75d3973
authored
Feb 23, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start working on mulitple replications
parent
4819120e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
dream/plugins/BatchesTabularExit.py
dream/plugins/BatchesTabularExit.py
+21
-11
No files found.
dream/plugins/BatchesTabularExit.py
View file @
c75d3973
...
...
@@ -5,6 +5,7 @@ import random
import
operator
import
StringIO
import
xlrd
import
numpy
from
dream.plugins
import
plugin
...
...
@@ -44,20 +45,23 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
avgCycleTime
])
elif
numberOfReplications
>
1
:
# create the titles of the columns
data
[
'result'
][
'result_list'
][
0
][
'exit_output'
]
=
[[
'Exit Id'
,
''
,
'Throughput'
,
''
,
''
,
'Takt Time'
,
''
,
''
,
'Lifespan'
,
''
],
[
''
,
'LB'
,
'AVG'
,
'RB'
,
'LB'
,
'AVG'
,
'RB'
,
'LB'
,
'AVG'
,
'RB'
]]
data
[
'result'
][
'result_list'
][
0
][
'exit_output'
]
=
[[
'KPI'
,
'Unit'
,
'Average'
,
'Std Dev'
,
'Min'
,
str
(
float
(
confidenceLevel
)
*
100
)
+
'% CI LB '
,
str
(
float
(
confidenceLevel
)
*
100
)
+
'% CI UB'
]]
for
record
in
data
[
'result'
][
'result_list'
][
0
][
'elementList'
]:
family
=
record
.
get
(
'family'
,
None
)
# when found, add a row with the results of the specific exit
if
family
==
'Exit'
:
exitId
=
record
[
'id'
]
throughput
=
self
.
getConfidenceInterval
(
record
[
'results'
].
get
(
'throughput'
,
'undefined'
),
confidenceLevel
)
taktTime
=
self
.
getConfidenceInterval
(
record
[
'results'
].
get
(
'takt_time'
,
'undefined'
),
confidenceLevel
)
lifespan
=
self
.
getConfidenceInterval
(
record
[
'results'
].
get
(
'lifespan'
,
'undefined'
),
confidenceLevel
)
data
[
'result'
][
'result_list'
][
0
][
'exit_output'
].
append
([
exitId
,
throughput
[
'lb'
],
throughput
[
'avg'
],
throughput
[
'ub'
],
taktTime
[
'lb'
],
taktTime
[
'avg'
],
taktTime
[
'ub'
],
lifespan
[
'lb'
],
lifespan
[
'avg'
],
lifespan
[
'ub'
]])
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
),
min
(
batchesThroughputList
),
max
(
batchesThroughputList
),
batchesThroughputCI
[
'lb'
],
batchesThroughputCI
[
'ub'
]]
)
return
data
def
getConfidenceInterval
(
self
,
value_list
,
confidenceLevel
):
...
...
@@ -68,4 +72,10 @@ class BatchesTabularExit(plugin.OutputPreparationPlugin):
return
{
'lb'
:
lb
,
'ub'
:
ub
,
'avg'
:
BSM
.
mean
(
value_list
)
}
\ No newline at end of file
}
def
getAverage
(
self
,
value_list
):
return
sum
(
value_list
)
/
float
(
len
(
value_list
))
def
getStDev
(
self
,
value_list
):
return
numpy
.
std
(
value_list
)
\ No newline at end of file
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