Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addresses Issue #109 -- Hard to read a reported value #191

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()


project(swmm-solver
VERSION 5.2.4
VERSION 5.2.5
LANGUAGES C CXX
)

Expand Down
12 changes: 7 additions & 5 deletions src/solver/statsrpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
// - Calculation of % Evaporation and % Exfiltration losses for storage
// units was corrected.
// Build 5.2.5
// - Changed flow format to scientific to prevent the merging of extremely
// large flows that make it difficult to interpret results.
// - Add padding to flow format to prevent fields from running together
// in the event of a width overflow.
//-----------------------------------------------------------------------------
#define _CRT_SECURE_NO_DEPRECATE

Expand Down Expand Up @@ -79,7 +79,7 @@ void writeLinkLoads(void);

#define WRITE(x) (report_writeLine((x)))

static char FlowFmt[6];
static char FlowFmt[7];
static double Vcf;

//=============================================================================
Expand All @@ -92,8 +92,10 @@ void statsrpt_writeReport()
//
{
// --- set number of decimal places for reporting flow values
if ( FlowUnits == MGD || FlowUnits == CMS ) sstrncpy(FlowFmt, "%9.3f", 5);
else sstrncpy(FlowFmt, "%9.2f", 5);
if ( FlowUnits == MGD || FlowUnits == CMS )
sstrncpy(FlowFmt, " %8.3f", 6);
else
sstrncpy(FlowFmt, " %8.2f", 6);

// --- conversion factor from cu. ft. to mil. gallons or megaliters
if (UnitSystem == US) Vcf = 7.48 / 1.0e6;
Expand Down