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
5fd7874c
Commit
5fd7874c
authored
Mar 04, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Batch instance set with view and (empty) plugin to output Excel schedule of operators
parent
40fb02fc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
dream/plugins/BatchesOperatorSpreadsheet.py
dream/plugins/BatchesOperatorSpreadsheet.py
+23
-0
dream/simulation/Examples/GUI_instances/BatchAllInOneEmpty.json
...simulation/Examples/GUI_instances/BatchAllInOneEmpty.json
+13
-1
No files found.
dream/plugins/BatchesOperatorSpreadsheet.py
0 → 100644
View file @
5fd7874c
from
dream.plugins
import
plugin
class
BatchesOperatorSpreadsheet
(
plugin
.
OutputPreparationPlugin
):
""" Output the result of demand planning in a format compatible with
Output_viewDownloadFile
"""
def
postprocess
(
self
,
data
):
# XXX the event generator should store its result in data and not in global
# variable.
print
"I'm in"
# from dream.simulation.applications.DemandPlanning.Globals import G
# data['result']['result_list'][-1][self.configuration_dict['output_id']] = {
# 'name': 'Result.xlsx',
# 'mime_type': 'application/vnd.ms-excel',
# 'data': G.reportResults.xlsx.encode('base64')
# }
# import json
# utilisationString=json.dumps(G.Utilisation, indent=5)
# outputJSONFile=open('Utilisation.json', mode='w')
# outputJSONFile.write(utilisationString)
return
data
dream/simulation/Examples/GUI_instances/BatchAllInOneEmpty.json
View file @
5fd7874c
...
...
@@ -229,7 +229,7 @@
"output_id"
:
"operator_gantt"
},
"gadget"
:
"Output_viewGantt"
,
"title"
:
"Operator Schedule"
,
"title"
:
"Operator Schedule
Gantt
"
,
"type"
:
"object_view"
},
"view_queue_stats"
:
{
...
...
@@ -255,6 +255,14 @@
"gadget"
:
"Output_viewGraph"
,
"title"
:
"Operator Utilization"
,
"type"
:
"object_view"
},
"view_download_spreadsheet"
:
{
"configuration"
:
{
"output_id"
:
"operator_spreadsheet"
},
"gadget"
:
"Output_viewDownloadFile"
,
"title"
:
"Operator Schedule Spreadsheet"
,
"type"
:
"object_view"
}
},
"post_processing"
:
{
...
...
@@ -284,6 +292,10 @@
{
"_class"
:
"dream.plugins.BatchesOperatorGantt.BatchesOperatorGantt"
,
"output_id"
:
"operator_gantt"
},
{
"_class"
:
"dream.plugins.BatchesOperatorSpreadsheet.BatchesOperatorSpreadsheet"
,
"output_id"
:
"operator_spreadsheet"
}
]
},
...
...
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