Error in "addLinkValvePRV " in EPANET-MATLAB toolkit


#1

Hello all,
I want to run the below code and get PRVs for all of pipes but I get one error. What is the solution:
I don’t want to use the Bin function because the speed of program reduce.

clc; clear; close all;

%% Epanet Loading-----------

tic;d=epanet(‘Net1.inp’);toc
nnode=d.getNodeJunctionCount;
npipe=d.getLinkPipeCount;
nPRV=d.getLinkValveCount;

%% PRV valve Locating

NodesConnectingLinksID = d.getNodesConnectingLinksID;

for i=1:npipe

j=npipe+i;
fromNode = NodesConnectingLinksID{pipeIndex(i),1};
toNode = NodesConnectingLinksID{pipeIndex(i),2};

d.addLinkValvePRV(num2str(j),fromNode,toNode);

end


Answer:

Thanks,
Alireza Moghaddam


#2

Hi @alireza2032,

Please replace your libraries with this https://www.dropbox.com/s/e52b3n21yoxbev7/EMT2.1.6_dlls.zip?dl=0


#3

Thanks a lot @Mariosmsk,
It’s great.