Commit e20b3402 authored by Georgios Dagkakis's avatar Georgios Dagkakis

cleanup in line-clearance

parent 738b50e6
......@@ -81,21 +81,3 @@ class LineClearance(Queue):
and giverObjectQueue[0].type == 'SubBatch'\
and giverObjectQueue[0].batchId == activeObjectQueue[0].batchId
def canAcceptAndIsRequested(self,callerObject=None):
# get the active and the giver objects
activeObject=self.getActiveObject()
activeObjectQueue=self.getActiveObjectQueue()
# giverObject=self.getGiverObject()
giverObject=callerObject
assert giverObject, 'there must be a caller for canAcceptAndIsRequested'
giverObjectQueue = giverObject.getActiveObjectQueue()
# check if there is a place available and the potential giver has an entity to dispose
if len(activeObjectQueue)==0:
return giverObject.haveToDispose(activeObject) and\
giverObjectQueue[0].type == 'SubBatch'
else:
return len(activeObjectQueue)<self.capacity and \
giverObject.haveToDispose(activeObject) and \
giverObjectQueue[0].type == 'SubBatch' and \
giverObjectQueue[0].batchId==activeObjectQueue[0].batchId
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