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
3e95f734
Commit
3e95f734
authored
Dec 02, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Failure to sort only the tie with end of processing
parent
3feef90e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
dream/simulation/Failure.py
dream/simulation/Failure.py
+3
-1
dream/simulation/Machine.py
dream/simulation/Machine.py
+3
-1
No files found.
dream/simulation/Failure.py
View file @
3e95f734
...
...
@@ -170,7 +170,9 @@ class Failure(ObjectInterruption):
# this is done so that if processing finishes exactly at the time of interruption
# the processing will finish first (if this mode is selected)
if
self
.
waitOnTie
:
yield
self
.
env
.
timeout
(
0
)
if
hasattr
(
self
.
victim
,
'timeToEndCurrentOperation'
):
if
float
(
self
.
victim
.
timeToEndCurrentOperation
)
==
float
(
self
.
env
.
now
):
yield
self
.
env
.
timeout
(
0
)
# interrupt the victim
self
.
interruptVictim
()
# interrupt the victim
...
...
dream/simulation/Machine.py
View file @
3e95f734
...
...
@@ -421,7 +421,8 @@ class Machine(CoreObject):
# get the operation time, tinMStarts holds the processing time of the machine
self
.
totalOperationTimeInCurrentEntity
=
self
.
calculateTime
(
type
)
# timer to hold the operation time left
self
.
tinM
=
self
.
totalOperationTimeInCurrentEntity
self
.
tinM
=
self
.
totalOperationTimeInCurrentEntity
self
.
timeToEndCurrentOperation
=
self
.
env
.
now
+
self
.
tinM
# variables used to flag any interruptions and the end of the processing
self
.
interruption
=
False
# local variable that is used to check whether the operation is concluded
...
...
@@ -914,6 +915,7 @@ class Machine(CoreObject):
# recalculate the processing time left tinM
if
self
.
timeLastOperationStarted
>=
0
:
self
.
tinM
=
self
.
tinM
-
(
self
.
env
.
now
-
self
.
timeLastOperationStarted
)
self
.
timeToEndCurrentOperation
=
self
.
env
.
now
+
self
.
tinM
if
(
self
.
tinM
==
0
):
# sometimes the failure may happen exactly at the time that the processing would finish
# this may produce disagreement with the simul8 because in both SimPy and Simul8
# it seems to be random which happens 1st
...
...
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