SWMM-Docs
5.2.0.dev5
Stormwater Management Model
|
The Programmer's Toolkit application programming interface (API) is an extension of the SWMM simulation package. Through the API, a developer can programmatically talk to SWMM before, during, and after a simulation. The API exposes SWMM's data model which enables new possibility. When a hydraulic network is initialized, a network is most generally comprised of nodes, link, and runoff surfaces. Nodes and Links are normally manholes and conduits, and runoff surfaces are a hydrologic representation of rainfall catchment surfaces that send flow into the hydraulic network.
The Toolkit API provides a series of functions that allow programmers to customize the use of SWMM's hydraulic and water quality solution engine to their own applications. Before using the Toolkit one should become familiar with the way that SWMM represents the hydrologic surfaces and hydraulic network and the design and operating information it requires to perform a simulation. This information can be obtained from reading SWMM's Users Manuals USEPA Link.
A typical usage of the Toolkit functions to analyze a stormwater network might look as follows:
swmm_setxxxParam
to update parameters before beginning a simulationswmm_getxxxResult
or swmm_getxxxStats` to read results.