OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
Core Engine The core engine module, including lifecycle management, simulation options, and shared utilities.
Collaboration diagram for Core Engine The core engine module, including lifecycle management, simulation options, and shared utilities.:

Files

file  charconv_compat.hpp
 Portable from_chars for floating-point types.
 
file  Constants.hpp
 Global physical, numerical, and model constants for OpenSWMM Engine.
 
file  DateTime.hpp
 DateTime utility functions — numerically identical to legacy datetime.c.
 
file  ErrorCodes.cpp
 Error/warning description table and formatting — legacy-compatible.
 
file  ErrorCodes.hpp
 Legacy-compatible error and warning codes with description lookup.
 
file  FileIO.hpp
 Opening files by UTF-8 path on every platform.
 
file  FilePathPair.hpp
 Carrier for an external file reference in a SWMM model.
 
file  InpWriter.cpp
 Comprehensive .inp serialisation — round-trip identical output.
 
file  InpWriter.hpp
 Write a SimulationContext to a SWMM .inp file.
 
file  InterfaceFile.cpp
 Routing interface file — coupling between separate SWMM simulations.
 
file  InterfaceFile.hpp
 Routing interface file — coupling between separate SWMM simulations.
 
file  NodeCoupling2D.cpp
 [2D_NODE_COUPLING] tokens, class defaults, validation, section handler and row formatting.
 
file  NodeCoupling2D.hpp
 [2D_NODE_COUPLING]: per-node coupling type — tokens, class defaults, validation, input section and row formatting.
 
file  PathResolver.hpp
 Pure-function path normalisation and relative-path math.
 
file  SimulationContext.hpp
 The central, reentrant simulation context for the new engine.
 
file  SpatialFrame.hpp
 Spatial frame — CRS specification and coordinate data for nodes/links.
 
file  StringCase.hpp
 Case-insensitive string helpers matching legacy SWMM name semantics.
 
file  TypeHelpers.hpp
 Shared C↔internal type mapping utilities for node and link type enums.
 
file  UnitConversion.cpp
 Global unit conversion — matching legacy SWMM UCF().
 
file  UnitConversion.hpp
 Global unit conversion factors — matching legacy SWMM Ucf[]/Qcf[].
 
file  UserFlags.hpp
 User-defined model flags (InfoWorks ICM-style, two-section design).
 

Classes

struct  openswmm::PluginSpec
 One plugin entry from the [PLUGINS] section. More...
 
struct  openswmm::HotstartSaveEntry
 Configuration parsed from the [FILES] section. More...
 
struct  openswmm::StateAccessors
 Solver-neutral hooks for reading and writing solver-internal state (infiltration, groundwater) at hot-start save/load time. More...
 
struct  openswmm::SimulationContext
 Central, reentrant simulation context. More...
 
struct  openswmm::SimulationOptions
 All SWMM simulation options parsed from [OPTIONS] section. More...
 
class  openswmm::ICouplingPoint
 Abstract coupling point between a 1D SWMM object and a 2D mesh cell. More...
 
struct  openswmm::SpatialFrame
 Spatial frame containing CRS and georeferenced coordinates. More...
 
struct  openswmm::UserFlagDef
 Schema entry for a single user-defined flag. More...
 
struct  openswmm::UserFlagAssignment
 A (object_type, object_name, flag_name) → value assignment. More...
 
class  openswmm::UserFlags
 Stores the full user-flags data: schema definitions + per-object values. More...
 

Typedefs

using openswmm::UserFlagValue = std::variant<bool, int, double, std::string>
 A concrete flag value assigned to a specific object.
 

Enumerations

enum class  openswmm::FileMode {
  openswmm::FileMode::NONE ,
  openswmm::FileMode::SAVE ,
  openswmm::FileMode::USE
}
 Mode keyword for one [FILES] row — SAVE or USE. More...
 
enum class  openswmm::EngineState : int32_t {
  openswmm::EngineState::CREATED = 0 ,
  openswmm::EngineState::OPENED = 1 ,
  openswmm::EngineState::INITIALIZED = 2 ,
  openswmm::EngineState::RUNNING = 3 ,
  openswmm::EngineState::PAUSED = 4 ,
  openswmm::EngineState::ENDED = 5 ,
  openswmm::EngineState::REPORTED = 6 ,
  openswmm::EngineState::CLOSED = 7 ,
  openswmm::EngineState::ERROR_STATE = 8 ,
  openswmm::EngineState::BUILDING = 9
}
 High-level engine lifecycle state. More...
 
enum class  openswmm::UserFlagType : int {
  openswmm::UserFlagType::BOOLEAN = 0 ,
  openswmm::UserFlagType::INTEGER = 1 ,
  openswmm::UserFlagType::REAL = 2 ,
  openswmm::UserFlagType::STRING = 3
}
 Value type for a user flag. More...
 

Detailed Description

Typedef Documentation

◆ UserFlagValue

using openswmm::UserFlagValue = std::variant<bool, int, double, std::string>

A concrete flag value assigned to a specific object.

Enumeration Type Documentation

◆ EngineState

enum class openswmm::EngineState : int32_t
strong

High-level engine lifecycle state.

Mirrors SWMM_EngineState in include/openswmm/engine/openswmm_engine.h but lives in the C++ domain (scoped enum).

Enumerator
CREATED 

Context allocated, no input loaded.

OPENED 

Input file parsed, objects allocated.

INITIALIZED 

Initial conditions applied.

RUNNING 

Simulation loop in progress.

PAUSED 

Simulation paused (future hot-swap support)

ENDED 

Simulation loop completed.

REPORTED 

Summary report written.

CLOSED 

Resources released.

ERROR_STATE 

Fatal error; call swmm_engine_last_error()

BUILDING 

Programmatic model construction in progress (no .inp)

◆ FileMode

enum class openswmm::FileMode
strong

Mode keyword for one [FILES] row — SAVE or USE.

NONE is the in-memory default for unconfigured slots so the writer can skip them. SAVE writes data out at simulation end; USE reads data in at simulation start.

Enumerator
NONE 
SAVE 
USE 

◆ UserFlagType

enum class openswmm::UserFlagType : int
strong

Value type for a user flag.

Enumerator
BOOLEAN 

YES/NO/TRUE/FALSE/1/0.

INTEGER 

Signed integer.

REAL 

Double-precision floating-point.

STRING 

Arbitrary string.