Commit Graph

38 Commits

Author SHA1 Message Date
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 38278f7d46 Fixed use of strncpy in xstrcpy() 2019-09-30 15:51:17 -04:00
Lew Rossman 3300ef00cb getTmpName() and xstrcpy() made safer 2019-09-30 14:05:38 -04:00
Lew Rossman f2ef979d95 Removed dependence on unistd.h in project.c
Travis CI failed because system could not find unistd.h.
2019-09-26 11:18:39 -04:00
Lew Rossman da1253f4ea Fixes bugs in pump and demand head loss gradients 2019-09-26 11:01:01 -04:00
Sam Hatchett 647abd71c1 fixes mkstemp file handle-leaking behavior (#529) 2019-09-25 10:47:38 -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 cf97cf8c9c Work in progress
code cleanup, addressed issue raised in review, and implemented EN_adddemand()
2019-04-23 17:52:11 -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
michaeltryby f19d43d3a4 Merge branch 'dev' of https://github.com/OpenWaterAnalytics/EPANET into dev-list 2019-04-22 13:36:44 -04:00
Lew Rossman d985a69248 Refactored xstrcpy function 2019-04-20 11:54:33 -04:00
Michael Tryby e9650d2d6d Work in progress
Fixing memory leaks
Unit tests passing
2019-04-19 21:21:58 -04:00
Lew Rossman a4ac34d5d6 Updated criteria for valid object ID name 2019-04-18 17:12:56 -04:00
Michael Tryby bf519fdd94 Work in progress
Fixing problems when demand lists are null
2019-04-18 14:24:30 -04:00
Lew Rossman 1583bea154 Return object index from EN_addnode and EN_addlink (issue #432)
Adds an output argument to EN_addnode and EN_addlink that returns the index of the newly added object.
Also refactors the validity check on object ID names.
2019-04-18 07:00:07 -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 9c4665a661 Fixes memory leak in EN_addnode() (#455)
* Fixing memory leak in EN_addnode()

* Separating test_net_builder from test_toolkit

Making test_net_builder a standalone test

* Removing BOOST_TEST_MAIN

* Work in progress
2019-04-11 18:04:20 -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
Michael Tryby 9da7e9a81b Cleaning up build on gcc 2019-04-03 10:29:10 -04:00
Lew Rossman 18f65eb8b0 Replace fixed-sized comment strings with dynamic strings 2019-03-17 19:54:51 -04:00
Lew Rossman 6e13d7e3aa Refactoring how the binary output is closed
This change implements the fix suggested by @gonccalo.
2019-03-06 11:14:03 -05:00
Lew Rossman 3ebb1831d7 Another attempt to fix closing/opening of output project 2019-03-06 10:44:03 -05:00
Lew Rossman 8765dfa3ab Initialize all file pointers to NULL in initpointers 2019-03-05 20:50:34 -05:00
Lew Rossman 324487ba86 Opening & closing output file in writeresults 2019-03-05 19:40:30 -05:00
Lew Rossman f2c0718819 Refactored closing/opening of output file 2019-03-05 16:15:33 -05:00
Lew Rossman 692955e3d2 Give external apps access to binary output file (#407) 2019-03-05 09:23:49 -05:00
Lew Rossman fcbbbf9b2e Adds new pattern, curve and reporting functions to API 2019-02-20 12:43:32 -05:00
Lew Rossman 3eb9a68783 Fixes win_build and VS/cmake build problems 2019-02-11 14:30:15 -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 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
Lew Rossman fa80bec8bb Included error number as part of error message (issue #357) 2018-12-06 11:40:59 -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