Commit fcf9dbaf authored by Georgios Dagkakis's avatar Georgios Dagkakis

SkilledOperatorRouter to consider machine blocked if the reassembly is blocked

parent 86e35941
...@@ -218,9 +218,17 @@ class SkilledRouter(Router): ...@@ -218,9 +218,17 @@ class SkilledRouter(Router):
machinesForSecondPhaseDict={} machinesForSecondPhaseDict={}
for stationId in self.availableStationsDict.keys(): for stationId in self.availableStationsDict.keys():
machine = Globals.findObjectById(stationId) machine = Globals.findObjectById(stationId)
if machine.isBlocked: nextObject = machine.next[0]
nextObjectClassName = nextObject.__class__.__name__
reassemblyBlocksMachine = False
if 'Reassembly' in nextObjectClassName:
if nextObject.getActiveObjectQueue():
if nextObject.getActiveObjectQueue()[0].type == 'Batch':
reassemblyBlocksMachine = True
if machine.isBlocked or reassemblyBlocksMachine:
machinesForSecondPhaseDict[stationId] = self.availableStationsDict[stationId] machinesForSecondPhaseDict[stationId] = self.availableStationsDict[stationId]
del self.availableStationsDict[stationId] del self.availableStationsDict[stationId]
# run the LP method only for the machines that are not blocked # run the LP method only for the machines that are not blocked
solution=opAss_LP(self.availableStationsDict, self.availableOperatorList, solution=opAss_LP(self.availableStationsDict, self.availableOperatorList,
self.operators, previousAssignment=self.previousSolution, self.operators, previousAssignment=self.previousSolution,
......
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