Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
ac5526b4
Commit
ac5526b4
authored
Aug 13, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
d583f3f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
22 deletions
+3
-22
dream/simulation/Failure.py
dream/simulation/Failure.py
+3
-22
No files found.
dream/simulation/Failure.py
View file @
ac5526b4
...
...
@@ -155,15 +155,9 @@ class Failure(ObjectInterruption):
self
.
outputTrace
(
"is down"
)
# update the failure time
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
#resource is available
# print self.env.now, self.repairman.id, 'will be requested by', self.victim.id
# 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
if
(
self
.
repairman
and
self
.
repairman
!=
"None"
):
# if the failure needs a resource to be fixed,
# the machine waits until the
# resource is available
with
self
.
repairman
.
getResource
().
request
()
as
request
:
yield
request
...
...
@@ -190,16 +184,3 @@ class Failure(ObjectInterruption):
self
.
reactivateVictim
()
# since repairing is over, the Machine is reactivated
self
.
victim
.
Up
=
True
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment