OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
NegativeSources.hpp File Reference

D-NS1: one clamp-bookkeeping seam for all three quality engines. More...

#include <string>
#include "../core/SimulationContext.hpp"
Include dependency graph for NegativeSources.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::quality
 

Functions

void openswmm::quality::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 row.
 
void openswmm::quality::bookNegativeAgeClamp (SimulationContext &ctx, int node)
 
void openswmm::quality::bookNegativeCellSourceClamp (SimulationContext &ctx, int conduit, double shortfall)
 P1.4: book one ARD cell-source clamp. Counted, NOT ledgered — and the reason is structural, not an omission.
 
void openswmm::quality::summarizeNegativeSourceClamps (SimulationContext &ctx)
 

Detailed Description

D-NS1: one clamp-bookkeeping seam for all three quality engines.

Subplan §3.1 (user requirement, 2026-08-23): negative sources (mass extraction) are legal; extraction beyond an element's held mass clamps to the available amount, the ledger books the mass ACTUALLY removed (the shortfall is un-booked from the extraction's own row — otherwise continuity breaks by construction), and the counts are summarized at end of run. LEGACY, ARD, and LARD all call the same helper so the semantics cannot drift apart (the lesson-52 family, applied prospectively).

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0