OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
Global Report Writer Methods

Global report writer methods. More...

Collaboration diagram for Global Report Writer Methods:

Functions

int report_readOptions (char *tok[], int ntoks)
 Reads reporting options from a line of input data.
 
void report_writeLine (const char *line)
 Writes a line of text to the report file.
 
void report_writeSysTime (void)
 Writes starting/ending processing times to the report file.
 
void report_writeLogo (void)
 Writes report header lines to report file.
 
void report_writeTitle (void)
 Writes project title to report file.
 
void report_writeOptions (void)
 Writes analysis options in use to report file.
 
void report_writeReport (void)
 Writes project title to report file.
 
void report_writeRainStats (int i, TRainStats *r)
 Writes summary of rain data read from input file to report file.
 
void report_writeRdiiStats (double rainVol, double rdiiVol)
 Writes summary of RDII inflow to report file.
 
void report_writeControlActionsHeading (void)
 Writes summary control actions heading to report file.
 
void report_writeControlAction (DateTime aDate, char *linkID, double value, char *ruleID)
 Writes control action to report file.
 
void report_writeRunoffError (TRunoffTotals *totals, double totalArea)
 Writes runoff continuity error to report file.
 
void report_writeLoadingError (TLoadingTotals *totals)
 Writes runoff loading continuity error to report file.
 
void report_writeGwaterError (TGwaterTotals *totals, double gwArea)
 Writes groundwater continuity error to report file.
 
void report_writeFlowError (TRoutingTotals *totals)
 Writes flow routing continuity error to report file.
 
void report_writeQualError (TRoutingTotals *QualTotals)
 Writes quality routing continuity error to report file.
 
void report_writeMaxStats (TMaxStats maxMassBalErrs[], TMaxStats maxCourantCrit[], int nMaxStats)
 Lists nodes and links with highest mass balance errors and courant time step violations to report file.
 
void report_writeMaxFlowTurns (TMaxStats flowTurns[], int nMaxStats)
 Lists links with highest number of flow turns to report (i.e., fraction of time periods where the flow is higher (or lower) than the flows in the previous and following periods)
 
void report_writeNonconvergedStats (TMaxStats maxNonconverged[], int nMaxStats)
 Writes non-converging nodes to report file.
 
void report_writeTimeStepStats (TTimeStepStats *timeStepStats)
 Writes routing time step statistics to report file.
 
void report_writeErrorMsg (int code, char *s)
 Writes error message to report file.
 
void report_writeErrorCode (void)
 Writes error message to report file.
 
void report_writeInputErrorMsg (int k, int sect, char *line, long lineCount)
 Writes input error message to report file.
 
void report_writeWarningMsg (char *msg, char *id)
 Writes a warning message to report file.
 
void report_invokeWarningCallback (const char *msg)
 Invokes the registered warning callback (if any) with a message.
 
void report_writeTseriesErrorMsg (int code, TTable *tseries)
 Writes the date where a time series' data is out of order.
 
void inputrpt_writeInput (void)
 Writes summary of input data to report file.
 
void statsrpt_writeReport (void)
 Reports simulation summary statistics.
 

Detailed Description

Global report writer methods.

Function Documentation

◆ inputrpt_writeInput()

void inputrpt_writeInput ( void )

Writes summary of input data to report file.

Here is the call graph for this function:

◆ report_invokeWarningCallback()

void report_invokeWarningCallback ( const char * msg)

Invokes the registered warning callback (if any) with a message.

Parameters
[in]msgWarning text; leading whitespace/newlines are skipped.

Used by the warning-emit sites that write the report line directly (input parsing, options parsing) so their warnings also stream to a host, in addition to being invoked from report_writeWarningMsg.

Invokes the registered warning callback (if any) with a message.

Implementation arguments
  • msg (in): Warning message text.
Here is the caller graph for this function:

◆ report_readOptions()

int report_readOptions ( char * tok[],
int ntoks )

Reads reporting options from a line of input data.

Parameters
[in]tokArray of string tokens
[in]ntoksNumber of tokens
Returns
Error code

Reads reporting options from a line of input data.

Implementation arguments
  • tok (borrowed/value): Array of string tokens.
  • ntoks (in): Number of tokens.
Returns
An error code.
Here is the call graph for this function:

◆ report_writeControlAction()

void report_writeControlAction ( DateTime aDate,
char * linkID,
double value,
char * ruleID )

Writes control action to report file.

Parameters
[in]aDateDate/time of rule action
[in]linkIDID of link being controlled
[in]valueNew status value of link
[in]ruleIDID of rule implementing the action

Writes control action to report file.

