Commit 1f0fc35b authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

globals set wip fix

parent 5e40e609
...@@ -190,7 +190,7 @@ def setWIP(entityList): ...@@ -190,7 +190,7 @@ def setWIP(entityList):
# for all the entities in the entityList # for all the entities in the entityList
for entity in entityList: for entity in entityList:
# if the entity is of type Part # if the entity is of type Part
if entity.type=='Part' or entity.type=='Batch' or entity.type=='SubBatch': if entity.type=='Part' or entity.type=='Batch' or entity.type=='SubBatch' or entity.type=='CapacityEntity':
object=entity.currentStation #identify the object object=entity.currentStation #identify the object
object.getActiveObjectQueue().append(entity) #append the entity to its Queue object.getActiveObjectQueue().append(entity) #append the entity to its Queue
entity.schedule.append([object,G.env.now]) #append the time to schedule so that it can be read in the result entity.schedule.append([object,G.env.now]) #append the time to schedule so that it can be read in the result
...@@ -231,7 +231,9 @@ def setWIP(entityList): ...@@ -231,7 +231,9 @@ def setWIP(entityList):
# if the currentStation of the entity is of type Machine then the entity # if the currentStation of the entity is of type Machine then the entity
# must be processed first and then added to the pendingEntities list # must be processed first and then added to the pendingEntities list
# Its hot flag is not raised # Its hot flag is not raised
if not (entity.currentStation in G.MachineList): # the following to be performed only if there is a current station. Orders, Projects e.t.c do not have
# TODO, maybe we should loop in wiplist here
if (not (entity.currentStation in G.MachineList)) and entity.currentStation:
# variable to inform whether the successors are machines or not # variable to inform whether the successors are machines or not
successorsAreMachines=True successorsAreMachines=True
for nextObject in entity.currentStation.next: for nextObject in entity.currentStation.next:
......
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