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
b0e30256
Commit
b0e30256
authored
Mar 13, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JobShop post_proc gadgets now work on all different results
parent
69bab6d0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
278 additions
and
272 deletions
+278
-272
dream/plugins/JSComponentGantt.py
dream/plugins/JSComponentGantt.py
+61
-58
dream/plugins/JSComponentTabSchedule.py
dream/plugins/JSComponentTabSchedule.py
+53
-51
dream/plugins/JSOperatorGantt.py
dream/plugins/JSOperatorGantt.py
+55
-54
dream/plugins/JSOperatorUtilization.py
dream/plugins/JSOperatorUtilization.py
+49
-49
dream/plugins/JSStationUtilization.py
dream/plugins/JSStationUtilization.py
+60
-60
No files found.
dream/plugins/JSComponentGantt.py
View file @
b0e30256
...
...
@@ -27,7 +27,11 @@ class JSComponentGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
maxSimTime
=
data
[
'general'
][
'maxSimTime'
]
self
.
initializeTimeSupport
(
data
)
date_format
=
'%d-%m-%Y %H:%M'
resultElements
=
data
[
'result'
][
'result_list'
][
-
1
][
'elementList'
]
'''read the results'''
for
result
in
data
[
'result'
][
'result_list'
]:
resultElements
=
result
[
'elementList'
]
task_dict
=
{}
# loop in the results to find Operators
for
element
in
resultElements
:
...
...
@@ -79,7 +83,6 @@ class JSComponentGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
)
# return the result to the gadget
result
=
data
[
'result'
][
'result_list'
][
-
1
]
result
[
self
.
configuration_dict
[
'output_id'
]]
=
dict
(
time_unit
=
self
.
getTimeUnitText
(),
task_list
=
sorted
(
task_dict
.
values
(),
...
...
dream/plugins/JSComponentTabSchedule.py
View file @
b0e30256
...
...
@@ -24,7 +24,7 @@ class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin):
'''returns the id of the operator that has performed a certain task'''
# XXX searching in the last solution only
# XXX synchronize with the solution that is used by postprocess method
resultElements
=
self
.
data
[
'result'
][
'result_list'
][
-
1
]
[
'elementList'
]
resultElements
=
self
.
result
[
'elementList'
]
for
element
in
resultElements
:
if
element
.
get
(
"_class"
,
None
)
in
self
.
OPERATOR_CLASS_SET
:
schedule
=
element
[
"results"
].
get
(
"schedule"
,
[])
...
...
@@ -38,7 +38,7 @@ class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin):
STATION_CLASS_SET
=
set
([
"Dream.MouldAssembly"
,
"Dream.MachineJobShop"
])
def
isActiveStation
(
self
,
ID
):
'''returns True if station is an active station'''
resultElements
=
self
.
data
[
'result'
][
'result_list'
][
-
1
]
[
'elementList'
]
resultElements
=
self
.
result
[
'elementList'
]
for
element
in
resultElements
:
if
element
.
get
(
"_class"
,
None
)
in
self
.
STATION_CLASS_SET
:
if
element
.
get
(
"id"
,
None
)
==
ID
:
...
...
@@ -63,10 +63,12 @@ class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin):
data
[
'general'
][
'dateFormat'
]
=
'%Y/%m/%d'
self
.
initializeTimeSupport
(
data
)
date_format
=
'%d-%m-%Y %H:%M'
'''reading results'''
resultElements
=
data
[
'result'
][
'result_list'
][
-
1
][
'elementList'
]
for
result
in
data
[
'result'
][
'result_list'
]:
self
.
result
=
result
resultElements
=
result
[
'elementList'
]
# create the titles row
result
=
data
[
'result'
][
'result_list'
][
-
1
]
result
[
self
.
configuration_dict
[
'output_id'
]]
=
[[
'Job ID'
,
'Order'
,
'Due Date'
,
...
...
dream/plugins/JSOperatorGantt.py
View file @
b0e30256
...
...
@@ -23,7 +23,9 @@ class JSOperatorGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
maxSimTime
=
data
[
'general'
][
'maxSimTime'
]
self
.
initializeTimeSupport
(
data
)
date_format
=
'%d-%m-%Y %H:%M'
resultElements
=
data
[
'result'
][
'result_list'
][
-
1
][
'elementList'
]
for
result
in
data
[
'result'
][
'result_list'
]:
resultElements
=
result
[
'elementList'
]
task_dict
=
{}
# loop in the results to find Operators
for
element
in
resultElements
:
...
...
@@ -74,7 +76,6 @@ class JSOperatorGantt(plugin.OutputPreparationPlugin, TimeSupportMixin):
duration
=
exitTime
-
entranceTime
,
)
# return the result to the gadget
result
=
data
[
'result'
][
'result_list'
][
-
1
]
result
[
self
.
configuration_dict
[
'output_id'
]]
=
dict
(
time_unit
=
self
.
getTimeUnitText
(),
task_list
=
sorted
(
task_dict
.
values
(),
...
...
dream/plugins/JSOperatorUtilization.py
View file @
b0e30256
...
...
@@ -7,7 +7,7 @@ class JSOperatorUtilization(plugin.OutputPreparationPlugin):
# XXX hardcoded values
JS_OPERATOR_CLASS_SET
=
set
([
"Dream.Operator"
])
def
postprocess
(
self
,
data
):
result
=
data
[
'result'
][
'result_list'
][
-
1
]
for
result
in
data
[
'result'
][
'result_list'
]:
ticks
=
[]
working_data
=
[]
...
...
dream/plugins/JSStationUtilization.py
View file @
b0e30256
...
...
@@ -7,7 +7,7 @@ class JSStationUtilization(plugin.OutputPreparationPlugin):
# XXX hardcoded values
JS_STATION_CLASS_SET
=
set
([
"Dream.MouldAssembly"
,
"Dream.MachineJobShop"
])
def
postprocess
(
self
,
data
):
result
=
data
[
'result'
][
'result_list'
][
-
1
]
for
result
in
data
[
'result'
][
'result_list'
]:
ticks
=
[]
working_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