1536 Commits

Author SHA1 Message Date
mariosmsk
532f89d14b Net1.inp have 0 MinorLoss / GUI accepts values zero for MINORLOSS. Similar to the parameter Power of pumps 2020-06-25 20:11:27 +03:00
Elad Salomons
9b42b19f56 Merge pull request #598 from OpenWaterAnalytics/dev_feature_in_control
Dev feature in control
2020-05-31 16:36:45 +03:00
Elad Salomons
d03327cfa5 Merge pull request #596 from jamesuber/dev
API access to incontrols() for information about node/link controls p…

No more comments so I'm merging. Thank you @jamesuber
2020-05-29 22:28:45 +03:00
Elad Salomons
e7ccf5281f Update include files 2020-05-22 21:43:14 +03:00
james uber
949022ed49 API access to incontrols() for information about node/link controls participation
allowing access to incontrols() for getting information about whether a node or link participates in a simple or rule-based control.
2020-05-22 11:45:52 -04:00
Elad Salomons
6af72fd6d1 Merge pull request #594 from eladsal/dev
Fix EN_settankdata for elevation with SI units
2020-04-19 19:17:14 +03:00
Elad Salomons
37342c70b1 Another option for EN_settankdata fix 2020-04-19 18:05:08 +03:00
Lew Rossman
37a58a467c Update epanet.c 2020-04-19 09:25:36 -04:00
Lew Rossman
99f09f1edb A simpler fix to EN_settankdata
Changes 1 line instead of 4.
2020-04-19 09:16:08 -04:00
Elad Salomons
3f515e7ad4 Fix EN_settankdata for elevation with SI units
Fix #593
2020-04-19 09:42:43 +03:00
Elad Salomons
b259f87782 Merge pull request #590 from eladsal/update-vb-bas
Update epanet2.bas
2020-04-19 08:07:58 +03:00
Lew Rossman
241ebe930d Merge pull request #591 from mcneish1/valgrind-issues-dev
Fix use-after-free in Smatrix, test_pda
2020-04-14 13:06:47 -04:00
Lew Rossman
b64e070354 Update project.c 2020-04-13 09:39:58 -04:00
Corey McNeish
ee5e910454 Alloc, free persistent parts of Hydraul in allocdata, rather than in allocmatrix 2020-04-11 11:33:37 -07:00
Corey McNeish
f358e39728 Make node degree list local to factorize 2020-04-11 11:33:28 -07:00
Elad Salomons
6ddea72ee9 Update epanet2.bas 2020-03-29 10:52:08 +03:00
Elad Salomons
d8ba9b11c5 Merge pull request #589 from csweetapple/dev
Allow start time to be set with EN_settimeparam
2020-03-25 09:18:36 +02:00
chrisgs
364ad08bcc Limit EN_STARTTIME parameter value to SECperDAY
Limit `EN_STARTTIME` parameter value to a maximum of `SECperDAY`, and
return an error code if this is exceeded.
2020-03-23 22:14:02 +00:00
chrisgs
21e1e4c019 Allow start time to be set with EN_settimeparam
Add additional case for `EN_STARTTIME` to the `EN_settimeparam`
function.
2020-03-21 17:13:40 +00:00
Elad Salomons
62d6fca577 Merge pull request #587 from eladsal/fix-link
Fix link in README.md
2020-02-17 08:05:19 +02:00
Elad Salomons
c7b32c1acc Fix link in README.md
Link to community.wateranalytics.org was broken
2020-02-15 19:33:57 +02:00
Elad Salomons
3abd02f4ae Merge pull request #585 from Mariosmsk/fix_initsetting583
fix EN_INITSETTING
2020-02-11 21:14:10 +02:00
Lew Rossman
a9ab376aa7 Revert "Replaced status checking for pumps & FCVs"
This reverts commit 3ee30ce019.
2020-02-09 17:25:33 -05:00
Lew Rossman
a3537b767a Revert "Changed benchmark results for EN_getstatistic test"
This reverts commit 7e3d5e1fe0.
2020-02-09 16:58:37 -05:00
mariosmsk
25f9a6f6d1 fix EN_INITSETTING
Co-Authored-By: Lew Rossman <lrossman@outlook.com>
Co-Authored-By: Elad Salomons <selad@optiwater.com>

