Commit adb92ea1 authored by Georgios Dagkakis's avatar Georgios Dagkakis

addBlockage moved to CoreObject

parent 32cf335b
......@@ -297,14 +297,7 @@ class Assembly(CoreObject):
activeObjectQueue[0].getFrameQueue().append(entity) #get the part from the giver and append it to the frame!
elif entity.type=='Frame':
activeObjectQueue.append(entity) #get the frame and append it to the internal queue
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def addBlockage(self):
self.totalBlockageTime+=self.env.now-self.timeLastBlockageStarted
#===========================================================================
# outputs data to "output.xls"
......
......@@ -185,6 +185,7 @@ class CoreObject(object):
self.isProcessing=False
# flag that shows if the object is blocked state at any given time
self.isBlocked=False
self.timeLastBlockageStarted=None
# =======================================================================
# the main process of the core object
......@@ -289,15 +290,14 @@ class CoreObject(object):
giverObjectQueue=self.getGiverObjectQueue()
return giverObjectQueue[0]
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def addBlockage(self):
self.totalTimeInCurrentEntity=self.env.now-self.timeLastEntityEntered
self.totalTimeWaitingForOperator += self.operatorWaitTimeCurrentEntity
blockage=self.env.now-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity)
self.totalBlockageTime+=blockage
if self.timeLastBlockageStarted:
self.totalBlockageTime+=self.env.now-self.timeLastBlockageStarted
# =======================================================================
# gets an entity from the giver
......
......@@ -295,13 +295,6 @@ class Dismantle(CoreObject):
activeObject.printTrace(self.id, attemptSignalGiver='(removeEntity)')
activeObject.signalGiver()
return activeEntity
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def addBlockage(self):
self.totalBlockageTime+=self.env.now-self.timeLastBlockageStarted
#===========================================================================
# outputs message to the trace.xls.
......
......@@ -853,14 +853,7 @@ class Machine(CoreObject):
and self.waitToDispose\
and (thecaller in self.next)\
and (self.canDeliverOnInterruption or self.checkIfActive())
# =======================================================================
# adds the blockage time to totalBlockageTime
# each time an Entity is removed
# =======================================================================
def addBlockage(self):
self.totalBlockageTime+=self.env.now-self.timeLastBlockageStarted
# =======================================================================
# calculates the setup time
# =======================================================================
......
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