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
18769d8d
Commit
18769d8d
authored
10 years ago
by
Georgios Dagkakis
Committed by
Jérome Perrin
10 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additions so that the movements of the operator are outputted in the Trace
parent
8a6b0745
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
dream/simulation/Machine.py
dream/simulation/Machine.py
+2
-1
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+2
-2
No files found.
dream/simulation/Machine.py
View file @
18769d8d
...
...
@@ -626,6 +626,7 @@ class Machine(CoreObject):
# prepare the machine to be released
# =======================================================================
def
releaseOperator
(
self
):
self
.
outputTrace
(
self
.
currentOperator
.
objName
,
"released from "
+
self
.
objName
)
self
.
broker
.
invokeBroker
()
self
.
toBeOperated
=
False
...
...
This diff is collapsed.
Click to expand it.
dream/simulation/OperatedPoolBroker.py
View file @
18769d8d
...
...
@@ -74,12 +74,12 @@ class Broker(ObjectInterruption):
self
.
timeWaitForOperatorStarted
=
0
# update the time that the operation started
self
.
timeOperationStarted
=
now
()
#self.victim.outputTrace(self.victim.currentOperator.objName, "started work "+
self.victim.objName)
self
.
victim
.
outputTrace
(
self
.
victim
.
currentOperator
.
objName
,
"started work in "
+
self
.
victim
.
objName
)
self
.
victim
.
currentOperator
.
timeLastOperationStarted
=
now
()
# ======= release a resource
elif
not
self
.
victim
.
isOperated
():
self
.
victim
.
currentOperator
.
totalWorkingTime
+=
now
()
-
self
.
victim
.
currentOperator
.
timeLastOperationStarted
#self.victim.outputTrace(self.victim.currentOperator.objName, "
finished work "+
self.victim.objName)
#self.victim.outputTrace(self.victim.currentOperator.objName, "
left "+
self.victim.objName)
yield
release
,
self
,
self
.
victim
.
operatorPool
.
getResource
(
self
.
victim
.
currentOperator
)
# the victim current operator must be cleared after the operator is released
self
.
timeLastOperationEnded
=
now
()
...
...
This diff is collapsed.
Click to expand it.
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