swmmx Documentation

Running Simulations

Use m.run() for a normal complete simulation and m.runs() when you want a Python iterator over the native SWMM step loop.

m.run()
print(m.log())

for step in m.runs():
    print(step.index, step.time, step.elapsed_days)

print(m.time.count_run())

When to Use m.runs()

Use stepped runs for progress reporting, monitoring, teaching workflows, and future dynamic control patterns. Current step fields include step.index, step.time, and step.elapsed_days.