Commit Graph

579 Commits

Author SHA1 Message Date
Lew Rossman
6089b93a51 Fix refactoring error in hydcoeffs.c 2024-07-02 20:19:45 -04:00
Lew Rossman
68b73a14f1 Fixes for PDA 2024-06-26 17:50:24 -04:00
Lew Rossman
037ca41af6 Adding Pipe Leakage Modeling 2024-06-26 11:34:19 -04:00
Sam Hatchett
31cfd60943 fixes compilation with old compilers and keeps our programming conventions of declaring variables 2024-06-24 15:10:06 -04:00
Sam Hatchett
94d136b58f Merge pull request #803 from OpenWaterAnalytics/bugfix/tank-never-drains
fixes regression related to tank fill/empty events
2024-06-24 15:07:33 -04:00
Sam Hatchett
0329819f04 fixes regression related to tank fill/empty events
In the affected code, q is really just a proxy for flow direction. And in cases where a tank has filled in a previous step, its connected link will have been TEMPCLOSED making the flow pretty small. When this occurs, the link actually never opens even if dH says that the tank should be draining.
2024-06-24 13:08:13 -04:00
Lew Rossman
59f7295739 Merge pull request #802 from YuChunTsao/add-INP-section-column-headings
feat: Add column headings for sections in INP file
2024-06-18 13:23:36 -04:00
Yu Chun Tsao
96cb4c9c88 fix: Use two semicolons in each heading line 2024-06-19 00:46:17 +08:00
Yu Chun Tsao
317990a8d1 feat: Add column headings for sections in INP file
This commit includes the following changes:
- Column headings have been added for each section in the INP file.
- The alignment of the values has been updated to match these headings.

These enhancements improve readability and understanding of the INP file.
2024-06-15 23:48:14 +08:00
Lew Rossman
6ac4156fd0 Update report.c
Change a "printf" statement to "sprintf".
2024-06-14 09:49:28 -04:00
Lew Rossman
62f0bc6db7 Fix two legacy API functions 2024-06-13 07:49:14 -04:00
Lew Rossman
109a93f7d5 Merge pull request #798 from zannads/dev-netadjlist_fix
Fix Issue 789- PR 791
2024-06-05 15:47:04 -04:00
Dennis
c79f125608 Fix: pass the network pointer to freeadjlists and not the project 2024-06-04 13:49:24 +02:00
Abel Heinsbroek
93a0b3671b Merge branch 'dev' into dev 2024-05-31 21:36:57 +02:00
Lew Rossman
8b6be71956 Merge pull request #788 from OpenWaterAnalytics/dev-rename_emitter_backflow_keyword
Changes EMITTER BACKFLOW keyword
2024-05-29 08:25:19 -04:00
Lew Rossman
7b334875f8 Merge pull request #797 from lbutler/big-fix-emitter-coefficient
Fix emitter-related NaN errors from EN_setnodevalue API
2024-05-29 08:23:56 -04:00
Lew Rossman
375823851a Merge pull request #791 from zannads/dev-netadjlist_fix
Fix Issue #789 - free network Adjlist
2024-05-29 08:22:48 -04:00
lbutler
a74171fa26 Fix emitter-related NaN errors by initializing zero EmitterFlow to 1.0.
Co-Authored-By: Lew Rossman <LRossman@outlook.com>
2024-05-28 22:18:29 -04:00
Dennis
d50c673321 Fix Issue #790 - incorrect number of pipes
The pipe counter was not decreased if the element was a pipe.
2024-05-23 10:33:30 +03:00
Dennis
9307913c5b Proposed Fix for Issue #789
See the comment on the Issue.
2024-05-23 10:24:29 +03:00
Lew Rossman
7e66114863 Changes EMITTER BACKFLOW keyword
This change avoids a conflict between the EMITTER EXPONENT and EMITTER BACKFLOW keywords when running a v2.3 input file in the v2.2 EPANET GUI.
2024-05-11 12:37:52 -04:00
Abel Heinsbroek
9637f5c092 change names of new functions to ENgetnodevalues and ENgetlinkvalues 2024-04-24 15:20:59 +02:00
Abel Heinsbroek
4dff3bd054 add ENgetnodesvalues and ENgetlinksvalues methods 2024-04-23 11:31:17 +02:00
Lew Rossman
c24f334208 Update validate.c
Fixes false negative when checking if a tank's min/max levels fall within its volume curve (see issue #767 ).
2024-03-19 14:38:47 -04:00
Lew Rossman
2f4e4e5139 Merge pull request #771 from OpenWaterAnalytics/dev-tank_overflow_fix
Account for mass lost in tank overflow
2024-03-18 13:37:07 -04:00
Lew Rossman
6d6f244a5f Merge pull request #766 from lbutler/update-readme-jan-2024
Update release notes and remove depreciated constants
2024-03-13 09:51:56 -04:00
Lew Rossman
482f658df4 Account for mass lost in tank overflow
This change addresses issue #769.
2024-03-13 09:22:33 -04:00
Lew Rossman
5c90eafdbe Update validate.c
Fixes bug in checking that tank min/max levels are within volume curve.
2024-01-25 12:21:09 -05:00
lbutler
c6ab471b5b Update release notes and remove depreciated constants 2024-01-09 14:14:19 -05:00
Lew Rossman
e7f9e26347 Update validate.c 2023-10-05 14:59:10 -04:00
Lew Rossman
653ffac514 Update input3.c 2023-10-05 12:10:08 -04:00
Lew Rossman
c0700c83ee Refactored validate.c 2023-10-05 11:37:13 -04:00
Lew Rossman
5a03def497 Merge branch 'dev' into dev-EN_openX 2023-10-04 10:09:02 -04:00
Lew Rossman
10d5079d75 Add EN_openX function
EN_openX allows an EPANET input file to be opened even if it has errors. This required re-arranging code, mainly in input3.c, so that default values are assigned to an object before its input line is parsed.
2023-10-04 09:53:05 -04:00
Luke Butler
05c0528862 Update EN_setcurvetype to support EN_VALVE_CURVE 2023-09-15 11:53:02 -04:00
Luke Butler
cfc06321a6 Remove recursion in getclosedlink
The function getclosedlink in report.c uses recursion to find closed links when reporting on disconnections.

