31#ifndef OPENSWMM_ENGINE_INFLOW_DATA_HPP
32#define OPENSWMM_ENGINE_INFLOW_DATA_HPP
87 void add(
int ni,
const std::string& cons,
const std::string& ts,
const std::string& type,
88 double mf,
double sf,
double base,
const std::string& pat,
89 const std::string& name = {}) {
111 if (idx < 0 || idx >=
count())
113 const auto u =
static_cast<std::size_t
>(idx);
169 void add(
int ni,
const std::string& cons,
double avg,
const std::string& p1,
170 const std::string& p2,
const std::string& p3,
const std::string& p4,
171 const std::string& name = {}) {
192 if (idx < 0 || idx >=
count())
194 const auto u =
static_cast<std::size_t
>(idx);
241 void add(
int ni,
const std::string& uh,
double area,
const std::string& name = {}) {
258 if (idx < 0 || idx >=
count())
260 const auto u =
static_cast<std::size_t
>(idx);
427 void add(
const std::string& name,
int type,
const std::vector<double>& facs) {
428 names.push_back(name);
429 types.push_back(type);
442 int find(std::string_view name)
const noexcept {
443 for (
int i = 0; i <
count(); ++i)
444 if (
ieq(
names[
static_cast<std::size_t
>(i)], name))
Case-insensitive string helpers matching legacy SWMM name semantics.
Rain records, accepted runoff-clock state and read-only report lookups. Context routines require alig...
Definition Gage.cpp:38
Definition ExchangeLaw.hpp:60
bool ieq(std::string_view a, std::string_view b) noexcept
Compare two byte sequences using the legacy ASCII uppercase fold.
Definition StringCase.hpp:70
Dry-weather-flow authoring rows stored in aligned columns.
Definition InflowData.hpp:136
std::vector< std::string > constituent
"FLOW" or pollutant name
Definition InflowData.hpp:145
std::vector< int > node_idx
Target node.
Definition InflowData.hpp:143
std::vector< std::string > pat1
Monthly pattern name.
Definition InflowData.hpp:147
std::vector< std::string > pat2
Daily pattern name.
Definition InflowData.hpp:148
std::vector< double > avg_value
Average value.
Definition InflowData.hpp:146
void add(int ni, const std::string &cons, double avg, const std::string &p1, const std::string &p2, const std::string &p3, const std::string &p4, const std::string &name={})
Append a copied authoring row.
Definition InflowData.hpp:169
void erase(int idx)
Erase an aligned row and shift all later row indices down.
Definition InflowData.hpp:191
std::vector< std::string > pat4
Weekend pattern name.
Definition InflowData.hpp:150
int count() const
Count rows in the primary ordered column.
Definition InflowData.hpp:141
std::vector< std::string > node_name
Raw node name from input (for post-parse re-resolution)
Definition InflowData.hpp:144
std::vector< std::string > pat3
Hourly pattern name.
Definition InflowData.hpp:149
External inflow authoring rows stored in aligned columns.
Definition InflowData.hpp:52
std::vector< std::string > pattern_name
Baseline pattern name.
Definition InflowData.hpp:67
std::vector< std::string > constituent
"FLOW" or pollutant name
Definition InflowData.hpp:61
std::vector< int > node_idx
Target node index.
Definition InflowData.hpp:59
std::vector< double > baseline
Baseline value.
Definition InflowData.hpp:66
int count() const
Count rows in the primary ordered column.
Definition InflowData.hpp:57
std::vector< std::string > inflow_type
"FLOW","CONCEN","MASS"
Definition InflowData.hpp:63
std::vector< double > s_factor
Scaling factor.
Definition InflowData.hpp:65
std::vector< double > m_factor
Multiplier factor.
Definition InflowData.hpp:64
std::vector< std::string > node_name
Raw node name from input (for post-parse re-resolution)
Definition InflowData.hpp:60
std::vector< std::string > ts_name
Timeseries name ("" if none)
Definition InflowData.hpp:62
void add(int ni, const std::string &cons, const std::string &ts, const std::string &type, double mf, double sf, double base, const std::string &pat, const std::string &name={})
Append a copied authoring row.
Definition InflowData.hpp:87
void erase(int idx)
Erase an aligned row and shift all later row indices down.
Definition InflowData.hpp:110
Time-pattern authoring names, types and multiplier vectors.
Definition InflowData.hpp:404
int find(std::string_view name) const noexcept
Find the first ASCII-insensitive pattern name match.
Definition InflowData.hpp:442
std::vector< std::vector< double > > factors
Up to 24 multiplier values.
Definition InflowData.hpp:413
void add(const std::string &name, int type, const std::vector< double > &facs)
Append a copied pattern row.
Definition InflowData.hpp:427
std::vector< std::string > names
Pattern name.
Definition InflowData.hpp:411
int count() const
Count rows in the primary ordered column.
Definition InflowData.hpp:409
std::vector< int > types
0=MONTHLY,1=DAILY,2=HOURLY,3=WEEKEND
Definition InflowData.hpp:412
Node-to-hydrograph authoring assignments stored in aligned columns.
Definition InflowData.hpp:216
std::vector< std::string > uh_name
Unit hydrograph name.
Definition InflowData.hpp:225
std::vector< double > sewer_area
Tributary sewer area.
Definition InflowData.hpp:226
std::vector< std::string > node_name
Raw node name from input (for post-parse re-resolution)
Definition InflowData.hpp:224
std::vector< int > node_idx
Target node.
Definition InflowData.hpp:223
int count() const
Count rows in the primary ordered column.
Definition InflowData.hpp:221
void erase(int idx)
Erase an aligned row and shift all later row indices down.
Definition InflowData.hpp:257
void add(int ni, const std::string &uh, double area, const std::string &name={})
Append a copied authoring row.
Definition InflowData.hpp:241
Exponential IA-decay authoring rows keyed by group and response.
Definition InflowData.hpp:372
int count() const
Count rows in the primary ordered column.
Definition InflowData.hpp:377
void add(const RDIIDecayEntry &e)
Append a copied authoring row.
Definition InflowData.hpp:391
std::vector< RDIIDecayEntry > entries
Definition InflowData.hpp:379
Definition InflowData.hpp:346
double k_T
Thermal recovery rate at T_ref (1/hr)
Definition InflowData.hpp:352
double k_0
Base recovery rate (1/hr)
Definition InflowData.hpp:351
double k_dep
Depletion rate (1/project rain-depth unit: 1/in or 1/mm) — temperature-independent.
Definition InflowData.hpp:349
double theta_rec
Temperature sensitivity (1/deg C)
Definition InflowData.hpp:354
int response
0=SHORT, 1=MEDIUM, 2=LONG
Definition InflowData.hpp:348
std::string uh_name
Matches UnitHydEntry::name.
Definition InflowData.hpp:347
double snow_T
Rain/snow partition threshold & melt base (deg C)
Definition InflowData.hpp:362
bool snow_on
Degree-day snow model enabled for this row.
Definition InflowData.hpp:361
double T_freeze
Recovery suppressed when T < T_freeze (deg C)
Definition InflowData.hpp:355
double snow_ddf
Degree-day melt factor (project rain-depth unit/degC/day)
Definition InflowData.hpp:363
double T_ref
Reference temperature (deg C)
Definition InflowData.hpp:353
Hydrograph parameter rows and independent group-to-gage assignments.
Definition InflowData.hpp:291
std::vector< std::string > gage_assignments
Rain gage names associated with each UH group (name → gage name)
Definition InflowData.hpp:301
std::vector< std::string > gage_names
Assigned rain gage names.
Definition InflowData.hpp:302
void add(const UnitHydEntry &e)
Append a copied authoring row.
Definition InflowData.hpp:329
std::vector< UnitHydEntry > entries
Definition InflowData.hpp:298
void add_gage(const std::string &uh_name, const std::string &gage)
Append a copied group-to-gage assignment without deduplication.
Definition InflowData.hpp:313
int count() const
Count rows in the primary ordered column.
Definition InflowData.hpp:296
Definition InflowData.hpp:272
double drecov
IA recovery rate.
Definition InflowData.hpp:281
std::string name
UH group name.
Definition InflowData.hpp:273
double t
Time to peak (hours)
Definition InflowData.hpp:278
int response
0=SHORT, 1=MEDIUM, 2=LONG
Definition InflowData.hpp:276
double dmax
Max initial abstraction depth.
Definition InflowData.hpp:280
double r
Fraction of rainfall volume.
Definition InflowData.hpp:277
int month
Month index (0-11, or -1 for ALL)
Definition InflowData.hpp:275
std::string gage_name
Associated rain gage name.
Definition InflowData.hpp:274
double dinit
Initial IA used.
Definition InflowData.hpp:282
double k
Recession-limb-to-peak-time ratio (tBase = t*(1+k); k >= 0)
Definition InflowData.hpp:279