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
65f96937
Commit
65f96937
authored
Aug 14, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better implementation of Machine.releaseOperator
parent
9e42059a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
dream/simulation/Machine.py
dream/simulation/Machine.py
+9
-9
No files found.
dream/simulation/Machine.py
View file @
65f96937
...
@@ -1149,16 +1149,16 @@ class Machine(CoreObject):
...
@@ -1149,16 +1149,16 @@ class Machine(CoreObject):
# prepare the machine to be released
# prepare the machine to be released
# =======================================================================
# =======================================================================
def
releaseOperator
(
self
):
def
releaseOperator
(
self
):
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# this checks if the operator is working on the last element.
# set the flag operatorAssignedTo to None
# 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
.
currentOperator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# XXX in case of skilled operators which stay at the same station should that change
# 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
elif
not
self
.
checkForDedicatedOperators
():
if
not
self
.
checkForDedicatedOperators
():
self
.
currentOperator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
currentOperator
.
unAssign
()
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
# 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
.
broker
.
invoke
()
self
.
toBeOperated
=
False
self
.
toBeOperated
=
False
...
...
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