Can I build a model only using a toolkit?


#1

Hi, all.

I want to build a model using a matlab code, because it is easy to control some parameters.
To implement this, I have generated the file that is empty firstly.
Next, I call the file in matlab, but the system error 102 is shown at the junction addition line.
The toolkit said “no network data available.”

Is it impossible to build a model only using a matlab?

Here is my code.

run(‘C:\Users\user\Documents\MATLAB\KIMM\EPANET\start_toolkit.m’) %Run Toolkit
d=epanet(‘Validated_Model_v1.inp’); %Load Original File
Co_J=[Co_Sn; Co_Corner; Co_d; Co_m; Co_1; Co_2; Co_3; Co_4];
NofJ=length(Co_J);
for i=1:NofJ
NewJunctionID{i}=num2str(int32(i));
NewJunction(i)=d.addNodeJunction(NewJunctionID{i});
d.setNodeCoordinates(NewJunction(i),Co_J(i,:));
end

In here, the ‘Validated_Model_v1.inp’ has no parameter (=empty file).
Further, the error is shown at line ‘d.setNodeCoordinates(NewJunction(i),Co_J(i,:));’.

Thank you!