Commit 83cbe975 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in reading of SubBatches as wip

parent fe105a4f
...@@ -191,9 +191,12 @@ def setWIP(entityList): ...@@ -191,9 +191,12 @@ def setWIP(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' or entity.type=='CapacityEntity': if entity.type=='Part' or entity.type=='Batch' or entity.type=='SubBatch' or entity.type=='CapacityEntity':
object=entity.currentStation #identify the object # these entities have to have a currentStation.
object.getActiveObjectQueue().append(entity) #append the entity to its Queue # TODO apply a more generic approach so that all need to have
entity.schedule.append([object,G.env.now]) #append the time to schedule so that it can be read in the result if entity.currentStation:
object=entity.currentStation #identify the object
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
# if the entity is of type Job/OrderComponent/Order/Mould # if the entity is of type Job/OrderComponent/Order/Mould
...@@ -228,7 +231,7 @@ def setWIP(entityList): ...@@ -228,7 +231,7 @@ def setWIP(entityList):
entity.remainingRoute.pop(0) # remove data from the remaining route. entity.remainingRoute.pop(0) # remove data from the remaining route.
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
entity.currentStation=object # update the current station of the entity
# 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
......
...@@ -1186,9 +1186,9 @@ def createWIP(): ...@@ -1186,9 +1186,9 @@ def createWIP():
batch.numberOfUnits+=numberOfUnits batch.numberOfUnits+=numberOfUnits
else: #if the parent batch was not found create it else: #if the parent batch was not found create it
batch=Batch(parentBatchId,parentBatchName, numberOfUnits) batch=Batch(parentBatchId,parentBatchName, numberOfUnits)
G.BatchList.append(B) G.BatchList.append(batch)
G.WipList.append(B) G.WipList.append(batch)
G.EntityList.append(B) G.EntityList.append(batch)
SB=SubBatch(id,name, numberOfUnits=numberOfUnits, parentBatch=batch) SB=SubBatch(id,name, numberOfUnits=numberOfUnits, parentBatch=batch)
G.SubBatchList.append(SB) G.SubBatchList.append(SB)
......
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