Legacy SWMM 5 — Compatibility Layer#
Note
Engine: SWMM 5.x — legacy. The pages in this section document
openswmm.legacy.engine and openswmm.legacy.output. For
the modern, recommended OpenSWMM 6 engine see
OpenSWMM 6 User Guide (refactored engine).
The openswmm.legacy namespace preserves the original EPA SWMM 5.x
C solver and its binary-output reader verbatim, with thin Cython
wrappers, so existing scripts that target SWMM 5 continue to run
unchanged.
This is a compatibility layer, not a fork:
The legacy code is the same source that EPA released; we apply bug fixes only.
No new features — every new feature lands in
openswmm.engineinstead.The two layers can coexist in a single Python process and both can read each other’s binary
.outfiles.
When to use which#
Use |
Use |
|---|---|
You have working SWMM 5 Python code and want it to keep running unchanged. |
You’re starting a new project, or you’ve decided to migrate. |
You depend on a specific SWMM 5 numerical detail (e.g. a third- party validation against EPA SWMM 5 outputs). |
You want bulk numpy accessors, programmatic model construction, in-place editing, or the plugin SDK. |
You need the exact |
You want multiple independent simulations in one process (reentrant engine). |
If you’re sitting on a pile of SWMM 5 Python code today, see Migrating from SWMM 5 to v6 for a side-by-side translation.
Layout#
Legacy SWMM 5 Solver — the legacy
Solverclass: lifecycle, the enum-drivengetValue/setValueAPI, progress callbacks, exceptions.Legacy SWMM 5 Output Reader — the legacy
Outputreader for the binary.outfile.
For the API reference (every public class and method) see the Legacy section of the API page.