minor bugs in shift and skills plugins corrected

parent fc946a94
...@@ -31,6 +31,7 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin): ...@@ -31,6 +31,7 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
shift_by_station.setdefault(station, []).append( shift_by_station.setdefault(station, []).append(
(start_time, stop_time) ) (start_time, stop_time) )
if data['input']['operator_shift_spreadsheet']:
for line in data['input']['operator_shift_spreadsheet'][1:]: for line in data['input']['operator_shift_spreadsheet'][1:]:
if line[1]: if line[1]:
# Get the dates, and convert them to simulation clock time units. # Get the dates, and convert them to simulation clock time units.
......
...@@ -17,6 +17,7 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin): ...@@ -17,6 +17,7 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
""" """
PBData=data['input'].get('operator_skill_spreadsheet', None) PBData=data['input'].get('operator_skill_spreadsheet', None)
node=data['graph']['node'] node=data['graph']['node']
operatorPresent = False
if PBData: if PBData:
PBData.pop(0) # pop the column names PBData.pop(0) # pop the column names
for PBitem in PBData: for PBitem in PBData:
...@@ -32,10 +33,12 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin): ...@@ -32,10 +33,12 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"skills":skills, "skills":skills,
"ouputSchedule" : 1 "ouputSchedule" : 1
} }
operatorPresent = True
# for every station that has one or more skilled operators set operation type to MT-Load-Processing # for every station that has one or more skilled operators set operation type to MT-Load-Processing
for stationId in skills: for stationId in skills:
node[stationId]["operationType"]="MT-Load-Processing" node[stationId]["operationType"]="MT-Load-Processing"
# add EventGenerator for the allocation every 10 minutes # add EventGenerator for the allocation every 10 minutes
if operatorPresent:
node['EV123454321']={ #(random id) node['EV123454321']={ #(random id)
"name": "Allocator", "name": "Allocator",
"argumentDict": "{}", "argumentDict": "{}",
......
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