def getEntity(self): activeEntity=ExitJobShop.getEntity(self) productId=activeEntity.productId if productId in self.finishedProductDict.keys(): self.finishedProductDict[productId]['totalFat']+=activeEntity.fat self.finishedProductDict[productId]['volume']+=activeEntity.liters self.finishedProductDict[productId]['exitTime']=self.env.now else: self.finishedProductDict[productId]={'totalFat':activeEntity.fat,'volume':activeEntity.liters,'exitTime':self.env.now} return activeEntity
def initialize(self): ExitJobShop.initialize(self) self.finishedProductDict={}