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
175a5a93
Commit
175a5a93
authored
Dec 02, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interarrivalTime and processingTime are required
parent
f9dcb1c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+10
-10
No files found.
dream/simulation/LineGenerationJSON.py
View file @
175a5a93
...
...
@@ -171,7 +171,7 @@ def createObjects():
if
objClass
==
'Dream.Source'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
interarrivalTime
=
element
.
get
(
'interarrivalTime'
,
'not found'
)
interarrivalTime
=
element
[
'interarrivalTime'
]
distributionType
=
interarrivalTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
interarrivalTime
.
get
(
'mean'
,
'0'
))
entity
=
str_to_class
(
element
.
get
(
'entity'
,
'not found'
))
# initialize entity
...
...
@@ -183,7 +183,7 @@ def createObjects():
if
objClass
==
'Dream.BatchSource'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
interarrivalTime
=
element
.
get
(
'interarrivalTime'
,
'not found'
)
interarrivalTime
=
element
[
'interarrivalTime'
]
distributionType
=
interarrivalTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
interarrivalTime
.
get
(
'mean'
,
'0'
))
entity
=
str_to_class
(
element
.
get
(
'entity'
,
'not found'
))
...
...
@@ -197,7 +197,7 @@ def createObjects():
elif
objClass
==
'Dream.Machine'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -223,7 +223,7 @@ def createObjects():
elif
objClass
==
'Dream.BatchScrapMachine'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -258,7 +258,7 @@ def createObjects():
elif
objClass
==
'Dream.MachineJobShop'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -334,7 +334,7 @@ def createObjects():
elif
objClass
==
'Dream.Assembly'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -348,7 +348,7 @@ def createObjects():
elif
objClass
==
'Dream.Dismantle'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -376,7 +376,7 @@ def createObjects():
elif
objClass
==
'Dream.BatchDecomposition'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -392,7 +392,7 @@ def createObjects():
elif
objClass
==
'Dream.BatchReassembly'
:
id
=
element
.
get
(
'id'
,
'not found'
)
name
=
element
.
get
(
'name'
,
'not found'
)
processingTime
=
element
.
get
(
'processingTime'
,
'not found'
)
processingTime
=
element
[
'processingTime'
]
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
mean
=
float
(
processingTime
.
get
(
'mean'
,
'0'
))
stdev
=
float
(
processingTime
.
get
(
'stdev'
,
'0'
))
...
...
@@ -532,7 +532,7 @@ def createWIP():
for
routeentity
in
JSONRoute
:
# for each 'step' dictionary in the JSONRoute
stepNumber
=
int
(
routeentity
.
get
(
'stepNumber'
,
'0'
))
# get the stepNumber
nextId
=
routeentity
.
get
(
'stationId'
,
'not found'
)
# the stationId
processingTime
=
routeentity
.
get
(
'processingTime'
,
'not found'
)
# and the 'processingTime' dictionary
processingTime
=
routeentity
[
'processingTime'
]
# and the 'processingTime' dictionary
distributionType
=
processingTime
.
get
(
'distributionType'
,
'not found'
)
# and from that dictionary
# get the 'mean'
mean
=
float
(
processingTime
.
get
(
'mean'
,
'not found'
))
...
...
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