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
93fbc6af
Commit
93fbc6af
authored
May 23, 2013
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1st version of conveyer object - not working properly
parent
efe93f63
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
404 additions
and
4 deletions
+404
-4
DREAM/dream/simulation/PlantTopologies/Topology15.spp
DREAM/dream/simulation/PlantTopologies/Topology15.spp
+0
-0
DREAM/dream/simulation/src/Assembly.py
DREAM/dream/simulation/src/Assembly.py
+1
-1
DREAM/dream/simulation/src/Conveyer.py
DREAM/dream/simulation/src/Conveyer.py
+296
-0
DREAM/dream/simulation/src/Exit.py
DREAM/dream/simulation/src/Exit.py
+2
-3
DREAM/dream/simulation/src/Frame.py
DREAM/dream/simulation/src/Frame.py
+4
-0
DREAM/dream/simulation/src/JSONInputs/Topology15.json
DREAM/dream/simulation/src/JSONInputs/Topology15.json
+82
-0
DREAM/dream/simulation/src/LineGenerationJSON.py
DREAM/dream/simulation/src/LineGenerationJSON.py
+15
-0
DREAM/dream/simulation/src/Part.py
DREAM/dream/simulation/src/Part.py
+4
-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/Topology15.spp
0 → 100644
View file @
93fbc6af
File added
DREAM/dream/simulation/src/Assembly.py
View file @
93fbc6af
...
...
@@ -84,7 +84,7 @@ class Assembly(Process):
def
run
(
self
):
while
1
:
yield
waituntil
,
self
,
self
.
canAcceptAndIsRequested
#wait until the Assembly can accept a frame
#and one "frame" predecessor requests it
#and one "frame" predecessor requests it
self
.
getEntity
(
"Frame"
)
#get the Frame
for
i
in
range
(
self
.
Res
.
activeQ
[
0
].
numOfParts
):
#this loop will be carried until the Frame is full with the parts
...
...
DREAM/dream/simulation/src/Conveyer.py
0 → 100644
View file @
93fbc6af
This diff is collapsed.
Click to expand it.
DREAM/dream/simulation/src/Exit.py
View file @
93fbc6af
...
...
@@ -93,9 +93,8 @@ class Exit(Process):
#gets an entity from the predecessor
def
getEntity
(
self
):
name
=
self
.
previous
[
self
.
predecessorIndex
].
Res
.
activeQ
[
0
].
name
#get the name of the entity for the trace
self
.
totalLifespan
+=
now
()
-
self
.
previous
[
self
.
predecessorIndex
].
Res
.
activeQ
[
0
].
startTime
#Add the entity's lifespan to the total one.
self
.
previous
[
self
.
predecessorIndex
].
removeEntity
()
#remove the entity from the previous object
name
=
self
.
previous
[
0
].
Res
.
activeQ
[
0
].
name
#get the name of the entity for the trace
self
.
previous
[
0
].
removeEntity
()
#remove the entity from the previous object
self
.
outputTrace
(
name
)
#actions to be taken after the simulation ends
...
...
DREAM/dream/simulation/src/Frame.py
View file @
93fbc6af
...
...
@@ -22,5 +22,9 @@ class Frame(object):
self
.
creationTime
=
0
self
.
startTime
=
0
#holds the startTime for the lifespan
self
.
Res
=
Resource
(
self
.
numOfParts
)
#dimension data
self
.
width
=
2
self
.
height
=
2
self
.
lenght
=
2
DREAM/dream/simulation/src/JSONInputs/Topology15.json
0 → 100644
View file @
93fbc6af
{
"_class"
:
"Dream.Simulation"
,
"general"
:
{
"_class"
:
"Dream.Configuration"
,
"numberOfReplications"
:
"1"
,
"maxSimTime"
:
"60"
,
"trace"
:
"Yes"
,
"confidenceLevel"
:
"0.95"
},
"modelResource"
:
[
{
"_class"
:
"Dream.Repairman"
,
"id"
:
"W1"
,
"name"
:
"W1"
,
"capacity"
:
"1"
}
],
"coreObject"
:
[
{
"_class"
:
"Dream.Source"
,
"id"
:
"S1"
,
"name"
:
"Raw Material"
,
"interarrivalTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0.5"
},
"entity"
:
"Part"
,
"successorList"
:
[
"DummyQ"
]
},
{
"_class"
:
"Dream.Machine"
,
"id"
:
"M1"
,
"name"
:
"Machine1"
,
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"0.25"
},
"failures"
:{
"failureDistribution"
:
"No"
,
"MTTF"
:
"60"
,
"MTTR"
:
"5"
,
"repairman"
:
"W1"
},
"predecessorList"
:
[
"DummyQ"
],
"successorList"
:
[
"C1"
]
},
{
"_class"
:
"Dream.Machine"
,
"id"
:
"M2"
,
"name"
:
"Machine2"
,
"processingTime"
:
{
"distributionType"
:
"Fixed"
,
"mean"
:
"1.5"
},
"failures"
:{
"failureDistribution"
:
"No"
,
"MTTF"
:
"40"
,
"MTTR"
:
"10"
,
"repairman"
:
"W1"
},
"predecessorList"
:
[
"C1"
],
"successorList"
:
[
"E1"
]
},
{
"_class"
:
"Dream.Queue"
,
"id"
:
"DummyQ"
,
"name"
:
"DummyQ"
,
"isDummy"
:
"1"
,
"capacity"
:
"1"
,
"predecessorList"
:
[
"S1"
],
"successorList"
:
[
"M1"
]
},
{
"_class"
:
"Dream.Conveyer"
,
"id"
:
"C1"
,
"name"
:
"C1"
,
"length"
:
"8"
,
"speed"
:
"1"
,
"predecessorList"
:
[
"M1"
],
"successorList"
:
[
"M2"
]
},
{
"_class"
:
"Dream.Exit"
,
"id"
:
"E1"
,
"name"
:
"Stock"
,
"predecessorList"
:
[
"M2"
]
}
]
}
DREAM/dream/simulation/src/LineGenerationJSON.py
View file @
93fbc6af
...
...
@@ -19,6 +19,7 @@ from Part import Part
from
Frame
import
Frame
from
Assembly
import
Assembly
from
Dismantle
import
Dismantle
from
Conveyer
import
Conveyer
import
xlwt
import
xlrd
import
time
...
...
@@ -49,6 +50,7 @@ def createObjects():
G
.
RepairmanList
=
[]
G
.
AssemblyList
=
[]
G
.
DismantleList
=
[]
G
.
ConveyerList
=
[]
#loop through all the model resources
#read the data and create them
...
...
@@ -167,6 +169,19 @@ def createObjects():
D
.
previousIds
=
predecessorList
G
.
DismantleList
.
append
(
D
)
G
.
ObjList
.
append
(
D
)
elif
objClass
==
'Dream.Conveyer'
:
id
=
coreObject
[
i
].
get
(
'id'
,
'not found'
)
name
=
coreObject
[
i
].
get
(
'name'
,
'not found'
)
length
=
float
(
coreObject
[
i
].
get
(
'length'
,
'10'
))
speed
=
float
(
coreObject
[
i
].
get
(
'speed'
,
'1'
))
successorList
=
coreObject
[
i
].
get
(
'successorList'
,
'not found'
)
predecessorList
=
coreObject
[
i
].
get
(
'predecessorList'
,
'not found'
)
C
=
Conveyer
(
id
,
name
,
length
,
speed
)
C
.
previousIds
=
predecessorList
C
.
nextIds
=
successorList
G
.
ObjList
.
append
(
C
)
G
.
ConveyerList
.
append
(
C
)
#defines the topology (predecessors and successors for all the objects)
def
setTopology
():
...
...
DREAM/dream/simulation/src/Part.py
View file @
93fbc6af
...
...
@@ -22,6 +22,10 @@ class Part(object):
self
.
currentStop
=
None
#contains the current object that the material is in
self
.
creationTime
=
0
self
.
startTime
=
0
#holds the startTime for the lifespan
#dimension data
self
.
width
=
1
self
.
height
=
1
self
.
length
=
1
def
__del__
(
self
):
pass
...
...
DREAM/dream/simulation/src/output.xls
View file @
93fbc6af
No preview for this file type
DREAM/dream/simulation/src/trace1.xls
View file @
93fbc6af
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