setWip updates the pendingEntities list and sets the hot flag of entity...

setWip updates the pendingEntities list and sets the hot flag of entity according to the type of the currentStation of the entity
parent ac748351
......@@ -132,7 +132,9 @@ def setWIP(entityList):
object=entity.currentStation #identify the object
object.getActiveObjectQueue().append(entity) #append the entity to its Queue
entity.schedule.append([object,now()]) #append the time to schedule so that it can be read in the result
# if the entity is of type Job/OrderComponent/Order
# if the entity is of type Job/OrderComponent/Order/Mould
elif entity.type=='Job' or 'OrderComponent' or 'Order' or 'Mould':
# find the list of starting station of the entity
currentObjectIds=entity.remainingRoute[0].get('stationIdsList',[])
......@@ -165,6 +167,21 @@ def setWIP(entityList):
entity.schedule.append([object,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
# must be processed first and then added to the pendingEntities list
# Its hot flag is not raised
if not (entity.currentStation in G.MachineList):
# variable to inform whether the successors are machines or not
successorsAreMachines=True
for nextObject in entity.currentStation.next:
if not nextObject in G.MachineList:
successorsAreMachines=False
break
if not successorsAreMachines:
entity.hot = False
# add the entity to the pendingEntities list
G.pendingEntities.append(entity)
def countIntervalThroughput(argumentDict={}):
currentExited=0
for obj in G.ObjList:
......
......@@ -57,7 +57,7 @@ class OrderComponent(Job): # inherits from the
# variables to be used by OperatorRouter
self.hot=self.order.hot
if self.order in G.pendingEntities:
G.pendingEntites.append(self)
G.pendingEntities.append(self)
# TODO: isCritical argument is deprecated
# self.isCritical=isCritical # this should be self.order.isCritical. Added now for testing
self.componentType = componentType # the type of the component which can be Basic/Secondary/Auxiliary
......@@ -67,5 +67,4 @@ class OrderComponent(Job): # inherits from the
self.requestingComponent = requestingComponent # the id of the requesting component
self.readyForAssembly = readyForAssembly # flag informing weather the component was received
# by the MouldAssembleBuffer
# variables that are used by OperatorRouter
\ No newline at end of file
......@@ -110,7 +110,6 @@ class QueueJobShop(Queue):
if nextObject not in activeObject.next:
activeObject.next.append(nextObject)
# TODO: if the successor of the object is a machine that is operated with operationType 'Load'
# then the flag hot of the activeEntity must be set to True
# to signalize that the entity has reached its final destination before the next Machine
......
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