Commit 49bc5cc6 authored by Georgios Dagkakis's avatar Georgios Dagkakis

user to define operation in skills spreadsheett

parent 6c01d6d6
...@@ -26,15 +26,21 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin): ...@@ -26,15 +26,21 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
if not PBId: if not PBId:
continue continue
skills=PBitem[1].split(',') skills=PBitem[1].split(',')
newSkills=[]
for n_id,n in node.iteritems():
technology=n.get('technology',None)
if technology in skills and n_id not in newSkills:
newSkills.append(n_id)
node[PBId]={ node[PBId]={
"_class": "Dream.Operator", "_class": "Dream.Operator",
"capacity": 1, "capacity": 1,
"name":PBId, "name":PBId,
"skills":skills, "skills":newSkills,
"ouputSchedule" : 1 "ouputSchedule" : 1
} }
operatorPresent = True operatorPresent = True
print PBId, newSkills
# if there is at least one operator # if there is at least one operator
if operatorPresent: if operatorPresent:
nodes=data['graph']['node'] nodes=data['graph']['node']
......
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