Commit Graph

70 Commits

Author SHA1 Message Date
Lew Rossman
b86dde98e3 Updating docs for added pressure units 2025-07-13 17:09:07 -04:00
lbutler
3d1d6496c9 Add support for bar and feet as pressure units, fix psi or m for emitters 2025-07-04 16:10:01 -04:00
Marios S. Kyriakou
fbfe62d21b Update input3.c 2025-05-14 18:00:16 +03:00
Lew Rossman
a9b5cc7124 Update input3.c 2025-04-19 13:44:59 -04:00
Lew Rossman
30c20770b3 InitSetting added to Link struct
Addresses issue #823.
2025-04-19 12:54:45 -04:00
Lew Rossman
6468ba9545 Include curve type in input file 2025-03-11 11:54:12 -04:00
Lew Rossman
7a1673994c Set/Get node & link tags added 2025-02-19 09:49:09 -05:00
Lew Rossman
70d5483361 Add read/write of disabled controls to input file 2025-02-11 15:38:30 -05:00
Lew Rossman
b0796f346a Adding leakage model 2024-06-26 11:15:01 -04: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
Lew Rossman
653ffac514 Update input3.c 2023-10-05 12:10:08 -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
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
Luke Butler
843f1f4e37 Added support for cubic meters per second (CMS) 2023-02-20 09:43:42 -05:00
Luke Butler
3856a6310d Fixes incorrect hour set with >9 input tokens
If you create a simple control with nine or more input tokens, the logic skips over assigning the hour variable and EPANET will activate the control at hour zero.
2023-02-15 14:46:39 -05:00
Lew Rossman
847fa82139 Add emitter backflow option
Adds a global hydraulic option to allow backflow or not through emitter elements. To maintain backward compatibility the default is YES.
2023-02-05 15:16:20 -05:00
Lew Rossman
f60102105a Ignore errors in coords. read from file
Ignores errors when reading node & link vertex coordinates from an input file. Also when saving a project to an input file, the [DEMANDS] section only includes non-zero demands.
See issues #603 and #174 .
2023-01-26 12:50:26 -05:00
Lew Rossman
6db17193f5 New positional control valve added 2022-08-16 11:47:44 -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
Elad Salomons
b1255dead8 Fix check for roughness coefficient
Fix check for roughness coefficient
2021-06-15 16:15:54 +03:00
Lew Rossman
951c7ce727 Refactor tank mixing zone volume
Addresses issue #597.
2020-07-11 17:12:49 -04:00
Lew Rossman
3935247e2b Fixes a "copy over" bug in input3.c
The copying of one input line token over another was causing a compilation error under Clang. With v2.2 this copying is no longer needed so the line of code in question was simply deleted.

This commit also deletes the HTML and Latex output generated by running Doxygen that got added from the previous update to dev since they don't really belong in a source code repo.
2019-11-29 15:56:33 -05:00
Lew Rossman
ce2a27f38e Bug fix for valvecheck function
See issue #561
2019-11-15 11:53:09 -05:00
Lew Rossman
7aadc83ddf Adds link vertex get/set functions to the API 2019-10-29 16:33:40 -04:00
Lew Rossman
b640a8685c Adds EN_getresultindex function to the API
See issue #546 . Also fixes a small bug in project.c.
2019-10-26 11:25:09 -04:00
Sam Hatchett
5f7fd55a36 Return error if node/link name is too long (#535)
* co-authored with @ehsan-shafiee

* removes errant slashes

* Throws correct error for ID name too long

* Revert "Throws correct error for ID name too long"

This reverts commit 57b4873f5882cb9fd983f7e1e5a703b9e442cd74.

* fixes #534 by bubbling error codes up from add node/link internal functions

* fixes tests on Mac at least

* fixes improper success code

* Error 252 (not 250) returned for ID name too long.

From errors.dat: DAT(252,"invalid ID name")
2019-10-09 10:47:45 -04:00
Lew Rossman
a89f339525 PDA fixes 2019-07-22 09:50:41 -04:00
Lew Rossman
d17a7df956 Update input3.c 2019-06-19 11:00:23 -04:00
Lew Rossman
9669742ab3 Adds tank overflow feature 2019-06-17 09:16:04 -04:00
Lew Rossman
40c39fd3c6 Fixes problem with findpattern() function (issue #498) 2019-05-24 10:33:36 -04:00
Lew Rossman
c9b836973e Removes _DEBUG directives from all source files
This commit removes the #ifdef _DEBUG statements at the top of all source code files per issue #482. It also updates the doc files to stress that the speedup observed for hydraulic analysis with the MMD node re-ordering method only applies to single period runs.
2019-05-13 23:49:19 -04:00
Lew Rossman
365ab00dcb Refactors the API's demand editing functions 2019-05-09 10:26:40 -04:00
Michael Tryby
5d3eeb91d9 Reverted handling of default pattern
When creating demands, no pattern is marked with a zero. Then when data is adjusted it gets updated to default.
2019-04-23 11:44:02 -04:00
Michael Tryby
7537be1ec9 Work in progress
Working on demand lists
2019-04-19 18:01:06 -04:00
Michael Tryby
901a802f21 Passing open and close test 2019-04-18 16:16:02 -04:00
Michael Tryby
c659c70817 Work in progress
Implementing demand_list
2019-04-15 13:35:37 -04:00
Michael Tryby
cf1fc43a4d Merge branch 'dev' of https://github.com/OpenWaterAnalytics/EPANET into Mariosmsk-fix_bug_getdemandname 2019-04-08 15:22:16 -04:00
Lew Rossman
edcd4b69c7 Eliminates use of temporary linked lists to process Patterns & Curves (issue #449) 2019-04-05 13:02:39 -04:00
Michael Tryby
84bf6f98d0 Cleaning up include statements adding crtdbg.h 2019-04-03 15:55:23 -04:00
mariosmsk
08799eb276 updates
replaced MAXMSG with MAXID
added a check if demandName is too long
2019-03-26 17:19:08 +02:00
Lew Rossman
18f65eb8b0 Replace fixed-sized comment strings with dynamic strings 2019-03-17 19:54:51 -04:00
Lew Rossman
0cfa45e52e New updates to address compiler warnings (issue #370)
In addition to addressing compiler warnings, argument names in the API function prototypes were made more consistent and descriptive. Also additional Doxygen comments were added in preparation for producing a more thorough documentation of the API.
2019-01-19 16:56:19 -05:00
Lew Rossman
dd376692ad Floating pt. args in thread-safe API changed to doubles (Issue #365) 2019-01-09 15:14:10 -05:00
Lew Rossman
628fffc718 Added additional network building features (#367) 2019-01-02 10:33:58 -05:00
Lew Rossman
3ce0361c1d Network validity checks added to openhyd()
Checks on illegal valve connections made whenever API creates a new link, changes its end nodes, or changes its type.
2018-12-20 08:36:05 -05:00
Lew Rossman
f1175b1f92 Error reporting fixes and re-formatting (issue #358) 2018-12-15 15:13:19 -05:00