Commit Graph

84 Commits

Author SHA1 Message Date
Lew Rossman
1f24209516 Fixes bug in EN_setpipedata
See issue #876 .
2025-09-03 15:11:49 -04:00
Lew Rossman
ebafb87e6a Fix link InitSetting/InitStatus properties 2025-07-25 11:02:40 -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
lbutler
f8f2d74bea Decoupled pressure units from the flow unit system
Decoupled pressure units from the flow unit system, allowing them to be set independently to support mixed-unit conventions (e.g., using LPS for flow and PSI for pressure).
2025-07-03 08:30:43 -04:00
Lew Rossman
30c20770b3 InitSetting added to Link struct
Addresses issue #823.
2025-04-19 12:54:45 -04:00
Lew Rossman
7a1673994c Set/Get node & link tags added 2025-02-19 09:49:09 -05:00
Lew Rossman
b0796f346a Adding leakage model 2024-06-26 11:15:01 -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
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
a9079b023b Allow simple controls to set valves OPEN/CLOSED 2023-05-13 12:29:35 -04:00
Luke Butler
843f1f4e37 Added support for cubic meters per second (CMS) 2023-02-20 09:43:42 -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
2f8561632f Allows string literals as arguments in C++ clients
See issue #651. Also addresses issue #602.
2023-01-29 12:34:58 -05:00
Sam Hatchett
30c511ca78 Merge branch 'dev' into 683-request-better-logging-functionality 2023-01-19 09:01:43 -05:00
Lew Rossman
6db17193f5 New positional control valve added 2022-08-16 11:47:44 -04:00
Sam Hatchett
41887e9016 adds client callback API function 2022-07-27 16:37:49 -04:00
Lew Rossman
afda609223 Adds get/set for default demand pattern to toolkit 2022-01-14 08:50:33 -05:00
Lew Rossman
bca3b99b88 Fixes error in energy usage for tank pumps 2020-09-20 19:37:15 -04:00
Lew Rossman
951c7ce727 Refactor tank mixing zone volume
Addresses issue #597.
2020-07-11 17:12:49 -04:00
Corey McNeish
f358e39728 Make node degree list local to factorize 2020-04-11 11:33:28 -07: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
Lew Rossman
1501204f5f Refactor of hydcoeffs.c
Simplifies and unifies how limit on head gradient at low flow is handled.
2019-10-04 10:01:41 -04:00
Lew Rossman
a89f339525 PDA fixes 2019-07-22 09:50:41 -04:00
Lew Rossman
85e2f2c187 Identifies overflowing tank in Status Report 2019-06-20 15:00:18 -04:00
Lew Rossman
9669742ab3 Adds tank overflow feature 2019-06-17 09:16:04 -04:00
Lew Rossman
efb189ac39 Fix refactor of types.h 2019-05-14 00:00:03 -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
901a802f21 Passing open and close test 2019-04-18 16:16:02 -04:00
Michael Tryby
880bdfffba Work in progress
compiles with warnings, definitely not working
2019-04-12 18:00:36 -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
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
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
628fffc718 Added additional network building features (#367) 2019-01-02 10:33:58 -05:00
Lew Rossman
f1175b1f92 Error reporting fixes and re-formatting (issue #358) 2018-12-15 15:13:19 -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
Michael Tryby
ad4969ea1b Rolling back errormanager 2018-11-19 16:40:40 -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
Lew Rossman
ee335ab077 Fixes bug #172 (adjust controls & rules when node/link added or deleted)
- Also adds new API function EN_deletecontrol
- Updates and re-arranges entries in the VBA and VB.Net headers
2018-10-31 11:32:01 -04:00
Lew Rossman
39fcfa2162 Fixed bug setting pump curve params (#314) and in setting demand categories
-Split off calc. of a pump's curve coeffs. from getpumpparams to updatepumpparams.
- Fixed problem with initializing node demand category when default demand pattern set before node is created.
- Increased MAXLINE to 1024 to accomodate increase in MAXMSG.
- Replaced EN_geterror calls in input2.c with geterrmsg (it's bad form to call API functions in the body of the library)
2018-10-25 09:39:28 -04:00
Lew Rossman
60a79de4a9 Fixed bug in hash.c
A bug in the delete function in hash.c was preventing the unit test of the new set ID API functions from running properly. In fixing this bug the entire hash table code was refactored to make it look more like the mempool service routines. Also the need to copy the string passed into the table's insert function was eliminated.
2018-10-18 10:03:09 -04:00
Lew Rossman
1fce14efb8 Increased size of MAXMSG to 255 (#189) 2018-10-15 11:34:25 -04:00
Lew Rossman
7c021cf533 Fixed water quality mass balance issue (#160) 2018-10-09 12:53:20 -04:00
Elad Salomons
cc21b55b68 Read and write demand categories names
Fixes #290
2018-09-22 11:19:05 +03:00
Lew Rossman
e45a23c4ef More robust method for handling zero/low flows (#164) 2018-09-12 10:38:01 -04:00
Lew Rossman
6e73b6a4f5 Made mempool.c threadsafe (#234) 2018-09-03 10:29:41 -04:00
Michael Tryby
bdc05058ca Resolving merge conflicts 2018-08-27 09:38:46 -04:00