File Exchange

image thumbnail

OpenWaterAnalytics/​EPANET-Matlab-Toolkit

version 2.1.7 (16 MB) by Demetrios Eliades
A Matlab class for EPANET water distribution simulation libraries

37 Downloads

Updated 25 Apr 2021

From GitHub

View Version History

View license on GitHub

The EPANET-Matlab Toolkit is an open-source software, originally developed by the KIOS Research Center for Intelligent Systems and Networks of the University of Cyprus which operates within the Matlab environment, for providing a programming interface for the latest version of EPANET, a hydraulic and quality modeling software created by the US EPA, with Matlab, a high-level technical computing software. The goal of the EPANET Matlab Toolkit is to serve as a common programming framework for research and development in the growing field of smart water networks. The EPANET-Matlab Toolkit features easy to use commands/wrappers for viewing, modifying, simulating and plotting results produced by the EPANET libraries. For support, please use the OWA community forum : http://community.wateranalytics.org/

Cite As

D.G. Eliades, M. Kyriakou, S. Vrachimis and M.M. Polycarpou, "EPANET-MATLAB Toolkit: An Open-Source Software for Interfacing EPANET with MATLAB", in Proc. 14th International Conference on Computing and Control for the Water Industry (CCWI), The Netherlands, Nov 2016, p.8. (doi:10.5281/zenodo.831493)

Comments and Ratings (32)

Pedram Jazayeri

Hi.
Two question were made.
1-How I can assign a different Preq,Pmin,Pexp for every node in PDA analysis with epanet dll 2.2?
2-When I run Net1.inp for 24hr-period, outputs concluded by "d.getComputedHydraulicTimeSeries" shown in 27 time periods ,why it happened?
Thank

Marios Kyriakou

How to use EPANET-MATLAB-Toolkit
https://www.youtube.com/watch?v=7fQTeZ0mH8Q

yiduo yao

Hi, I have already install the MinGW64. However, when I type 'd = epanet ()', the result showed that epanet is undefined variable. Could you please help me figure it out?
Thank you!

prerna pandey

I am not able to change the setting of the valve (Linked with the Epanet) in Matlab. Can anyone suggest the command for changing the setting of valve for the static condition. Thank you so much in advance.

Pedram Jazayeri

Thank you for your practical Toolkit.
Why EX19~EX25 do not exist in the downloaded toolkit?
Even, it can not be reachable in the "functions" part!
Thanks a lot

Pedram Jazayeri

NISHANT SOURABH

Hi everyone,
I have to use the Epanet Toolkit to analyse the simple water supply network. While using the toolkit, initially i have run the model successfully. I have to model the leakage in the pipe by using the Emitter Coefficient for a given node. So, after changing the value of emitter coefficient in the input file, the toolkit is unable to incorporate the changes in the result(toolkit is not using the emitter coefficient in the hydraulic solution).
I am loading the input file using "Bin", as i am unable to install any supported SDK or compiler. The syntax is as:
d=epanet('Filename','bin')
to get the result, the command which i am using is
"d.getBinComputedAllParameters"

I am using Matlab 2016a. I have tried mingw-w64 c/c++ compiler, but i am not able to install and use.

Please help me in this regard.

devang singh

Sir i have lodes the network in toolkit successfully but i am not able to tum hydraulic analysis by command in matlab ,plz help

Marios Kyriakou

For support, please use the OWA community forum: http://community.wateranalytics.org/

Jorge Pesantez

Hi
I have downloaded the toolkit and when I want to the hydraulic analysis (EX2_Hydraulic_Analysis) on a network but it seems that the code doesn't read the control rules and I don't get the correct data. Is there any possible solution?

researcher

Hi
I have downloaded this file but I can't install it on Windows 7
the exe file relate to 64bit can't open
can you help me?

SREETHU S

