Commit 2a951bc7 authored by Georgios Dagkakis's avatar Georgios Dagkakis

if there is operator set operation type for all machines

parent 814fa34e
...@@ -34,12 +34,17 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin): ...@@ -34,12 +34,17 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"ouputSchedule" : 1 "ouputSchedule" : 1
} }
operatorPresent = True operatorPresent = True
# for every station that has one or more skilled operators set operation type to MT-Load-Processing
for stationId in skills: # if there is at least one operator
node[stationId]["operationType"]="MT-Load-Processing"
# add EventGenerator for the allocation every 10 minutes
if operatorPresent: if operatorPresent:
node['EV123454321']={ #(random id) nodes=data['graph']['node']
for station_id,station in nodes.iteritems():
# set the operation type of all machines to MT-Load-Processing
if station['_class'] in ['Dream.BatchScrapMachine','Dream.BatchScrapMachineBeforeReassembly',
'Dream.BatchScrapMachineAfterDecompose','Dream.M3']:
station["operationType"]="MT-Load-Processing"
# add EventGenerator for the allocation every 10 minutes
node['EV123454321']={ #(random id)
"name": "Allocator", "name": "Allocator",
"argumentDict": "{}", "argumentDict": "{}",
"interval": 10, "interval": 10,
...@@ -49,9 +54,6 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin): ...@@ -49,9 +54,6 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"interruptions": {}, "interruptions": {},
"_class": "Dream.EventGenerator", "_class": "Dream.EventGenerator",
"method": "Dream.ManPyObject.requestAllocation" "method": "Dream.ManPyObject.requestAllocation"
} }
# print '---------------------------------'
# print data['graph']['node']
# print '---------------------------------'
return data return data
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