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
d0a0926c
Commit
d0a0926c
authored
Aug 12, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expectedDowntime not used anymore
parent
8b4b0eaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
6 deletions
+0
-6
dream/simulation/Failure.py
dream/simulation/Failure.py
+0
-5
dream/simulation/Machine.py
dream/simulation/Machine.py
+0
-1
No files found.
dream/simulation/Failure.py
View file @
d0a0926c
...
...
@@ -104,7 +104,6 @@ class Failure(ObjectInterruption):
# if the time that the victim is off-shift should not be counted
timeToFailure
=
self
.
rngTTF
.
generateNumber
()
remainingTimeToFailure
=
timeToFailure
self
.
victim
.
expectedDownTime
=
self
.
env
.
now
+
remainingTimeToFailure
failureNotTriggered
=
True
if
self
.
deteriorationType
==
'constant'
:
...
...
@@ -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
assert
self
.
victim
.
onShift
==
False
,
'shiftFailure cannot recalculate TTF if the victim is onShift'
remainingTimeToFailure
=
remainingTimeToFailure
-
(
self
.
env
.
now
-
timeRestartedCounting
)
self
.
victim
.
expectedDownTime
=
self
.
env
.
now
+
remainingTimeToFailure
# wait for the shift to start again
yield
self
.
victim
.
interruptionEnd
...
...
@@ -134,13 +132,10 @@ class Failure(ObjectInterruption):
timeRestartedCounting
=
self
.
env
.
now
receivedEvent
=
yield
self
.
env
.
timeout
(
remainingTimeToFailure
)
|
self
.
victimEndsProcess
if
self
.
victimEndsProcess
in
receivedEvent
:
#print self.env.now, 'victimEndsProcess'
self
.
victimEndsProcess
=
self
.
env
.
event
()
remainingTimeToFailure
=
remainingTimeToFailure
-
(
self
.
env
.
now
-
timeRestartedCounting
)
self
.
victim
.
expectedDownTime
=
self
.
env
.
now
+
remainingTimeToFailure
yield
self
.
victimStartsProcess
self
.
victimStartsProcess
=
self
.
env
.
event
()
#print self.env.now, 'startsProcess'
else
:
failureNotTriggered
=
False
...
...
dream/simulation/Machine.py
View file @
d0a0926c
...
...
@@ -189,7 +189,6 @@ class Machine(CoreObject):
self
.
preemptQueue
=
self
.
env
.
event
()
# signal used for informing objectInterruption objects that the current entity processed has finished processnig
self
.
endedLastProcessing
=
self
.
env
.
event
()
self
.
expectedDownTime
=-
1
# the time the next failure is expected
#===========================================================================
# create an operatorPool if needed
...
...
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