hello,
i am using epanet matlab toolkit to analyse a water distribution network and the code is as below:
x=[110 112 113 114 115]';
for i= 1:1
x(:,i)=min(x(:,i))+(max(x(:,i))-min(x(:,i)))*rand(5,1);
a = x(:,i)
g = epanet('network1.inp');
for m = 1:5;
RC = g.getLinkRoughnessCoeff;
RC(5) = a(m,1);
g.setLinkRoughnessCoeff(RC);
g.getLinkRoughnessCoeff(5)
LF = g.getBinComputedLinkFlow
Q (m,1) = LF (1,5)
end
end

but, the link roughness coefficient is not getting updated in the epanet and i am getting link flow for the initial value of pipe roughness coefficient only. how can this be solved?

Abdulaziz Alqahtani

Hello,
I am new to this toolkit and tried to start it and got the message
Error using epanet (line 477)
Could not open the file, please check INP file.

This happens when I run d=epanet('Net1.inp');
any idea how to solve this?

Thanks,

Alexis Kyriacou

Great Matlab Toolkit. Thank you !

Ungtae Kim

I ran RunTests.m and got the following message.

Index exceeds matrix dimensions.
Error in loadlibrary>getLoadlibraryCompilerConfiguration (line 527)
Error in loadlibrary (line 263)
Error in epanet>ENLoadLibrary (line 6917)
loadlibrary([LibEPANETpath,LibEPANET],[LibEPANETpath,LibEPANET,'.h']);
Error in epanet (line 463)
ENLoadLibrary(obj.LibEPANETpath,obj.LibEPANET);

Any idea to figure out this?
Thanks,
Kim

hima bindu

how can i write code in matlab
ENopenQ
ENinitQ
ENrunQ
ENstepQ
ENcloseQ
instead of ENsolveQ

Can i apply the fuzzy logic in matlab to epanet? for example, use fuzzy logic control pump station

Demetrios Eliades

@Very Tary, EPANET splits the time step when a hydraulic change is made. So you may have extra instances (e.g. 12:00, 13:00, 13:15, 14:00) if at time 13:15 a tank status has changed. Please keep track of the time using the toolkit.

Veronica Taurino

Hi! Great tool!
I'm trying the example script "simepa.m" (folder "example"). I wonder the difference between the output data in the workspace "hydraulics" and "results". Why the "hydraulics" struct has more rows then "results" struct, even if the time series is fixed?

Thank you for your effort!

Stelios Vrachimis

KYU DAE SHIM

Thank you for your efforts and I'd like to receive your advice.
When I run EPANET-Matlab-Toolkit, the error message is occurred as below,

epanet('networks/Net1_Rossman2000.inp')
Warning : Folder "64bit" does not exit.
> In epanet (line 408)

What's is the problem?

KYU DAE SHIM

bilel HADRICH

any one have tutoriel to call epanet in matlab

GOPIKA LAKSHMANAN

how to call epanet in matlab

Demetrios Eliades

@Karwan Ali: you need to run

>>mex -setup

and select a compiler (e.g. Microsoft Windows SDK 7.1)

Have a look at this link:
http://www.mathworks.com/support/compilers/R2014b/index.html?sec=win32

Karwan Ali

Please,I have the following error, what does it means?. Thank you

Error using loadlibrary (line 254)
A 'Selected' compiler was not found. You may need to run mex -setup.

Error in epanetloadfile (line 3)
loadlibrary('epanet2');

Chris Kelley

Thank you for this tool. I've noticed that the full hydraulic analysis report output by the toolkit (set with ENsetstatusreport(2)) seems to be very different from the full report output by EPANET (in Report >> Full...). Is there an easy way to get all the data in the EPANET full report via this toolkit?

Your advice is greatly appreciated.

Chris

Mesanlibor

i want to use optimization also here, i want to keep the elevation of the nodes and the diameter of the pipes as variables in the input file. How can i do it?

jinseok

can you tell me how to install this file?

david

fantastic tool!

Kegong Diao

Thanks a lot!

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: getwdsdata.m

Inspired: KIOS-Research/EpaGui, EPANET Info from INP files

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!