32#ifndef OPENSWMM_ENGINE_QUALITY_DATA_HPP
33#define OPENSWMM_ENGINE_QUALITY_DATA_HPP
72 auto un =
static_cast<std::size_t
>(n);
120 auto total =
static_cast<std::size_t
>(nlu) *
static_cast<std::size_t
>(npoll);
122 coeff1.assign(total, 0.0);
123 coeff2.assign(total, 0.0);
124 coeff3.assign(total, 0.0);
170 auto total =
static_cast<std::size_t
>(nlu) *
static_cast<std::size_t
>(npoll);
172 coeff.assign(total, 0.0);
173 expon.assign(total, 0.0);
186 coeff.shrink_to_fit();
187 expon.shrink_to_fit();
205 std::vector<openswmm::treatment::TreatExpr>
compiled;
232 auto total =
static_cast<std::size_t
>(nn * npoll);
236 cin.assign(
static_cast<std::size_t
>(npoll), 0.0);
237 removal.assign(
static_cast<std::size_t
>(npoll), -1.0);
Treatment expression evaluator for water quality.
Definition ExchangeLaw.hpp:60
Definition QualityData.hpp:97
int n_pollutants
Definition QualityData.hpp:106
std::vector< int > func_type
Index: [landuse * n_pollutants + pollutant].
Definition QualityData.hpp:99
void shrink_to_fit()
Request capacity reduction for the owned parameter columns.
Definition QualityData.hpp:134
int n_landuses
Definition QualityData.hpp:105
std::vector< double > coeff2
Definition QualityData.hpp:101
void resize(int nlu, int npoll)
Replace the land-use-major pollutant parameter matrix.
Definition QualityData.hpp:117
std::vector< double > coeff1
Definition QualityData.hpp:100
std::vector< double > coeff3
Definition QualityData.hpp:102
std::vector< int > normalizer
0=PER_AREA, 1=PER_CURB
Definition QualityData.hpp:103
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:61
int count() const
Count land-use rows from the sweep interval column.
Definition QualityData.hpp:50
void resize(int n)
Replace all land-use parameter/comment rows with defaults.
Definition QualityData.hpp:71
std::vector< double > sweep_interval
Days between sweeps.
Definition QualityData.hpp:52
std::vector< double > last_swept
Days since last swept.
Definition QualityData.hpp:54
void shrink_to_fit()
Request capacity reduction for the owned parameter columns.
Definition QualityData.hpp:85
std::vector< double > sweep_removal
Max removal fraction (0-100)
Definition QualityData.hpp:53
Definition QualityData.hpp:197
std::vector< std::string > expressions
Index: [node * n_pollutants + pollutant].
Definition QualityData.hpp:199
int n_nodes
Definition QualityData.hpp:201
std::vector< double > removal
Definition QualityData.hpp:215
void resize(int nn, int npoll)
Resize node-major treatment storage and reset authored expressions/workspaces.
Definition QualityData.hpp:229
std::vector< openswmm::treatment::TreatExpr > compiled
Compiled treatment expressions (same indexing as expressions[])
Definition QualityData.hpp:205
void shrink_to_fit()
Request capacity reduction for authored and compiled expression vectors.
Definition QualityData.hpp:246
std::vector< bool > has_treatment
Per-node flag: true if any pollutant has a treatment expression.
Definition QualityData.hpp:208
std::vector< double > cin
Per-node inflow concentrations (size = n_pollutants, reused each timestep)
Definition QualityData.hpp:211
bool hasAny() const
Test whether any authored treatment expression is nonempty.
Definition QualityData.hpp:257
int n_pollutants
Definition QualityData.hpp:202
Definition QualityData.hpp:147
std::vector< double > sweep_effic
0-100
Definition QualityData.hpp:152
int n_pollutants
Definition QualityData.hpp:156
std::vector< double > expon
Definition QualityData.hpp:151
std::vector< int > func_type
Index: [landuse * n_pollutants + pollutant].
Definition QualityData.hpp:149
std::vector< double > bmp_effic
0-100
Definition QualityData.hpp:153
std::vector< double > coeff
Definition QualityData.hpp:150
void resize(int nlu, int npoll)
Replace the land-use-major pollutant parameter matrix.
Definition QualityData.hpp:167
int n_landuses
Definition QualityData.hpp:155
void shrink_to_fit()
Request capacity reduction for the owned parameter columns.
Definition QualityData.hpp:184