unused code removed

parent 8e5f31b4
......@@ -484,12 +484,6 @@ class CoreObject(Process):
maxTimeWaiting=timeWaiting
return giver
#===========================================================================
# checks whether the entity can proceed to a successor object
#===========================================================================
def canEntityProceed(self):
pass
# =======================================================================
# actions to be taken after the simulation ends
# =======================================================================
......
......@@ -65,10 +65,6 @@ class Entity(object):
self.candidateReceivers=[] # list of candidateReceivers of the entity (those stations that can receive the entity
self.candidateReceiver=None # the station that is finaly chosen to receive the entity
# variables used to avoid signalling the same object twice before it receives an entity
self.receiver=None
self.timeOfAssignement=0
# =======================================================================
# outputs results to JSON File
# =======================================================================
......
......@@ -102,10 +102,11 @@ class Exit(CoreObject):
activeEntity = CoreObject.getEntity(self) #run the default method
# if the entity is in the G.pendingEntities list then remove it from there
from Globals import G
if activeEntity in G.pendingEntities:
G.pendingEntities.remove(activeEntity)
if activeEntity in G.EntityList:
G.EntityList.remove(activeEntity)
# if activeEntity in G.pendingEntities:
# G.pendingEntities.remove(activeEntity)
# if activeEntity in G.EntityList:
# G.EntityList.remove(activeEntity)
self.clear(activeEntity)
self.totalLifespan+=now()-activeEntity.startTime #Add the entity's lifespan to the total one.
self.numOfExits+=1 # increase the exits by one
self.totalNumberOfUnitsExited+=activeEntity.numberOfUnits # add the number of units that xited
......@@ -115,6 +116,19 @@ class Exit(CoreObject):
del self.Res.activeQ[:]
return activeEntity
@staticmethod
def clear(entity):
from Globals import G
def deleteEntityfromlist(entity, list):
if entity in list:
list.remove(entity)
lists=(G.EntityList, G.PartList, G.pendingEntities, G.WipList)
# lists=(G.EntityList, G.PartList, G.BatchList, G.SubBatchList,
# G.JobList, G.OrderList, G.OrderComponentList, G.MouldList,
# G.pendingEntities, G.WipList)
for list in lists:
deleteEntityfromlist(entity,list)
#===========================================================================
# haveToDispose of an exit must always return False
#===========================================================================
......
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