32#ifndef OPENSWMM_ENGINE_QUALITY_DATA_HPP
33#define OPENSWMM_ENGINE_QUALITY_DATA_HPP
60 auto un =
static_cast<std::size_t
>(n);
92 auto total =
static_cast<std::size_t
>(nlu) *
93 static_cast<std::size_t
>(npoll);
127 auto total =
static_cast<std::size_t
>(nlu) *
128 static_cast<std::size_t
>(npoll);
130 coeff.assign(total, 0.0);
131 expon.assign(total, 0.0);
138 coeff.shrink_to_fit();
139 expon.shrink_to_fit();
157 std::vector<openswmm::treatment::TreatExpr>
compiled;
171 auto total =
static_cast<std::size_t
>(nn * npoll);
175 cin.assign(
static_cast<std::size_t
>(npoll), 0.0);
176 removal.assign(
static_cast<std::size_t
>(npoll), -1.0);
185 for (
const auto& e :
expressions)
if (!e.empty())
return true;
Treatment expression evaluator for water quality.
Definition NodeCoupling.cpp:16
Definition QualityData.hpp:79
int n_pollutants
Definition QualityData.hpp:88
std::vector< int > func_type
Index: [landuse * n_pollutants + pollutant].
Definition QualityData.hpp:81
void shrink_to_fit()
Definition QualityData.hpp:101
int n_landuses
Definition QualityData.hpp:87
std::vector< double > coeff2
Definition QualityData.hpp:83
void resize(int nlu, int npoll)
Definition QualityData.hpp:90
std::vector< double > coeff1
Definition QualityData.hpp:82
std::vector< double > coeff3
Definition QualityData.hpp:84
std::vector< int > normalizer
0=PER_AREA, 1=PER_CURB
Definition QualityData.hpp:85
Definition QualityData.hpp:45
std::vector< std::string > comments
Object comment from the INP file (';'-prefixed lines immediately above this landuse's data row),...
Definition QualityData.hpp:57
int count() const
Definition QualityData.hpp:46
void resize(int n)
Definition QualityData.hpp:59
std::vector< double > sweep_interval
Days between sweeps.
Definition QualityData.hpp:48
std::vector< double > last_swept
Days since last swept.
Definition QualityData.hpp:50
void shrink_to_fit()
Definition QualityData.hpp:67
std::vector< double > sweep_removal
Max removal fraction (0-100)
Definition QualityData.hpp:49
Definition QualityData.hpp:149
std::vector< std::string > expressions
Index: [node * n_pollutants + pollutant].
Definition QualityData.hpp:151
int n_nodes
Definition QualityData.hpp:153
std::vector< double > removal
Definition QualityData.hpp:167
void resize(int nn, int npoll)
Definition QualityData.hpp:169
std::vector< openswmm::treatment::TreatExpr > compiled
Compiled treatment expressions (same indexing as expressions[])
Definition QualityData.hpp:157
void shrink_to_fit()
Definition QualityData.hpp:179
std::vector< bool > has_treatment
Per-node flag: true if any pollutant has a treatment expression.
Definition QualityData.hpp:160
std::vector< double > cin
Per-node inflow concentrations (size = n_pollutants, reused each timestep)
Definition QualityData.hpp:163
bool hasAny() const
Definition QualityData.hpp:184
int n_pollutants
Definition QualityData.hpp:154
Definition QualityData.hpp:114
std::vector< double > sweep_effic
0-100
Definition QualityData.hpp:119
int n_pollutants
Definition QualityData.hpp:123
std::vector< double > expon
Definition QualityData.hpp:118
std::vector< int > func_type
Index: [landuse * n_pollutants + pollutant].
Definition QualityData.hpp:116
std::vector< double > bmp_effic
0-100
Definition QualityData.hpp:120
std::vector< double > coeff
Definition QualityData.hpp:117
void resize(int nlu, int npoll)
Definition QualityData.hpp:125
int n_landuses
Definition QualityData.hpp:122
void shrink_to_fit()
Definition QualityData.hpp:136