Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1f12ef9
ENsetcontrolenabled, ENgetcontrolenabled
LefterisKalligiannakis Sep 10, 2025
aa63620
ENsetcontrolenabled fix
LefterisKalligiannakis Sep 10, 2025
56af41a
apiENgetruleenabled, apiENsetruleenabled
LefterisKalligiannakis Sep 11, 2025
77251be
ENsetcurvetype
LefterisKalligiannakis Sep 11, 2025
807ab62
ENsetvertex
LefterisKalligiannakis Sep 11, 2025
5f1560e
ENtimetonextevent
LefterisKalligiannakis Sep 11, 2025
954b3c5
ENopenX
LefterisKalligiannakis Sep 11, 2025
ac9251c
ENgetlinkvalues
LefterisKalligiannakis Sep 12, 2025
002f955
Valve link functions + enums
LefterisKalligiannakis Sep 12, 2025
d689c16
setCurveType + typed helpers
LefterisKalligiannakis Sep 12, 2025
3340b24
getControlState, getRuleEnabled, setRuleEnabled
LefterisKalligiannakis Sep 12, 2025
500860b
getLinkInControl, getNodeInControl
LefterisKalligiannakis Sep 15, 2025
7433857
getTimeToNextEvent
LefterisKalligiannakis Sep 15, 2025
ed8ef36
Leakage and demand functions
LefterisKalligiannakis Sep 15, 2025
f86300e
openX
LefterisKalligiannakis Sep 16, 2025
877f774
statistics functions
LefterisKalligiannakis Sep 16, 2025
0e9c809
getPatternAverageDefaultValue
LefterisKalligiannakis Sep 16, 2025
22f3c2b
Pressure unit and Status report level functions + errorInChangingMetr…
LefterisKalligiannakis Sep 16, 2025
b4480a4
Demand pattern and emitter backflow functions
LefterisKalligiannakis Sep 16, 2025
039da7e
setFlowUnitsCMS
LefterisKalligiannakis Sep 17, 2025
8ae05c3
getLinkValues
LefterisKalligiannakis Sep 17, 2025
6c4d3da
link/valve curve accessors + change getLinkValues to getLinkInfo
LefterisKalligiannakis Sep 17, 2025
80bfa74
leakage example
LefterisKalligiannakis Sep 17, 2025
8762202
setVertex + bulk retrieval for getRuleEnabled and getControlState
LefterisKalligiannakis Sep 19, 2025
9d57430
example for 2.3 functions
LefterisKalligiannakis Sep 22, 2025
4d42f91
tests for 2.3 functions
LefterisKalligiannakis Sep 23, 2025
70940d0
update README.md
LefterisKalligiannakis Sep 23, 2025
3fe86ab
update README.md
LefterisKalligiannakis Oct 2, 2025
58a328f
Fixed tests 2.3
LefterisKalligiannakis Oct 2, 2025
4544a61
make openX look in the /networks directory
LefterisKalligiannakis Oct 2, 2025
b2b3255
delete EX_NewFunctions2_3
LefterisKalligiannakis Oct 2, 2025
0b95aad
rename testNewfunctions to 2_2
Mariosmsk Oct 6, 2025
18f4e86
minor updates in test file 2.3
Mariosmsk Oct 6, 2025
5f996af
rename getLinkInfo to getLinkValues
LefterisKalligiannakis Oct 6, 2025
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
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ matlab -nodisplay -r "addpath(genpath('$PWD')); savepath"
- [List of EPANET 2.1 Functions Supported](#list-of-epanet-21-functions-supported)
- [List of EPANET 2.012 Functions Supported](#list-of-epanet-2012-functions-supported)
- [List of EPANET 2.2 Functions Supported](#list-of-epanet-22-functions-supported)
- [List of EPANET 2.3 Functions Supported](#list-of-epanet-23-functions-supported)

## How to cite

Expand Down Expand Up @@ -909,3 +910,68 @@ The `EPANET-Matlab Toolkit` is based/inspired on the [EPANET-Matlab Toolkit](htt
|ENinit|Initializes an EPANET project that isn't opened with an input file|

↑ [Back to top](#table-of-contents)

## List of EPANET 2.3 Functions Supported

|Function|Description|
|--------|-----------|
|ENgetcontrolenabled|Get enabled/disabled flag for a simple control by index (1 = enabled, 0 = disabled)|
|ENgetlinkvalues|Bulk-retrieve property values for all links for a given link property code|
|ENgetruleenabled|Get enabled/disabled flag for a rule-based control by rule index|
|ENloadpatternfile|Load time patterns from an external file into the current project under a specific pattern ID|
|ENopenX|Open an input file even if it has formatting errors (lenient parsing mode)|
|ENsetcontrolenabled|Enable/disable a specific simple control by index|
|ENsetcurvetype|Set the type of a curve object (volume, pump, efficiency, headloss, general, valve)|
|ENsetruleenabled|Enable/disable a rule by rule index|
|ENsetvertex|Set the coordinates of a link’s intermediate vertex (polyline point) by vertex index|
|ENtimetonextevent|Return the type of event that terminates the current time step (hydraulic step, water quality step, tank level event, control event)|
|addLinkValvePCV|Create a Pressure-Control Valve (PCV) link|
|setLinkTypeValvePCV|Convert an existing link to PCV type|
|setCurveType|Set the curve type. includes helpers: setCurveTypeVolume, setCurveTypePump, setCurveTypeEfficiency, setCurveTypeHeadloss, setCurveTypeGeneral, setCurveTypeValveCurve|
|setVertex|Set intermediate vertex coordinates for a link|
|getControlState|Retrieve simple control enabled flag (single or all)|
|getRuleEnabled|Retrieve rule enabled flag (single or all)|
|setRuleEnabled|Enable/disable rule by index|
|getLinkInControl|Query which objects are referenced by controls (returns IDs/indices)|
|getNodeInControl|Query which objects are referenced by controls (returns IDs/indices)|
|getTimetoNextEvent|Wrapper around ENtimetonextevent (returns enum + time to event)|
|loadPatternFile|Load a time pattern file into the project (forwards to ENloadpatternfile)|
|getPatternAverageDefaultValue|Report average value used when a pattern is missing|
|getOptionsPressureUnits|Retrieve current pressure units|
|setOptionsPressureUnits|Set pressure units (EN_PSI / EN_KPA / EN_METERS)|
|setOptionsPressureUnitsMeters|Set pressure units to meters|
|setOptionsPressureUnitsPSI|Set pressure units to PSI|
|setOptionsPressureUnitsKPA|Set pressure units to kPa|
|getOptionsStatusReport|Get current status report level|
|setOptionsStatusReport|Set status report level (EN_NO_REPORT / EN_NORMAL_REPORT / EN_FULL_REPORT)|
|setOptionsStatusReportNo|Set report level to no report|
|setOptionsStatusReportNormal|Set report level to normal|
|setOptionsStatusReportFull|Set report level to full|
|getOptionsDemandPattern|Get default demand pattern behavior|
|setOptionsDemandPattern|Set default demand pattern behavior|
|getOptionsEmitterBackFlow|Get emitter backflow setting|
|setOptionsEmitterBackFlowAllowed|Allow emitter backflow|
|setOptionsEmitterBackFlowDisallowed|Disallow emitter backflow|
|setFlowUnitsCMS|Set flow units to cubic meters per second|
|getLinkValveCurveGPV|Get valve curve for GPV link|
|getLinkValveCurvePCV|Get valve curve for PCV link|
|setLinkValveCurveGPV|Set valve curve for GPV link|
|setLinkValveCurvePCV|Set valve curve for PCV link|
|getLinkLeakArea|Get leakage area for a link|
|setLinkLeakArea|Set leakage area for a link|
|getLinkExpansionProperties|Get expansion properties for a link|
|setLinkExpansionProperties|Set expansion properties for a link|
|getLinkLeakageRate|Get leakage rate for a link|
|getNodeLeakageFlow|Get leakage flow at a node|
|getNodeEmitterFlow|Get emitter flow at a node|
|getConsumerDemandRequested|Retrieve consumer demand requested|
|getConsumerDemandDelivered|Retrieve consumer demand delivered|
|openX|Lenient open for project files|
|getLinkInfo|Bulk retrieve link property vector|
|getStatisticIterations|Retrieves the number of iterations taken in the simulation|
|getStatisticRelativeError|Retrieves the relative error statistic from the simulation|
|getStatisticDeficientNodes|Retrieve number of deficient nodes|
|getStatisticDemandReduction|Retrieve demand reduction statistics|
|getStatisticTotalLeakageLoss|Retrieve total leakage loss value|

↑ [Back to top](#table-of-contents)
Loading