Machine and Operator now updated to consider the new skillDict

parent bbc6bfc8
......@@ -715,7 +715,7 @@ class Machine(CoreObject):
yield self.env.process(self.release())
elif (self.currentOperator):
if self.currentOperator.skillDict:
if not self.id in self.currentOperator.skillDict["process"]:
if not self.id in self.currentOperator.skillDict["process"].get("stationIdList",[]):
yield self.env.process(self.release())
#===================================================================
......
......@@ -83,8 +83,8 @@ class Operator(ObjectResource):
self.skillDict = skillDict
# if there is a skillDict add the stations defined to the operators coreObjectIds
if skillDict:
for operation_stations in skillDict.values():
for station in operation_stations:
for operation_data in skillDict.values():
for station in operation_data.get("stationIdList", []):
if not station in self.coreObjectIds:
# append the station ID to the correObjectIds
self.coreObjectIds.append(station)
......
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