Commit d8231222 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Ioannis Papagiannopoulos

Shifts to be read in the new way

parent 44ede8cc
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
"node": { "node": {
"M1": { "M1": {
"name": "Moulding", "name": "Moulding",
"top": 0.5,
"processingTime": {
"Fixed": {
"mean": 0.25
}
},
"interruptions": {
"shift": { "shift": {
"endUnfinished": 0, "endUnfinished": 0,
"receiveBeforeEndThreshold": 2, "receiveBeforeEndThreshold": 2,
...@@ -16,14 +23,8 @@ ...@@ -16,14 +23,8 @@
15 15
] ]
] ]
},
"top": 0.5,
"processingTime": {
"Fixed": {
"mean": 0.25
} }
}, },
"interruptions": {},
"_class": "Dream.Machine", "_class": "Dream.Machine",
"left": 0.5 "left": 0.5
}, },
...@@ -50,17 +51,17 @@ ...@@ -50,17 +51,17 @@
} }
}, },
"edge": { "edge": {
"1": {
"source": "M1",
"destination": "E1",
"data": {},
"_class": "Dream.Edge"
},
"0": { "0": {
"source": "S1", "source": "S1",
"destination": "M1", "destination": "M1",
"data": {}, "data": {},
"_class": "Dream.Edge" "_class": "Dream.Edge"
},
"1": {
"source": "M1",
"destination": "E1",
"data": {},
"_class": "Dream.Edge"
} }
} }
}, },
......
...@@ -313,7 +313,7 @@ def createObjectInterruptions(): ...@@ -313,7 +313,7 @@ def createObjectInterruptions():
G.PeriodicMaintenanceList.append(PM) G.PeriodicMaintenanceList.append(PM)
# if there is a shift pattern defined # if there is a shift pattern defined
# initiate them # initiate them
shift=element.get('shift', {}) shift=element.get('interruptions',{}).get('shift', {})
if len(shift): if len(shift):
victim=Globals.findObjectById(element['id']) victim=Globals.findObjectById(element['id'])
shiftPattern=list(shift.get('shiftPattern', [])) shiftPattern=list(shift.get('shiftPattern', []))
......
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