New positional control valve added

This commit is contained in:
Lew Rossman
2022-08-16 11:47:44 -04:00
parent c766d4eceb
commit 6db17193f5
16 changed files with 292 additions and 33 deletions

View File

@@ -7,7 +7,7 @@ Description: saves network data to an EPANET formatted text file
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 10/29/2019
Last Updated: 08/13/2022
******************************************************************************
*/
@@ -312,6 +312,11 @@ int saveinpfile(Project *pr, const char *fname)
{
sprintf(s1, "%-31s %12.4f", net->Curve[j].ID, km);
}
// For PCV add loss curve if present
else if (link->Type == PCV && (j = net->Valve[i].Curve) > 0)
{
sprintf(s1, "%12.4f %12.4f %-31s", kc, km, net->Curve[j].ID);
}
else sprintf(s1, "%12.4f %12.4f", kc, km);
fprintf(f, "\n%s %s", s, s1);
if (link->Comment) fprintf(f, " ;%s", link->Comment);