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
4445678b
Commit
4445678b
authored
Aug 15, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better implementation in shiftscheduler
parent
892fa3bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dream/simulation/ShiftScheduler.py
dream/simulation/ShiftScheduler.py
+4
-2
No files found.
dream/simulation/ShiftScheduler.py
View file @
4445678b
...
...
@@ -61,6 +61,8 @@ class ShiftScheduler(ObjectInterruption):
# =======================================================================
def
run
(
self
):
from
CoreObject
import
CoreObject
from
ObjectInterruption
import
ObjectInterruption
# the victim should not be interrupted but the scheduler should wait for the processing to finish before the stations turns to off-shift mode
self
.
victim
.
totalOffShiftTime
=
0
self
.
victim
.
timeLastShiftEnded
=
self
.
env
.
now
...
...
@@ -110,7 +112,7 @@ class ShiftScheduler(ObjectInterruption):
# if the mode is to end current work before going off-shift and there is current work, wait for victimEndedLastProcessing
# signal before going off-shift
if
issubclass
(
self
.
victim
.
__class__
,
CoreObject
):
if
self
.
endUnfinished
and
len
(
self
.
victim
.
getActiveObjectQueue
())
==
1
and
(
not
self
.
victim
.
waitToDispose
)
:
if
self
.
endUnfinished
and
self
.
victim
.
isProcessing
:
self
.
victim
.
isWorkingOnTheLast
=
True
self
.
waitingSignal
=
True
...
...
@@ -121,7 +123,7 @@ class ShiftScheduler(ObjectInterruption):
self
.
expectedSignals
[
'endedLastProcessing'
]
=
0
transmitter
,
eventTime
=
self
.
victim
.
endedLastProcessing
.
value
self
.
victim
.
endedLastProcessing
=
self
.
env
.
event
()
self
.
victim
.
endedLastProcessing
=
self
.
env
.
event
()
# if the victim has interruptions that measure only the on-shift time, they have to be notified
for
oi
in
self
.
victim
.
objectInterruptions
:
...
...
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