Commit d97c8d06 authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in calculation of failure time

parent 8952b42c
...@@ -985,10 +985,14 @@ class Machine(CoreObject): ...@@ -985,10 +985,14 @@ class Machine(CoreObject):
activeObject.totalTimeWaitingForOperator+=self.env.now-activeObject.timeWaitForOperatorStarted\ activeObject.totalTimeWaitingForOperator+=self.env.now-activeObject.timeWaitForOperatorStarted\
-activeObject.downTimeProcessingCurrentEntity\ -activeObject.downTimeProcessingCurrentEntity\
-offShiftTimeInCurrentEntity -offShiftTimeInCurrentEntity
# if Machine is down we have to add this failure time to its total failure time # if Machine is down we have to add this failure time to its total failure time
# we also need to add the last blocking time to total blockage time if self.Up==False:
if(activeObject.Up==False): if self.onShift:
activeObject.totalFailureTime+=self.env.now-activeObject.timeLastFailure activeObject.totalFailureTime+=self.env.now-activeObject.timeLastFailure
# if Machine is off shift add only the fail time before the shift ended
if not self.onShift and self.timeLastFailure < self.timeLastShiftEnded:
self.victim.totalFailureTime+=self.victim.timeLastShiftEnded-failTime
#if the machine is off shift,add this to the off-shift time #if the machine is off shift,add this to the off-shift time
if activeObject.onShift==False: if activeObject.onShift==False:
......
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