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
60bcbdd5
Commit
60bcbdd5
authored
Feb 02, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skills-set first approach
parent
646dc69a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
dream/simulation/Operator.py
dream/simulation/Operator.py
+3
-1
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+8
-2
No files found.
dream/simulation/Operator.py
View file @
60bcbdd5
...
...
@@ -37,7 +37,7 @@ from ObjectResource import ObjectResource
class
Operator
(
ObjectResource
):
family
=
'Operator'
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
'FIFO'
,
skills
=
[],
available
=
True
,
ouputSchedule
=
False
,
**
kw
):
def
__init__
(
self
,
id
,
name
,
capacity
=
1
,
schedulingRule
=
'FIFO'
,
skill
Dict
=
{},
skill
s
=
[],
available
=
True
,
ouputSchedule
=
False
,
**
kw
):
ObjectResource
.
__init__
(
self
,
id
=
id
,
name
=
name
)
self
.
objName
=
name
self
.
capacity
=
int
(
capacity
)
# repairman is an instance of resource
...
...
@@ -79,6 +79,8 @@ class Operator(ObjectResource):
self
.
alias
=
self
.
id
# list attribute that describes the skills of the operator in terms of stations he can operate
self
.
skillsList
=
skills
# skils dict (defining also if the skill is regarding different operations on the same technology)
self
.
skillDict
=
skillDict
# flag to show if the resource is available at the start of simulation
self
.
available
=
available
from
Globals
import
G
...
...
dream/simulation/OperatorRouter.py
View file @
60bcbdd5
...
...
@@ -311,8 +311,14 @@ class Router(ObjectInterruption):
candidateOperators
=
station
.
operatorPool
.
availableOperators
()
if
candidateOperators
:
# if there was an operator found append the Machine on his candidateStations
for
candidateOperator
in
candidateOperators
:
if
not
station
in
candidateOperator
.
candidateStations
:
candidateOperator
.
candidateStations
.
append
(
station
)
# XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load
if
candidateOperator
.
skillDict
:
if
station
.
id
in
candidateOperator
.
skillDict
[
"process"
]:
if
not
station
in
candidateOperator
.
candidateStations
:
candidateOperator
.
candidateStations
.
append
(
station
)
else
:
if
not
station
in
candidateOperator
.
candidateStations
:
candidateOperator
.
candidateStations
.
append
(
station
)
if
not
candidateOperator
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
candidateOperator
)
# if there are critical pending entities then populate the candidateOperators list with preemptiveOperators
...
...
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