#include <InitialQualityData.hpp>
|
| int | count () const |
| | Count initial-quality rows from the element-kind column.
|
| |
| void | add (bool link, const std::string &name, const std::string &cons, double v, int ei=-1, int k=kKindUnresolved, bool fromFile=false) |
| | Append an initial-quality row without resolving its names.
|
| |
| void | erase (int idx) |
| | Remove a stored initial-quality row when its index exists.
|
| |
|
| static constexpr int | msxKind (int species) noexcept |
| | Encode a reaction-species index as a negative constituent kind.
|
| |
| static constexpr int | msxSpecies (int k) noexcept |
| | Decode a negative MSX kind into its reaction-species index.
|
| |
|
| std::vector< uint8_t > | is_link |
| | 0 = NODE row, 1 = LINK row
|
| |
| std::vector< std::string > | elem_name |
| | Raw element name (post-parse re-resolution)
|
| |
| std::vector< int > | elem_idx |
| | Resolved node/link index (-1 until resolved)
|
| |
| std::vector< std::string > | constituent |
| | Raw constituent name (writer round-trip)
|
| |
| std::vector< int > | kind |
| | >=0 pollutant idx; kKind* otherwise
|
| |
| std::vector< double > | value |
| |
| std::vector< uint8_t > | from_file |
| |
| std::string | file |
| |
◆ add()
| void openswmm::InitialQualityData::add |
( |
bool | link, |
|
|
const std::string & | name, |
|
|
const std::string & | cons, |
|
|
double | v, |
|
|
int | ei = -1, |
|
|
int | k = kKindUnresolved, |
|
|
bool | fromFile = false ) |
|
inline |
Append an initial-quality row without resolving its names.
Allows duplicate rows and unresolved/invalid inputs. Independent column appends may fail without rollback; no runtime concentration update or registry synchronization.
- Parameters
-
| [in] | link | True for a link row, false for a node row. |
| [in] | name | Borrowed authored element name copied verbatim. |
| [in] | cons | Borrowed constituent name copied verbatim. |
| [in] | v | Raw user-unit value: pollutant/species concentration, age hours or temperature degC. |
| [in] | ei | Resolved element index or -1; no bounds check. |
| [in] | k | Pollutant index or reserved/MSX/unresolved kind; no validation. |
| [in] | fromFile | Whether the writer should treat this row as sidecar-owned. |
◆ count()
| int openswmm::InitialQualityData::count |
( |
| ) |
const |
|
inline |
Count initial-quality rows from the element-kind column.
- Returns
- is_link.size() converted to int; other columns are not checked.
◆ erase()
| void openswmm::InitialQualityData::erase |
( |
int | idx | ) |
|
|
inline |
Remove a stored initial-quality row when its index exists.
Requires aligned core columns; from_file is erased only when present. Subsequent rows shift and borrowed elements are invalidated; sidecar path and runtime seeded concentrations remain unchanged.
- Parameters
-
| [in] | idx | Row index; negative or >=count() is a no-op. |
◆ msxKind()
| static constexpr int openswmm::InitialQualityData::msxKind |
( |
int | species | ) |
|
|
inlinestaticconstexprnoexcept |
Encode a reaction-species index as a negative constituent kind.
- Parameters
-
| [in] | species | Nonnegative MSX index such that kKindMsxFirst-species fits signed int. |
- Returns
- kKindMsxFirst-species; no registry/existence or overflow check.
◆ msxSpecies()
| static constexpr int openswmm::InitialQualityData::msxSpecies |
( |
int | k | ) |
|
|
inlinestaticconstexprnoexcept |
Decode a negative MSX kind into its reaction-species index.
- Parameters
-
| [in] | k | Constituent kind; caller ensures kKindMsxFirst-k fits signed int if k<=kKindMsxFirst. |
- Returns
- Decoded nonnegative MSX index, or -1 for a non-MSX kind; no species-count validation.
◆ constituent
| std::vector<std::string> openswmm::InitialQualityData::constituent |
Raw constituent name (writer round-trip)
◆ elem_idx
| std::vector<int> openswmm::InitialQualityData::elem_idx |
Resolved node/link index (-1 until resolved)
◆ elem_name
| std::vector<std::string> openswmm::InitialQualityData::elem_name |
Raw element name (post-parse re-resolution)
◆ file
| std::string openswmm::InitialQualityData::file |
U2: [INITIAL_QUALITY] FILE <path> as written (relative to the .inp); empty when none. Read at open, after the .inp parse.
◆ from_file
| std::vector<uint8_t> openswmm::InitialQualityData::from_file |
U2: 1 when the row came from the [INITIAL_QUALITY] FILE <csv> sidecar. The writer emits the FILE line and the inline rows only; the sidecar is the source of its rows (edit or re-import it).
◆ is_link
| std::vector<uint8_t> openswmm::InitialQualityData::is_link |
0 = NODE row, 1 = LINK row
◆ kind
| std::vector<int> openswmm::InitialQualityData::kind |
>=0 pollutant idx; kKind* otherwise
◆ kKindMsxFirst
| int openswmm::InitialQualityData::kKindMsxFirst = -100 |
|
staticconstexpr |
U2 (2026-09-07): MSX species m of the reactions component is encoded as kind = kKindMsxFirst - m (every value <= kKindMsxFirst). The row stays here for the writer ([INITIAL_QUALITY] is the canonical home) and is mirrored into ReactionData::init_elem_* for the engines by transport::mirrorInitialQualityMsxRows.
◆ kKindTemperature
| int openswmm::InitialQualityData::kKindTemperature = -2 |
|
staticconstexpr |
◆ kKindUnresolved
| int openswmm::InitialQualityData::kKindUnresolved = -3 |
|
staticconstexpr |
◆ kKindWaterAge
| int openswmm::InitialQualityData::kKindWaterAge = -1 |
|
staticconstexpr |
Classified constituent kinds (see kind).
WATER_AGE (hours)
◆ value
| std::vector<double> openswmm::InitialQualityData::value |
The documentation for this struct was generated from the following file: