Commit Graph

333 Commits

Author SHA1 Message Date
Michael Tryby
b3a9701863 Adding test for getoption 2019-03-01 12:12:10 -05:00
Michael Tryby
a4b2e53768 Adding tests for save and use hydraulics file 2019-02-28 11:14:15 -05:00
Michael Tryby
97ae763d1a Moving getcount in epanet.py and adding test 2019-02-28 09:17:16 -05:00
Michael Tryby
c7d533c6e4 Adding tests for gettitle and saveinpfile 2019-02-28 08:11:59 -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
36b78f28d3 New function clearreport added (see issue #383)
The newly added `gettitle` and `settitle` functions were moved from the Reporting Functions section to the Project (formerly System) Functions section of epanet2.c and epanet.c.
2019-02-08 12:07:56 -05:00
Elad Salomons
140c95214e Merge pull request #385 from eladsal/dev-title
Add new function to get and set title strings
2019-02-07 22:13:40 +02:00
Elad Salomons
ab62d3bb61 Add new function to get and set title strings 2019-02-06 11:45:48 +02:00
Michael Tryby
6a0151b9c7 Adding support for custom epanet_py build target 2019-02-04 14:28:32 -05:00
Michael Tryby
cba9dda5cf Fixing build error gcc / Travis 2019-01-30 14:30:44 -05:00
Michael Tryby
8d12664061 Removing EN_API_FLOAT_TYPE 2019-01-28 11:31:31 -05:00
Michael Tryby
b339ff22ca Merging dev into dev-swig-redux 2019-01-28 11:23:25 -05:00
Michael Tryby
30c9843965 Merge remote-tracking branch 'upstream/dev' into dev-swig-redux 2019-01-28 10:41:23 -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
f673aa2f20 Modifications made to EN_getlinkvalue & EN_setlinkvalue in EPANET.C
1. EN__PUMP_ECOST added to EN_getlinkvalue.
2. Order of cases in switch statement of both EN_getlinkvalue and EN_setlinkvalue changed to match the order of EN_LinkProperty enumeration.
2019-01-11 12:52:09 -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
a66f5a2c92 Checks addded to prevent changing network structure when solver active (#361) 2018-12-18 15:35:06 -05:00
Lew Rossman
f1175b1f92 Error reporting fixes and re-formatting (issue #358) 2018-12-15 15:13:19 -05:00
Michael Tryby
186c17bb15 Adding file headers 2018-12-10 17:30:47 -05:00
Michael Tryby
9e3ecbd17f Merge remote-tracking branch 'upstream/dev' into dev-swig-redux 2018-12-10 17:17:11 -05:00
Michael Tryby
51795d86e9 Adding API for simple and rule based controls 2018-12-10 15:53:38 -05:00
Michael Tryby
fca9c42411 Fixing arg as return with enum type 2018-12-07 16:23:12 -05:00
Michael Tryby
d5de19caa0 Ongoing dev 2018-12-06 17:48:32 -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
5f2cd402ef Merge pull request #354 from LRossman/lrossman-dev
Avoid possible divide by zero in hydcoeffs.c
2018-12-06 10:56:08 -05:00
Michael Tryby
c1adfd514d Fleshing out api for swig wrap 2018-12-04 17:54:39 -05:00
Lew Rossman
107483bee8 Avoid possible divide by zero in hydcoeffs.c 2018-12-04 09:50:01 -05:00
Michael Tryby
b63f232884 Initial commit interface for python wrap 2018-11-30 15:49:28 -05:00
Michael Tryby
76a9dd999c Fixing file header, adding epanet2.c to winbuild 2018-11-30 09:08:38 -05:00
Michael Tryby
b0c7714d72 Keeping legacy api in epanet2.h epanet2.c and moving new api to epanet2_2.h epanet.c 2018-11-29 12:51:47 -05:00
Michael Tryby
be2ca0a9f6 Implmenting Toolkit API versioning 2018-11-29 11:57:51 -05:00
Lew Rossman
20bc6358ff Restored previous parallel link detection method to smatrix.c 2018-11-28 10:01:29 -05:00
Lew Rossman
d3a50dc490 Fixed refactoring bug in EN_setlinkid 2018-11-27 19:25:01 -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
a611832184 Fixing build error 2018-11-19 16:51:39 -05:00
Michael Tryby
ad4969ea1b Rolling back errormanager 2018-11-19 16:40:40 -05:00
Michael Tryby
440230ef6d Rolling back errormanager 2018-11-19 16:33:30 -05:00
Elad Salomons
36972c2a60 Fix for VB header file 2018-11-08 10:09:35 +02:00
Lew Rossman
6397a01363 Merge branch 'dev' into lrossman-dev 2018-11-07 23:19:16 -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
18fb352527 Merge pull request #327 from eladsal/dev-link-nodes
Add ENsetlinknodes to DEF file and add a function check
2018-10-31 18:23:03 +02: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
Elad Salomons
4394c53f9b Add ENsetlinknodes to DEF file and add a function check 2018-10-29 17:20:45 +02:00
Lew Rossman
c2b16a6466 Deleted previous, commented-out version of EN_setlinktype 2018-10-28 20:07:54 -04:00
Lew Rossman
8514929622 Rewrite of EN_setlinktype function (#305)
- Complete rewrite of EN_setlinktype with link index argument passed by reference
- New unit test of EN_setlinktype added
- New function EN_setlinknodes added
2018-10-28 16:58:43 -04:00
Lew Rossman
320dec3ff7 Replaced main() for runnable version of the library 2018-10-27 11:00:00 -04:00
Lew Rossman
9d0b738e77 Removed writecon function and all calls to it 2018-10-27 09:36:21 -04:00