Sam Hatchett
9b3007ff55
adds projectless function declarations
...
and fixes non-camelcase convention
2022-08-08 12:02:22 -04:00
Sam Hatchett
5f8ee49fd6
adds an API function to get information about upcoming events
2022-07-27 14:18:50 -04:00
Sam Hatchett
c500cddd6d
fixes issue where a string position an underflow ( #676 )
...
under some circumstances, like certain input lines that have long comments, the code here can cause an underflow in size_t which casts to a very large integer during comparison and results in the number of tokens being over-reported (max of 40). Most of these tokens are of course garbage. Changing this `len` variable to an integer permits it to be less than zero, thus allowing an exit from the `while` at L665.
2022-06-14 09:36:56 -04:00
Lew Rossman
4d66af19a5
Merge pull request #669 from OpenWaterAnalytics/dev-pump-fix
...
Modify const. HP pump
2022-04-05 09:15:18 -04:00
Luke Butler
9c0b576182
Fix for GPV controls in EN_saveinpfile
...
EN_saveinpfile was incorrectly saving the index of the GPV head loss curve inside of a simple control instead of the control status
2022-03-30 23:13:48 -04:00
Lew Rossman
4bdbe6cd78
Modify const. HP pump
2022-03-30 09:22:01 -04:00
Lew Rossman
cecc941d29
Update to force re-check of PR
2022-03-20 09:27:37 -04:00
Lew Rossman
dbd3f6387d
Fixes possible integer overflow
...
Fixes a possible integer overflow when computing time for a tank to fill/empty (issue #666 ). Also fixes issue #642 that failed to set a pump's initial setting to 0 when its initial status was CLOSED.
2022-03-19 13:25:55 -04:00
Lew Rossman
c8a3eadfdf
Merge pull request #634 from OpenWaterAnalytics/dev-PDA_mod
...
Dev pda mod
2022-03-19 08:53:15 -04:00
Lew Rossman
a63f553b5f
Adds PDA convergence test
2022-02-14 11:19:00 -05:00
Lew Rossman
070901d6bf
Update hydsolver.c
2022-02-14 11:03:22 -05:00
Lew Rossman
f9189d04b4
Updates to default demand pattern fix
2022-01-15 11:21:24 -05:00
Lew Rossman
14de37d0cb
Adjust default pattern index after a pattern is deleted
2022-01-14 09:09:32 -05:00
Lew Rossman
afda609223
Adds get/set for default demand pattern to toolkit
2022-01-14 08:50:33 -05:00
Elad Salomons
64f0d15afe
Merge pull request #657 from OpenWaterAnalytics/dev-Qualflag_Fix
...
Removes silent change to WQ option for 0 duration run
2021-09-28 10:09:26 +03:00
Lew Rossman
d552d0c92c
Removes silent change to WQ option for 0 duration run
2021-09-25 09:32:20 -04:00
james uber
3be813facb
Return MISSING as initial valve setting
...
If the initial setting is indeed MISSING, that means the status of the valve has been set to OPEN or CLOSED, and the valve is non-functional (until the setting is changed by a control). This change is required to be able to accurately see the initial setting, because the status does not distinguish between open and active valves.
2021-09-23 11:04:19 -04:00
james uber
886a5cf266
Bugfix for En_getaveragepatternvalue()
...
Fixes a bug where 0 was not considered to be a valid pattern index.
2021-09-08 10:49:57 -04:00
mariosmsk
79b2c4c8ee
add new errcode 263 "node is not a tank"
2021-06-26 17:11:33 +03:00
mariosmsk
6728a59e63
node is not a tank
2021-06-26 12:01:19 +03:00
Elad Salomons
b1255dead8
Fix check for roughness coefficient
...
Fix check for roughness coefficient
2021-06-15 16:15:54 +03:00
Lew Rossman
e58d36c6a1
Revert "Update hydcoeffs.c"
...
This reverts commit 13416942f8 .
2021-04-20 09:36:01 -04:00
Lew Rossman
13416942f8
Update hydcoeffs.c
2021-04-20 09:30:11 -04:00
Lew Rossman
bec7c0db0f
Remove line comments with release number
2021-04-17 10:24:42 -04:00
Lew Rossman
409a600455
Improved flow checks for full and empty tanks
...
Improves the way link flow into full and out of empty tanks is checked. Also corrects the head loss and gradient calculation for constant horsepower pumps at very low and very high flow rates (this was affecting one of the examples used to test the full/empty tank fix).
2021-04-16 17:01:54 -04:00
Lew Rossman
aaa9b44aaf
Removed unreferenced variable in hydstatus.c
2021-01-26 15:47:04 -05:00
Lew Rossman
9d2256433f
Fix having flow out of an empty tank
2021-01-26 15:41:01 -05:00
Lew Rossman
1e0c65e04e
Merge pull request #619 from OpenWaterAnalytics/fix_energy_usage
...
Update hydraul.c
2020-12-18 11:11:46 -05:00
Lew Rossman
854abdf5d2
Update hydraul.c
...
Fixes a bug that was adding time on-line to a closed pump's energy usage for the time step just prior to when a rule-based control re-opens it.
2020-12-09 20:26:13 -05:00
Lew Rossman
533466b796
PDA changes to improve convergence
2020-11-19 16:23:24 -05:00
Lew Rossman
0d31da816a
Remove redundant check on EN_STARTTIME
2020-11-08 10:23:03 -05:00
Lew Rossman
b6eddc07fa
Add EN_STARTTIME to EN_settimeparam function
2020-11-08 10:10:16 -05:00
Lew Rossman
a76cc51ac8
Allow negative EN_SETTING value in EN_setlinkvalue
...
Makes EN_setlinkvalue consistent with how an input file is read. This addresses issue #616 .
2020-11-05 21:54:10 -05:00
Lew Rossman
ff00c1a6f1
Merge pull request #613 from OpenWaterAnalytics/fix_energy_usage
...
Fixes error in energy usage for tank pumps
2020-09-30 10:03:29 -04:00
Lew Rossman
bca3b99b88
Fixes error in energy usage for tank pumps
2020-09-20 19:37:15 -04:00
chrisgs
35aa9f8e08
Fix vmin calculation
...
Multiply area by `Hmin - elevation` instead of just `Hmin`.
2020-08-18 16:58:08 +01:00
Elad Salomons
ec11556d88
Change error number 2331 to 234
2020-08-10 11:20:51 +03:00
Alex Sinske
32732dbdd5
This solves the garbled error message and optionally adds an improved specific error message, which existed in EPANET 2.1 when a network has unconnected nodes. Another similar case in was code found and corrected with the same pattern, but could not be tested.
2020-08-05 18:43:17 +02:00
Lew Rossman
951c7ce727
Refactor tank mixing zone volume
...
Addresses issue #597 .
2020-07-11 17:12:49 -04:00
Lew Rossman
71a733ed85
Add missing break statement after update from dev
2020-07-10 15:42:34 -04:00
Lew Rossman
67f7d8f76b
Merge branch 'dev' into dev_2.3
2020-07-10 14:36:46 -04:00
mariosmsk
e0745e9dc5
Update epanet.c
2020-06-25 20:22:12 +03:00
mariosmsk
532f89d14b
Net1.inp have 0 MinorLoss / GUI accepts values zero for MINORLOSS. Similar to the parameter Power of pumps
2020-06-25 20:11:27 +03:00
james uber
949022ed49
API access to incontrols() for information about node/link controls participation
...
allowing access to incontrols() for getting information about whether a node or link participates in a simple or rule-based control.
2020-05-22 11:45:52 -04:00
Elad Salomons
37342c70b1
Another option for EN_settankdata fix
2020-04-19 18:05:08 +03:00
Lew Rossman
37a58a467c
Update epanet.c
2020-04-19 09:25:36 -04:00
Lew Rossman
99f09f1edb
A simpler fix to EN_settankdata
...
Changes 1 line instead of 4.
2020-04-19 09:16:08 -04:00
Elad Salomons
3f515e7ad4
Fix EN_settankdata for elevation with SI units
...
Fix #593
2020-04-19 09:42:43 +03:00
Lew Rossman
b64e070354
Update project.c
2020-04-13 09:39:58 -04:00
Corey McNeish
ee5e910454
Alloc, free persistent parts of Hydraul in allocdata, rather than in allocmatrix
2020-04-11 11:33:37 -07:00