Commit 5d86f089 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

cherry-pick from readWIPseperatelly. updateNext of MachineJobSShop updated in...

cherry-pick from readWIPseperatelly. updateNext of MachineJobSShop updated in order to avoid updating the next list if there is no next step in the remaining route of the activeEntity
parent 3034739b
...@@ -125,16 +125,19 @@ class MachineJobShop(Machine): ...@@ -125,16 +125,19 @@ class MachineJobShop(Machine):
activeEntity=entity activeEntity=entity
# read the possible receivers - update the next list # read the possible receivers - update the next list
import Globals import Globals
nextObjectIds=activeEntity.remainingRoute[1].get('stationIdsList',[]) # XXX: in the case of MouldAssembler there is no next defined in the route of the entities that are received
nextObjects = [] # the position activeEntity.remainingRoute[1] is out of bound. the next should be updated by the remaining route of the entity to be assembled
for nextObjectId in nextObjectIds: if len(activeEntity.remainingRoute)>1:
nextObject = Globals.findObjectById(nextObjectId) nextObjectIds=activeEntity.remainingRoute[1].get('stationIdsList',[])
nextObjects.append(nextObject) nextObjects = []
# update the next list of the object for nextObjectId in nextObjectIds:
for nextObject in nextObjects: nextObject = Globals.findObjectById(nextObjectId)
# append only if not already in the list nextObjects.append(nextObject)
if nextObject not in activeObject.next: # update the next list of the object
activeObject.next.append(nextObject) for nextObject in nextObjects:
# append only if not already in the list
if nextObject not in activeObject.next:
activeObject.next.append(nextObject)
# ======================================================================= # =======================================================================
# calculates the processing time # calculates the processing time
......
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