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
75574fe5
Commit
75574fe5
authored
Oct 15, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Machine to update the working time of dedicated operators
parent
dadca3f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
dream/simulation/Machine.py
dream/simulation/Machine.py
+9
-5
No files found.
dream/simulation/Machine.py
View file @
75574fe5
...
...
@@ -1168,14 +1168,18 @@ class Machine(CoreObject):
def
releaseOperator
(
self
):
# this checks if the operator is working on the last element.
# If yes the time that he was set off-shift should be updated
operator
=
self
.
currentOperator
if
not
self
.
currentOperator
.
onShift
:
self
.
currentO
perator
.
timeLastShiftEnded
=
self
.
env
.
now
self
.
currentO
perator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
outputTrace
(
self
.
currentO
perator
.
name
,
"released from "
+
self
.
objName
)
o
perator
.
timeLastShiftEnded
=
self
.
env
.
now
o
perator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
outputTrace
(
o
perator
.
name
,
"released from "
+
self
.
objName
)
# XXX in case of skilled operators which stay at the same station should that change
elif
not
self
.
checkForDedicatedOperators
():
self
.
currentOperator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
operator
.
unAssign
()
# set the flag operatorAssignedTo to None
self
.
outputTrace
(
operator
.
objName
,
"released from "
+
self
.
objName
)
else
:
self
.
outputTrace
(
operator
.
objName
,
"ended a process in "
+
self
.
objName
)
operator
.
totalWorkingTime
+=
self
.
env
.
now
-
operator
.
timeLastOperationStarted
self
.
broker
.
invoke
()
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