Commit Graph
100 Commits
Author SHA1 Message Date
Elad Salomons c1c80da667 Add APIs to get\set demand categories names 2018-09-26 11:15:37 +03:00
Elad SalomonsandGitHub 1e42b7f70d Merge pull request #291 from eladsal/dev-dem-cat
Read and write the demand categories names
2018-09-25 16:38:51 +03:00
Elad Salomons fbaf2a6061 Update release notes
Added placeholders for new API functions, general changes, new definitions and list of contributing authors
2018-09-22 11:29:56 +03:00
Elad Salomons cc21b55b68 Read and write demand categories names
Fixes #290
2018-09-22 11:19:05 +03:00
Elad SalomonsandGitHub 054c48c48a Merge pull request #287 from eladsal/dev-default-pattern
Add option to get\set default demand pattern
2018-09-21 17:22:28 +03:00
Elad Salomons dad11cce8d Add option to get\set default demand pattern
also updates the net builder test
2018-09-15 14:22:20 +03:00
Elad SalomonsandGitHub 902dac953f Merge pull request #278 from eladsal/net-builder-es
Test  for the net builder functions
2018-09-13 23:22:20 +03:00
Elad Salomons 8e96d1e7a3 Fixing casting of chars (take 2) 2018-09-13 17:21:33 +03:00
Elad Salomons 735811dd60 Revert "Fixing char casting in test file"
This reverts commit 8d5d20f542.
2018-09-13 16:17:06 +03:00
Elad Salomons 8d5d20f542 Fixing char casting in test file 2018-09-13 15:33:12 +03:00
Elad Salomons 7cf8d53356 Explicitly set demant patterns for junctions
This is since there is currently no way to set the default demand pattern. Should be fixed in #280 and then the test can be changed.
2018-09-06 12:07:14 +03:00
Elad Salomons 40a53718cc Fix EN_setnodevalue for EN_MINLEVEL
Vmin was not updated correctly
2018-09-06 12:01:09 +03:00
Elad Salomons 102ac90a98 Adding last test 2018-09-05 13:56:59 +03:00
Elad Salomons d46dd1a182 Added documentation 2018-09-05 13:56:18 +03:00
Elad Salomons ad3b26d727 Fail the test... 2018-09-05 09:37:21 +03:00
Elad Salomons 8687af337f Initial net builder test 2018-09-05 09:33:21 +03:00
Elad SalomonsandGitHub 756e8be735 Merge pull request #265 from eladsal/dev-control
Add EN_addcontrol function
2018-09-05 07:42:02 +03:00
Elad Salomons 0f296db492 Initialize node and link comments in add functions 2018-09-04 21:15:57 +03:00
Elad Salomons fcbb47251e Fix old function calls 2018-09-04 08:26:22 +03:00
Elad Salomons 7957864d62 Another fix for unit test 2018-09-03 14:10:09 +03:00
Elad Salomons c78aa9df99 Fix for unit test 2018-09-03 13:52:37 +03:00
Elad Salomons 1b23f91f72 Unit test for EN_addcontrol 2018-09-03 13:48:18 +03:00
Elad Salomons d09548992f Add EN_addcontrol function 2018-09-03 12:35:39 +03:00
Elad Salomons 5d241e2fbd Create headers for EN_addcontrol 2018-09-03 08:18:42 +03:00
Elad Salomons 0b9dd8d29a Minor fix for VB header file
type is a reserved keyword in VB
2018-09-03 07:44:37 +03:00
Elad SalomonsandGitHub 25db9cfe8f Merge pull request #242 from Mariosmsk/pr86
add ENsetdemandpattern. Closes #241
2018-08-31 06:51:39 +03:00
Elad Salomons 74d68a884c Fix typo 2018-08-30 18:05:39 +03:00
Elad SalomonsandGitHub 7d8d780a8b Merge branch 'dev' into pr86 2018-08-30 17:55:35 +03:00
Elad SalomonsandGitHub 7d374338a7 Merge pull request #250 from eladsal/dev-232
Add legacy ENinit API and set status for new links in EN_addlink
2018-08-30 12:47:27 +03:00
Elad SalomonsandGitHub cff7ca7433 Merge pull request #248 from OpenWaterAnalytics/dev-231
Fix EN_addpattern and add test for the function
2018-08-30 12:46:56 +03:00
Elad Salomons dbdafd6352 Set status for new links in EN_addlink
Status is OPEN for pumps\pipes\CV and ACTIVE for valves. Closes #173
2018-08-29 22:31:28 +03:00
Elad Salomons bcd6877935 Add legacy ENinit API
Closes #232
2018-08-29 22:26:32 +03:00
Elad SalomonsandMarios S. Kyriakou f3d680dc54 Fix test_addpattern test
Thanks @mariosmsk

