I have a question about EPANET-Matlab Toolkit:
When I want to set hydraulic time step=21600 s, I write like the following:
but when I want to get hydraulic time step (like: “d.getTimeHydraulicStep”), It returns: 3600
So, it seems that doesn’t work. What should I do to solve the problem?
it should be noted that the demand pattern of my network, changes every six hours, however, the demand time step is 3600s. so due to the decrease of hydraulic simulation, I want to set the hydraulic time step to 21600s
You can try:
% time->Hstep = MIN(time->Pstep, time->Hstep);
% time->Hstep = MIN(time->Rstep, time->Hstep);
% time->Qstep = MIN(time->Qstep, time->Hstep);
Thanks a lot for your response.
Thank you for your response. I commanded the codes. But something is wrong. But when I execute your commands to apply the time step of hydraulic calculations, only the pressure and flow calculations from 0 to 4 in the morning (which of course all have the same consumption coefficient) are done. While the goal is to perform calculations at times 12 am, 6 am, 12 pm, and 18 pm. I think this is because by executing the command, the first 4 numbers in the consumption pattern are considered with a time step of 6 hours, which is not true. What is your opinion and solution in this problem? I submitted the network file as a Google link.
d.openHydraulicAnalysis; d.initializeHydraulicAnalysis; tstep=1; kt=1; while (tstep>0) t= d.runHydraulicAnalysis; Pressure(kt,:)=d.getNodePressure; Flow(kt,:)=d.getLinkFlows; d.runHydraulicAnalysis; kt=kt+1; tstep=d.nextHydraulicAnalysisStep; end d.closeHydraulicAnalysis