![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Namespaces | |
| namespace | climate |
| namespace | constants |
| namespace | controls |
| namespace | culvert |
| namespace | datetime |
| namespace | divider |
| namespace | dynwave |
| namespace | exfil |
| namespace | findroot |
| namespace | forcemain |
| namespace | gage |
| namespace | groundwater |
| namespace | hydraulics |
| namespace | hydstruct |
| namespace | iface |
| namespace | infil |
| namespace | inflow |
| namespace | inlet |
| namespace | inp_writer |
| namespace | input |
| namespace | kinwave |
| namespace | landuse |
| namespace | lid |
| namespace | link |
| namespace | mathexpr |
| namespace | node |
| namespace | ode |
| namespace | outfall |
| namespace | quality |
| namespace | rdii |
| namespace | roadway |
| namespace | runoff |
| namespace | simd |
| namespace | snow |
| namespace | street |
| namespace | toposort |
| namespace | transect |
| namespace | treatment |
| namespace | ucf |
| namespace | xsect |
| namespace | xsect_batch |
| namespace | xsect_tables |
Classes | |
| struct | AquiferStore |
| SoA storage for aquifer parameter sets. More... | |
| struct | BuildupData |
| struct | ControlRuleStore |
| struct | CurveNumState |
| class | DefaultOutputPlugin |
| Default output plugin: writes SWMM 5.x compatible binary .out file. More... | |
| class | DefaultReportPlugin |
| Default report plugin: writes SWMM 5.x compatible .rpt report file. More... | |
| struct | DwfData |
| struct | ExtInflowData |
| struct | ForcingData |
| struct | GageData |
| Structure-of-Arrays storage for all rain gages. More... | |
| struct | GageSnapshot |
| Snapshot of rain gage state at an output time step. More... | |
| struct | GreenAmptState |
| struct | HortonState |
| struct | HotStartFile |
| In-memory hot start file data. More... | |
| struct | HotStartHeader |
| In-memory representation of the OPENSWMM_HS_V1 header. More... | |
| struct | HotStartLinkRecord |
| Link hydraulic state at hot-start save time. More... | |
| class | HotStartManager |
| Static utility class for hot start file operations. More... | |
| struct | HotStartNodeRecord |
| Node hydraulic state at hot-start save time. More... | |
| struct | HotStartSubcatchRecord |
| Subcatchment state at hot-start save time. More... | |
| class | ICouplingPoint |
| Abstract coupling point between a 1D SWMM object and a 2D mesh cell. More... | |
| struct | InletStore |
| struct | InletUsageStore |
| class | IOThread |
| Producer-consumer IO thread for writing simulation snapshots. More... | |
| class | IOutputPlugin |
| Interface for output-writing plugins. More... | |
| class | IPluginComponentInfo |
| Describes a plugin component: metadata, capabilities, and factory methods. More... | |
| class | IReportPlugin |
| Interface for report-writing plugins. More... | |
| struct | LanduseData |
| struct | LidControlStore |
| SoA storage for LID control type definitions. More... | |
| struct | LidUsageStore |
| SoA storage for LID usage assignments to subcatchments. More... | |
| struct | LinkData |
| Structure-of-Arrays storage for all links. More... | |
| struct | LinkSnapshot |
| Snapshot of link state at an output time step. More... | |
| class | NameIndex |
| Bidirectional name↔index registry for SWMM objects. More... | |
| struct | NodeData |
| Structure-of-Arrays storage for all nodes. More... | |
| struct | NodeSnapshot |
| Snapshot of node state at an output time step. More... | |
| class | OutputReader |
| Reads SWMM 5.x binary .out files produced by DefaultOutputPlugin. More... | |
| struct | PatternData |
| class | PluginFactory |
| Manages all dynamically loaded plugins for one engine instance. More... | |
| struct | PluginSpec |
| One plugin entry from the [PLUGINS] section. More... | |
| struct | PollutantData |
| Static properties for each pollutant species. More... | |
| struct | RDIIAssignData |
| class | Router |
| Top-level routing orchestrator. More... | |
| struct | ShapeGroup |
| SoA parameter block for all links of one cross-section shape. More... | |
| struct | SimulationContext |
| Central, reentrant simulation context. More... | |
| struct | SimulationOptions |
| All SWMM simulation options parsed from [OPTIONS] section. More... | |
| struct | SimulationSnapshot |
| Complete simulation state snapshot at one output time step. More... | |
| struct | SnowpackStore |
| SoA storage for snowpack parameter sets. More... | |
| struct | SpatialFrame |
| Spatial frame containing CRS and georeferenced coordinates. More... | |
| struct | StreetStore |
| struct | SubcatchData |
| Structure-of-Arrays storage for all subcatchments. More... | |
| struct | SubcatchSnapshot |
| Snapshot of subcatchment state at an output time step. More... | |
| struct | Table |
| A single time series or rating curve. More... | |
| struct | TableCursor |
| Bidirectional cursor tracking the last accessed index in a Table. More... | |
| struct | TableData |
| SoA collection of all time series and curves in the model. More... | |
| struct | TransectStore |
| struct | TreatmentData |
| struct | UserFlagAssignment |
| A (object_type, object_name, flag_name) → value assignment. More... | |
| struct | UserFlagDef |
| Schema entry for a single user-defined flag. More... | |
| class | UserFlags |
| Stores the full user-flags data: schema definitions + per-object values. More... | |
| struct | WashoffData |
| struct | WriteTask |
| One item in the IOThread write queue. More... | |
| class | XSectGroups |
| Shape-grouped cross-section manager for batch computation. More... | |
| struct | XSectParams |
Typedefs | |
| using | UserFlagValue = std::variant< bool, int, double, std::string > |
| A concrete flag value assigned to a specific object. | |
| using | PluginInfoFactory = IPluginComponentInfo *(*)() |
| Typedef for the C factory function that plugin libraries must export. | |
Enumerations | |
| enum class | EngineState : int32_t { EngineState::CREATED = 0 , EngineState::OPENED = 1 , EngineState::INITIALIZED = 2 , EngineState::RUNNING = 3 , EngineState::PAUSED = 4 , EngineState::ENDED = 5 , EngineState::REPORTED = 6 , EngineState::CLOSED = 7 , EngineState::ERROR_STATE = 8 , EngineState::BUILDING = 9 } |
| High-level engine lifecycle state. More... | |
| enum class | FlowUnits : int { CFS = 0 , GPM = 1 , MGD = 2 , CMS = 3 , LPS = 4 , MLD = 5 } |
| Flow unit systems. More... | |
| enum class | RoutingModel : int { STEADY = 0 , KINWAVE = 1 , DYNWAVE = 2 } |
| Flow routing methods. More... | |
| enum class | InfiltrationModel : int { HORTON = 0 , MOD_HORTON = 1 , GREEN_AMPT = 2 , MOD_GREEN_AMPT = 3 , CURVE_NUMBER = 4 } |
| Infiltration methods. More... | |
| enum class | RunoffModel : int { NONE = 0 , NL_POND = 1 } |
| Runoff routing methods. More... | |
| enum class | UserFlagType : int { UserFlagType::BOOLEAN = 0 , UserFlagType::INTEGER = 1 , UserFlagType::REAL = 2 , UserFlagType::STRING = 3 } |
| Value type for a user flag. More... | |
| enum class | ForcingMode : int8_t { NONE = 0 , OVERRIDE = 1 , ADD = 2 } |
| enum class | ForcingPersist : int8_t { RESET = 0 , PERSIST = 1 } |
| enum class | RainSource : int8_t { TIMESERIES = 0 , FILE_RAIN = 1 } |
| Precipitation source type for a rain gage. More... | |
| enum class | RainFileFormat : int8_t { UNKNOWN = -1 , NWS_15 = 0 , NWS_HOURLY = 1 , DSI_3240 = 2 , DSI_3260 = 3 , HLY_PRCP = 4 , STAN_PRCP = 5 , USER_CSV = 6 } |
| Rain data format in an external file. More... | |
| enum class | LinkType : int8_t { CONDUIT = 0 , PUMP = 1 , ORIFICE = 2 , WEIR = 3 , OUTLET = 4 } |
| Link type codes. More... | |
| enum class | XsectShape : int16_t { CIRCULAR = 0 , FILLED_CIRCULAR = 1 , RECT_CLOSED = 2 , RECT_OPEN = 3 , TRAPEZOIDAL = 4 , TRIANGULAR = 5 , PARABOLIC = 6 , POWER = 7 , MODBASKETHANDLE = 8 , EGGSHAPED = 9 , HORSESHOE = 10 , GOTHIC = 11 , CATENARY = 12 , SEMIELLIPTICAL = 13 , BASKETHANDLE = 14 , SEMICIRCULAR = 15 , RECT_TRIANG = 16 , RECT_ROUND = 17 , IRREGULAR = 18 , CUSTOM = 19 , FORCE_MAIN = 20 , STREET_XSECT = 21 , DUMMY = 22 } |
| Conduit cross-section shape code. More... | |
| enum class | FlowClass : int8_t { DRY = 0 , UP_DRY = 1 , DN_DRY = 2 , SUBCRITICAL = 3 , SUPERCRITICAL = 4 , UP_CRITICAL = 5 , DN_CRITICAL = 6 } |
| Link flow state. More... | |
| enum class | NodeType : int8_t { JUNCTION = 0 , OUTFALL = 1 , DIVIDER = 2 , STORAGE = 3 } |
| Node type codes. More... | |
| enum class | OutfallType : int8_t { FREE = 0 , NORMAL = 1 , FIXED = 2 , TIDAL = 3 , TIMESERIES = 4 } |
| Outfall boundary condition type. More... | |
| enum class | DividerType : int8_t { CUTOFF = 0 , OVERFLOW_DIV = 1 , TABULAR = 2 , WEIR = 3 } |
| Flow divider type. More... | |
| enum class | MassUnits : int8_t { MG_PER_L = 0 , UG_PER_L = 1 , COUNTS_PER_L = 2 } |
| Pollutant concentration units. More... | |
| enum class | TableType : int { TIMESERIES = 0 , CURVE_STORAGE = 1 , CURVE_DIVERSION = 2 , CURVE_RATING = 3 , CURVE_SHAPE = 4 , CURVE_CONTROL = 5 , CURVE_TIDAL = 6 , CURVE_PUMP1 = 7 , CURVE_PUMP2 = 8 , CURVE_PUMP3 = 9 , CURVE_PUMP4 = 10 } |
| Type of data stored in a Table. More... | |
| enum class | RouteModel : int { STEADY = 0 , KINWAVE = 1 , DYNWAVE = 2 } |
| enum class | XSectShape : int { DUMMY = 0 , CIRCULAR = 1 , FILLED_CIRCULAR = 2 , RECT_CLOSED = 3 , RECT_OPEN = 4 , TRAPEZOIDAL = 5 , TRIANGULAR = 6 , PARABOLIC = 7 , POWERFUNC = 8 , RECT_TRIANG = 9 , RECT_ROUND = 10 , MOD_BASKET = 11 , HORIZ_ELLIPSE = 12 , VERT_ELLIPSE = 13 , ARCH = 14 , EGGSHAPED = 15 , HORSESHOE = 16 , GOTHIC = 17 , CATENARY = 18 , SEMIELLIPTICAL = 19 , BASKETHANDLE = 20 , SEMICIRCULAR = 21 , IRREGULAR = 22 , CUSTOM = 23 , FORCE_MAIN = 24 , STREET_XSECT = 25 } |
| enum class | InfilModel : int { HORTON = 0 , MOD_HORTON = 1 , GREEN_AMPT = 2 , CURVE_NUM = 3 } |
| enum class | PluginState : std::int32_t { PluginState::UNLOADED = 0 , PluginState::LOADED = 1 , PluginState::INITIALIZED = 2 , PluginState::VALIDATED = 3 , PluginState::PREPARED = 4 , PluginState::UPDATING = 5 , PluginState::FINALIZED = 6 , PluginState::CLOSED = 7 , PluginState::ERROR = -1 } |
| Plugin lifecycle states. More... | |
Functions | |
| std::from_chars_result | from_chars_double (const char *first, const char *last, double &value) noexcept |
| Locale-independent parse of a double from a character range. | |
| double | table_lookup_cursor (Table &tbl, double x_query) noexcept |
| Look up a value in a Table using the bidirectional cursor. | |
| double | table_step_cursor (Table &tbl, double x_query) noexcept |
| Piecewise-constant (step function) table lookup with cursor. | |
| const char * | plugin_state_to_string (PluginState state) noexcept |
| Convert a PluginState to a human-readable string. | |
| bool | plugin_state_transition_valid (PluginState from, PluginState to) noexcept |
| Check whether a state transition is valid. | |
| using openswmm::PluginInfoFactory = typedef IPluginComponentInfo*(*)() |
Typedef for the C factory function that plugin libraries must export.
Every plugin shared library must export a function with this signature and the name openswmm_plugin_info. The PluginFactory looks this up via dlsym/GetProcAddress after loading the library.
Example implementation in your plugin:
|
strong |
Flow divider type.
| Enumerator | |
|---|---|
| CUTOFF | |
| OVERFLOW_DIV | Renamed from OVERFLOW to avoid macOS math.h macro collision. |
| TABULAR | |
| WEIR | |
|
strong |
Link flow state.
| Enumerator | |
|---|---|
| DRY | |
| UP_DRY | |
| DN_DRY | |
| SUBCRITICAL | |
| SUPERCRITICAL | |
| UP_CRITICAL | |
| DN_CRITICAL | |
|
strong |
Flow unit systems.
| Enumerator | |
|---|---|
| CFS | Cubic feet per second. |
| GPM | Gallons per minute. |
| MGD | Million gallons per day. |
| CMS | Cubic meters per second. |
| LPS | Liters per second. |
| MLD | Million liters per day. |
|
strong |
|
strong |
|
strong |
|
strong |
Infiltration methods.
| Enumerator | |
|---|---|
| HORTON | |
| MOD_HORTON | |
| GREEN_AMPT | |
| MOD_GREEN_AMPT | |
| CURVE_NUMBER | |
|
strong |
Link type codes.
| Enumerator | |
|---|---|
| CONDUIT | |
| PUMP | |
| ORIFICE | |
| WEIR | |
| OUTLET | |
|
strong |
|
strong |
Node type codes.
| Enumerator | |
|---|---|
| JUNCTION | |
| OUTFALL | |
| DIVIDER | |
| STORAGE | |
|
strong |
Outfall boundary condition type.
| Enumerator | |
|---|---|
| FREE | |
| NORMAL | |
| FIXED | |
| TIDAL | |
| TIMESERIES | |
|
strong |
Rain data format in an external file.
|
strong |
Precipitation source type for a rain gage.
| Enumerator | |
|---|---|
| TIMESERIES | Data from an in-file [TIMESERIES]. |
| FILE_RAIN | Data from an external rain file. |
|
strong |
|
strong |
Flow routing methods.
| Enumerator | |
|---|---|
| STEADY | Steady-state (no routing) |
| KINWAVE | Kinematic wave approximation. |
| DYNWAVE | Dynamic wave (full Saint-Venant) |
|
strong |
Runoff routing methods.
| Enumerator | |
|---|---|
| NONE | |
| NL_POND | Non-linear reservoir (default) |
|
strong |
Type of data stored in a Table.
|
strong |
Conduit cross-section shape code.
|
strong |
|
inlinenoexcept |
Locale-independent parse of a double from a character range.
On toolchains that support std::from_chars for doubles this forwards directly; otherwise it falls back to std::strtod via a null-terminated temporary copy.
|
inlinenoexcept |
Convert a PluginState to a human-readable string.
| state | Plugin state. |
|
inlinenoexcept |
Check whether a state transition is valid.
| from | Current state. |
| to | Target state. |
|
inlinenoexcept |
Look up a value in a Table using the bidirectional cursor.
Performs linear interpolation between adjacent entries. Clamping behavior at boundaries:
The cursor is updated on each call to reflect the current position. For monotonically advancing queries (typical), this is O(1) amortized.
| tbl | Table to look up (cursor is modified in-place). |
| x_query | The independent variable value to look up. |
|
inlinenoexcept |
Piecewise-constant (step function) table lookup with cursor.
Returns y[idx] where x[idx] <= x_query < x[idx+1]. No interpolation — the value is held constant until the next table entry. This is the correct behavior for rain time series where each entry represents the value for the following interval.
| tbl | Table to look up (cursor is modified in-place). |
| x_query | The independent variable value to look up. |