Example #1
0
 def removeEntity(self, entity=None):
     activeEntity=Queue.removeEntity(self, entity)                  #run the default method
     activeObjectQueue=self.getActiveObjectQueue()
     entityType=self.entityData.get('_class', None)
     if len(activeObjectQueue)<self.threshold:
         self.createEntity()
     return activeEntity
Example #2
0
 def removeEntity(self, entity=None):
     activeEntity = Queue.removeEntity(self,
                                       entity)  #run the default method
     activeObjectQueue = self.getActiveObjectQueue()
     entityType = self.entityData.get('_class', None)
     if len(activeObjectQueue) < self.threshold:
         self.createEntity()
     return activeEntity
Example #3
0
 def removeEntity(self, entity=None):
     receiverObject=self.getReceiverObject()
     #run the default method
     activeEntity=Queue.removeEntity(self, entity)
     removeReceiver=True 
     # search in the internalQ. If an entity has the same receiver do not remove
     for ent in self.Res.users:
         nextObjectIds=ent.remainingRoute[0].get('stationIdsList',[])
         if receiverObject.id in nextObjectIds:
             removeReceiver=False      
     # if not entity had the same receiver then the receiver will be removed 
     if removeReceiver:
         self.next.remove(receiverObject)
     return activeEntity
Example #4
0
 def removeEntity(self, entity=None):
     receiverObject=self.getReceiverObject()
     #run the default method
     activeEntity=Queue.removeEntity(self, entity)
     removeReceiver=True 
     # search in the internalQ. If an entity has the same receiver do not remove
     for ent in self.Res.users:
         nextObjectIds=ent.remainingRoute[0].get('stationIdsList',[])
         if receiverObject.id in nextObjectIds:
             removeReceiver=False      
     # if not entity had the same receiver then the receiver will be removed 
     if removeReceiver:
         self.next.remove(receiverObject)
     return activeEntity
Example #5
0
 def removeEntity(self, entity=None, resetFlags=True, addBlockage=True):
     activeEntity=Queue.removeEntity(self, entity)
     parentBatch=activeEntity.parentBatch
     for subbatch in parentBatch.subBatchList:
         subbatch.receiver=activeEntity.currentStation
     return activeEntity