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
2a951bc7
Commit
2a951bc7
authored
Feb 24, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if there is operator set operation type for all machines
parent
814fa34e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
dream/plugins/ReadSkilledOperators.py
dream/plugins/ReadSkilledOperators.py
+11
-9
No files found.
dream/plugins/ReadSkilledOperators.py
View file @
2a951bc7
...
...
@@ -34,12 +34,17 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"ouputSchedule"
:
1
}
operatorPresent
=
True
# for every station that has one or more skilled operators set operation type to MT-Load-Processing
for
stationId
in
skills
:
node
[
stationId
][
"operationType"
]
=
"MT-Load-Processing"
# add EventGenerator for the allocation every 10 minutes
# if there is at least one operator
if
operatorPresent
:
node
[
'EV123454321'
]
=
{
#(random id)
nodes
=
data
[
'graph'
][
'node'
]
for
station_id
,
station
in
nodes
.
iteritems
():
# set the operation type of all machines to MT-Load-Processing
if
station
[
'_class'
]
in
[
'Dream.BatchScrapMachine'
,
'Dream.BatchScrapMachineBeforeReassembly'
,
'Dream.BatchScrapMachineAfterDecompose'
,
'Dream.M3'
]:
station
[
"operationType"
]
=
"MT-Load-Processing"
# add EventGenerator for the allocation every 10 minutes
node
[
'EV123454321'
]
=
{
#(random id)
"name"
:
"Allocator"
,
"argumentDict"
:
"{}"
,
"interval"
:
10
,
...
...
@@ -49,9 +54,6 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"interruptions"
:
{},
"_class"
:
"Dream.EventGenerator"
,
"method"
:
"Dream.ManPyObject.requestAllocation"
}
# print '---------------------------------'
# print data['graph']['node']
# print '---------------------------------'
}
return
data
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