I'm working on the coupling of SWMM with a homemade 2D superficial flow model. The later is written in Python.
For this purpose, I'm currently writing a Python wrapper for SWMM using ctypes. So far I managed to control a simulation from Python using swmm_step() and get results at each time-step using node_getResults().
But for my purpose I will need to exchange nodes data at runtime. Simply put, at each time-step I need to read values from given nodes, and then update them before the next time-step.
From what I've read in this forum about Matlab-SWMM interface, a proposed solution would be to run a full SWMM simulation between two "exchange time", read output files, update input files and run a new simulation. However I'm afraid this solution would introduce a severe overhead with file reading and writing.
So I'd like to know from people who have good knowledge of SWMM source code, if there is a safe way to change some node data during a simulation.
Thanks for your help.