30#ifndef OPENSWMM_ENGINE_INFRA_DATA_HPP
31#define OPENSWMM_ENGINE_INFRA_DATA_HPP
48 int count()
const {
return static_cast<int>(
names.size()); }
82 int count()
const {
return static_cast<int>(
names.size()); }
87 std::vector<double>
sx;
126 std::vector<std::string>
150 int add_row(
const std::string& name,
const std::string& type) {
151 names.push_back(name);
154 width.push_back(0.0);
177 auto u =
static_cast<std::size_t
>(idx);
178 names.erase(
names.begin() +
static_cast<std::ptrdiff_t
>(u));
180 length.erase(
length.begin() +
static_cast<std::ptrdiff_t
>(u));
181 width.erase(
width.begin() +
static_cast<std::ptrdiff_t
>(u));
243 int add_row(
int link_idx,
int node_host_idx,
int design_idx,
int capture_node_idx) {
269 auto e = [idx](
auto& v) {
270 if (
static_cast<std::size_t
>(idx) < v.size())
271 v.erase(v.begin() +
static_cast<std::ptrdiff_t
>(idx));
302 for (
int i = 0; i <
count(); ++i)
303 if (
link_index[
static_cast<std::size_t
>(i)] == link_idx)
317 for (
int i = 0; i <
count(); ++i)
318 if (
node_host[
static_cast<std::size_t
>(i)] == node_idx)
338 auto un =
static_cast<std::size_t
>(n);
Definition ExchangeLaw.hpp:60
Definition InfraData.hpp:350
int count() const
Count stored rows from the rule_text column.
Definition InfraData.hpp:356
std::vector< std::string > rule_text
Definition InfraData.hpp:360
Definition InfraData.hpp:114
std::vector< double > open_area
GENERIC only: open-area fraction (0,1].
Definition InfraData.hpp:128
std::vector< int > curve_index
CUSTOM: resolved curve index (-1 until PostParseResolver)
Definition InfraData.hpp:135
std::vector< double > width
grate or slotted width
Definition InfraData.hpp:125
std::vector< std::string > curve_id
CUSTOM: capture curve name.
Definition InfraData.hpp:134
void erase_row(int idx)
Erase one inlet design from every owned column.
Definition InfraData.hpp:176
std::vector< double > curb_height
CURB/DROP_CURB/COMBO.
Definition InfraData.hpp:131
std::vector< std::string > grate_type
P_BAR-50, P_BAR-50x100, P_BAR-30, CURVED_VANE, TILT_BAR-45, TILT_BAR-30, RETICULINE,...
Definition InfraData.hpp:127
std::vector< std::string > comments
optional description (round-tripped as ';' comment)
Definition InfraData.hpp:138
int count() const
Count stored rows from the names column.
Definition InfraData.hpp:120
std::vector< double > curb_length
CURB/DROP_CURB/COMBO.
Definition InfraData.hpp:130
std::vector< double > splash_veloc
GENERIC only: splash-over velocity.
Definition InfraData.hpp:129
int add_row(const std::string &name, const std::string &type)
Append a copied design name/type and default parameter columns.
Definition InfraData.hpp:150
std::vector< std::string > inlet_type
GRATE/CURB/COMBO/SLOTTED/DROP_GRATE/DROP_CURB/CUSTOM.
Definition InfraData.hpp:123
std::vector< double > length
grate or slotted length
Definition InfraData.hpp:124
std::vector< int > curb_throat
0=HORIZONTAL 1=INCLINED 2=VERTICAL (legacy ThroatAngleWords order); default 2
Definition InfraData.hpp:133
std::vector< std::string > names
Definition InfraData.hpp:122
std::vector< int > curve_kind
CUSTOM: 0=unresolved, 1=DIVERSION (captured vs approach flow), 2=RATING (captured vs depth)
Definition InfraData.hpp:137
Definition InfraData.hpp:204
std::vector< int > num_inlets
Number of inlets per side.
Definition InfraData.hpp:216
std::vector< int > street_index
Definition InfraData.hpp:223
int find_by_link(int link_idx) const
Find the first usage with a matching conduit-host key.
Definition InfraData.hpp:301
std::vector< std::string > pending_design_name
Definition InfraData.hpp:227
std::vector< std::string > pending_capture_name
Definition InfraData.hpp:228
std::vector< int > design_index
Index into InletStore.
Definition InfraData.hpp:214
std::vector< double > stat_capture_vol
Total captured volume (ft³)
Definition InfraData.hpp:324
std::vector< double > flow_limit
Max capture flow per inlet (user flow units), 0=unlimited.
Definition InfraData.hpp:219
void erase_row(int idx)
Erase a usage row from each column that contains it.
Definition InfraData.hpp:268
std::vector< int > node_index
Capture (receiving / underdrain) node index.
Definition InfraData.hpp:215
std::vector< int > node_host
Host inlet-junction node index (-1 for a conduit usage)
Definition InfraData.hpp:213
int add_row(int link_idx, int node_host_idx, int design_idx, int capture_node_idx)
Append an unresolved/default inlet usage with explicit host references.
Definition InfraData.hpp:243
int find_by_node_host(int node_idx) const
Find the first usage with a matching inlet-junction host key.
Definition InfraData.hpp:316
std::vector< double > local_width
Local depression width (user length units)
Definition InfraData.hpp:221
std::vector< double > local_depress
Local gutter depression (user length units)
Definition InfraData.hpp:220
std::vector< double > stat_peak_flow
Peak captured flow (cfs)
Definition InfraData.hpp:327
std::vector< int > placement
0=auto, 1=on_grade, 2=on_sag
Definition InfraData.hpp:217
std::vector< double > clog_factor
1.0 - pctClogged/100
Definition InfraData.hpp:218
int count() const
Count stored rows from the design_index column.
Definition InfraData.hpp:210
std::vector< int > link_index
Host conduit link index (-1 for an inlet junction)
Definition InfraData.hpp:212
std::vector< double > stat_backflow_vol
Total backflow volume (ft³)
Definition InfraData.hpp:326
void resize_stats(int n)
Replace inlet usage statistics with zeroed columns.
Definition InfraData.hpp:337
std::vector< double > stat_bypass_vol
Total bypassed volume (ft³)
Definition InfraData.hpp:325
Definition InfraData.hpp:76
std::vector< double > gutter_depres
Definition InfraData.hpp:89
std::vector< double > h_curb
Definition InfraData.hpp:86
std::vector< double > back_slope
Definition InfraData.hpp:93
std::vector< double > sx
Cross slope (%)
Definition InfraData.hpp:87
std::vector< double > back_n
Definition InfraData.hpp:94
std::vector< double > back_width
Definition InfraData.hpp:92
std::vector< double > gutter_width
Definition InfraData.hpp:90
int count() const
Count stored rows from the names column.
Definition InfraData.hpp:82
std::vector< double > t_crown
Definition InfraData.hpp:85
std::vector< int > sides
Definition InfraData.hpp:91
std::vector< std::string > names
Definition InfraData.hpp:84
std::vector< double > n_road
Definition InfraData.hpp:88
Definition InfraData.hpp:42
std::vector< std::string > comments
Free-form description per transect (DA-ENG-09)
Definition InfraData.hpp:51
std::vector< double > x_left_encroachment
Definition InfraData.hpp:61
std::vector< double > x_left_bank
Definition InfraData.hpp:55
std::vector< double > y_factor
Definition InfraData.hpp:64
std::vector< double > x_right_bank
Definition InfraData.hpp:56
std::vector< double > n_left
Definition InfraData.hpp:52
std::vector< std::vector< double > > stations
Station-elevation pairs per transect.
Definition InfraData.hpp:68
std::vector< double > x_factor
Definition InfraData.hpp:63
std::vector< double > n_channel
Definition InfraData.hpp:54
std::vector< std::vector< double > > elevations
Definition InfraData.hpp:69
std::vector< double > length_factor
Definition InfraData.hpp:66
int count() const
Count stored rows from the names column.
Definition InfraData.hpp:48
std::vector< double > x_right_encroachment
Definition InfraData.hpp:62
std::vector< std::string > names
Definition InfraData.hpp:50
std::vector< double > n_right
Definition InfraData.hpp:53