#583
2020-02-09 22:05:40 +02:00
Lew Rossman
7e3d5e1fe0 Changed benchmark results for EN_getstatistic test 2020-02-07 13:49:54 -05:00
Lew Rossman
3ee30ce019 Replaced status checking for pumps & FCVs
See ReleaseNotes2_3.md.
2020-02-07 10:44:52 -05:00
Lew Rossman
80f9acfe4d Network building enhancements 2020-02-04 10:01:23 -05:00
Sam Hatchett
588a9dad99 resolve conflicts on merge 2019-12-11 14:20:25 -05:00
Abel Heinsbroek
77243b1607 Add author to release notes (#571) 2019-12-11 14:13:01 -05:00
Sam Hatchett
4d8d82ddc2 v2.2
* removing reference to strncpy

* Fixing memory problems with test_toolkit

Fixes memory leaks and some minor refactoring.

* Update test_toolkit.hpp

removing crtdbg.h from header

* Update CMakeLists.txt

Restoring test_net_builder to test_toolkit.exe

* Cleaning up include statements adding crtdbg.h

* Fixing index error in test

* Add more analysis options to the API (issue #425)

* Fixed epanet2_enums.h

* Eliminates use of temporary linked lists to process Patterns & Curves (issue #449)

* Update input2.c

* Bug fix for 2Comp and LIFO tank mixing models (issue #448)

* Triggering build to update benchmarks

* Added new reg tests

Updating reference build id

* Initial commit list

generic linked list

* Update test_list.cpp

Tests are passing

* Update list.h

Adding documentation

* Fix typo

* Fixing bug in head_list

* Fixing indentation

* Fixed memory leak

Fixed memory leak in test_head_list

* Clean up and inline comments

* Updating file headers

* Update list.c

Updating in line comments.

* Update test_list.cpp

* Fixing indent

Spaces not tabs

* Update list.c

Fixing indent

* Update test_list.cpp

Updating file header to reflect proper attribution

* Expanding test

Added test where data is a struct

* Fixing indent

* Work in progress

* Reorganized to contain list abstraction

* Update list.c

* Refactoring head_list and tail_list

Simplifying head and tail list. Adding delete_node() to list API.

* Update test_list.cpp

* Update test_list.cpp

Fixing bug on gcc

* Fixing bug

* Fixing bug on gcc

* Update CMakeLists.txt

Adding test_list to ctest

* 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

* Updating unit tests

* Fixing compilation bug on gcc

* Work in progress

compiles with warnings, definitely not working

* Update demand.h

* Work in progress

Implementing demand_list

* Work in progress

Creating function for validateing element ID strings

* Work in progress

Refactoring cstr_copy and adding test

* Update cstr_helper.c

fixing indentation

* Update cstr_helper.c

Fixing indentation

* Update test_cstrhelper.cpp

Fixed mem leak

* Adding element id validity checks

* Adding element id validity check

Adding checks for element set id functions

* Fixing build warnings on gcc

* Update errror code from 250 to 252

* Work in progress

Implementing generic demand pattern lists. Compiles but does not run.

* Update demand.c

Work in progress

* 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.

* Fixed compilation errors

* Update test_node.cpp

* Create test_demand_data.cpp

* test demand data passing

* Work in progress

Fixing problems when demand lists are null

* Passing open and close test

* get/set demand name are passing

* Updated criteria for valid object ID name

* Work in progress

* Work in progress

Working on demand lists

* Work in progress

Fixing memory leaks
Unit tests passing

* Cleaning up build on gcc

* Cleaning up gcc build

* Fixing bug

* Working on gcc bug

Tests are passing on Appveyor

* Update inpfile.c

Trying to isolate bug

* GCC Bug

* Refactored xstrcpy function

* Update inpfile.c

Testing linux build

* Update epanet.c

Trying to isolate bug

* updating get demand name and write demands

Everything passing locally

* Update test_project.cpp

Isolating bug on gcc

* Isolating bug

Not writing demand section of input file should eliminate it

* Update demand.c

Fixing bug in get_category_name when category_name is NULL

* Restoring write_demands section in saveinpfile

* Update test_demand_data.cpp

Adding index to addnode calls. Fixing indent

* Update demand.c

* 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.

* Update epanet.c

Updating EN_getnodevalue() and EN_setnodevalue() to process the primary demand located at the head of the demand list

* Update demand.c

* Work in progress

code cleanup, addressed issue raised in review, and implemented EN_adddemand()

* Adding key and search to list

* Adding remove node method to generic list

* Adding remove demand method to toolkit

* Fix bug and test remove demand

* Fix problems with setting tank parameters (issue #464 )

* Fixed NULL pointer error, if no label is provided after the rule keyword.

* Create Makefile2.bat

Co-Authored-By: Demetrios G. Eliades <eldemet@users.noreply.github.com>
Co-Authored-By: Elad Salomons <selad@optiwater.com>

* Create LICENSE

* Fixed NULL pointer error, if no label is provided after the rule keyword.
Add NULL guard in freerules function. Use strncat and strncpy to ensure
the buffer lengths are adhered to.

* For "conditional" do delete a node connected to a link

For "conditional" deletion the node is deleted only if all of its links have been explicitly deleted beforehand #473

Co-Authored-By: Lew Rossman <lrossman@outlook.com>

* Create CODE_OF_CONDUCT.md

* Refactors the API's demand editing functions

* Update test_demand.cpp

* Update CODE_OF_CONDUCT.md

* Update rules.c

Fix broken win build script

* Updates to doc files

* Documentation edits

* Update Makefile.bat

Updates on the Microsoft SDK 7.1 compilation script to generate runepanet.exe and to use the \include\epanet2.def

* Update Makefile2.bat

Modified epanet2.exe to runepanet.exe, for consistency.

* Delete epanet2.def

Deleted the redundant `epanet2.def` file in the WindSDK folder

* Minor format change to status report

* Removing status reports from CI testing

* rm WinSDK folder and update Makefiles

Co-Authored-By: Demetrios G. Eliades <eldemet@users.noreply.github.com>

* Restored CI testing of status reports

* 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.

* Fix refactor of types.h

* updates authors

* updates AUTHORS and generator script

* Update run\CMakeLists.txt

* add help file win_build.md

Co-Authored-By: Elad Salomons <selad@optiwater.com>

* move win_build.md to root dir and renaiming to BUILDING.md

* Move BuildAndTest.md to the tools directory

* Update BUILDING.md

* Update BUILDING.md

* Update BUILDING.md

* Fixes problem with findpattern() function (issue #498)

* Change default properties for new pipe created with EN_addlink (issue #500)

* Numerous updates to project documentation

* Adds tank overflow feature

* Updating docs for tank overflow feature

* Updating VB include files

* Update input3.c

* Identifies overflowing tank in Status Report

* Update Makefile.bat

* Update Makefile2.bat

#508

* rethinking the python wrapper (#511)

* renames certain function parameter declarations and removes double pointer call from the deleteproject function

* deprecates conditonal compilation, removes python-specific headers and function renaming

* fixes tests and docs

* fixes test

* PDA fixes

* Minor update to force new CI test

* Another minor change to force another CI test

* Fixes Overflow and PDA tests not being run

* Fix EN_getElseaction and EN_setelseaction

Co-Authored-By: Andreas Ashikkis <andreasashikkis@users.noreply.github.com>

* Add -MT switch for CMake Windows build

* Updates to the docs

* Update BUILDING.md

* Build script updates

* Fixes EN_setlinkvalue bug

* fix in EN_deleteLink

when pipes are deleted via deletelink it also deletes comment of last link

Co-Authored-By: Pavlos Pavlou <pavlou.v.pavlos@ucy.ac.cy>

* rm set to null in functions EN_deletenode, EN_deletelink

* trial actions config

* Update ccpp.yml

* welcome to the Actions beta

* fixes mkstemp file handle-leaking behavior (#529)

* reverts posix include (#533)

... because it is not needed

* Fixes bugs in pump and demand head loss gradients

* Removed dependence on unistd.h in project.c

Travis CI failed because system could not find unistd.h.

* getTmpName() and xstrcpy() made safer

* Fixed use of strncpy in xstrcpy()

* Refactor of hydcoeffs.c

Simplifies and unifies how limit on head gradient at low flow is handled.

* Update ReleaseNotes2_2.md

* Return error if node/link name is too long (#535)

* co-authored with @ehsan-shafiee

* removes errant slashes

* Throws correct error for ID name too long

* Revert "Throws correct error for ID name too long"

This reverts commit 57b4873f5882cb9fd983f7e1e5a703b9e442cd74.

* fixes #534 by bubbling error codes up from add node/link internal functions

* fixes tests on Mac at least

* fixes improper success code

* Error 252 (not 250) returned for ID name too long.

From errors.dat: DAT(252,"invalid ID name")

* Fixes problems with EN_addnode() (#543)

See issue #542 . Also modifies unit test test_node to check that fixup works.

* Adds EN_getresultindex function to the API

See issue #546 . Also fixes a small bug in project.c.

* Adds link vertex get/set functions to the API

* Fixes to EN_addlink and EN_deletelink

* Updates the docs

* Bug fix for EN_setcurve

Adjusts params of any pump that uses the curve whose data is modified by EN_setcurve or EN_setcurvevalue (issue #550 ).

* Bug fix for EN_getrule

Fixes possible seg fault condition in EN_getrule. Also defines EN_MISSING as an API constant since it can be assigned internally to several variables that are retrievable by the API.

* Updating the docs

* Adds error check to EN_setheadcurveindex

See issue #556 .

* Update epanet2.pas

* Incorrect characterd

There was a character ’ instead of ' which created an error when compiling LaTeX.

* fixes a crashing issue in freedata (#559)

The freedata function used cached values for sizes of certain arrays found in the parser struct. However, now that the network is mutable, those values can become invalid. Relying instead on the actual array lengths prevents freeing unallocated memory, or ignoring cleanup on newly created elements.

* Bug fix for valvecheck function

See issue #561

* Restored prior update to project.c that got overwritten

* Fixed editing errors made to project.c

* PDF Guide

PDF users' guide for EPANET, and some minor corrections to readme.md to fix some formatting issues.

* HTML Users Guide

* Fixes a "copy over" bug in input3.c

The copying of one input line token over another was causing a compilation error under Clang. With v2.2 this copying is no longer needed so the line of code in question was simply deleted.

This commit also deletes the HTML and Latex output generated by running Doxygen that got added from the previous update to dev since they don't really belong in a source code repo.

* Correction made to doc files

The output-format.dox file was deprecated and not included in the doxyfile so it was deleted. The description of the format of of the Energy Usage section of the binary output in toolkit-files.dox was corrected.

* Update ReleaseNotes2_2.md

I added the v2.2 contributing authors to the notes. I checked PR's from 2017 and beyond and these were the only names I could find. Please append any one I might have missed.

* Fixes problem with re-opening const. HP pumps

See latest comments in issue #528. Also, the setlinkflow() function was deleted as it was never called anywhere.

* Update README.md (#539)

* Update README.md

* Update README.md

Some section titles were re-named to conform to GitHub guidelines and the OWA info was moved to a CREDITS section.

* Update README.md

Added link to the Community Forum page.

* Replaced OWA copyright with "(see AUTHORS)".

* Update AUTHORS

Copied format used by the OWA-SWMM project.

* Update README.md

The Disclaimer section was edited to reflect that there actually is a "collaborative" connection between USEPA and OWA.

* updates CI badges

* cleanup of readme links and unused files

* possessive vs contraction

* adding contributor to notes
2019-12-10 10:19:36 -05:00
Sam Hatchett
6639ce9b3e adding contributor to notes 2019-12-09 09:56:50 -05:00
Sam Hatchett
c0fe89ceb5 possessive vs contraction 2019-12-07 21:16:58 -05:00
Sam Hatchett
0ca1a0b7a7 cleanup of readme links and unused files 2019-12-07 20:49:21 -05:00
Sam Hatchett
b5eb1e9882 updates CI badges 2019-12-06 10:16:34 -05:00
Sam Hatchett
865a16cec8 Update README.md (#539)
* Update README.md

* Update README.md

Some section titles were re-named to conform to GitHub guidelines and the OWA info was moved to a CREDITS section.

* Update README.md

Added link to the Community Forum page.

* Replaced OWA copyright with "(see AUTHORS)".

* Update AUTHORS

Copied format used by the OWA-SWMM project.

* Update README.md

The Disclaimer section was edited to reflect that there actually is a "collaborative" connection between USEPA and OWA.
2019-12-06 10:05:44 -05:00
Lew Rossman
8d9f85737e Merge pull request #568 from OpenWaterAnalytics/lrossman-Pump_Bug_Fix
Fixes problem with re-opening const. HP pumps
2019-12-05 16:03:31 -05:00
Lew Rossman
d05ea20c9a Fixes problem with re-opening const. HP pumps
See latest comments in issue #528. Also, the setlinkflow() function was deleted as it was never called anywhere.
2019-12-05 10:16:12 -05:00
Lew Rossman
b3a306f69b Merge pull request #567 from OpenWaterAnalytics/lrossman-ReleaseNotesUpdate
Update ReleaseNotes2_2.md
2019-12-05 10:03:32 -05:00
Lew Rossman
21defae4c7 Update ReleaseNotes2_2.md
I added the v2.2 contributing authors to the notes. I checked PR's from 2017 and beyond and these were the only names I could find. Please append any one I might have missed.
2019-12-04 10:56:01 -05:00
Lew Rossman
5288bc88bf Merge pull request #566 from OpenWaterAnalytics/lrossman-doc_correction
Correction made to doc files
2019-12-04 09:23:27 -05:00
Lew Rossman
e11740ce56 Correction made to doc files
The output-format.dox file was deprecated and not included in the doxyfile so it was deleted. The description of the format of of the Energy Usage section of the binary output in toolkit-files.dox was corrected.
2019-12-02 11:26:50 -05:00
Lew Rossman
f18152482c Merge pull request #565 from OpenWaterAnalytics/lrossman-input3_bug_fix
Fixes a "copy over" bug in input3.c
2019-12-02 11:17:13 -05:00
Lew Rossman
3935247e2b Fixes a "copy over" bug in input3.c
The copying of one input line token over another was causing a compilation error under Clang. With v2.2 this copying is no longer needed so the line of code in question was simply deleted.

This commit also deletes the HTML and Latex output generated by running Doxygen that got added from the previous update to dev since they don't really belong in a source code repo.
2019-11-29 15:56:33 -05:00
Demetrios G. Eliades
c16c861789 HTML Users Guide 2019-11-21 16:58:18 +02:00
Demetrios G. Eliades
3259a8c1e1 PDF Guide
PDF users' guide for EPANET, and some minor corrections to readme.md to fix some formatting issues.
2019-11-21 16:55:49 +02:00
Lew Rossman
f87865a849 Merge pull request #562 from OpenWaterAnalytics/lrossman-valvecheck_fix
Bug fix for valvecheck function
2019-11-19 09:40:11 -05:00
Elad Salomons
02173df64c Merge pull request #560 from OpenWaterAnalytics/eldemet-patch-1
Incorrect character causing a LaTeX compilation problem
2019-11-16 20:32:26 +02:00
Lew Rossman
2033ddfc22 Fixed editing errors made to project.c 2019-11-15 12:55:29 -05:00
Lew Rossman
94b6cb28b6 Restored prior update to project.c that got overwritten 2019-11-15 12:50:54 -05:00