I need to control the status of some pipes at certain hydrodynamics. Could you explain me how can I especify the correct arguments to addBinControls??
for example, I need to execute next control:
‘LINK X CLOSED AT TIME XX’;
But I don’t solve yet how to write the correct a,b,c,d,… arguments in d.addBinControl function.
SOME ASPECTS BEFORE ANSWER:
1.- I have tested the “EX17a_add_multiple_controls_pipestatus_bin.m” contained in the examples folder of the toolkit. But when I test only one Control (Not carried out all the loop, only generate one of them: Controls = ‘LINK 10 Open AT CLOCKTIME 000:00:00’ and when apply to: “d.addBinControl(Controls)”, I get an error , buy when “Controls” have all the 288 simple controls, It works . Why??
2.- In other post, I see than there exist and “EMT v2.2” with dll functions of Epanet 2.2 beta. This version contains the function d.addControls, and the next example works perfectly :
d.addControls(['LINK, char(LinkID), ’ CLOSED AT TIME ', num2str(2*3600)]);
Even if this could be the solution, use this version is not possible for me, because I generate some INP files with "d.saveInputFile(‘NameX.inp’); but it writes incorrectly the [DEMANDS] part of the file. It writes some symbols tha Epanet and the toolkit himself can’t read them. (I attached one example) and THIS NOT OCCUR IN THE 2.1 VERSION
Net3ScnBMODByPass.inp (83.4 KB)
I hope you help me to write simple controls with d.addBinControls(a,b,c,…) in the EMT 2.1