def canAcceptAndIsRequested(self, callerObject=None): nextObject=self.next[0] if len(nextObject.getActiveObjectQueue())>0: if nextObject.getActiveObjectQueue()[0].type=='Batch' or\ len(nextObject.getActiveObjectQueue())==nextObject.numberOfSubBatches: return False return BatchScrapMachine.canAcceptAndIsRequested(self, callerObject)
def canAcceptAndIsRequested(self, callerObject=None): nextObject = self.next[0] if len(nextObject.getActiveObjectQueue()) > 0: if nextObject.getActiveObjectQueue()[0].type=='Batch' or\ len(nextObject.getActiveObjectQueue())==nextObject.numberOfSubBatches: return False return BatchScrapMachine.canAcceptAndIsRequested(self, callerObject)
def removeEntity(self, entity=None): activeEntity = BatchScrapMachine.removeEntity(self, entity) from BatchDecompositionBlocking import BatchDecompositionBlocking decomposition = self.previous[0] if decomposition.__class__ is BatchDecompositionBlocking: buffer = decomposition.previous[0] if buffer.expectedSignals['canDispose']: self.sendSignal(receiver=buffer, signal=buffer.canDispose, sender=decomposition) return activeEntity
def removeEntity(self, entity=None): activeEntity=BatchScrapMachine.removeEntity(self, entity) from BatchDecompositionBlocking import BatchDecompositionBlocking decomposition = self.previous[0] if decomposition.__class__ is BatchDecompositionBlocking: buffer=decomposition.previous[0] if buffer.expectedSignals['canDispose']: self.sendSignal(receiver=buffer, signal=buffer.canDispose, sender=decomposition) return activeEntity