In very large networks, it’s possible for the recursion to exhaust the memory on the call stack which then causes EPANET to crash.

If a loop is used instead of recursion, EPANET will not crash with very large disconnections
2023-09-14 16:00:34 -04:00
Sam Hatchett
d0ab568a5d using int/bool convention instead of new enum type 2023-09-13 09:14:57 -04:00
Sam Hatchett
06a43cdb4e adds api support for enabling/disabling controls and rules 2023-09-12 14:51:44 -04:00
Lew Rossman
a2c0ff7889 Fix trace node id parser error 2023-09-11 18:23:49 -04:00
Lew Rossman
6aa2a21327 Change PCV settings from fraction to percent 2023-08-17 14:54:59 -04:00
0tkl
2f63e513f0 fix potential memory leaks
Co-authored-by: Lew Rossman <LRossman@cinci.rr.com>
2023-08-10 12:32:28 +08:00
0tkl
b860f9b16f add a default value to controlIndex 2023-08-09 15:38:41 +08:00
0tkl
434cd68a23 fix potential deref of a null pointer 2023-08-05 01:20:09 +08:00
Lew Rossman
353ba4eb34 Allow API to get/set type of status report
The existing EN_setstatusreport function only allows one to set the level of status reporting and not retrieve this value. A new EN_STATUS_REPORT constant was added, to be used with EN_setoption and EN_getoption, to provide read/write access to the level of status reporting.
2023-07-19 09:15:25 -04:00
Lew Rossman
3acfb6dae3 Added retrieval of emitter flow to the API 2023-07-06 15:35:30 -04:00
Lew Rossman
789d42f248 Merge pull request #732 from OpenWaterAnalytics/dev-controls
Allow simple controls to set valves OPEN/CLOSED
2023-06-08 10:37:45 -04:00
Lew Rossman
a9079b023b Allow simple controls to set valves OPEN/CLOSED 2023-05-13 12:29:35 -04:00
james uber
f709c199bc correct error in adjustpumpparams() where a curveindex was being used instead of the pump index 2023-04-22 17:40:25 -04:00
james uber
7ae9c28e1a setlinkvalue missing a break statement 2023-04-15 12:57:01 -04:00
Lew Rossman
583cca01ca Merge pull request #721 from OpenWaterAnalytics/dev-PDA-coeffs
Use barrier functions for PDA & emitters
2023-04-15 11:01:08 -04:00