These functions are used to report simulation results.
| ||Writes a line of text to a project's report file.|
| ||Writes simulation results in a tabular format to a project's report file.|
| ||Copies the current contents of a project's report file to another file.|
| ||Clears the contents of a project's report file.|
| ||Resets a project's report options to their default values.|
| ||Processes a reporting format command.|
| ||Sets the level of hydraulic status reporting.|
| ||Retrieves a particular simulation statistic.|
| ||Retrieves the order in which a node or link appears in an output file.|
Writes a line of text to a project's report file.
writeLine(line: string): void;
|line|| ||a text string to write.|
Writes simulation results in a tabular format to a project's report file.
Either a full hydraulic analysis or full hydraulic and water quality analysis must have been run, with results saved to file, before
report is called. In the former case,
saveH must also be called first to transfer results from the project's intermediate hydraulics file to its output file.
The format of the report is controlled by commands issued with
Copies the current contents of a project's report file to another file.
copyReport(filename: string): void;
|filename|| ||the full path name of the destination file.|
This function allows toolkit clients to retrieve the contents of a project's report file while the project is still open.
Clears the contents of a project's report file.
Resets a project's report options to their default values.
After calling this function the default reporting options are in effect. These are:
- no status report
- no energy report
- no nodes reported on
- no links reported on
- node variables reported to 2 decimal places
- link variables reported to 2 decimal places (3 for friction factor)
- node variables reported are elevation, head, pressure, and quality
- link variables reported are flow, velocity, and head loss.
Processes a reporting format command.
setReport(format: string): void;
|format|| ||a report formatting command.|
Acceptable report formatting commands are described in the [REPORT] section of the Input File topic.
Formatted results of a simulation can be written to a project's report file using the
Sets the level of hydraulic status reporting.
setStatusReport(level: StatusReport): void;
|level|| ||a status reporting level code (see |
Status reporting writes changes in the hydraulics status of network elements to a project's report file as a hydraulic simulation unfolds. There are three levels of reporting:
StatusReport.NoReport (no status reporting),
StatusReport.NormalReport (normal reporting)
StatusReport.FullReport (full status reporting).
The full status report contains information at each trial of the solution to the system hydraulic equations at each time step of a simulation. It is useful mainly for debugging purposes.
If many hydraulic analyses will be run in the application it is recommended that status reporting be turned off (level =
Retrieves a particular simulation statistic.
getStatistic(type: AnalysisStatistic): number;
|type|| ||the type of statistic to retrieve (see |
Number the value of the statistic.
Retrieves the order in which a node or link appears in an output file.
getResultIndex(type: ObjectType.Node | ObjectType.Link, index: number): number;
|type|| ||a type of element (either |
|index|| ||the element's current index (starting from 1).|
Number the order in which the element's results were written to file.
If the element does not appear in the file then its result index is 0.
This function can be used to correctly retrieve results from an EPANET binary output file after the order of nodes or links in a network's database has been changed due to editing operations.