Commit Graph

62 Commits

Author SHA1 Message Date
0tkl
56c44c04f6 fix typos in code comments
remove duplicate words from a comment
2025-05-14 17:09:42 +08: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
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
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
a9079b023b Allow simple controls to set valves OPEN/CLOSED 2023-05-13 12:29:35 -04: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
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
afda609223 Adds get/set for default demand pattern to toolkit 2022-01-14 08:50:33 -05:00
Lew Rossman
951c7ce727 Refactor tank mixing zone volume
Addresses issue #597.
2020-07-11 17:12:49 -04:00
Lew Rossman
7aadc83ddf Adds link vertex get/set functions to the API 2019-10-29 16:33:40 -04:00
Lew Rossman
9669742ab3 Adds tank overflow feature 2019-06-17 09:16:04 -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
michaeltryby
ce70d144ce Restoring write_demands section in saveinpfile 2019-04-22 13:13:38 -04:00
michaeltryby
c98a43e72c Isolating bug
Not writing demand section of input file should eliminate it
2019-04-22 12:47:52 -04:00
michaeltryby
d34ac67172 updating get demand name and write demands
Everything passing locally
2019-04-22 12:14:33 -04:00
michaeltryby
b80b4ed09c Update inpfile.c
Testing linux build
2019-04-22 10:52:04 -04:00
Michael Tryby
6a084cc764 Update inpfile.c
Trying to isolate bug
2019-04-19 22:35:15 -04:00
Michael Tryby
8761543395 Working on gcc bug
Tests are passing on Appveyor
2019-04-19 22:24:31 -04:00
Michael Tryby
e2e12fab22 Cleaning up gcc build 2019-04-19 21:51:55 -04:00
Michael Tryby
405822cdf6 Cleaning up build on gcc 2019-04-19 21:34:25 -04:00
Michael Tryby
e9650d2d6d Work in progress
Fixing memory leaks
Unit tests passing
2019-04-19 21:21:58 -04:00
Michael Tryby
109276e379 Work in progress
Implementing generic demand pattern lists. Compiles but does not run.
2019-04-17 17:24:34 -04:00
Michael Tryby
927cf9770e merging upstream dev 2019-04-03 16:40:58 -04:00
Michael Tryby
84bf6f98d0 Cleaning up include statements adding crtdbg.h 2019-04-03 15:55:23 -04:00
Lew Rossman
83ffc1cfc7 Removed the EN_DEFDEMANDPAT option
See issue #429. Also allowed the EN_HEADLOSSFORM option to be changed if the solver is not active.
2019-04-03 10:25:37 -04:00
Lew Rossman
6a4b95f4d5 Bug fixes 2019-04-02 22:21:05 -04:00
Lew Rossman
18f65eb8b0 Replace fixed-sized comment strings with dynamic strings 2019-03-17 19:54:51 -04:00
Lew Rossman
03f41d567d Set InFile to NULL after closing it 2019-03-09 10:52:59 -05:00
Lew Rossman
e5ec4eecab Fixes writing auxiliary data for deleted elements to a saved input file (#411) 2019-03-08 16:41:12 -05: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
9a540cc0f4 Code cleanup
1. Added a standard header to each code module and removed obsolete comments.
2. Re-named several of the sub-structs in the project struct and re-arranged some of their contents.
3. Re-named _defaultModel to _defaultProject.
4. Removed the need to call EN_createproject and EN_deleteproject when working with the default project.
5. Made X & Y coords. part of Snode properties instead of a separate struct.
6. Moved the non-API functions in epanet.c into a new module named project.c.
7. Re-factored the quality module so that it uses the same nodal adjacency lists as the hydraulics solver.
8. Re-factored the sparse matrix module (smatrix.c) to be more memory efficient.
9. Restricted line lengths to < 90 columns.
10. Grouped the placement of functions in EPANET2.H and EPANET.C by category.
2018-11-27 14:22:06 -05:00
Lew Rossman
7443cea9d4 Fixes #172 (adjust controls when node/link is deleted) & EN_addrule added
- Deleting controls with node/link deletion made conditional.
- New EN_addrule function added along with a test file.
- Rule structures re-named & rules.c heavily modified.
- Issue with exceeding limit on number of temporary file names fixed.
- VB declaration and DEF files updated.
2018-11-07 23:09:47 -05:00
Elad Salomons
cc21b55b68 Read and write demand categories names
Fixes #290
2018-09-22 11:19:05 +03:00
Michael Tryby
bec729a669 Fixing compiler warnings 2018-09-13 10:48:55 -04:00
Lew Rossman
b3e26b9ac8 Resolved conflict in inpfile.c 2018-08-13 10:11:34 -04:00
Lew Rossman
3bd2d4a800 Merge branch 'contributor-lr' of https://github.com/LRossman/EPANET into contributor-lr 2018-08-13 10:09:44 -04:00
Lew Rossman
a73d9235e7 Fixed max. flow change node ID in Status Report 2018-08-13 10:04:24 -04:00
Elad Salomons
d94e1643bf Update Windows build script and VB header file
Also save HeadErrorLimit and FlowChangeLimit only if they are used.
2018-08-13 09:19:05 +03:00
Lew Rossman
b5e3986e6b Pressure Dependent Demands added to address issue 163 2018-08-09 10:42:47 -04:00
Elad Salomons
f86df2291a Saving HeadErrorLimit and FlowChangeLimit only if they are used
To help a bit with backward computability the two new parameters will be saved to the INP file only if values were set for them.
2018-06-21 10:20:16 +03:00
Lew Rossman
b3ab8ea2c7 Addresses issue #161
Adds new options HEADERROR and FLOWCHANGE to provide more rigorous criteria for hydraulic convergence. Also breaks HYDRAUL.C into 3 separate files to improve code readability.
2018-06-16 11:02:18 -04:00