31#ifndef OPENSWMM_ENGINE_INFLOW_DATA_HPP
32#define OPENSWMM_ENGINE_INFLOW_DATA_HPP
59 void add(
int ni,
const std::string& cons,
const std::string& ts,
60 const std::string& type,
double mf,
double sf,
double base,
61 const std::string& pat,
const std::string& name = {}) {
72 if (idx < 0 || idx >=
count())
return;
73 const auto u =
static_cast<std::size_t
>(idx);
97 std::vector<std::string>
pat1;
98 std::vector<std::string>
pat2;
99 std::vector<std::string>
pat3;
102 void add(
int ni,
const std::string& cons,
double avg,
103 const std::string& p1,
const std::string& p2,
104 const std::string& p3,
const std::string& p4,
105 const std::string& name = {}) {
109 pat1.push_back(p1);
pat2.push_back(p2);
110 pat3.push_back(p3);
pat4.push_back(p4);
114 if (idx < 0 || idx >=
count())
return;
115 const auto u =
static_cast<std::size_t
>(idx);
139 void add(
int ni,
const std::string& uh,
double area,
140 const std::string& name = {}) {
147 if (idx < 0 || idx >=
count())
return;
148 const auto u =
static_cast<std::size_t
>(idx);
242 void add(
const std::string& name,
int type,
const std::vector<double>& facs) {
249 int find(std::string_view name)
const noexcept {
250 for (
int i = 0; i <
count(); ++i)
251 if (
ieq(
names[
static_cast<std::size_t
>(i)], name))
return i;
Case-insensitive string helpers matching legacy SWMM name semantics.
Definition NodeCoupling.cpp:16
bool ieq(std::string_view a, std::string_view b) noexcept
Case-insensitive equality (ASCII fold), matching legacy samestr().
Definition StringCase.hpp:57
Definition InflowData.hpp:90
std::vector< std::string > constituent
"FLOW" or pollutant name
Definition InflowData.hpp:95
std::vector< int > node_idx
Target node.
Definition InflowData.hpp:93
std::vector< std::string > pat1
Monthly pattern name.
Definition InflowData.hpp:97
std::vector< std::string > pat2
Daily pattern name.
Definition InflowData.hpp:98
std::vector< double > avg_value
Average value.
Definition InflowData.hpp:96
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={})
Definition InflowData.hpp:102
void erase(int idx)
Definition InflowData.hpp:113
std::vector< std::string > pat4
Weekend pattern name.
Definition InflowData.hpp:100
int count() const
Definition InflowData.hpp:91
std::vector< std::string > node_name
Raw node name from input (for post-parse re-resolution)
Definition InflowData.hpp:94
std::vector< std::string > pat3
Hourly pattern name.
Definition InflowData.hpp:99
Definition InflowData.hpp:46
std::vector< std::string > pattern_name
Baseline pattern name.
Definition InflowData.hpp:57
std::vector< std::string > constituent
"FLOW" or pollutant name
Definition InflowData.hpp:51
std::vector< int > node_idx
Target node index.
Definition InflowData.hpp:49
std::vector< double > baseline
Baseline value.
Definition InflowData.hpp:56
int count() const
Definition InflowData.hpp:47
std::vector< std::string > inflow_type
"FLOW","CONCEN","MASS"
Definition InflowData.hpp:53
std::vector< double > s_factor
Scaling factor.
Definition InflowData.hpp:55
std::vector< double > m_factor
Multiplier factor.
Definition InflowData.hpp:54
std::vector< std::string > node_name
Raw node name from input (for post-parse re-resolution)
Definition InflowData.hpp:50
std::vector< std::string > ts_name
Timeseries name ("" if none)
Definition InflowData.hpp:52
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={})
Definition InflowData.hpp:59
void erase(int idx)
Definition InflowData.hpp:71
Definition InflowData.hpp:235
int find(std::string_view name) const noexcept
Definition InflowData.hpp:249
std::vector< std::vector< double > > factors
Up to 24 multiplier values.
Definition InflowData.hpp:240
void add(const std::string &name, int type, const std::vector< double > &facs)
Definition InflowData.hpp:242
std::vector< std::string > names
Pattern name.
Definition InflowData.hpp:238
int count() const
Definition InflowData.hpp:236
std::vector< int > types
0=MONTHLY,1=DAILY,2=HOURLY,3=WEEKEND
Definition InflowData.hpp:239
Definition InflowData.hpp:131
std::vector< std::string > uh_name
Unit hydrograph name.
Definition InflowData.hpp:136
std::vector< double > sewer_area
Tributary sewer area.
Definition InflowData.hpp:137
std::vector< std::string > node_name
Raw node name from input (for post-parse re-resolution)
Definition InflowData.hpp:135
std::vector< int > node_idx
Target node.
Definition InflowData.hpp:134
int count() const
Definition InflowData.hpp:132
void erase(int idx)
Definition InflowData.hpp:146
void add(int ni, const std::string &uh, double area, const std::string &name={})
Definition InflowData.hpp:139
Definition InflowData.hpp:223
int count() const
Definition InflowData.hpp:224
void add(const RDIIDecayEntry &e)
Definition InflowData.hpp:228
std::vector< RDIIDecayEntry > entries
Definition InflowData.hpp:226
Definition InflowData.hpp:204
double k_T
Thermal recovery rate at T_ref (1/hr)
Definition InflowData.hpp:209
double k_0
Base recovery rate (1/hr)
Definition InflowData.hpp:208
double k_dep
Depletion rate (1/project rain-depth unit: 1/in or 1/mm) — temperature-independent.
Definition InflowData.hpp:207
double theta_rec
Temperature sensitivity (1/deg C)
Definition InflowData.hpp:211
int response
0=SHORT, 1=MEDIUM, 2=LONG
Definition InflowData.hpp:206
std::string uh_name
Matches UnitHydEntry::name.
Definition InflowData.hpp:205
double snow_T
Rain/snow partition threshold & melt base (deg C)
Definition InflowData.hpp:219
bool snow_on
Degree-day snow model enabled for this row.
Definition InflowData.hpp:218
double T_freeze
Recovery suppressed when T < T_freeze (deg C)
Definition InflowData.hpp:212
double snow_ddf
Degree-day melt factor (project rain-depth unit/degC/day)
Definition InflowData.hpp:220
double T_ref
Reference temperature (deg C)
Definition InflowData.hpp:210
Definition InflowData.hpp:173
std::vector< std::string > gage_assignments
Rain gage names associated with each UH group (name → gage name)
Definition InflowData.hpp:179
std::vector< std::string > gage_names
Assigned rain gage names.
Definition InflowData.hpp:180
void add(const UnitHydEntry &e)
Definition InflowData.hpp:187
std::vector< UnitHydEntry > entries
Definition InflowData.hpp:176
void add_gage(const std::string &uh_name, const std::string &gage)
Definition InflowData.hpp:182
int count() const
Definition InflowData.hpp:174
Definition InflowData.hpp:160
double drecov
IA recovery rate.
Definition InflowData.hpp:169
std::string name
UH group name.
Definition InflowData.hpp:161
double t
Time to peak (hours)
Definition InflowData.hpp:166
int response
0=SHORT, 1=MEDIUM, 2=LONG
Definition InflowData.hpp:164
double dmax
Max initial abstraction depth.
Definition InflowData.hpp:168
double r
Fraction of rainfall volume.
Definition InflowData.hpp:165
int month
Month index (0-11, or -1 for ALL)
Definition InflowData.hpp:163
std::string gage_name
Associated rain gage name.
Definition InflowData.hpp:162
double dinit
Initial IA used.
Definition InflowData.hpp:170
double k
Recession-limb-to-peak-time ratio (tBase = t*(1+k); k >= 0)
Definition InflowData.hpp:167