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
9e42059a
Commit
9e42059a
authored
Aug 14, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Operator able to finish current work before getting off-shift
parent
0a80309c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
dream/simulation/Machine.py
dream/simulation/Machine.py
+6
-1
dream/simulation/Operator.py
dream/simulation/Operator.py
+2
-1
dream/simulation/ShiftScheduler.py
dream/simulation/ShiftScheduler.py
+5
-4
No files found.
dream/simulation/Machine.py
View file @
9e42059a
...
...
@@ -1152,8 +1152,13 @@ class Machine(CoreObject):
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# set the flag operatorAssignedTo to None
# XXX in case of skilled operators which stay at the same station should that change
# TODO I think this control should be moved before the method is called
if
not
self
.
checkForDedicatedOperators
():
self
.
currentOperator
.
unAssign
()
# this checks if the operator is working on the last element.
# If yes the time that he was set off-shift should be updated
if
not
self
.
currentOperator
.
onShift
:
self
.
currentOperator
.
timeLastShiftEnded
=
self
.
env
.
now
self
.
broker
.
invoke
()
self
.
toBeOperated
=
False
...
...
dream/simulation/Operator.py
View file @
9e42059a
...
...
@@ -316,12 +316,13 @@ class Operator(ObjectResource):
if
MaxSimtime
==
None
:
from
Globals
import
G
MaxSimtime
=
G
.
maxSimTime
# if the Operator is currently working we have to count the time of this work
if
len
(
self
.
getResourceQueue
())
>
0
:
self
.
totalWorkingTime
+=
self
.
env
.
now
-
self
.
timeLastOperationStarted
# if the Operator is currently off-shift we have to count the time of this work
if
not
self
.
onShift
:
if
not
self
.
onShift
and
len
(
self
.
getResourceQueue
())
==
0
:
self
.
totalOffShiftTime
+=
self
.
env
.
now
-
self
.
timeLastShiftEnded
# Repairman was idle when he was not in any other state
...
...
dream/simulation/ShiftScheduler.py
View file @
9e42059a
...
...
@@ -109,6 +109,7 @@ class ShiftScheduler(ObjectInterruption):
self
.
victim
.
isLocked
=
False
# unlock the entry of the victim
# 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
):
self
.
victim
.
isWorkingOnTheLast
=
True
self
.
waitingSignal
=
True
...
...
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