Commit 7484c7c6 authored by Sebastien Robin's avatar Sebastien Robin

source and destination where reversed. Some topology are still not working fine though

parent 5628fc49
......@@ -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
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
}
......@@ -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
......
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment