swmmx Documentation

Quick Start

This workflow opens an existing model, validates it, plots the layout, runs SWMM, plots link flow, and saves a modified model.

from swmmx import swmm

m = swmm("examples/example.inp")
m.validate()
m.plot_layout()
m.run()
m.plot_timeseries.link.flow()
m.save("modified_model.inp")

Line by Line

LinePurpose
swmm("examples/example.inp")Parse an existing EPA SWMM input file into a model object.
m.validate()Check common structural and reference issues before relying on results.
m.plot_layout()Draw mapped nodes, links, subcatchments, rain gages, and related geometry.
m.run()Run the native SWMM engine and load output metadata.
m.plot_timeseries.link.flow()Plot simulated link flow. Result variables require a completed run.
m.save(...)Write the current in-memory model back to an INP file.