Commit ac5526b4 authored by Georgios Dagkakis's avatar Georgios Dagkakis

cleanup

parent d583f3f2
...@@ -155,15 +155,9 @@ class Failure(ObjectInterruption): ...@@ -155,15 +155,9 @@ class Failure(ObjectInterruption):
self.outputTrace("is down") self.outputTrace("is down")
# update the failure time # update the failure time
failTime=self.env.now failTime=self.env.now
if(self.repairman and self.repairman!="None"): #if the failure needs a resource to be fixed, the machine waits until the if(self.repairman and self.repairman!="None"): # if the failure needs a resource to be fixed,
#resource is available # the machine waits until the
# print self.env.now, self.repairman.id, 'will be requested by', self.victim.id # resource is available
# yield self.repairman.getResource().request()
# print self.repairman.Res.users
# # update the time that the repair started
# timeOperationStarted=self.env.now
# self.repairman.timeLastOperationStarted=self.env.now
with self.repairman.getResource().request() as request: with self.repairman.getResource().request() as request:
yield request yield request
...@@ -190,16 +184,3 @@ class Failure(ObjectInterruption): ...@@ -190,16 +184,3 @@ class Failure(ObjectInterruption):
self.reactivateVictim() # since repairing is over, the Machine is reactivated self.reactivateVictim() # since repairing is over, the Machine is reactivated
self.victim.Up=True self.victim.Up=True
self.outputTrace("is up") self.outputTrace("is up")
# if(self.repairman and self.repairman!="None"): #if a resource was used, it is now released
# print self.repairman.Res.users
# print self.env.now, self.repairman.id, 'about to be release from', self.victim.id
# self.repairman.Res.release()
# self.repairman.totalWorkingTime+=self.env.now-timeOperationStarted
# #===========================================================================
# # interrupts the victim
# #===========================================================================
# def interruptVictim(self):
# ObjectInterruption.interrupt(self)
# # TODO: check whether it is a good idea to update the failure timers here
\ No newline at end of file
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