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

scheduled maintenance updated

parent ba8c230d
......@@ -31,10 +31,6 @@
"left": 0.5
},
"M1": {
"scheduledMaintenance": {
"duration": "60",
"start": "120"
},
"name": "Moulding",
"top": 0.5,
"processingTime": {
......@@ -42,24 +38,29 @@
"mean": 0.25
}
},
"interruptions": {},
"interruptions": {
"scheduledMaintenance": {
"duration": "60",
"start": "120"
}
},
"_class": "Dream.Machine",
"left": 0.5
}
},
"edge": {
"1": {
"source": "Q1",
"destination": "M1",
"data": {},
"_class": "Dream.Edge"
},
"0": {
"source": "S1",
"destination": "Q1",
"data": {},
"_class": "Dream.Edge"
},
"1": {
"source": "Q1",
"destination": "M1",
"data": {},
"_class": "Dream.Edge"
},
"2": {
"source": "M1",
"destination": "E1",
......
......@@ -281,7 +281,7 @@ def createObjectInterruptions():
from dream.simulation.ShiftScheduler import ShiftScheduler
for (element_id, element) in nodes.iteritems():
element['id'] = element_id
scheduledMaintenance=element.get('scheduledMaintenance', {})
scheduledMaintenance=element.get('interruptions',{}).get('scheduledMaintenance', {})
# if there is a scheduled maintenance initiate it and append it
# to the interruptions- and scheduled maintenances- list
if len(scheduledMaintenance):
......
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