Co-Authored-By: Marios S. Kyriakou <mariosmsk@gmail.com>
2018-08-29 18:12:25 +03:00
Elad Salomons edf4a09ebe Fix EN_addpattern
Closes #231. Also adds unit test for the function.
2018-08-29 15:14:49 +03:00
Elad SalomonsandGitHub da8522b553 Merge pull request #236 from Mariosmsk/issue235
add hydstatus.c in win_build file to fix #235
2018-08-27 23:18:29 +03:00
Elad SalomonsandGitHub 13011ae71c Merge pull request #229 from Mariosmsk/dev-issue228
Syntax for the epanet executable, thanks @Mariosmsk
2018-08-27 09:32:49 +03:00
Elad SalomonsandGitHub 6ab76efc5a Merge pull request #226 from Mariosmsk/dev-epanet
fix addnode, thanks @Mariosmsk
2018-08-27 09:21:47 +03:00
Elad Salomons a2fdd86a4d Updating windows build script 2018-08-23 23:20:16 +03:00
Elad Salomonsandmilad ghiami 761199b08e Added ENgetcurvetype API
Also update curve type on EN_setheadcurveindex.

Co-Authored-By: milad ghiami <milad-ghiami@users.noreply.github.com>
2018-08-20 21:10:49 +03:00
Elad Salomons 634651d4e6 Add option to get pump's constant power and speed
Details in #215
2018-08-18 21:54:52 +03:00
Elad Salomons 99e7151172 Add option to get link state
Add EN_STATE to ENgetlinkvalue. Related to #218
2018-08-17 15:43:53 +03:00
Elad Salomons e06368eca0 Adtional chnage for #208 2018-08-15 16:45:51 +03:00
Elad Salomons 4e48c31147 Fix PumpType and CurveType enums
Also adds a general \default curve type. Fixes #208.
2018-08-15 07:37:19 +03:00
Elad SalomonsandGitHub 5d6d0ca933 Merge branch 'dev' into contributor-lr 2018-08-13 11:07:10 +03: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
Elad Salomons 528e99a791 Update win make file to include genmmd.c 2018-07-17 07:17:33 +03: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
Elad Salomons c41e140b6a Update VB header files 2018-06-19 11:16:32 +03:00
Elad Salomons 42f70f579f Remove strange string from types.h and fix win_build make file 2018-06-17 07:48:25 +03:00
Elad Salomons 80a0acc26b Set default pattern for new junctions
Also fix an `ENgetqualtype` function call to include the project pointer
2018-04-18 08:29:22 +03:00
Elad Salomons a46652f47c Fix bug when adding a junction 2018-04-17 21:46:09 +03:00
Elad Salomons 4415d8c4a1 Revert "Merge branch 'dev' of https://github.com/OpenWaterAnalytics/EPANET into dev"
This reverts commit 8fca63294d, reversing
changes made to b85aff9fc9.
2018-04-09 15:03:03 +03:00
Elad Salomons 8fca63294d Merge branch 'dev' of https://github.com/OpenWaterAnalytics/EPANET into dev 2018-04-09 15:02:19 +03:00
Elad Salomons b85aff9fc9 Change how demand categories linked-list is constructed (appending instead of prepending)
Fix #150
This wasn't changed but one should note that the default pattern is used and saved if none assigned to a demand
2018-04-09 15:01:27 +03:00
Elad Salomons dcd1c6dd10 Fix VB header file and win build script 2018-01-18 13:58:26 +02:00
Elad Salomons 831583a349 Revert "Fix VB header file and win build script"
This reverts commit 2b60bec5b5.
2018-01-18 13:55:48 +02:00
Elad Salomons 2b60bec5b5 Fix VB header file and win build script 2018-01-18 13:55:22 +02:00
Elad Salomons 5eead5ae40 Fix quality conversion factor error in ENsetqualtype
Reported here:

