Commit 5eddc6ac authored by Jérome Perrin's avatar Jérome Perrin

interarrivalTime.mean is now a float

TODO: the GUI will have to make it a float too
parent fd62846b
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.7857142857142857, "left": 0.7857142857142857,
"name": "Parts", "name": "Parts",
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"entity": "Dream.Frame", "entity": "Dream.Frame",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "2" "mean": 2.0
}, },
"left": 0.2142857142857143, "left": 0.2142857142857143,
"name": "Frames", "name": "Frames",
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.30208333333333337, "left": 0.30208333333333337,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.6979166666666667, "left": 0.6979166666666667,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.2142857142857143, "left": 0.2142857142857143,
"name": "Parts", "name": "Parts",
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
"entity": "Dream.Frame", "entity": "Dream.Frame",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "2" "mean": 2.0
}, },
"left": 0.7857142857142857, "left": 0.7857142857142857,
"name": "Frames", "name": "Frames",
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.6979166666666667, "left": 0.6979166666666667,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.7857142857142857, "left": 0.7857142857142857,
"name": "Raw Material 1", "name": "Raw Material 1",
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.2142857142857143, "left": 0.2142857142857143,
"name": "Raw Material 2", "name": "Raw Material 2",
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.8636363636363636, "left": 0.8636363636363636,
"name": "Raw Material 1", "name": "Raw Material 1",
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.13636363636363635, "left": 0.13636363636363635,
"name": "Raw Material 2", "name": "Raw Material 2",
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "2" "mean": 2.0
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material 3", "name": "Raw Material 3",
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.7857142857142857, "left": 0.7857142857142857,
"name": "Raw Material 1", "name": "Raw Material 1",
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.2142857142857143, "left": 0.2142857142857143,
"name": "Raw Material 2", "name": "Raw Material 2",
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.639751552795031, "left": 0.639751552795031,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.639751552795031, "left": 0.639751552795031,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.2142857142857143, "left": 0.2142857142857143,
"name": "Parts", "name": "Parts",
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
"entity": "Dream.Frame", "entity": "Dream.Frame",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "2" "mean": 2.0
}, },
"left": 0.7857142857142857, "left": 0.7857142857142857,
"name": "Frames", "name": "Frames",
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.2142857142857143, "left": 0.2142857142857143,
"name": "Parts", "name": "Parts",
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
"entity": "Dream.Frame", "entity": "Dream.Frame",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "2" "mean": 2.0
}, },
"left": 0.7857142857142857, "left": 0.7857142857142857,
"name": "Frames", "name": "Frames",
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.30208333333333337, "left": 0.30208333333333337,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.30208333333333337, "left": 0.30208333333333337,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
"id": "S1", "id": "S1",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"name": "Raw Material" "name": "Raw Material"
} }
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
"entity": "Dream.Batch", "entity": "Dream.Batch",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Source", "name": "Source",
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
"entity": "Dream.Batch", "entity": "Dream.Batch",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1.5" "mean": 1.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Source", "name": "Source",
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
"entity": "Dream.Batch", "entity": "Dream.Batch",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1.5" "mean": 1.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Source", "name": "Source",
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
"id": "S1", "id": "S1",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "30" "mean": 30.0
}, },
"name": "Raw Material" "name": "Raw Material"
} }
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
"entity": "Dream.Batch", "entity": "Dream.Batch",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Source", "name": "Source",
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1.5" "mean": 1.5
}, },
"left": 0.30208333333333337, "left": 0.30208333333333337,
"name": "Source", "name": "Source",
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
"id": "S1", "id": "S1",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"name": "Raw Material" "name": "Raw Material"
}, },
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.639751552795031, "left": 0.639751552795031,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.5" "mean": 0.5
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "6" "mean": 6.0
}, },
"name": "Source" "name": "Source"
} }
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
"entity": "Dream.Batch", "entity": "Dream.Batch",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1.5" "mean": 1.5
}, },
"left": 0.6968085106382979, "left": 0.6968085106382979,
"name": "Source", "name": "Source",
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"entity": "Dream.Part", "entity": "Dream.Part",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "1" "mean": 1.0
}, },
"left": 0.5, "left": 0.5,
"name": "Raw Material", "name": "Raw Material",
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"id": "S1", "id": "S1",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.75" "mean": 0.75
}, },
"name": "Raw Material" "name": "Raw Material"
} }
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"id": "S1", "id": "S1",
"interarrivalTime": { "interarrivalTime": {
"distributionType": "Fixed", "distributionType": "Fixed",
"mean": "0.75" "mean": 0.75
}, },
"name": "Raw Material" "name": "Raw Material"
} }
......
...@@ -58,7 +58,9 @@ def positionGraph(g): ...@@ -58,7 +58,9 @@ def positionGraph(g):
def format(m): def format(m):
for node in m['nodes'].values(): for node in m['nodes'].values():
if node['_class'] in ('Dream.Source', 'Dream.BatchSource'): if node['_class'] in ('Dream.Source', 'Dream.BatchSource'):
print node interarrivalTime = node['interarrivalTime']
print interarrivalTime
interarrivalTime['mean'] = float(interarrivalTime['mean'])
entity = node['entity'] entity = node['entity']
if not entity.startswith('Dream.'): if not entity.startswith('Dream.'):
node['entity'] = 'Dream.%s' % entity node['entity'] = 'Dream.%s' % entity
...@@ -68,7 +70,7 @@ def format(m): ...@@ -68,7 +70,7 @@ def format(m):
with open(sys.argv[1]) as infile: with open(sys.argv[1]) as infile:
m = json.load(infile) m = json.load(infile)
#m.update(format(m)) m.update(format(m))
#m.update(preferences=positionGraph(m)) #m.update(preferences=positionGraph(m))
with open(sys.argv[1], "w") as outfile: with open(sys.argv[1], "w") as outfile:
......
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