Fail to get source quality value


#1

Hi everyone,

I failed to retrieve the parameter value of a source node (Node 1) in Net2 using toolkit in MATLAB.
The value of source quality, source pattern index and source type turned out to be zero when called ENgetnodevalue function, though specific value had been set in input file.

Would anyone have encountered similar problem before? Thank you very much.

Best,
Xuyi


#2

Hi @x.zhan, do you use the EPANET-Matlab Toolkit (EMT)?

example with EMT 2.1.7:

start_toolkit;

d = epanet(‘Net2.inp’);

node_index = 1;
d.getNodeSourceQuality(node_index)
d.getNodeSourceQuality
d.getNodeSourcePatternIndex
d.getNodeSourceType
d.unload;

without EMT:

[EN_SOURCEQUAL = 5;
node_index = 1;
[Errcode, value] = calllib(‘epanet2’,‘ENgetnodevalue’,node_index, 5, 0)


#3

Thanks! I used EPANET toolkit without EMT, and the result is shown as follows.

I think this issue might be related to the toolkit version, because it works well after I download the latest toolkit.