36#ifndef OPENSWMM_QUALITY_NEGATIVE_SOURCES_HPP
37#define OPENSWMM_QUALITY_NEGATIVE_SOURCES_HPP
74 st.shortfall_mass += shortfall;
82 if (!st.first_clamp_recorded) {
83 st.first_clamp_recorded =
true;
102 if (!st.first_clamp_recorded) {
103 st.first_clamp_recorded =
true;
104 st.first_node =
node;
140 st.shortfall_mass += shortfall;
141 if (!st.first_clamp_recorded) {
142 st.first_clamp_recorded =
true;
143 st.first_node = conduit;
160 const auto& st = ctx.
negsrc;
161 if (st.clamp_events == 0 && st.age_clamp_events == 0)
164 "D-NS1 summary: extraction exceeded available mass " + std::to_string(st.clamp_events) +
165 " time(s) (unmet extraction " + std::to_string(st.shortfall_mass) +
166 " internal mass units)" +
167 (st.age_clamp_events > 0
168 ?
", water-age extraction clamped " + std::to_string(st.age_clamp_events) +
" time(s)"
170 ", first at element index " + std::to_string(st.first_node) +
171 ". Extraction clamps ROUTINELY while the system fills, when elements "
172 "are near-empty; a nonzero count is not by itself a modelling error. "
173 "Node-seam clamps are ledgered (the ledger carries the mass actually "
174 "removed); ARD cell-source clamps are counted only — see "
175 "bookNegativeCellSourceClamp.");
The central, reentrant simulation context for the new engine.
Definition ConservativeMixing.cpp:8
void summarizeNegativeSourceClamps(SimulationContext &ctx)
End-of-run summary (pushed once by SWMMEngine::end when anything clamped; gates read ctx....
Definition NegativeSources.hpp:159
void bookNegativeAgeClamp(SimulationContext &ctx, int node)
Age-row clamp: counted, not ledgered (no age row until A2c) and not warned per-clamp (see bookNegativ...
Definition NegativeSources.hpp:99
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:71
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:137
Definition ExchangeLaw.hpp:60
std::vector< double > qual_routing_ex_in
External (interface file) quality mass inflow.
Definition SimulationContext.hpp:1328
long clamp_events
pollutant clamps, all engines
Definition SimulationContext.hpp:1489
long age_clamp_events
age-row clamps
Definition SimulationContext.hpp:1491
Central, reentrant simulation context.
Definition SimulationContext.hpp:390
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:1107