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
dfe8d623
Commit
dfe8d623
authored
Dec 23, 2014
by
Georgios Dagkakis
Committed by
Ioannis Papagiannopoulos
Jan 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes so that BOM info is read correctly by the objects
parent
df7a90e1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
369 additions
and
357 deletions
+369
-357
dream/simulation/JSONInputs/BOMOps1.json
dream/simulation/JSONInputs/BOMOps1.json
+345
-331
dream/simulation/Job.py
dream/simulation/Job.py
+10
-8
dream/simulation/MachineJobShop.py
dream/simulation/MachineJobShop.py
+2
-2
dream/simulation/MouldAssembly.py
dream/simulation/MouldAssembly.py
+12
-16
No files found.
dream/simulation/JSONInputs/BOMOps1.json
View file @
dfe8d623
...
...
@@ -83,21 +83,15 @@
}
},
"edge"
:
{
"1"
:
{
"source"
:
"O2"
,
"destination"
:
"OP1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
},
"0"
:
{
"source"
:
"O1"
,
"destination"
:
"OP1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
},
"3
"
:
{
"source"
:
"OP1"
,
"destination"
:
"M1"
,
"1
"
:
{
"source"
:
"O2"
,
"destination"
:
"OP1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
},
...
...
@@ -107,9 +101,9 @@
"data"
:
{},
"_class"
:
"Dream.Edge"
},
"5
"
:
{
"3
"
:
{
"source"
:
"OP1"
,
"destination"
:
"MA1"
,
"destination"
:
"M1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
},
...
...
@@ -118,13 +112,19 @@
"destination"
:
"M2"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
},
"5"
:
{
"source"
:
"OP1"
,
"destination"
:
"MA1"
,
"data"
:
{},
"_class"
:
"Dream.Edge"
}
}
},
"general"
:
{
"console"
:
"No"
,
"numberOfReplications"
:
"1"
,
"trace"
:
"No"
,
"trace"
:
"Yes"
,
"confidenceLevel"
:
"0.95"
,
"maxSimTime"
:
"-1"
,
"_class"
:
"Dream.Configuration"
...
...
@@ -144,9 +144,12 @@
{
"operator"
:
"O1"
,
"processingTime"
:
{
"operationType"
:
1
,
"distributionType"
:
"Fixed"
,
"Fixed"
:
{
"mean"
:
1.0
}
},
"operationType"
:
{
"Processing"
:
1
},
"stationIdsList"
:
[
"M0"
...
...
@@ -176,9 +179,12 @@
{
"operator"
:
"O1"
,
"processingTime"
:
{
"operationType"
:
1
,
"distributionType"
:
"Fixed"
,
"mean"
:
"2"
"Fixed"
:
{
"mean"
:
2
}
},
"operationType"
:
{
"Processing"
:
1
},
"stationIdsList"
:
[
"M1"
,
...
...
@@ -221,9 +227,12 @@
{
"operator"
:
"O1"
,
"processingTime"
:
{
"operationType"
:
1
,
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
"Fixed"
:
{
"mean"
:
1
}
},
"operationType"
:
{
"Processing"
:
1
},
"stationIdsList"
:
[
"M1"
,
...
...
@@ -264,11 +273,13 @@
"sequence"
:
"4"
},
{
"operator"
:
"O1"
,
"processingTime"
:
{
"operationType"
:
1
,
"distributionType"
:
"Fixed"
,
"mean"
:
"3"
"Fixed"
:
{
"mean"
:
3
}
},
"operationType"
:
{
"Processing"
:
1
},
"stationIdsList"
:
[
"M1"
,
...
...
@@ -302,9 +313,12 @@
{
"operator"
:
"O2"
,
"processingTime"
:
{
"operationType"
:
1
,
"distributionType"
:
"Fixed"
,
"mean"
:
"1"
"Fixed"
:
{
"mean"
:
1
}
},
"operationType"
:
{
"Processing"
:
1
},
"stationIdsList"
:
[
"MA1"
...
...
dream/simulation/Job.py
View file @
dfe8d623
...
...
@@ -58,14 +58,16 @@ class Job(Entity): # inherits from the Entity c
self
.
routeInBOM
=
False
# initialOperationTypes dictionary that shows if there are any manual operations to be performed if the Job is initial WIP at a machine
if
self
.
remainingRoute
:
initialSetup
=
self
.
remainingRoute
[
0
].
get
(
'setupTime'
,{})
# the setupTime dict of the first step
initialSetupType
=
0
if
initialSetup
:
initialSetupType
=
initialSetup
.
get
(
'operationType'
,
0
)
initialProcessing
=
self
.
remainingRoute
[
0
].
get
(
'processingTime'
,{})
# the processingTime dict of the first step
initialProcessingType
=
0
if
initialProcessing
:
initialProcessingType
=
initialProcessing
.
get
(
'operationType'
,
0
)
# the setupType of the first step
initialSetupType
=
self
.
remainingRoute
[
0
].
get
(
'operationType'
,{}).
get
(
'Setup'
,
0
)
initialProcessingType
=
self
.
remainingRoute
[
0
].
get
(
'operationType'
,{}).
get
(
'Processing'
,
0
)
# initialSetupType=0
# if initialSetup:
# initialSetupType=initialSetup.get('operationType',0)
# initialProcessing=self.remainingRoute[0].get('processingTime',{}) # the processingTime dict of the first step
# initialProcessingType=0
# if initialProcessing:
# initialProcessingType=initialProcessing.get('operationType',0)
self
.
initialOperationTypes
=
{
"Setup"
:
initialSetupType
,
"Processing"
:
initialProcessingType
}
...
...
dream/simulation/MachineJobShop.py
View file @
dfe8d623
...
...
@@ -248,8 +248,8 @@ class MachineJobShop(Machine):
activeEntity
=
entity
# read the definition of the time from the remainingRoute dict
if
not
self
.
isProcessingInitialWIP
:
time
=
activeEntity
.
remainingRoute
[
0
].
get
(
str
(
typeDict
[
str
(
type
)])
,{})
operationType
=
time
.
get
(
'operationType'
,
'not defined'
)
operationTypeDict
=
activeEntity
.
remainingRoute
[
0
].
get
(
'operationType'
,{})
operationType
=
operationTypeDict
.
get
(
str
(
type
),
'not defined'
)
else
:
# if the active entity is initialWIP at the start of simulation
operationType
=
activeEntity
.
initialOperationTypes
.
get
(
str
(
type
),
'not defined'
)
# if the operationType is not 'not defined'
...
...
dream/simulation/MouldAssembly.py
View file @
dfe8d623
...
...
@@ -243,31 +243,27 @@ class MouldAssembly(MachineJobShop):
self
.
rng
=
RandomNumberGenerator
(
self
,
processingTime
)
self
.
procTime
=
self
.
rng
.
generateNumber
()
# update the activeObject's processing time according to the readings in the mould's route
processDistType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
procTime
=
float
(
processingTime
.
get
(
'mean'
,
0
))
processOpType
=
processingTime
.
get
(
'operationType
'
,
'not found'
)
# can be manual/automatic
processDistType
=
processingTime
.
keys
()[
0
]
procTime
=
float
(
processingTime
[
processDistType
]
.
get
(
'mean'
,
0
))
processOpType
=
firstStep
.
get
(
'operationType'
,{}).
get
(
'Processing
'
,
'not found'
)
# can be manual/automatic
# setup operation
setupTime
=
firstStep
.
get
(
'setupTime'
,
None
)
if
setupTime
:
setupTime
=
self
.
getOperationTime
(
setupTime
)
self
.
stpRng
=
RandomNumberGenerator
(
self
,
**
setupTime
)
self
.
stpRng
=
RandomNumberGenerator
(
self
,
setupTime
)
# update the activeObject's processing time according to the readings in the mould's route
setupDistType
=
setupTime
.
get
(
'distributionType'
,
'not found'
)
setTime
=
float
(
setupTime
.
get
(
'mean'
,
0
))
setupOpType
=
setupTime
.
get
(
'operationType
'
,
'not found'
)
# can be manual/automatic
setupDistType
=
setupTime
.
get
keys
()[
0
]
setTime
=
float
(
setupTime
[
setupDistType
]
.
get
(
'mean'
,
0
))
setupOpType
=
firstStep
.
get
(
'operationType'
,{}).
get
(
'Setup
'
,
'not found'
)
# can be manual/automatic
# update the first step of the route with the activeObjects id as sole element of the stationIdsList
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
'distributionType'
:
str
(
processDistType
),
\
'mean'
:
str
(
procTime
),
\
'operationType'
:
str
(
processOpType
)},
\
'setupTime'
:{
'distributionType'
:
str
(
setupDistType
),
\
'mean'
:
str
(
setupTime
),
\
'operationType'
:
str
(
setupOpType
)}})
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
str
(
processDistType
):{
'mean'
:
str
(
procTime
)}},
\
'setupTime'
:{
str
(
setupDistType
):{
'mean'
:
str
(
setupTime
)}},
'operationType'
:{
'Processing'
:
processOpType
,
'Setup'
:
setupOpType
}})
else
:
# update the first step of the route with the activeObjects id as sole element of the stationIdsList
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
'distributionType'
:
str
(
processDistType
),
\
'mean'
:
str
(
procTime
),
\
'operationType'
:
str
(
processOpType
)}})
route
.
insert
(
0
,
{
'stationIdsList'
:[
str
(
self
.
id
)],
'processingTime'
:{
str
(
processDistType
):{
'mean'
:
str
(
procTime
)}},
'operationType'
:{
'Processing'
:
processOpType
}})
#Below it is to assign an exit if it was not assigned in JSON
#have to talk about it with NEX
exitAssigned
=
False
...
...
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