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
7d44f9b3
Commit
7d44f9b3
authored
Jan 16, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor bugs in shift and skills plugins corrected
parent
fc946a94
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
23 deletions
+27
-23
dream/plugins/ReadShiftFromSpreadsheet.py
dream/plugins/ReadShiftFromSpreadsheet.py
+13
-12
dream/plugins/ReadSkilledOperators.py
dream/plugins/ReadSkilledOperators.py
+14
-11
No files found.
dream/plugins/ReadShiftFromSpreadsheet.py
View file @
7d44f9b3
...
@@ -31,6 +31,7 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
...
@@ -31,6 +31,7 @@ class ReadShiftFromSpreadsheet(plugin.InputPreparationPlugin):
shift_by_station
.
setdefault
(
station
,
[]).
append
(
shift_by_station
.
setdefault
(
station
,
[]).
append
(
(
start_time
,
stop_time
)
)
(
start_time
,
stop_time
)
)
if
data
[
'input'
][
'operator_shift_spreadsheet'
]:
for
line
in
data
[
'input'
][
'operator_shift_spreadsheet'
][
1
:]:
for
line
in
data
[
'input'
][
'operator_shift_spreadsheet'
][
1
:]:
if
line
[
1
]:
if
line
[
1
]:
# Get the dates, and convert them to simulation clock time units.
# Get the dates, and convert them to simulation clock time units.
...
...
dream/plugins/ReadSkilledOperators.py
View file @
7d44f9b3
...
@@ -17,6 +17,7 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
...
@@ -17,6 +17,7 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"""
"""
PBData
=
data
[
'input'
].
get
(
'operator_skill_spreadsheet'
,
None
)
PBData
=
data
[
'input'
].
get
(
'operator_skill_spreadsheet'
,
None
)
node
=
data
[
'graph'
][
'node'
]
node
=
data
[
'graph'
][
'node'
]
operatorPresent
=
False
if
PBData
:
if
PBData
:
PBData
.
pop
(
0
)
# pop the column names
PBData
.
pop
(
0
)
# pop the column names
for
PBitem
in
PBData
:
for
PBitem
in
PBData
:
...
@@ -32,10 +33,12 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
...
@@ -32,10 +33,12 @@ class ReadSkilledOperators(plugin.InputPreparationPlugin):
"skills"
:
skills
,
"skills"
:
skills
,
"ouputSchedule"
:
1
"ouputSchedule"
:
1
}
}
operatorPresent
=
True
# for every station that has one or more skilled operators set operation type to MT-Load-Processing
# for every station that has one or more skilled operators set operation type to MT-Load-Processing
for
stationId
in
skills
:
for
stationId
in
skills
:
node
[
stationId
][
"operationType"
]
=
"MT-Load-Processing"
node
[
stationId
][
"operationType"
]
=
"MT-Load-Processing"
# add EventGenerator for the allocation every 10 minutes
# add EventGenerator for the allocation every 10 minutes
if
operatorPresent
:
node
[
'EV123454321'
]
=
{
#(random id)
node
[
'EV123454321'
]
=
{
#(random id)
"name"
:
"Allocator"
,
"name"
:
"Allocator"
,
"argumentDict"
:
"{}"
,
"argumentDict"
:
"{}"
,
...
...
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