[Python] Pyswmm and swmm_api: how can I speed up the simulation?

Discussão em 'Python' iniciado por Stack, Abril 17, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using pyswmm and swmm_api to simulate the behaviour of different urban drainage networks.

    I found out that running the simulation using pyswmm (without interacting with it), swmm_api as well the software epa-swmm takes almost the same amount of time. Also, using pyswmm with the aim to interact with the simulation at specified time steps to save a large amount of results causes a huge slowing down of computation. In addition, I could be interest to disable the generation of the .out file: by now I'm not able to do it using pyswmm as well as the swmm_api module. Based on my experience, it's better to open the .out file using swmm_api and then memorized the results compared to save some results during simulation using pyswmm.

    My final goals are:


    • Save some results during the simulation at specific time steps without increase too much the time required. I know the only way to interact with the simulation is to use the pyswmm module at this moment.


    • Decrease the time required for run simulations using pyswmm and/or swmm_api.

    Knowing that, my questions are:


    1. Is there a way to speed up the simulation using pyswmm or swmm_api?


    2. What could be the best way to save some results during simulation in order to avoid the increase of computational times?


    3. Is there a way to disable the automatic generation of .out and .rpt files using pyswmm and/or swmm_api?

    Continue reading...

Compartilhe esta Página