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
80344dc3
Commit
80344dc3
authored
Apr 13, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction in how skilled router calculates the last assignment
parent
7e8984b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+11
-7
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
80344dc3
...
...
@@ -43,7 +43,7 @@ class SkilledRouter(Router):
# chosen in case of multiple criteria for different Operators
# =======================================================================
def
__init__
(
self
,
id
=
'SkilledRouter01'
,
name
=
'SkilledRouter01'
,
sorting
=
False
,
outputSolutions
=
True
,
weightFactors
=
[
2
,
1
,
0
,
2
,
1
,
1
],
tool
=
{},
checkCondition
=
False
,
**
kw
):
weightFactors
=
[
2
,
1
,
0
,
2
,
2
,
1
],
tool
=
{},
checkCondition
=
False
,
**
kw
):
Router
.
__init__
(
self
)
# Flag used to notify the need for re-allocation of skilled operators to operatorPools
self
.
allocation
=
False
...
...
@@ -146,7 +146,12 @@ class SkilledRouter(Router):
#===================================================================
self
.
availableStationsDict
=
{}
for
station
in
self
.
availableStations
:
self
.
availableStationsDict
[
str
(
station
.
id
)]
=
{
'stationID'
:
str
(
station
.
id
),
'WIP'
:
station
.
wip
,
'lastAssignment'
:
self
.
env
.
now
}
lastAssignmentTime
=
0
for
record
in
self
.
solutionList
:
if
station
.
id
in
record
[
"allocation"
].
values
():
lastAssignmentTime
=
record
[
"time"
]
self
.
availableStationsDict
[
str
(
station
.
id
)]
=
{
'stationID'
:
str
(
station
.
id
),
'WIP'
:
station
.
wip
,
'lastAssignment'
:
0
}
#===================================================================
# # operators and their skills set
#===================================================================
...
...
@@ -187,7 +192,6 @@ class SkilledRouter(Router):
# print '-------'
# print self.env.now, solution
if
self
.
outputSolutions
:
self
.
solutionList
.
append
({
"time"
:
self
.
env
.
now
,
"allocation"
:
solution
...
...
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