http://community.wateranalytics.org/t/difference-in-water-age-calculated-in-epanet-and-in-matlab-using-epanet-matlab-toolkit/406/12
2017-06-15 16:21:39 +03:00
Elad Salomons a00269e39a Added comment for 3c78856
Added comment for 3c78856
2017-05-01 13:28:59 +03:00
Elad Salomons 3c788567a4 Fix ENsetqualtype to set node initial values
When changing from CHEM to AGE or TRACE, nodes initial quality values
must be returned to their original ones. Reported by R.T., CSIRO AU -
thanks!
2017-05-01 13:25:59 +03:00
Elad Salomons 8ab0f06ccc Added option to retrieve the pumps price pattern
Added to ENgetlinkvalue function like the speed\status pattern. use the
new EN_PRICEPATTERN constant.
2017-04-13 12:14:32 +03:00
Elad SalomonsandGitHub 09bf10d4a7 Merge pull request #89 from OpenWaterAnalytics/dev-rule-apis
Merge dev-rule-apis into dev
2016-11-21 21:31:17 +02:00
Elad Salomons e1da9bc9d7 Fix duplicate w_POWER definition
Fix duplicate w_POWER definition and some house keeping. Tested the new
commit by @AngelaMarchi from #87, all results are the same as version
2.1.
2016-11-09 16:37:57 +02:00
Elad SalomonsandGitHub bca5409952 Merge pull request #87 from AngelaMarchi/ChangingRuleBased_v2
Thanks @AngelaMarchi
2016-11-08 12:00:20 +02:00
Elad Salomons ab4622b276 Updated more float types in function APIs
Updated APIs calls to support EN_API_FLOAT_TYPE and few updates to the
DEF file
2016-10-10 11:45:02 +03:00
Elad Salomons 9942f6761d Updated def file and float types in function APIs
Added the new funcions to the DEF file.
Updated VB headers from Double to Single
Changed a few APIs calls to support EN_API_FLOAT_TYPE - this needs more
work for the rest of the new functions
2016-09-24 12:28:20 +03:00
Elad SalomonsandGitHub 98b86cd014 Merge pull request #84 from AngelaMarchi/ChangingRuleBased
Changing rule based
2016-09-23 14:00:34 +03:00
Elad SalomonsandGitHub 8b4a03d349 Merge pull request #75 from Mariosmsk/dev
Added reservoirs in EN_TANKCOUNT header comment
2016-08-18 15:04:42 +03:00
Elad Salomons 773705e3d2 Consistency change in ENgetcurve function call 2016-07-21 17:07:50 +03:00
Elad Salomons 754d24c118 Small fix to VB header file
and consistency in ENgetcurve function call
2016-07-21 17:04:29 +03:00
Elad Salomons e42d59e754 Revert "Small VB header fix"
This reverts commit c81d2c6954.
2016-07-21 17:01:38 +03:00
Elad Salomons c81d2c6954 Small VB header fix
and consistency in ENgetcurve function call
2016-07-21 17:00:33 +03:00
Elad SalomonsandGitHub 98e9a31eb3 Merge pull request #69 from eldemet/dev-2.1-windsdk
Windows compilation using SDK
2016-07-15 10:46:28 +03:00
Elad Salomons 1c0690837f Fix for avgqual function
Due to changes in the order initsegs was called the links average
quality value, for the initial time step, was wrong. This was found in
issue #16
2015-12-18 13:34:04 +02:00
Elad Salomons 32fa8feda7 Fix ENgetheadcurveindex VB header 2015-12-12 21:23:07 +02:00
Elad Salomons ec04b7f535 Initial commit of VB6 code to perform comparison of binary output files
Related to #16
2015-12-10 22:57:16 +02:00
Elad Salomons 19f04fb8b3 Add WIN build for linked EXE
Now the WIN build script supports two options: one is a standalone EXE
were the entire code base is compiled into one EXE file and the second
is an EXE which is linked to the DLL
2015-12-09 21:55:16 +02:00
Elad Salomons 99a215b88a Change VERSION to ENGINE_VERSION
Also changed it form 200 to 201 as some changes were made to the engine
in 2.1.

