Commit adb92ea1 authored by Georgios Dagkakis's avatar Georgios Dagkakis

addBlockage moved to CoreObject

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