Commit d0a0926c authored by Georgios Dagkakis's avatar Georgios Dagkakis

expectedDowntime not used anymore

parent 8b4b0eaf
...@@ -104,7 +104,6 @@ class Failure(ObjectInterruption): ...@@ -104,7 +104,6 @@ class Failure(ObjectInterruption):
# if the time that the victim is off-shift should not be counted # if the time that the victim is off-shift should not be counted
timeToFailure=self.rngTTF.generateNumber() timeToFailure=self.rngTTF.generateNumber()
remainingTimeToFailure=timeToFailure remainingTimeToFailure=timeToFailure
self.victim.expectedDownTime=self.env.now+remainingTimeToFailure
failureNotTriggered=True failureNotTriggered=True
if self.deteriorationType=='constant': if self.deteriorationType=='constant':
...@@ -119,7 +118,6 @@ class Failure(ObjectInterruption): ...@@ -119,7 +118,6 @@ class Failure(ObjectInterruption):
# TODO: the signal interruptionStart is reset by the time it is received by the victim. not sure if will be still triggered when it is checked here # TODO: the signal interruptionStart is reset by the time it is received by the victim. not sure if will be still triggered when it is checked here
assert self.victim.onShift==False, 'shiftFailure cannot recalculate TTF if the victim is onShift' assert self.victim.onShift==False, 'shiftFailure cannot recalculate TTF if the victim is onShift'
remainingTimeToFailure=remainingTimeToFailure-(self.env.now-timeRestartedCounting) remainingTimeToFailure=remainingTimeToFailure-(self.env.now-timeRestartedCounting)
self.victim.expectedDownTime=self.env.now+remainingTimeToFailure
# wait for the shift to start again # wait for the shift to start again
yield self.victim.interruptionEnd yield self.victim.interruptionEnd
...@@ -134,13 +132,10 @@ class Failure(ObjectInterruption): ...@@ -134,13 +132,10 @@ class Failure(ObjectInterruption):
timeRestartedCounting=self.env.now timeRestartedCounting=self.env.now
receivedEvent=yield self.env.timeout(remainingTimeToFailure) | self.victimEndsProcess receivedEvent=yield self.env.timeout(remainingTimeToFailure) | self.victimEndsProcess
if self.victimEndsProcess in receivedEvent: if self.victimEndsProcess in receivedEvent:
#print self.env.now, 'victimEndsProcess'
self.victimEndsProcess=self.env.event() self.victimEndsProcess=self.env.event()
remainingTimeToFailure=remainingTimeToFailure-(self.env.now-timeRestartedCounting) remainingTimeToFailure=remainingTimeToFailure-(self.env.now-timeRestartedCounting)
self.victim.expectedDownTime=self.env.now+remainingTimeToFailure
yield self.victimStartsProcess yield self.victimStartsProcess
self.victimStartsProcess=self.env.event() self.victimStartsProcess=self.env.event()
#print self.env.now, 'startsProcess'
else: else:
failureNotTriggered=False failureNotTriggered=False
......
...@@ -189,7 +189,6 @@ class Machine(CoreObject): ...@@ -189,7 +189,6 @@ class Machine(CoreObject):
self.preemptQueue=self.env.event() self.preemptQueue=self.env.event()
# signal used for informing objectInterruption objects that the current entity processed has finished processnig # signal used for informing objectInterruption objects that the current entity processed has finished processnig
self.endedLastProcessing=self.env.event() self.endedLastProcessing=self.env.event()
self.expectedDownTime=-1 # the time the next failure is expected
#=========================================================================== #===========================================================================
# create an operatorPool if needed # create an operatorPool if needed
......
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