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
50a4e123
Commit
50a4e123
authored
May 06, 2018
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup wip calculation in SkilledOperatorRouter. Still not full solution
parent
289bba8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+13
-6
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
50a4e123
...
@@ -139,12 +139,19 @@ class SkilledRouter(Router):
...
@@ -139,12 +139,19 @@ class SkilledRouter(Router):
#===================================================================
#===================================================================
for
station
in
self
.
availableStations
:
for
station
in
self
.
availableStations
:
station
.
wip
=
1
+
(
len
(
station
.
getActiveObjectQueue
())
/
station
.
capacity
)
station
.
wip
=
1
+
(
len
(
station
.
getActiveObjectQueue
())
/
station
.
capacity
)
for
predecessor
in
station
.
previous
:
current_object
=
station
try
:
capacity
=
station
.
capacity
station
.
wip
+=
float
(
len
(
predecessor
.
getActiveObjectQueue
())
/
float
(
predecessor
.
capacity
))
while
1
:
except
:
# XXX this is assuming only one predecessor
# XXX what happens in the case of sources or infinite-capacity-queues
current_object
=
current_object
.
previous
[
0
]
pass
class_name
=
current_object
.
__class__
.
__name__
if
class_name
==
'BatchSource'
:
break
station
.
wip
+=
float
(
len
(
current_object
.
getActiveObjectQueue
())
/
float
(
capacity
)
)
if
class_name
in
(
'Queue'
,
'LineClearance'
,
'RoutingQueue'
):
break
#===================================================================
#===================================================================
# # stations of the line and their corresponding WIP
# # stations of the line and their corresponding WIP
...
...
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