Analysis: Adding New Component Types to Model Reports
Phil Weinstein, CADSWES
Status:
Add these three items to model reports (i.e. as user-addable components):
A model report is a RiverWare "output device" which generates an HTML document containing a hierarchy of report components. The three new types of components to be made available are similar to certain already-supported components.
Specifically, model output reports already support the inclusion of any Plot Page output device instance. It is included in the generated HTML document as an image. This is exactly how a Pie Chart output device instance would be included. The Tabular Series Slot Report is also an output device, but its output is essentially an HTML table.
Model reports also support a Model Information component containing couple optional paragraphs (derived from text blocks defined in the model) and the number of each type of Simulation Object in the model, presented in a two-column table. (TBD).The new Water Accounting Information component would be similar to that component.
The Model Report mechanism generates HTML using an ad-hock (though consistently structured) "template" mechanism. HTML snippets are assembled using just character string processing. In particular DOM is not used (e.g. as provided by QDom). (Note that we do use QDom in RiverWare for various XML serializations -- but not for model reports).
Since each of the new types of model report components are similar to existing components, the development task will consist of mostly copying and modifying examples of existing definitions and blocks of code.
This can be handled in virtually the same way as Plot Pages. The Plot Page report component has these attributes:
A mechanism for selecting among the existing Chart instances will be created as a modified duplicate of the existing support for Plot Pages. (Pie-) Chart already supports the generation of an image (for export); this will be made available to, and used by the model report generation mechanism.
The inclusion of this component will be similar to the inclusion of a Pie Chart component -- it is a reference to an existing RiverWare "output device" instance. However, the Tabular Series Slot Report generates an HTML document. The contents of the "body" of that generated HTML document will be made available to, and used by the model report generation mechanism.
Minor note: Since the Tabular Series Slot Report itself provides a "Title", it probably wouldn't make sense to redundantly support a title in the model report component configuration for the Tabular Series Slot Report.
NOTE: The requirements for this report component need to be defined.
Assuming this represents just summary information for the Accounts in the model, and possibly also enumerations of Accounts (and maybe Supplies and Exchanges), this will be a relatively simple adaptation of the already existing Model Information component.
Temporary Development GIT Branch: PhilModelRep
Day | Hours | Description | |
3.0 | Project Planning (incl. this document) | ||
7.0 | Definitions and configuration implementation for Pie Chart and Tabular Series Slot Report components. | ||
3.5 | Pie Chart Rendering. | sample | |
7.75 | Tabular Series Slot Reports. | sample | |
8.25 | Account System Information, Account Table, Supply Table. | sample | |
7.0 | Account Method Table, and revisions to prior items. | ||
8.0 | Account Section, Supply & Exchange support for Slot, Slot Table items, other accounting revisions. | ||
7.5 | Pie Chart revisions (timestep fix, white backgrounds, warning) ... including separate commit for white backgrounds in Pie Chart printing and image export (2.0 hours). | ||
11-18-2013 | 4.5 | Feature document: R:\doc\Output\ModelReport\2013\ModelRepNov2013Enh.html ... also online: HTML / PDF |
|
56.5 | Total Hours Completed (as of 11-18) |
Related Filed Bugs:
---