Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
40982c7
2.3 library update
ichrys03 Aug 8, 2024
cd6f469
Update 2.3 EN_setcurvetype (api)
ichrys03 Aug 8, 2024
5191749
update 2.3 def EN_setvertex api
ichrys03 Aug 8, 2024
a238034
update 2.3 EN_timetonextevent api
ichrys03 Aug 8, 2024
2890262
2.3 EN_getcontrolenabled api
ichrys03 Aug 8, 2024
9140058
2.3 EN_setcontrolenabled api
ichrys03 Aug 8, 2024
b469b2c
2.3 EN_getruleenabled api
ichrys03 Aug 8, 2024
203bd4e
2.3 EN_setruleenabled api
ichrys03 Aug 8, 2024
36ee4d8
2.3 EN_openX api
ichrys03 Aug 8, 2024
0b68449
2.3 EN_getlinksvalues api
ichrys03 Aug 8, 2024
e56468c
2.3 EN_loadpatternfile api
ichrys03 Aug 8, 2024
838847e
setCurvetype()
ichrys03 Aug 8, 2024
2908856
2.3 setvertex()
ichrys03 Aug 8, 2024
9bf105e
2.3 timetonexteven
ichrys03 Aug 8, 2024
e240a89
2.3 getcontrolenabled()
ichrys03 Aug 8, 2024
bb6e63c
2.3 setcontrolenabled()
ichrys03 Aug 8, 2024
2845ae6
2.3 getruleenabled()
ichrys03 Aug 8, 2024
d8bb7c4
2.3 setruleenabled()
ichrys03 Aug 8, 2024
a3bb023
2.3 openX()
ichrys03 Aug 9, 2024
7c7abb9
2.3 loadpatternfile()
ichrys03 Aug 9, 2024
1201e3a
2.3 getlinksvalues()
ichrys03 Aug 9, 2024
f7d95ca
function getlinkvalues() from update 2.3 tested
ichrys03 Aug 23, 2024
50a7d0f
setCurveType tested, now with comments + getLinkValues
ichrys03 Aug 26, 2024
4eed1f7
minor fix with setCurveType now shows errorcode + setVertex() now has…
ichrys03 Aug 26, 2024
41c3c56
Update epanet.py
ichrys03 Aug 26, 2024
3a992d5
minor fix
ichrys03 Aug 26, 2024
925c157
getControlEnabled() + setControlEnabled()
ichrys03 Aug 26, 2024
b91cb84
getRuleEnabled() + setRuleEnabled()
ichrys03 Aug 26, 2024
9c3f978
loadPatternfile()
ichrys03 Aug 26, 2024
2edaa97
openX()
ichrys03 Aug 26, 2024
a0f089a
error message added
ichrys03 Aug 26, 2024
2553102
Unit test update 2.3 setcurvetype()
ichrys03 Aug 28, 2024
0ed2780
Unit test update 2.3 set/get control enabled
ichrys03 Aug 28, 2024
0573879
unitest for getlinkvalues
ichrys03 Aug 28, 2024
f6fc1d2
major fix
ichrys03 Aug 29, 2024
3fd0919
typepump index 3 added 2.3 update
ichrys03 Sep 3, 2024
c35e368
Underscore typo functions 2.3
ichrys03 Sep 3, 2024
5a37717
setControlEnabled() function splitted into 2 functions setControlEnab…
ichrys03 Sep 3, 2024
90be47c
typo fix getControlRulesCount() -> getControlCount
ichrys03 Sep 3, 2024
839ef00
typo fixed with warning to users that already have been using the fun…
ichrys03 Sep 3, 2024
8807f93
getControlEnabled() now works without arguments to get all items upda…
ichrys03 Sep 3, 2024
cb0722b
getRulesEnabled() now works without arguments to get all items update…
ichrys03 Sep 3, 2024
a8b1755
getControlEnabled() renamed to getControlState() for users
ichrys03 Sep 7, 2024
801455f
setcontroldisabled and set ruleenabled removed , back with setcontrol…
ichrys03 Sep 7, 2024
3a3767e
new param added update 2.3 to create setStartTime()
ichrys03 Sep 10, 2024
76265d8
4 new option constants added for update 2.3
ichrys03 Sep 10, 2024
6219e51
setPressureUnit() for options (function) added. update 2.3
ichrys03 Sep 10, 2024
927b36b
getPressureUnit() function added update 2.3
ichrys03 Sep 10, 2024
02de18f
new constants for nodes update 2.3
ichrys03 Sep 10, 2024
1570813
get statusreport/nodeemitterflow() added update 2.3
ichrys03 Sep 10, 2024
c25114f
new constants added update 2.3
ichrys03 Sep 10, 2024
454a847
new link constants parameters added for update 2.3
ichrys03 Sep 10, 2024
6b2b790
set/get for GPVCurver and PVCCurve
ichrys03 Sep 10, 2024
be076b3
get/set DefaultTimePat update 2.3
ichrys03 Sep 10, 2024
6422925
Curve constants added 2.3 update
ichrys03 Sep 10, 2024
f405285
typepump comment
ichrys03 Sep 10, 2024
3afab22
Constant added update 2.3
ichrys03 Sep 10, 2024
8c1dee0
get/set LinkLeakArea & LinkExpansionProp
ichrys03 Sep 10, 2024
76fe5cf
getLinkLeakageRate() added 2.3 update
ichrys03 Sep 10, 2024
962b960
getNodeLeageDemand & getTotalLeageLoss added, update 2.3
ichrys03 Sep 10, 2024
68980d3
new functions from update 2.3
ichrys03 Sep 10, 2024
8414557
setCurveType() -> split into 5 types setCurveTypeVolume(),setCurveTyp…
ichrys03 Sep 12, 2024
0ecad3b
The method set /get GPVCurve has been renamed to set/get LinkValveCur…
ichrys03 Sep 12, 2024
8932fb6
+
ichrys03 Sep 12, 2024
1dfdce4
set/get timestarttime has been renamed to set/get TimeClockStartTime(…
ichrys03 Sep 12, 2024
aa6a3c1
Performance Example for new function getLinkValues() update 2.3
ichrys03 Sep 12, 2024
13d44bb
getPatternAverageDefaultValue() update 2.3 function
ichrys03 Sep 12, 2024
f999c99
set/get OptionsDemandPattern() update 2.3 update
ichrys03 Sep 12, 2024
a6cd366
Warning message if the network is not fully connected update 2.3 (now…
ichrys03 Sep 12, 2024
589facd
2 functions added update 2.3 (addLinkValvePCV + setLinkTypeValvePCV)
ichrys03 Sep 13, 2024
ce87433
new functions added set/get OptionsEmitterBackFlow() update 2.3
ichrys03 Sep 13, 2024
25673aa
Refactor : from ENgetLinkValues(code) - > __getLinkInfo(code,*argv)
ichrys03 Sep 13, 2024
fff4cec
update 2.3 EN_timetonextevent function fixed
ichrys03 Sep 13, 2024
dcca1e9
ENgettimetonextevent ->{getTimetoNextEventIndex, getTimeDurationtoNex…
ichrys03 Sep 17, 2024
43aa8bc
getoNodeEmitterFlow now accepts *argv as input
ichrys03 Sep 26, 2024
3f1bab8
getTimeToNextEvent function update 2.3
ichrys03 Sep 26, 2024
78bed9e
setoptionsemmiterbackflowAllowed and dissalowed update 2.3
ichrys03 Sep 26, 2024
0ed429b
new constants update 2.3
ichrys03 Sep 26, 2024
c2347ec
setOptionsStatusReport slit to 3 functions -> setOptionsStatusReportN…
ichrys03 Sep 26, 2024
9aa6c00
new constants update 2.3 for pressure unit type
ichrys03 Sep 26, 2024
56c8d79
setOptionsPressureUnits split to -> setOptionsPressureUnitsMeters, se…
ichrys03 Sep 26, 2024
e77f428
ENsetOption for status report now is called with constants from toolkit.
ichrys03 Sep 26, 2024
62d455f
getpressureunit to getOptionspressureunits()
ichrys03 Sep 26, 2024
8894a23
setOptionsCurveType now uses toolkitconstants
ichrys03 Sep 26, 2024
eb76cf8
new function setCurveTypeValveCurve() update 2.3
ichrys03 Sep 26, 2024
8826cd8
getOptionsPressureUnits() now returns string instead of integer
ichrys03 Sep 26, 2024
69153b3
new constants for demand driven analysis and pressure driven analysis
ichrys03 Sep 26, 2024
fe15d38
getNodeInControl / getLinkInControl new functions update 2.3
ichrys03 Sep 26, 2024
65bb907
getNodeLeakageDemand() typo fix
ichrys03 Sep 26, 2024
c212438
fix for new functions missing argument update 2.3
ichrys03 Sep 26, 2024
3dfd1db
typo link instead of node
ichrys03 Sep 28, 2024
358dd1b
removed duplicate functions
ichrys03 Oct 3, 2024
6620563
fixed for getnodeincontrol and getlinkincontrol where the output was …
ichrys03 Oct 3, 2024
194c044
getNodeInControl() and getLinkInControl() can be called by 4 differen…
ichrys03 Oct 3, 2024
7ee7cd1
Revert "getNodeInControl() and getLinkInControl() can be called by 4 …
ichrys03 Oct 3, 2024
8afb873
Revert "getNodeInControl() and getLinkInControl() can be called by 4 …
ichrys03 Oct 3, 2024
f1b8d4d
update 2.3 setFLowUnitsCMS() new function
ichrys03 Oct 3, 2024
96c8b09
getStatistic got another property .TotalLeakageLoss update 2.3
ichrys03 Oct 3, 2024
7f3a6e6
getstatistic splitted into 5 new functions
ichrys03 Oct 3, 2024
ab8ae46
after every function is called there is a check for errors. if an err…
ichrys03 Oct 3, 2024
1de5053
fix with program starting with errors
ichrys03 Oct 4, 2024
4577fa6
smooth error messages for users 1 line instead of 2-3 lines for each …
ichrys03 Oct 4, 2024
d65b822
Changed variables for easier understanding(item - > function_id) and …
ichrys03 Oct 4, 2024
ec5c73a
Updated comments for the family of functions using setFlowUnits.
ichrys03 Oct 4, 2024
135b8f8
Function that checks the current flow units and returns whether it's …
ichrys03 Oct 4, 2024
681bb9d
Function that checks if the change of metric is possible; if not, it …
ichrys03 Oct 4, 2024
dcc1ca2
Comments for set of functions -> setOptionsPressureUnits
ichrys03 Oct 4, 2024
f60aec4
comments for set of functions -> setOptionsStatusReport
ichrys03 Oct 4, 2024
5d8e22f
Comments for get/set LinkLeakArea
ichrys03 Oct 4, 2024
450b9f0
comments for get/set LinkExpansionProperties()
ichrys03 Oct 4, 2024
d8d4dcd
removed duplicate function getConsumerDemandDeficit -> getNodeDemandD…
ichrys03 Oct 4, 2024
a46d2e3
Comments for non user functions
ichrys03 Oct 4, 2024
c8157e9
Coments for getLinkInControl & getNodeInControl
ichrys03 Oct 4, 2024
2fa0984
fix on setVertex() from float to double and updated example
ichrys03 Oct 4, 2024
44c97a8
comments for set/get LinkValveCurveGPV/PCV
ichrys03 Oct 4, 2024
9759846
comments getTimeofNextEvent
ichrys03 Oct 4, 2024
565d3b6
comments for statistics functions
ichrys03 Oct 4, 2024
b312400
comments
ichrys03 Oct 4, 2024
f351184
updated readme and comments
ichrys03 Oct 6, 2024
2c46f6c
updated readme + comments + private functions
ichrys03 Oct 7, 2024
8cace5a
typo in readme
ichrys03 Oct 7, 2024
87b0576
private function
ichrys03 Oct 7, 2024
22ca820
Users will now be able to see the line of error in their code, along …
ichrys03 Oct 8, 2024
acf80da
fix :memory violation error with changeMSXOptions
ichrys03 Oct 8, 2024
e7bd168
typofix
ichrys03 Oct 8, 2024
e061497
Update epanet.py
ichrys03 Oct 8, 2024
ec38a6c
fix in genral unit test
ichrys03 Oct 8, 2024
73d1a41
unit_test update 2.3
ichrys03 Oct 8, 2024
2bcde51
unit test and example for new functions update 2.3
ichrys03 Oct 8, 2024
de3070c
library for linux update 2.3
ichrys03 Oct 8, 2024
8d361ff
test1
ichrys03 Oct 8, 2024
365f219
Update general_unit_test.py
ichrys03 Oct 8, 2024
d1602eb
mac libraries
ichrys03 Oct 9, 2024
7056b72
mac_libaries update
ichrys03 Oct 9, 2024
85c07e5
mac libraries
ichrys03 Oct 9, 2024
1a43916
Update epanet.py
ichrys03 Oct 9, 2024
8294396
maclibs
ichrys03 Oct 9, 2024
5d7b4c5
mac libs
ichrys03 Oct 9, 2024
6314958
Update epanetmsx.dylib
ichrys03 Oct 9, 2024
0a90a7d
Update general_unit_test.py
ichrys03 Oct 15, 2024
81f3cd0
Update epanet.py
ichrys03 Oct 15, 2024
07b98db
Revert "Update epanet.py"
ichrys03 Oct 15, 2024
7764345
Revert "Update general_unit_test.py"
ichrys03 Oct 15, 2024
f0d7115
general unit test fix?
ichrys03 Oct 22, 2024
267f49d
unit_test leakage from epanet 2.3 update + some set functions now ret…
ichrys03 Oct 22, 2024
0e9b9fb
test unit leakage with EN functions
ichrys03 Oct 24, 2024
83f2dc6
revert changes
ichrys03 Oct 24, 2024
e4cd12f
Users can now include an id column which contains the node or link ID…
ichrys03 Nov 12, 2024
c2f0d16
#77 + example
ichrys03 May 26, 2025
0a08845
Update README.md
ichrys03 Jul 15, 2025
c07e56c
Merge branch 'dev' into msxstatistics
ichrys03 Jul 15, 2025
c970dfa
Correct a typo
Jul 23, 2025
84e939d
Merge pull request #82 from eladsal/dev
Mariosmsk Jul 25, 2025
05495d4
Merge pull request #78 from ichrys03/msxstatistics
Mariosmsk Jul 25, 2025
bacab5a
Merge branch 'dev' into epanet2.3-undercover
ichrys03 Sep 15, 2025
a2742d0
Update epanet.py
ichrys03 Sep 15, 2025
4b5d688
Update epanet.py
ichrys03 Sep 15, 2025
a23dc8a
Create EX25_Leakage.py
ichrys03 Sep 15, 2025
3031160
rename
ichrys03 Sep 16, 2025
b5a7b64
Merge pull request #62 from ichrys03/epanet2.3-undercover
Mariosmsk Sep 16, 2025
40bd318
mv this file under tests
Mariosmsk Sep 16, 2025
6b76fdf
relocate examples folder to project root
Mariosmsk Sep 23, 2025
d68e899
Warn on failing imports
Dec 23, 2025
547cde4
Merge pull request #84 from angusmcb/optional-deps
Mariosmsk Feb 2, 2026
ef87b4b
Add EPANET 2.3 C API headers and update libs
Mariosmsk Feb 4, 2026
3fd719c
update test files
Mariosmsk Feb 4, 2026
2431555
Refactor epanet API to CFFI and optimize calls
Mariosmsk Feb 4, 2026
4cb14b4
Create Net1broken.inp
Mariosmsk Feb 4, 2026
b6764ff
Enhance Python examples: hydraulic, quality, MSX
Mariosmsk Feb 4, 2026
ceee7da
Merge branch 'dev' into dev2.3
Mariosmsk Feb 4, 2026
48977ed
Add cffi to requirements
Mariosmsk Feb 4, 2026
9cc4d8d
Bump Python support to 3.9-3.14 and pin deps
Mariosmsk Feb 4, 2026
3599e7a
Refactor imports, update examples, remove INP file
Mariosmsk Feb 4, 2026
be6555b
Refactor EPANET API usage and simplify loops
Mariosmsk Feb 4, 2026
67fbae8
Update Python examples for API and formatting
Mariosmsk Feb 4, 2026
18f8568
Return resolved file paths in _collect_files
Mariosmsk Feb 4, 2026
e124c7d
update examples
Mariosmsk Feb 4, 2026
53b1f03
Update epanetapi.py
Mariosmsk Feb 4, 2026
00f6213
Update Toolkit_api_EX1_using_EN_functions.py
Mariosmsk Feb 4, 2026
0b7bd35
Add createinp option and robust ph handling
Mariosmsk Feb 4, 2026
aa86374
Add workflow_dispatch to build_tests.yml
Mariosmsk Feb 4, 2026
4eeb4f8
create ipynb files via jupytext
Mariosmsk Feb 4, 2026
98f6586
Support multiple attr args and fix link quality
Mariosmsk Feb 5, 2026
05693aa
Use numpy arrays and fix rescount bug
Mariosmsk Feb 5, 2026
2c2ca05
Refactor and fix unit tests in general_unit_test.py
Mariosmsk Feb 5, 2026
55799af
Use networks.inp_files() for test INP file
Mariosmsk Feb 5, 2026
7010746
Refactor networks file index and update tests
Mariosmsk Feb 5, 2026
e497036
Update epanet_cffi_compat.py
Mariosmsk Feb 5, 2026
693c43a
update epanet/tests - temp change 240
Mariosmsk Feb 5, 2026
279b0d1
update mac lib
Mariosmsk Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: build

on: [push]
on:
push:
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4

Expand Down
941 changes: 807 additions & 134 deletions README.md

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions epyt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# -*- coding: utf-8 -*-
__author__ = """Marios S. Kyriakou"""
__email__ = "kiriakou.marios@ucy.ac.cy"
__version__ = "1.2.3"
__version__ = "2.3.3.0"
__msxversion__ = "200000"
__lastupdate__ = "25/06/2025"
__lastupdate__ = "04/02/2026"
__copyright__ = """Copyright 2022, KIOS Research and Innovation Center of Excellence (KIOS CoE),
University of Cyprus (www.kios.org.cy)."""
__license__ = "EUPL License, Version 1.2"

from epyt.epanet import epanet
try:
from importlib.resources import files # Python 3.9+
except ImportError:
from importlib_resources import files # Backport for < 3.9
epyt_root = str(files("epyt"))

from epyt.epanet import epanet
Loading
Loading