How to run MATLAB Epanet toolkit in MacOs


#1

Hi,

I am trying to run my code using MATLAB EPANET Toolkit using a MacOs

It needs .so file, shared object (dynamic) library similar to a DLL on Windows. Is there anyone who has used the epanet toolkit in Mac ?.

Thank you.


#2

Hi, it’s fairly straightforward to build from source repo (community v2.1) - or you can download a pre-built dylib/.h archive here: https://www.dropbox.com/s/wqto7kgsgqpiff7/libepanet.zip?dl=0

hope this helps!


#3

@samhatchett, it works, thank you very much


#4

Hello everyone,

Could you please explain further how to use MATLAB- EPANET on MACOS? I don’t have much experience and have the same problem> Haven’t been able to run it yet. What files are the ones that I need to have on the folder in mac os enviroment and how do I set them up.

Thank you very much.


#5

Hi,

Its straightforward like sam mentioned, download: https://www.dropbox.com/s/wqto7kgsgqpiff7/libepanet.zip?dl=0
and include it in your matlab-epanet toolkit folder and run the RunTests.m from MATLAB.


#6

Hello,

Thank you for the help. I have done it and it is giving me the following errors now:

Error using loadlibrary
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.

Error in loadlibrary

Error in epanet>ENLoadLibrary (line 6954)
loadlibrary(LibEPANET,[LibEPANETpath,LibEPANET,’.h’]);

Error in epanet (line 472)
ENLoadLibrary(obj.LibEPANETpath,obj.LibEPANET);

Error in testFunctions (line 16)
d=epanet(inpname);

Error in RunTests (line 6)
testFunctions

and this is how my folders looks:

https://paste.pics/3TBJH
https://paste.pics/3TBJK

i have placed the start toolkit script out of the main file because that’s how they run it on a youtube tutorial and last time i tried on windows, it worked.

Are you working on smart water networks? I am trying to use model predictive control for chlorine decay response.

Thanks again!


#7

Ok it is working now. My macos was blocking the folder dowloaded for security.

Thabks so much!