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
ace10513
Commit
ace10513
authored
Mar 06, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments removed
parent
8a765025
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+0
-10
No files found.
dream/simulation/OperatedPoolBroker.py
View file @
ace10513
...
@@ -78,8 +78,6 @@ class Broker(ObjectInterruption):
...
@@ -78,8 +78,6 @@ class Broker(ObjectInterruption):
self
.
expectedSignals
[
'isCalled'
]
=
1
self
.
expectedSignals
[
'isCalled'
]
=
1
yield
self
.
isCalled
yield
self
.
isCalled
# if self.victim.id=='St2M0':
# print self.env.now, self.victim.id, 'Broker Called',self.invokeType
transmitter
,
eventTime
=
self
.
isCalled
.
value
transmitter
,
eventTime
=
self
.
isCalled
.
value
assert
eventTime
==
self
.
env
.
now
,
'the broker should be granted control instantly'
assert
eventTime
==
self
.
env
.
now
,
'the broker should be granted control instantly'
self
.
isCalled
=
self
.
env
.
event
()
self
.
isCalled
=
self
.
env
.
event
()
...
@@ -150,8 +148,6 @@ class Broker(ObjectInterruption):
...
@@ -150,8 +148,6 @@ class Broker(ObjectInterruption):
with
self
.
victim
.
operatorPool
.
getResource
(
self
.
victim
.
currentOperator
).
request
()
as
request
:
with
self
.
victim
.
operatorPool
.
getResource
(
self
.
victim
.
currentOperator
).
request
()
as
request
:
yield
request
yield
request
if
self
.
victim
.
id
==
'St2M0'
:
print
1
# update the operator workingStation
# update the operator workingStation
self
.
victim
.
currentOperator
.
workingStation
=
self
.
victim
self
.
victim
.
currentOperator
.
workingStation
=
self
.
victim
self
.
victim
.
printTrace
(
self
.
victim
.
currentOperator
.
objName
,
startWork
=
self
.
victim
.
id
)
self
.
victim
.
printTrace
(
self
.
victim
.
currentOperator
.
objName
,
startWork
=
self
.
victim
.
id
)
...
@@ -185,22 +181,16 @@ class Broker(ObjectInterruption):
...
@@ -185,22 +181,16 @@ class Broker(ObjectInterruption):
self
.
expectedSignals
[
'isCalled'
]
=
1
self
.
expectedSignals
[
'isCalled'
]
=
1
yield
self
.
isCalled
yield
self
.
isCalled
# if self.victim.id=='St2M0':
# print self.env.now, self.victim.id, 'Broker Called 2', self.invokeType
transmitter
,
eventTime
=
self
.
isCalled
.
value
transmitter
,
eventTime
=
self
.
isCalled
.
value
assert
eventTime
==
self
.
env
.
now
,
'the broker should be granted control instantly'
assert
eventTime
==
self
.
env
.
now
,
'the broker should be granted control instantly'
self
.
isCalled
=
self
.
env
.
event
()
self
.
isCalled
=
self
.
env
.
event
()
if
self
.
invokeType
==
'release'
:
if
self
.
invokeType
==
'release'
:
# if self.victim.id=='St2M0':
# print 2
# The operator is released (the router is not called in the case of skilled
# The operator is released (the router is not called in the case of skilled
# ops that work constantly on the same machine)
# ops that work constantly on the same machine)
if
not
self
.
victim
.
currentOperator
.
operatorDedicatedTo
==
self
.
victim
:
if
not
self
.
victim
.
currentOperator
.
operatorDedicatedTo
==
self
.
victim
:
if
not
self
.
victim
.
isOperated
():
if
not
self
.
victim
.
isOperated
():
# if self.victim.id=='St2M0':
# print 3
# signal the other brokers waiting for the same operators that they are now free
# signal the other brokers waiting for the same operators that they are now free
# also signal the stations that were not requested to receive because the operator was occupied
# also signal the stations that were not requested to receive because the operator was occupied
...
...
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