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
a1556795
Commit
a1556795
authored
May 21, 2013
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first version of Dismantle object added to the library
parent
cab0f78e
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
414 additions
and
10 deletions
+414
-10
DREAM/dream/simulation/PlantTopologies/Topology13.spp
DREAM/dream/simulation/PlantTopologies/Topology13.spp
+0
-0
DREAM/dream/simulation/src/Assembly.py
DREAM/dream/simulation/src/Assembly.py
+3
-3
DREAM/dream/simulation/src/Dismantle.py
DREAM/dream/simulation/src/Dismantle.py
+288
-0
DREAM/dream/simulation/src/Exit.py
DREAM/dream/simulation/src/Exit.py
+4
-5
DREAM/dream/simulation/src/JSONInputs/Topology02.json
DREAM/dream/simulation/src/JSONInputs/Topology02.json
+0
-1
DREAM/dream/simulation/src/JSONInputs/Topology05.json
DREAM/dream/simulation/src/JSONInputs/Topology05.json
+0
-1
DREAM/dream/simulation/src/JSONInputs/Topology13.json
DREAM/dream/simulation/src/JSONInputs/Topology13.json
+83
-0
DREAM/dream/simulation/src/LineGenerationJSON.py
DREAM/dream/simulation/src/LineGenerationJSON.py
+36
-0
DREAM/dream/simulation/src/output.xls
DREAM/dream/simulation/src/output.xls
+0
-0
DREAM/dream/simulation/src/trace1.xls
DREAM/dream/simulation/src/trace1.xls
+0
-0
No files found.
DREAM/dream/simulation/PlantTopologies/Topology13.spp
0 → 100644
View file @
a1556795
File added
DREAM/dream/simulation/src/Assembly.py
View file @
a1556795
...
...
@@ -115,11 +115,11 @@ class Assembly(Process):
def
canAccept
(
self
):
return
len
(
self
.
Res
.
activeQ
)
==
0
#checks if the
machine
can accept an entity and there is a Frame waiting for it
#checks if the
Assembly
can accept an entity and there is a Frame waiting for it
def
canAcceptAndIsRequested
(
self
):
return
len
(
self
.
Res
.
activeQ
)
==
0
and
self
.
previousFrame
[
0
].
haveToDispose
()
#checks if the
machine
can accept an entity and there is a Frame waiting for it
#checks if the
Assembly
can accept an entity and there is a Frame waiting for it
def
isRequestedFromPart
(
self
):
return
len
(
self
.
Res
.
activeQ
)
==
1
and
self
.
previousPart
[
0
].
haveToDispose
()
...
...
@@ -127,7 +127,7 @@ class Assembly(Process):
def
haveToDispose
(
self
):
return
len
(
self
.
Res
.
activeQ
)
>
0
and
self
.
waitToDispose
#sets the routing in and out elements for the
queue
#sets the routing in and out elements for the
Assembly
def
defineRouting
(
self
,
pp
,
pf
,
n
):
self
.
next
=
n
self
.
previousPart
=
pp
...
...
DREAM/dream/simulation/src/Dismantle.py
0 → 100644
View file @
a1556795
This diff is collapsed.
Click to expand it.
DREAM/dream/simulation/src/Exit.py
View file @
a1556795
...
...
@@ -3,7 +3,6 @@ Created on 6 Feb 2013
@author: George
'''
'''
models the exit of the model
'''
...
...
@@ -130,10 +129,10 @@ class Exit(Process):
def
outputResultsXL
(
self
,
MaxSimtime
):
from
Globals
import
G
if
(
G
.
numberOfReplications
==
1
):
#if we had just one replication output the results to excel
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"The Throughput is:"
)
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"The Throughput i
n "
+
self
.
objName
+
" i
s:"
)
G
.
outputSheet
.
write
(
G
.
outputIndex
,
1
,
self
.
numOfExits
)
G
.
outputIndex
+=
1
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"The average lifespan of an entity is:"
)
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"The average lifespan of an entity
that exited from "
+
self
.
objName
+
"
is:"
)
G
.
outputSheet
.
write
(
G
.
outputIndex
,
1
,((
self
.
totalLifespan
)
/
self
.
numOfExits
)
/
G
.
Base
)
G
.
outputIndex
+=
1
else
:
#if we had multiple replications we output confidence intervals to excel
...
...
@@ -141,7 +140,7 @@ class Exit(Process):
#so failurePortion will be exactly the same in each run). That will give 0 variability and errors.
#so for each output value we check if there was difference in the runs' results
#if yes we output the Confidence Intervals. if not we output just the fix value
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"CI "
+
str
(
G
.
confidenceLevel
*
100
)
+
"% for the mean Throughput is:"
)
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"CI "
+
str
(
G
.
confidenceLevel
*
100
)
+
"% for the mean Throughput i
n "
+
self
.
objName
+
" i
s:"
)
if
self
.
checkIfArrayHasDifValues
(
self
.
Exits
):
G
.
outputSheet
.
write
(
G
.
outputIndex
,
1
,
stat
.
bayes_mvs
(
self
.
Exits
,
G
.
confidenceLevel
)[
0
][
1
][
0
])
G
.
outputSheet
.
write
(
G
.
outputIndex
,
2
,
stat
.
bayes_mvs
(
self
.
Exits
,
G
.
confidenceLevel
)[
0
][
0
])
...
...
@@ -151,7 +150,7 @@ class Exit(Process):
G
.
outputSheet
.
write
(
G
.
outputIndex
,
2
,
self
.
Exits
[
0
])
G
.
outputSheet
.
write
(
G
.
outputIndex
,
3
,
self
.
Exits
[
0
])
G
.
outputIndex
+=
1
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"CI "
+
str
(
G
.
confidenceLevel
*
100
)
+
"% for the mean Lifespan of an entity is:"
)
G
.
outputSheet
.
write
(
G
.
outputIndex
,
0
,
"CI "
+
str
(
G
.
confidenceLevel
*
100
)
+
"% for the mean Lifespan of an entity
that exited from "
+
self
.
objName
+
"
is:"
)
if
self
.
checkIfArrayHasDifValues
(
self
.
Lifespan
):
G
.
outputSheet
.
write
(
G
.
outputIndex
,
1
,
stat
.
bayes_mvs
(
self
.
Lifespan
,
G
.
confidenceLevel
)[
0
][
1
][
0
])
G
.
outputSheet
.
write
(
G
.
outputIndex
,
2
,
stat
.
bayes_mvs
(
self
.
Lifespan
,
G
.
confidenceLevel
)[
0
][
0
])
...
...
DREAM/dream/simulation/src/JSONInputs/Topology02.json
View file @
a1556795
...
...
@@ -38,7 +38,6 @@
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
},
"entity"
:
"Frame"
,
"predecessorPartList"
:
[
"S1"
],
"predecessorFrameList"
:
[
"S2"
],
"successorList"
:
[
"M1"
]
...
...
DREAM/dream/simulation/src/JSONInputs/Topology05.json
View file @
a1556795
...
...
@@ -38,7 +38,6 @@
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
},
"entity"
:
"Frame"
,
"predecessorPartList"
:
[
"S1"
],
"predecessorFrameList"
:
[
"S2"
],
"successorList"
:
[
"M1"
]
...
...
DREAM/dream/simulation/src/JSONInputs/Topology13.json
0 → 100644
View file @
a1556795
{
"_class"
:
"Dream.Simulation"
,
"general"
:
{
"_class"
:
"Dream.Configuration"
,
"numberOfReplications"
:
"1"
,
"maxSimTime"
:
"1440"
,
"trace"
:
"Yes"
,
"confidenceLevel"
:
"0.95"
},
"modelResource"
:
[
],
"coreObject"
:
[
{
"_class"
:
"Dream.Source"
,
"id"
:
"S1"
,
"name"
:
"Parts"
,
"interarrivalTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0.5"
},
"entity"
:
"Part"
,
"successorList"
:
[
"Α1"
]
},
{
"_class"
:
"Dream.Source"
,
"id"
:
"S2"
,
"name"
:
"Frames"
,
"interarrivalTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
},
"entity"
:
"Frame"
,
"successorList"
:
[
"Α1"
]
},
{
"_class"
:
"Dream.Assembly"
,
"id"
:
"A1"
,
"name"
:
"Assembly"
,
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
},
"predecessorPartList"
:
[
"S1"
],
"predecessorFrameList"
:
[
"S2"
],
"successorList"
:
[
"M1"
]
},
{
"_class"
:
"Dream.Machine"
,
"id"
:
"M1"
,
"name"
:
"Moulding"
,
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0.25"
},
"failures"
:{
"failureDistribution"
:
"Fixed"
,
"MTTF"
:
"60"
,
"MTTR"
:
"5"
,
"repairman"
:
"None"
},
"predecessorList"
:
[
"A1"
],
"successorList"
:
[
"D1"
]
},
{
"_class"
:
"Dream.Dismantle"
,
"id"
:
"D1"
,
"name"
:
"Dismantle"
,
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
},
"successorPartList"
:
[
"E1"
],
"successorFrameList"
:
[
"E2"
],
"predecessorList"
:
[
"M1"
]
},
{
"_class"
:
"Dream.Exit"
,
"id"
:
"E1"
,
"name"
:
"Parts Stock"
,
"predecessorList"
:
[
"D1"
]
},
{
"_class"
:
"Dream.Exit"
,
"id"
:
"E2"
,
"name"
:
"Frames Stock"
,
"predecessorList"
:
[
"D1"
]
}
]
}
DREAM/dream/simulation/src/LineGenerationJSON.py
View file @
a1556795
...
...
@@ -18,6 +18,7 @@ from Repairman import Repairman
from
Part
import
Part
from
Frame
import
Frame
from
Assembly
import
Assembly
from
Dismantle
import
Dismantle
import
xlwt
import
xlrd
import
time
...
...
@@ -47,6 +48,7 @@ def createObjects():
G
.
QueueList
=
[]
G
.
RepairmanList
=
[]
G
.
AssemblyList
=
[]
G
.
DismantleList
=
[]
#loop through all the model resources
#read the data and create them
...
...
@@ -146,6 +148,25 @@ def createObjects():
A
.
nextIds
=
successorList
G
.
AssemblyList
.
append
(
A
)
G
.
ObjList
.
append
(
A
)
elif
objClass
==
'Dream.Dismantle'
:
id
=
coreObject
[
i
].
get
(
'id'
,
'not found'
)
name
=
coreObject
[
i
].
get
(
'name'
,
'not found'
)
processingTime
=
coreObject
[
i
].
get
(
'processingTime'
,
'not found'
)
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
min
=
float
(
processingTime
.
get
(
'min'
,
'0'
))
max
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
successorPartList
=
coreObject
[
i
].
get
(
'successorPartList'
,
'not found'
)
successorFrameList
=
coreObject
[
i
].
get
(
'successorFrameList'
,
'not found'
)
predecessorList
=
coreObject
[
i
].
get
(
'predecessorList'
,
'not found'
)
D
=
Dismantle
(
id
,
name
,
distributionType
,
[
mean
,
stdev
,
min
,
max
])
D
.
nextPartIds
=
successorPartList
D
.
nextFrameIds
=
successorFrameList
D
.
previousIds
=
predecessorList
G
.
DismantleList
.
append
(
D
)
G
.
ObjList
.
append
(
D
)
#defines the topology (predecessors and successors for all the objects)
def
setTopology
():
...
...
@@ -169,6 +190,7 @@ def setTopology():
G
.
ObjList
[
i
].
defineRouting
(
next
)
elif
G
.
ObjList
[
i
].
type
==
"Exit"
:
G
.
ObjList
[
i
].
defineRouting
(
previous
)
#Assembly should be changed to identify what the entity that it receives is.
#previousPart and previousFrame will become problematic
elif
G
.
ObjList
[
i
].
type
==
"Assembly"
:
...
...
@@ -183,6 +205,20 @@ def setTopology():
if
G
.
ObjList
[
q
].
id
==
G
.
ObjList
[
i
].
previousFrameIds
[
j
]:
previousFrame
.
append
(
G
.
ObjList
[
q
])
G
.
ObjList
[
i
].
defineRouting
(
previousPart
,
previousFrame
,
next
)
#Assembly should be changed to identify what the entity that it receives is.
#previousPart and previousFrame will become problematic
elif
G
.
ObjList
[
i
].
type
==
"Dismantle"
:
nextPart
=
[]
nextFrame
=
[]
for
j
in
range
(
len
(
G
.
ObjList
[
i
].
nextPartIds
)):
for
q
in
range
(
len
(
G
.
ObjList
)):
if
G
.
ObjList
[
q
].
id
==
G
.
ObjList
[
i
].
nextPartIds
[
j
]:
nextPart
.
append
(
G
.
ObjList
[
q
])
for
j
in
range
(
len
(
G
.
ObjList
[
i
].
nextFrameIds
)):
for
q
in
range
(
len
(
G
.
ObjList
)):
if
G
.
ObjList
[
q
].
id
==
G
.
ObjList
[
i
].
nextFrameIds
[
j
]:
nextFrame
.
append
(
G
.
ObjList
[
q
])
G
.
ObjList
[
i
].
defineRouting
(
previous
,
nextPart
,
nextFrame
)
else
:
G
.
ObjList
[
i
].
defineRouting
(
previous
,
next
)
...
...
DREAM/dream/simulation/src/output.xls
View file @
a1556795
No preview for this file type
DREAM/dream/simulation/src/trace1.xls
View file @
a1556795
No preview for this file type
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