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
82815e3c
Commit
82815e3c
authored
Sep 09, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction in signal reset
parent
f0069316
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
dream/simulation/Failure.py
dream/simulation/Failure.py
+0
-2
dream/simulation/Machine.py
dream/simulation/Machine.py
+2
-5
dream/simulation/ObjectInterruption.py
dream/simulation/ObjectInterruption.py
+1
-0
No files found.
dream/simulation/Failure.py
View file @
82815e3c
...
...
@@ -51,8 +51,6 @@ class Failure(ObjectInterruption):
self
.
repairman
=
repairman
# the resource that may be needed to fix the failure
# if now resource is needed this will be "None"
self
.
type
=
"Failure"
self
.
id
=
0
# shows how the time to failure is measured
# 'constant' means it counts not matter the state of the victim
# 'onShift' counts only if the victim is onShift
...
...
dream/simulation/Machine.py
View file @
82815e3c
...
...
@@ -606,10 +606,10 @@ class Machine(CoreObject):
# this loop is repeated until the processing time is expired with no failure
# check when the processingEndedFlag switched to false
self
.
expectedSignals
[
'interruptionStart'
]
=
1
self
.
expectedSignals
[
'preemptQueue'
]
=
1
while
processingNotFinished
:
self
.
expectedSignals
[
'interruptionStart'
]
=
1
self
.
expectedSignals
[
'preemptQueue'
]
=
1
# timeLastProcessingStarted : dummy variable to keep track of the time that the processing starts after
# every interruption
self
.
timeLastProcessingStarted
=
self
.
env
.
now
...
...
@@ -634,9 +634,7 @@ class Machine(CoreObject):
self
.
releaseOperator
()
self
.
expectedSignals
[
'brokerIsSet'
]
=
1
yield
self
.
brokerIsSet
self
.
expectedSignals
[
'brokerIsSet'
]
=
0
transmitter
,
eventTime
=
self
.
brokerIsSet
.
value
...
...
@@ -833,7 +831,6 @@ class Machine(CoreObject):
if
not
self
.
haveToDispose
():
break
self
.
expectedSignals
[
'interruptionStart'
]
=
0
self
.
expectedSignals
[
'canDispose'
]
=
0
# =======================================================================
...
...
dream/simulation/ObjectInterruption.py
View file @
82815e3c
...
...
@@ -121,6 +121,7 @@ class ObjectInterruption(ManPyObject):
self
.
victim
.
interruptedBy
=
self
.
type
succeedTuple
=
(
self
,
self
.
env
.
now
)
self
.
victim
.
interruptionStart
.
succeed
(
succeedTuple
)
self
.
victim
.
expectedSignals
[
'interruptionStart'
]
=
0
# if the machines are operated by dedicated operators
if
self
.
victim
.
dedicatedOperator
:
# request allocation
...
...
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