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
cf38a007
Commit
cf38a007
authored
Apr 30, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not show operator in Gantt if he/she was off-shift all through the experiment
parent
365141af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
dream/plugins/Batches/BatchesOperatorGantt.py
dream/plugins/Batches/BatchesOperatorGantt.py
+13
-4
No files found.
dream/plugins/Batches/BatchesOperatorGantt.py
View file @
cf38a007
...
...
@@ -48,16 +48,25 @@ class BatchesOperatorGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
for
element
in
resultElements
:
if
element
[
'_class'
]
==
"Dream.Operator"
:
operatorId
=
element
[
'id'
]
operatorId
=
element
[
'id'
]
schedule
=
copy
(
element
[
'results'
][
'schedule'
])
hasOnShift
=
False
# if the operator was off-shift all through the simulation run no need to be outputted in Gantt
for
record
in
schedule
:
if
not
record
[
'stationId'
]
==
'off-shift'
:
hasOnShift
=
True
break
if
not
hasOnShift
:
continue
# add the operator in the task_dict
task_dict
[
element
[
'id'
]]
=
dict
(
id
=
operatorId
,
text
=
operatorId
,
type
=
'operator'
,
open
=
False
)
schedule
=
copy
(
element
[
'results'
][
'schedule'
])
# in the cases the operator exits and the enters in the same station merge those records
k
=
0
for
record
in
schedule
:
...
...
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