Closes #27
2015-12-07 22:18:05 +02:00
Elad Salomons 3c006d724e Add more checks for ENsetnodevalue tank properties
Work in progress for issue #29
2015-12-06 13:01:20 +02:00
Elad Salomons 4e965f1dd7 Merge pull request #45 from mauriziocingi/dev-2.1
issue #44 memory leak
2015-12-01 13:10:28 +02:00
Elad Salomons 395533c53d Remove hard coded version number
This should close #17
2015-11-29 22:33:30 +02:00
Elad Salomons 096167af8b Change ENgetheadcurve to ENgetheadcurveindex
Closes #31
2015-11-28 00:21:36 +02:00
Elad Salomons 942a3f2860 Fix typo on vb.net header file 2015-09-29 23:23:14 +03:00
Elad Salomons 8be1fcffd6 Fix header file 2015-09-24 12:55:29 +03:00
Elad Salomons 322a3cb463 Added pump's type constants to header files 2015-09-23 15:31:29 +03:00
Elad Salomons f894ade5ee Fix case when no section at top of input file
This fixes issue #13
2015-09-20 22:44:31 +03:00
Elad Salomons bdcf3d77d5 Fix header typo 2015-09-20 21:57:09 +03:00
Elad Salomons 472d9dd35b Added curves SET functions
ENsetcurvevalue, ENsetcurve and ENaddcurve
This should close issue #9
2015-09-18 14:54:43 +03:00
Elad Salomons 02a42fe16b Added curve GET functions
ENgetcurveindex, ENgetcurveid, ENgetcurvelen and ENgetcurvevalue. This
is for issue #9
2015-09-18 13:03:53 +03:00
Elad Salomons a31e4242f3 Update sample networks 2015-09-16 23:32:14 +03:00
Elad Salomons c23c846cd8 replace strlcpy with strncpy 2015-09-15 22:38:13 +03:00
Elad Salomons 2c46a002ba Changed coordinates are saved to INP
Added a flag which controls the loading of coordinates at epanet.c line
213.
When set to TRUE coordinates are loaded and users can use the ENgetcoord
and ENsetcoord functions. Changes are then saved when ENsaveinpfile is
called.
When set to FALSE coordinates are not loaded and can't be retrieved or
changed. When saved, the COORD section is copied from the original INP
file.
2015-09-13 12:56:28 +03:00
Elad Salomons 913f48f11a minor fix to VB6 & VBA include file 2015-09-13 09:56:21 +03:00
Elad Salomons c12f901454 added ENsetcoord function
also minor fix to include files
2015-09-13 09:53:21 +03:00
Elad Salomons 4d6bcef623 rewrite the coordinate getter
currently controlled from input2.c lines 297-298. will need to add a
flag to not load the coordinates.
2015-09-12 16:34:52 +03:00
Elad Salomons 186f21f9a7 update coord struct 2015-09-12 11:54:57 +03:00
Elad Salomons f9ea14e57a Fix HEAD and HEADLOSS results in report file 2015-08-20 21:59:12 +03:00
Elad Salomons 6878e046ed Removed old and unused code
A bit of code cleaning
2015-08-07 12:37:05 +03:00
Elad Salomons d0c3f59f34 Added missing parameters in the REPORT section
The MESSAGES and FILE options were not saved
2015-08-05 14:15:27 +03:00
Elad Salomons a3c7eaae15 Minor addition to vb header files 2015-07-31 14:41:18 +03:00