From b6eddc07faa5856ce6f5c568824bd864fff4da3d Mon Sep 17 00:00:00 2001 From: Lew Rossman Date: Sun, 8 Nov 2020 10:10:16 -0500 Subject: [PATCH] Add EN_STARTTIME to EN_settimeparam function --- ReleaseNotes2_3.md | 2 ++ src/epanet.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes2_3.md b/ReleaseNotes2_3.md index 83d49c2..3d7ba97 100644 --- a/ReleaseNotes2_3.md +++ b/ReleaseNotes2_3.md @@ -8,4 +8,6 @@ This document describes the changes and updates that have been made in version 2 - A `EN_setvertex` function was added to allow API clients to change the coordinates of a single link vertex. - The index of a General Purpose Valve's (GPV's) head loss curve was added to the list of editable Link Properties using the symbolic constant name `EN_GPV_CURVE`. - The `EN_getlinkvalue` and `EN_setlinkvalue` functions were updated to get and set the value of `EN_GPV_CURVE`. + - Negative pressure values for `EN_SETTING` are now permitted in the `EN_setlinkvalue` function. + - The `EN_STARTTIME` parameter was added into the `EN_settimeparam` function. diff --git a/src/epanet.c b/src/epanet.c index e249e1b..ecb7df7 100644 --- a/src/epanet.c +++ b/src/epanet.c @@ -7,7 +7,7 @@ Authors: see AUTHORS Copyright: see AUTHORS License: see LICENSE - Last Updated: 02/01/2020 + Last Updated: 11/08/2020 ****************************************************************************** */ @@ -1583,6 +1583,11 @@ int DLLEXPORT EN_settimeparam(EN_Project p, int param, long value) rpt->Tstatflag = (char)value; break; + case EN_STARTTIME: + if (value > 86400) return 213; + time->Tstart = value; + break; + case EN_HTIME: time->Htime = value; break;