Skip to content

Writing a Report

Elad Salomons edited this page Sep 25, 2015 · 5 revisions

The Toolkit has some built-in capabilities to produce formatted output results saved to a file. More specialized reporting needs can always be handled by writing specialized code.

The ENsetreport function is used to define the format of a report while the ENreport function actually writes the report. The latter should be called only after a hydraulic or water quality analysis has been made. An example of creating a report that lists all nodes where the pressure variation over the duration of the simulation exceeds 20 psi is shown below:

/* Compute ranges (max - min) */ 
ENsettimeparam(EN_STATISTIC, EN_RANGE); 

/* Solve hydraulics */ 

/* Define contents of the report */ 
ENsetreport("FILE myfile.rpt");
ENsetreport("NODES ALL");
ENsetreport("PRESSURE ABOVE 20");

/* Write the report to file */ 
Clone this wiki locally
You can’t perform that action at this time.