36#ifndef OPENSWMM_QUALITY_NEGATIVE_SOURCES_HPP
37#define OPENSWMM_QUALITY_NEGATIVE_SOURCES_HPP
64 st.shortfall_mass += shortfall;
71 static_cast<std::size_t
>(p) <
75 if (!st.first_clamp_recorded) {
76 st.first_clamp_recorded =
true;
86 if (!st.first_clamp_recorded) {
87 st.first_clamp_recorded =
true;
122 st.shortfall_mass += shortfall;
123 if (!st.first_clamp_recorded) {
124 st.first_clamp_recorded =
true;
125 st.first_node = conduit;
132 const auto& st = ctx.
negsrc;
133 if (st.clamp_events == 0 && st.age_clamp_events == 0)
return;
135 "D-NS1 summary: extraction exceeded available mass " +
136 std::to_string(st.clamp_events) +
" time(s) (unmet extraction " +
137 std::to_string(st.shortfall_mass) +
" internal mass units)" +
138 (st.age_clamp_events > 0
139 ?
", water-age extraction clamped " +
140 std::to_string(st.age_clamp_events) +
" time(s)"
142 ", first at element index " + std::to_string(st.first_node) +
143 ". Extraction clamps ROUTINELY while the system fills, when elements "
144 "are near-empty; a nonzero count is not by itself a modelling error. "
145 "Node-seam clamps are ledgered (the ledger carries the mass actually "
146 "removed); ARD cell-source clamps are counted only — see "
147 "bookNegativeCellSourceClamp.");
The central, reentrant simulation context for the new engine.
Definition NegativeSources.hpp:44
void summarizeNegativeSourceClamps(SimulationContext &ctx)
Definition NegativeSources.hpp:131
void bookNegativeAgeClamp(SimulationContext &ctx, int node)
Definition NegativeSources.hpp:83
void bookNegativeSourceClamp(SimulationContext &ctx, int node, int p, double shortfall)
Book one pollutant-row clamp: count it and un-book the shortfall from the external-extraction ledger ...
Definition NegativeSources.hpp:60
void bookNegativeCellSourceClamp(SimulationContext &ctx, int conduit, double shortfall)
P1.4: book one ARD cell-source clamp. Counted, NOT ledgered — and the reason is structural,...
Definition NegativeSources.hpp:118
Definition NodeCoupling.cpp:16
std::vector< double > qual_routing_ex_in
External (interface file) quality mass inflow.
Definition SimulationContext.hpp:1155
long clamp_events
pollutant clamps, all engines
Definition SimulationContext.hpp:1296
long age_clamp_events
age-row clamps
Definition SimulationContext.hpp:1298
Central, reentrant simulation context.
Definition SimulationContext.hpp:353
struct openswmm::SimulationContext::MassBalance mass_balance
struct openswmm::SimulationContext::NegativeSourceStats negsrc
std::vector< std::string > warnings
Accumulated warning messages written to report file.
Definition SimulationContext.hpp:998