Implementation arguments
  • aDate (in): Date/time of rule action.
  • linkID (borrowed/value): ID of link being controlled.
  • value (in): New status value of link.
  • ruleID (borrowed/value): ID of rule implementing the action.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeControlActionsHeading()

void report_writeControlActionsHeading ( void )

Writes summary control actions heading to report file.

Writes summary control actions heading to report file.

Precondition
Frpt.file is open for writing.
Note
Does not flush/close the stream or return output errors.

◆ report_writeErrorCode()

void report_writeErrorCode ( void )

Writes error message to report file.

Here is the call graph for this function:

◆ report_writeErrorMsg()

void report_writeErrorMsg ( int code,
char * s )

Writes error message to report file.

Parameters
[in]codeError code
[in]sError message text
Implementation arguments
  • code (in): Error code.
  • s (borrowed/value): Error message text.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeFlowError()

void report_writeFlowError ( TRoutingTotals * totals)

Writes flow routing continuity error to report file.

Parameters
[in]totalsAccumulated flow routing totals
Implementation arguments
  • totals (borrowed/value): Accumulated flow routing totals.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeGwaterError()

void report_writeGwaterError ( TGwaterTotals * totals,
double gwArea )

Writes groundwater continuity error to report file.

Parameters
[in]totalsAccumulated groundwater totals
[in]gwAreaTotal area of all subcatchments with groundwater
Implementation arguments
  • totals (borrowed/value): Accumulated groundwater totals.
  • gwArea (in): Total area of all subcatchments with groundwater.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeInputErrorMsg()

void report_writeInputErrorMsg ( int k,
int sect,
char * line,
long lineCount )

Writes input error message to report file.

Parameters
[in]kError code
[in]sectNumber of input data section where error occurred
[in]lineLine of data containing the error
[in]lineCountLine number of data file containing the error
Implementation arguments
  • k (in): Error code.
  • sect (in): Number of input data section where error occurred.
  • line (borrowed/value): Line of data containing the error.
  • lineCount (in): Line number of data file containing the error.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeLine()

void report_writeLine ( const char * line)

Writes a line of text to the report file.

Parameters
[in]lineLine of text

Writes a line of text to the report file.

Implementation arguments
  • line (in): Line of text.
Here is the caller graph for this function:

◆ report_writeLoadingError()

void report_writeLoadingError ( TLoadingTotals * totals)

Writes runoff loading continuity error to report file.

Parameters
[in]totalsAccumulated pollutant loading totals

Writes runoff loading continuity error to report file.

Implementation arguments
  • totals (in): Borrowed array of Nobjects[POLLUT] finalized loading totals in report units; not modified or retained.
Precondition
Frpt.file is an open writable report stream and pollutant names/units exist.
Note
Does not close or flush the report stream or report fprintf errors.
Here is the caller graph for this function:

◆ report_writeLogo()

void report_writeLogo ( void )

Writes report header lines to report file.

◆ report_writeMaxFlowTurns()

void report_writeMaxFlowTurns ( TMaxStats flowTurns[],
int nMaxStats )

Lists links with highest number of flow turns to report (i.e., fraction of time periods where the flow is higher (or lower) than the flows in the previous and following periods)

Parameters
[in]flowTurnsLinks with highest number of flow turns
[in]nMaxStatsNumber of links in flowTurns[]

Lists links with highest number of flow turns to report (i.e., fraction of time periods where the flow is higher (or lower) than the flows in the previous and following periods)

Implementation arguments
  • flowTurns (borrowed/value): Links with highest number of flow turns.
  • nMaxStats (in): Number of links in flowTurns[].
Here is the caller graph for this function:

◆ report_writeMaxStats()

void report_writeMaxStats ( TMaxStats maxMassBalErrs[],
TMaxStats maxCourantCrit[],
int nMaxStats )

Lists nodes and links with highest mass balance errors and courant time step violations to report file.

Parameters
[in]maxMassBalErrsNodes with highest mass balance errors
[in]maxCourantCritNodes most often Courant time step critical
[in]nMaxStatsNumber of most critical nodes/links saved

Lists nodes and links with highest mass balance errors and courant time step violations to report file.

Implementation arguments
  • maxMassBalErrs (in): Borrowed nMaxStats array of node continuity error records; negative indices are skipped and values are percentages.
  • maxCourantCrit (in): Borrowed nMaxStats array of node/link critical-step records with valid objType/index or negative unused indices; values are percentages.
  • nMaxStats (in): Number of records in each array; <= 0 writes nothing.
Note
Writes only for dynamic-wave networks with links. Courant statistics also require a nonzero CourantFactor. Arrays are neither changed nor retained.
Here is the caller graph for this function:

◆ report_writeNonconvergedStats()

void report_writeNonconvergedStats ( TMaxStats maxNonconverged[],
int nMaxStats )

Writes non-converging nodes to report file.

Parameters
[in]maxNonconvergedNodes most often Courant time step critical
[in]nMaxStatsNumber of most critical nodes/links saved

Writes non-converging nodes to report file.

Implementation arguments
  • maxNonconverged (in): Borrowed nMaxStats records containing valid node indices or negative unused indices, and dimensionless nonconvergence fractions.
  • nMaxStats (in): Available record count; <= 0 prints the no-failure message.
Note
Runs only when nodes exist and RouteModel is DW. The legacy first record checks may also select the no-failure message for index <= 0 or fraction < 0.00005. Report output errors are not returned.
Here is the caller graph for this function:

◆ report_writeOptions()

void report_writeOptions ( void )

Writes analysis options in use to report file.

Here is the call graph for this function:

◆ report_writeQualError()

void report_writeQualError ( TRoutingTotals * QualTotals)

Writes quality routing continuity error to report file.

Parameters
[in]QualTotalsAccumulated quality routing totals for each pollutant

Writes quality routing continuity error to report file.

Implementation arguments
  • QualTotals (in): Borrowed Nobjects[POLLUT] array of finalized routing totals in report units; not modified or retained.
Precondition
Frpt.file and pollutant metadata are initialized.
Note
Writes tables of up to five pollutants each; stream errors are not returned.
Here is the caller graph for this function:

◆ report_writeRainStats()

void report_writeRainStats ( int i,
TRainStats * r )

Writes summary of rain data read from input file to report file.

Parameters
[in]iRain gage index
[in]rRain file summary statistics

Writes summary of rain data read from input file to report file.

Implementation arguments
  • i (in): Rain gage index.
  • r (borrowed/value): Rain file summary statistics.
Here is the call graph for this function:

◆ report_writeRdiiStats()

void report_writeRdiiStats ( double rainVol,
double rdiiVol )

Writes summary of RDII inflow to report file.

Parameters
[in]rainVolTotal rainfall volume over sewershed
[in]rdiiVolTotal RDII volume produced
Implementation arguments
  • rainVol (in): Total rainfall volume over sewershed.
  • rdiiVol (in): Total RDII volume produced.
Here is the call graph for this function:

◆ report_writeReport()

void report_writeReport ( void )

Writes project title to report file.

Writes project title to report file.

◆ report_writeRunoffError()

void report_writeRunoffError ( TRunoffTotals * totals,
double totalArea )

Writes runoff continuity error to report file.

Parameters
[in]totalsAccumulated runoff totals
[in]totalAreaTotal area of all subcatchments
Implementation arguments
  • totals (borrowed/value): Accumulated runoff totals.
  • totalArea (in): Total area of all subcatchments.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeSysTime()

void report_writeSysTime ( void )

Writes starting/ending processing times to the report file.

Writes starting/ending processing times to the report file.

Here is the call graph for this function:

◆ report_writeTimeStepStats()

void report_writeTimeStepStats ( TTimeStepStats * timeStepStats)

Writes routing time step statistics to report file.

Parameters
[in]timeStepStatsRouting time step statistics
Implementation arguments
  • timeStepStats (borrowed/value): Routing time step statistics.
Here is the caller graph for this function:

◆ report_writeTitle()

void report_writeTitle ( void )

Writes project title to report file.

◆ report_writeTseriesErrorMsg()

void report_writeTseriesErrorMsg ( int code,
TTable * tseries )

Writes the date where a time series' data is out of order.

Parameters
[in]codeError code
[in]tseriesPointer to a time series

Writes the date where a time series' data is out of order.

Implementation arguments
  • code (in): Error code; ERR_CURVE_SEQUENCE is translated to ERR_TIMESERIES_SEQUENCE and includes the offending tseries->x2 calendar time.
  • tseries (in): Non-null borrowed table containing ID and x2 when required.
Postcondition
Writes to the report and updates the normal global reporting error state.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_writeWarningMsg()

void report_writeWarningMsg ( char * msg,
char * id )

Writes a warning message to report file.

Parameters
[in]msgText of warning message
[in]idID name of object that message refers to

Writes a warning message to report file.

Implementation arguments
  • msg (borrowed/value): Text of warning message.
  • id (borrowed/value): ID name of object that message refers to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ statsrpt_writeReport()

void statsrpt_writeReport ( void )

Reports simulation summary statistics.

Here is the call graph for this function:
Here is the caller graph for this function: