Simple router updated to assign entities to operators that arecapable of...

Simple router updated to assign entities to operators that arecapable of performing the requested type of operation (setup or process)
parent 4664b756
...@@ -452,17 +452,31 @@ class Router(ObjectInterruption): ...@@ -452,17 +452,31 @@ class Router(ObjectInterruption):
if requestedTechnology: if requestedTechnology:
# if the requested technology is in the operators skillDict # if the requested technology is in the operators skillDict
# XXX needs refining (an operator may have INJM in Process but the candidate entity may need setup # XXX needs refining (an operator may have INJM in Process but the candidate entity may need setup
# if entity.currentStation in self.pendingMachines: # if the entity is in a station
# pass if entity.currentStation in self.pendingMachines and\
# else: entity.schedule[-1].get("station", None)==entity.currentStation:
# pass # setup type (no exitTime is defined yet for the last step of the schedule)
if entity.schedule[-1].get("exitTime", "None")=="None":
if requestedTechnology in operator.skillDict["process"].get("technologyList", []) or\ if requestedTechnology in operator.skillDict["setup"].get("technologyList", []):
requestedTechnology in operator.skillDict["setup"].get("technologyList", []): operator.candidateEntity=operator.candidateEntities[index]
operator.candidateEntity=operator.candidateEntities[index] break
break # process type (exit time is defined for the last step of the schedule; setup step is concluded)
if entity.schedule[-1].get("exitTime", "None")!="None" or\
not entity.currentStep.get("setupTime", {}):
if requestedTechnology in operator.skillDict["process"].get("technologyList", []):
operator.candidateEntity=operator.candidateEntities[index]
break
# if the entity is in a queue
else: else:
continue if entity.remainingRoute[0].get("setupTime", {}):
if requestedTechnology in operator.skillDict["setup"].get("technologyList", []):
operator.candidateEntity=operator.candidateEntities[index]
break
else:
if requestedTechnology in operator.skillDict["process"].get("technologyList", []):
operator.candidateEntity=operator.candidateEntities[index]
break
continue
# otherwise # otherwise
else: else:
operator.candidateEntity=operator.candidateEntities[index] operator.candidateEntity=operator.candidateEntities[index]
......
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