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
98ed5607
Commit
98ed5607
authored
Oct 07, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction on how skilled router calculates WIP of the stations
parent
8628b3a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+3
-15
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
98ed5607
...
...
@@ -68,13 +68,13 @@ class SkilledRouter(Router):
read the pendingEntities currentStations, these are the stations (queues) that may be signalled
'''
def
run
(
self
):
while
1
:
# wait until the router is called
self
.
expectedSignals
[
'isCalled'
]
=
1
yield
self
.
isCalled
transmitter
,
eventTime
=
self
.
isCalled
.
value
self
.
isCalled
=
self
.
env
.
event
()
self
.
printTrace
(
''
,
'=-'
*
15
)
...
...
@@ -159,26 +159,14 @@ class SkilledRouter(Router):
# # XXX calculate the WIP of each station
#===================================================================
for
station
in
self
.
availableStations
:
# station.wip=0
station
.
wip
=
1
+
(
len
(
station
.
getActiveObjectQueue
())
/
station
.
capacity
)
for
predecessor
in
station
.
previous
:
# predecessor.remainingWip=0
# if len(predecessor.next)>1:
# nextNo=len(predecessor.next)
# for obj in predecessor.next:
# if not obj in self.availableStations:
# nextNo-=1
try
:
station
.
wip
+=
float
(
len
(
predecessor
.
getActiveObjectQueue
())
/
predecessor
.
capacity
)
station
.
wip
+=
float
(
len
(
predecessor
.
getActiveObjectQueue
())
/
float
(
predecessor
.
capacity
)
)
except
:
# XXX what happens in the case of sources or infinite-capacity-queues
pass
# predecessor.remainingWip=len(predecessor.getActiveObjectQueue()) % nextNo
# for buffer in G.QueueList:
# if buffer.remainingWip:
# nextObj=next(x for x in buffer.next if x in self.availableStations) # pick the first of the list available
# nextObj.wip+=buffer.remainingWip
# buffer.remainingWip=0
#===================================================================
# # stations of the line and their corresponding WIP
# TODO: the WIP of the stations must be normalised to the max WIP possible on that station
...
...
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