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
7484c7c6
Commit
7484c7c6
authored
Sep 30, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
source and destination where reversed. Some topology are still not working fine though
parent
5628fc49
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
141 additions
and
131 deletions
+141
-131
dream/simulation/Exit.py
dream/simulation/Exit.py
+9
-0
dream/simulation/JSONInputs/Topology01.json
dream/simulation/JSONInputs/Topology01.json
+9
-9
dream/simulation/JSONInputs/Topology02.json
dream/simulation/JSONInputs/Topology02.json
+5
-5
dream/simulation/JSONInputs/Topology03.json
dream/simulation/JSONInputs/Topology03.json
+7
-7
dream/simulation/JSONInputs/Topology04.json
dream/simulation/JSONInputs/Topology04.json
+8
-8
dream/simulation/JSONInputs/Topology05.json
dream/simulation/JSONInputs/Topology05.json
+7
-7
dream/simulation/JSONInputs/Topology06.json
dream/simulation/JSONInputs/Topology06.json
+9
-9
dream/simulation/JSONInputs/Topology07.json
dream/simulation/JSONInputs/Topology07.json
+7
-7
dream/simulation/JSONInputs/Topology08.json
dream/simulation/JSONInputs/Topology08.json
+9
-9
dream/simulation/JSONInputs/Topology09.json
dream/simulation/JSONInputs/Topology09.json
+3
-3
dream/simulation/JSONInputs/Topology10.json
dream/simulation/JSONInputs/Topology10.json
+9
-9
dream/simulation/JSONInputs/Topology11.json
dream/simulation/JSONInputs/Topology11.json
+10
-10
dream/simulation/JSONInputs/Topology12.json
dream/simulation/JSONInputs/Topology12.json
+13
-13
dream/simulation/JSONInputs/Topology13.json
dream/simulation/JSONInputs/Topology13.json
+7
-7
dream/simulation/JSONInputs/Topology14.json
dream/simulation/JSONInputs/Topology14.json
+9
-9
dream/simulation/JSONInputs/Topology15.json
dream/simulation/JSONInputs/Topology15.json
+8
-8
dream/simulation/JSONInputs/Topology16.json
dream/simulation/JSONInputs/Topology16.json
+9
-9
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+2
-1
dream/simulation/reformat.py
dream/simulation/reformat.py
+1
-1
No files found.
dream/simulation/Exit.py
View file @
7484c7c6
...
...
@@ -102,6 +102,7 @@ class Exit(CoreObject):
#checks if the Exit can accept an entity and there is an entity waiting for it
def
canAcceptAndIsRequested
(
self
):
result
=
None
if
(
len
(
self
.
previous
)
==
1
):
return
self
.
previous
[
0
].
haveToDispose
(
self
)
...
...
@@ -255,3 +256,11 @@ class Exit(CoreObject):
json
[
'results'
][
'taktTime'
][
'max'
]
=
self
.
TaktTime
[
0
]
G
.
outputJSON
[
'elementList'
].
append
(
json
)
#takes the array and checks if all its values are identical (returns false) or not (returns true)
#needed because if somebody runs multiple runs in deterministic case it would crash!
def
checkIfArrayHasDifValues
(
self
,
array
):
difValuesFlag
=
False
for
i
in
range
(
1
,
len
(
array
)):
if
(
array
[
i
]
!=
array
[
1
]):
difValuesFlag
=
True
return
difValuesFlag
dream/simulation/JSONInputs/Topology01.json
View file @
7484c7c6
...
...
@@ -2,38 +2,38 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"Q1"
,
"M1"
,
"Q1"
,
{}
],
"4"
:
[
"E1"
,
"M2"
,
"E1"
,
{}
],
"5"
:
[
"M1"
,
"DummyQ"
,
"M1"
,
{}
],
"6"
:
[
"M2"
,
"Q1"
,
"M2"
,
{}
]
},
...
...
@@ -41,7 +41,7 @@
"_class"
:
"Dream.Configuration"
,
"confidenceLevel"
:
"0.95"
,
"maxSimTime"
:
"1440"
,
"numberOfReplications"
:
"
1
"
,
"numberOfReplications"
:
"
2
"
,
"trace"
:
"No"
},
"nodes"
:
{
...
...
@@ -119,4 +119,4 @@
"top"
:
0.7727272727272727
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology02.json
View file @
7484c7c6
...
...
@@ -2,23 +2,23 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"A1"
,
"S1"
,
"A1"
,
{}
],
"1"
:
[
"A1"
,
"S2"
,
"A1"
,
{}
],
"2"
:
[
"M1"
,
"A1"
,
"M1"
,
{}
],
"3"
:
[
"E1"
,
"M1"
,
"E1"
,
{}
]
},
...
...
@@ -85,4 +85,4 @@
"top"
:
0.926923076923077
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology03.json
View file @
7484c7c6
...
...
@@ -2,33 +2,33 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"M2"
,
"M1"
,
"M2"
,
{}
],
"4"
:
[
"E1"
,
"M2"
,
"E1"
,
{}
],
"5"
:
[
"M1"
,
"DummyQ"
,
"M1"
,
{}
]
},
...
...
@@ -102,4 +102,4 @@
"top"
:
0.721556886227545
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology04.json
View file @
7484c7c6
...
...
@@ -2,38 +2,38 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"E1"
,
"M1"
,
"E1"
,
{}
],
"4"
:
[
"Q1"
,
"M2"
,
"Q1"
,
{}
],
"5"
:
[
"M2"
,
"DummyQ"
,
"M2"
,
{}
],
"6"
:
[
"M1"
,
"Q1"
,
"M1"
,
{}
]
},
...
...
@@ -116,4 +116,4 @@
"top"
:
0.7720588235294118
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology05.json
View file @
7484c7c6
...
...
@@ -2,33 +2,33 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"A1"
,
"S1"
,
"A1"
,
{}
],
"1"
:
[
"A1"
,
"S2"
,
"A1"
,
{}
],
"2"
:
[
"M1"
,
"A1"
,
"M1"
,
{}
],
"3"
:
[
"Q1"
,
"M1"
,
"Q1"
,
{}
],
"4"
:
[
"E1"
,
"M2"
,
"E1"
,
{}
],
"5"
:
[
"M2"
,
"Q1"
,
"M2"
,
{}
]
},
...
...
@@ -119,4 +119,4 @@
"top"
:
0.9534313725490196
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology06.json
View file @
7484c7c6
...
...
@@ -2,43 +2,43 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"Q1"
,
"M1"
,
"Q1"
,
{}
],
"4"
:
[
"M3"
,
"M2"
,
"M3"
,
{}
],
"5"
:
[
"E1"
,
"M3"
,
"E1"
,
{}
],
"6"
:
[
"M1"
,
"DummyQ"
,
"M1"
,
{}
],
"7"
:
[
"M2"
,
"Q1"
,
"M2"
,
{}
]
},
...
...
@@ -134,4 +134,4 @@
"top"
:
0.8070539419087137
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology07.json
View file @
7484c7c6
...
...
@@ -2,33 +2,33 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"S1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"S2"
,
"M2"
,
{}
],
"2"
:
[
"Q1"
,
"M1"
,
"Q1"
,
{}
],
"3"
:
[
"Q1"
,
"M2"
,
"Q1"
,
{}
],
"4"
:
[
"E1"
,
"M3"
,
"E1"
,
{}
],
"5"
:
[
"M3"
,
"Q1"
,
"M3"
,
{}
]
},
...
...
@@ -122,4 +122,4 @@
"top"
:
0.9431137724550899
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology08.json
View file @
7484c7c6
...
...
@@ -2,43 +2,43 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"S1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"S2"
,
"M2"
,
{}
],
"2"
:
[
"M3"
,
"S3"
,
"M3"
,
{}
],
"3"
:
[
"Q1"
,
"M1"
,
"Q1"
,
{}
],
"4"
:
[
"Q1"
,
"M2"
,
"Q1"
,
{}
],
"5"
:
[
"Q1"
,
"M3"
,
"Q1"
,
{}
],
"6"
:
[
"E1"
,
"M4"
,
"E1"
,
{}
],
"7"
:
[
"M4"
,
"Q1"
,
"M4"
,
{}
]
},
...
...
@@ -150,4 +150,4 @@
"top"
:
0.9431137724550899
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology09.json
View file @
7484c7c6
...
...
@@ -2,13 +2,13 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"S1"
,
"M1"
,
{}
],
"1"
:
[
"E1"
,
"M1"
,
"E1"
,
{}
]
},
...
...
@@ -51,4 +51,4 @@
"top"
:
0.8978494623655914
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology10.json
View file @
7484c7c6
...
...
@@ -2,43 +2,43 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"S1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"S2"
,
"M2"
,
{}
],
"2"
:
[
"Q1"
,
"M1"
,
"Q1"
,
{}
],
"3"
:
[
"Q1"
,
"M2"
,
"Q1"
,
{}
],
"4"
:
[
"E1"
,
"M3"
,
"E1"
,
{}
],
"5"
:
[
"E1"
,
"M4"
,
"E1"
,
{}
],
"6"
:
[
"M3"
,
"Q1"
,
"M3"
,
{}
],
"7"
:
[
"M4"
,
"Q1"
,
"M4"
,
{}
]
},
...
...
@@ -139,4 +139,4 @@
"top"
:
0.9431137724550899
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology11.json
View file @
7484c7c6
...
...
@@ -2,48 +2,48 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"M3"
,
"M1"
,
"M3"
,
{}
],
"4"
:
[
"M3"
,
"M2"
,
"M3"
,
{}
],
"5"
:
[
"E1"
,
"M3"
,
"E1"
,
{}
],
"6"
:
[
"Q1"
,
"DummyQ"
,
"Q1"
,
{}
],
"7"
:
[
"M1"
,
"Q1"
,
"M1"
,
{}
],
"8"
:
[
"M2"
,
"Q1"
,
"M2"
,
{}
]
},
...
...
@@ -139,4 +139,4 @@
"top"
:
0.5906862745098039
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology12.json
View file @
7484c7c6
...
...
@@ -2,63 +2,63 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"10"
:
[
"M1"
,
"Q1"
,
"M1"
,
{}
],
"11"
:
[
"M2"
,
"Q1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"M3"
,
"M1"
,
"M3"
,
{}
],
"4"
:
[
"M4"
,
"M1"
,
"M4"
,
{}
],
"5"
:
[
"M3"
,
"M2"
,
"M3"
,
{}
],
"6"
:
[
"M4"
,
"M2"
,
"M4"
,
{}
],
"7"
:
[
"E1"
,
"M3"
,
"E1"
,
{}
],
"8"
:
[
"E1"
,
"M4"
,
"E1"
,
{}
],
"9"
:
[
"Q1"
,
"DummyQ"
,
"Q1"
,
{}
]
},
...
...
@@ -167,4 +167,4 @@
"top"
:
0.5906862745098039
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology13.json
View file @
7484c7c6
...
...
@@ -2,39 +2,39 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"S1"
,
"A1"
,
"S1"
,
{
"entity"
:
"Part"
}
],
"1"
:
[
"S2"
,
"A1"
,
"S2"
,
{
"entity"
:
"Frame"
}
],
"2"
:
[
"A1"
,
"M1"
,
"A1"
,
{}
],
"3"
:
[
"M1"
,
"D1"
,
"M1"
,
{}
],
"4"
:
[
"D1"
,
"E1"
,
"D1"
,
{
"entity"
:
"Frame"
}
],
"5"
:
[
"D1"
,
"E2"
,
"D1"
,
{
"entity"
:
"Part"
}
...
...
@@ -119,4 +119,4 @@
"top"
:
0.05688622754491013
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology14.json
View file @
7484c7c6
...
...
@@ -2,43 +2,43 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"A1"
,
"S1"
,
"A1"
,
{}
],
"1"
:
[
"A1"
,
"S2"
,
"A1"
,
{}
],
"2"
:
[
"M1"
,
"A1"
,
"M1"
,
{}
],
"3"
:
[
"D1"
,
"M1"
,
"D1"
,
{}
],
"4"
:
[
"M2"
,
"D1"
,
"M2"
,
{}
],
"5"
:
[
"M3"
,
"D1"
,
"M3"
,
{}
],
"6"
:
[
"E1"
,
"M2"
,
"E1"
,
{}
],
"7"
:
[
"E2"
,
"M3"
,
"E2"
,
{}
]
},
...
...
@@ -159,4 +159,4 @@
"top"
:
0.9534313725490196
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology15.json
View file @
7484c7c6
...
...
@@ -2,38 +2,38 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"C1"
,
"M1"
,
"C1"
,
{}
],
"4"
:
[
"E1"
,
"M2"
,
"E1"
,
{}
],
"5"
:
[
"M1"
,
"DummyQ"
,
"M1"
,
{}
],
"6"
:
[
"M2"
,
"C1"
,
"M2"
,
{}
]
},
...
...
@@ -116,4 +116,4 @@
"top"
:
0.7720588235294118
}
}
}
\ No newline at end of file
}
dream/simulation/JSONInputs/Topology16.json
View file @
7484c7c6
...
...
@@ -2,43 +2,43 @@
"_class"
:
"Dream.Simulation"
,
"edges"
:
{
"0"
:
[
"M1"
,
"W1"
,
"M1"
,
{}
],
"1"
:
[
"M2"
,
"W1"
,
"M2"
,
{}
],
"2"
:
[
"DummyQ"
,
"S1"
,
"DummyQ"
,
{}
],
"3"
:
[
"C1"
,
"M1"
,
"C1"
,
{}
],
"4"
:
[
"M3"
,
"M2"
,
"M3"
,
{}
],
"5"
:
[
"M1"
,
"DummyQ"
,
"M1"
,
{}
],
"6"
:
[
"M2"
,
"C1"
,
"M2"
,
{}
],
"7"
:
[
"E1"
,
"M3"
,
"E1"
,
{}
]
},
...
...
@@ -134,4 +134,4 @@
"top"
:
0.8070539419087137
}
}
}
\ No newline at end of file
}
dream/simulation/LineGenerationJSON.py
View file @
7484c7c6
...
...
@@ -90,7 +90,7 @@ def createObjects():
# XXX slow implementation
def
getSuccessorList
(
node_id
,
predicate
=
lambda
source
,
destination
,
edge_data
:
True
):
successor_list
=
[]
for
source
,
destination
,
edge_data
in
edges
:
for
source
,
destination
,
edge_data
in
edges
.
values
()
:
if
source
==
node_id
:
if
predicate
(
source
,
destination
,
edge_data
):
successor_list
.
append
(
destination
)
...
...
@@ -244,6 +244,7 @@ def createObjects():
if
possible_successor
.
id
==
nextId
:
possible_successor
.
previousIds
.
append
(
element
.
id
)
#defines the topology (predecessors and successors for all the objects)
def
setTopology
():
#loop through all the objects
...
...
dream/simulation/reformat.py
View file @
7484c7c6
...
...
@@ -40,7 +40,7 @@ def format(m):
edges
=
m
.
pop
(
'edges'
)
m
[
'edges'
]
=
{}
for
i
,
(
s
,
d
,
data
)
in
enumerate
(
edges
):
m
[
'edges'
][
i
]
=
s
,
d
,
data
m
[
'edges'
][
i
]
=
d
,
s
,
data
return
m
with
open
(
sys
.
argv
[
1
])
as
infile
:
...
...
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