OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::LinkData Struct Reference

Structure-of-Arrays storage for all links. More...

#include <LinkData.hpp>

Collaboration diagram for openswmm::LinkData:

Public Member Functions

int count () const noexcept
 
void resize (int n)
 
void grow_to (int n)
 Grow all arrays to hold at least n links, preserving existing data.
 
void erase_at (int idx)
 Erase the link at index idx from every parallel array.
 
void resize_loads (int n_pollutants)
 Resize pollutant load arrays after pollutant count is known.
 
void resize_quality (int n_pollutants)
 Resize per-link quality arrays after pollutant count is known.
 
void shrink_to_fit ()
 Release excess vector capacity accumulated during parsing.
 
void save_state () noexcept
 
void reset_state () noexcept
 

Public Attributes

std::vector< LinkTypetype
 Link type.
 
std::vector< int > node1
 Upstream node index.
 
std::vector< int > node2
 Downstream node index.
 
std::vector< double > offset1
 Link offset at upstream node (project length units above invert).
 
std::vector< double > offset2
 Link offset at downstream node.
 
std::vector< double > q0
 Initial flow rate (project flow units).
 
std::vector< double > q_limit
 Maximum allowable flow rate (project flow units, 0 = unlimited).
 
std::vector< XsectShapexsect_shape
 Cross-section shape.
 
std::vector< double > xsect_y_full
 Full depth of cross-section (project length units).
 
std::vector< double > xsect_a_full
 Full-flow area of cross-section (sq project length units).
 
std::vector< double > xsect_w_max
 Full hydraulic width of cross-section.
 
std::vector< int > xsect_curve
 Shape curve index (for IRREGULAR / CUSTOM shapes).
 
std::vector< double > roughness
 Manning's roughness coefficient.
 
std::vector< double > length
 Conduit length (project length units).
 
std::vector< double > slope
 Conduit slope (rise/run, dimensionless).
 
std::vector< double > mod_length
 Modified conduit length for CFL stability (project length units).
 
std::vector< int > barrels
 Number of identical barrels (conduits only, default 1).
 
std::vector< double > beta
 Manning conveyance factor: beta = PHI * sqrt(|slope|) / n.
 
std::vector< double > rough_factor
 Roughness factor for head loss: GRAVITY * (n/PHI)^2.
 
std::vector< double > q_full
 Full-pipe flow rate: q_full = xsect_s_full * beta.
 
std::vector< double > xsect_r_full
 Full-pipe hydraulic radius.
 
std::vector< double > xsect_s_full
 Full-pipe section factor.
 
std::vector< double > xsect_s_max
 Maximum section factor (at depth of max conveyance).
 
std::vector< double > q_max
 Maximum flow rate at sMax: q_max = xsect_s_max * beta.
 
std::vector< double > xsect_y_bot
 Bottom depth for FILLED_CIRCULAR, RECT_TRIANG, RECT_ROUND shapes.
 
std::vector< double > xsect_a_bot
 Bottom area for FILLED_CIRCULAR, RECT_TRIANG shapes.
 
std::vector< double > xsect_s_bot
 Multi-purpose shape param: side slope (RECT_TRIANG), C-factor (FORCE_MAIN), number of open sides (RECT_OPEN), etc.
 
std::vector< double > xsect_r_bot
 Multi-purpose shape param: wall length (RECT_TRIANG), wetted perimeter (FILLED_CIRCULAR).
 
std::vector< double > xsect_yw_max
 Depth at maximum width.
 
std::vector< int > xsect_batch_shape
 Cached batch (XSectBatch) shape code, translated from XsectShape at init.
 
std::vector< double > setting
 Current link setting (0-1 for pumps/orifices/weirs, 1.0 default for conduits).
 
std::vector< double > target_setting
 Target setting from control rules.
 
std::vector< double > time_last_set
 Absolute date (decimal days) when target_setting last crossed an open<->closed boundary. Consulted by the control engine for LINK_TIMEOPEN / LINK_TIMECLOSED premises. Updated by the routing layer (SWMMEngine::stepRouting) only on open<->closed transitions, matching legacy routing.c:295-299.
 
std::vector< int > direction
 Flow direction: +1 = node1→node2, -1 = reversed.
 
std::vector< int > pump_curve
 Pump curve index into TableData.
 
std::vector< bool > pump_init_state
 Initial pump on/off state.
 
std::vector< double > pump_startup
 Pump startup depth (ft).
 
std::vector< double > pump_shutoff
 Pump shutoff depth (ft).
 
std::vector< int > pump_curve_type
 Pump curve type: 1=TYPE1..5=TYPE5, 6=Ideal, -1=not a pump.
 
std::vector< std::string > pump_curve_name
 Pump curve name (for deferred resolution).
 
std::vector< double > loss_inlet
 Inlet loss coefficient.
 
std::vector< double > loss_outlet
 Outlet loss coefficient.
 
std::vector< double > loss_avg
 Average loss coefficient.
 
std::vector< uint8_t > has_flap_gate
 Flap gate on this conduit (uint8_t: 0=no, 1=yes).
 
std::vector< double > seep_rate
 User-specified seepage rate (project units).
 
std::vector< double > evap_loss_rate
 Computed conduit evaporation loss rate (cfs per barrel).
 
std::vector< double > seep_loss_rate
 Computed conduit seepage loss rate (cfs per barrel).
 
std::vector< int > culvert_code
 Culvert type code (1-57, 0 = not a culvert).
 
std::vector< uint8_t > normal_flow_limited
 
std::vector< uint8_t > inlet_control
 True if inlet control governs for this culvert link (uint8_t: 0=no, 1=yes).
 
std::vector< double > dqdh
 Derivative dQ/dH for inlet-controlled culvert flow.
 
std::vector< double > crest_height
 Crest height above upstream node invert (project length units).
 
std::vector< double > cd
 Discharge coefficient (dimensionless).
 
std::vector< double > param1
 Parameter 1 (orifice type: 0=BOTTOM, 1=SIDE; weir type encoding).
 
std::vector< double > param2
 Rated capacity or parameter 2 (weir side slopes, orifice area, etc.).
 
std::vector< double > orate
 Orifice open/close rate (fraction per second).
 
std::vector< double > flow
 Current flow rate (project flow units, +ve = node1→node2).
 
std::vector< double > depth
 Current water depth at midpoint (project length units).
 
std::vector< double > volume
 Current full-flow volume (project volume units).
 
std::vector< double > froude
 Current froude number (absolute).
 
std::vector< FlowClassflow_class
 Current flow class (DRY, SUBCRITICAL, etc.).
 
std::vector< uint8_t > is_closed
 True if the link is closed by a control rule (uint8_t: 0=no, 1=yes).
 
std::vector< int8_t > full_state
 End-of-step full-pipe classification: 0=neither, 1=UP_FULL, 2=DN_FULL, 3=ALL_FULL.
 
std::vector< double > old_flow
 Flow at the previous timestep.
 
std::vector< double > old_depth
 Depth at the previous timestep.
 
std::vector< double > old_volume
 Volume at the previous timestep.
 
std::vector< double > conc
 Current quality concentration in each link.
 
std::vector< double > conc_old
 Previous-step quality in each link.
 
int conc_n_pollutants = 0
 Number of pollutants in the quality arrays.
 
std::vector< std::string > comments
 Object comment from the INP file (';'-prefixed lines immediately above this link's data row), joined by literal "\\n". Empty string means no comment.
 
std::vector< std::string > tags
 Per-object tag from the INP [TAGS] section.
 
std::vector< char > rpt_flag
 Whether this link is included in report/output (0=no, 1=yes).
 
std::vector< double > stat_vol_flow
 Total volume conveyed by this link (project volume units).
 
std::vector< double > stat_max_flow
 Maximum reported flow rate (project flow units).
 
std::vector< double > stat_max_veloc
 Maximum reported flow velocity (project length/time units).
 
std::vector< double > stat_max_filling
 Maximum reported filling ratio (depth / full depth).
 
std::vector< double > stat_time_surcharged
 Total duration of surcharge (seconds).
 
std::vector< long > stat_flow_class
 
std::vector< long > stat_norm_ltd
 Count of steps with normal flow limiting.
 
std::vector< long > stat_inlet_ctrl
 Count of steps with inlet control.
 
std::vector< double > stat_max_flow_date
 
std::vector< double > stat_time_full_upstream
 
std::vector< double > stat_time_full_dnstream
 
std::vector< double > stat_time_full_both
 
std::vector< double > stat_time_capacity_limited
 
std::vector< double > stat_total_load
 Cumulative pollutant loads transported through each link.
 
int stat_n_pollutants = 0
 
std::vector< int > stat_pump_cycles
 Number of pump on→off + off→on transitions per pump.
 
std::vector< double > stat_pump_on_time
 Time pump was running (seconds).
 
std::vector< double > stat_pump_volume
 Total volume pumped (ft³).
 
std::vector< double > stat_pump_energy
 Total pump energy consumed (kWh).
 
std::vector< bool > stat_pump_was_on
 Previous pump state for cycle detection (true = on).
 
std::vector< long > stat_flow_turns
 Count of flow direction reversals per link.
 
std::vector< int > stat_flow_turn_sign
 Sign of previous flow change for flow-turn detection.
 
std::vector< double > stat_time_courant_critical
 CFL time-step critical count per link.
 

Static Public Attributes

static constexpr int N_FLOW_CLASSES = 7
 Per-link flow classification step counts.
 

Detailed Description

Structure-of-Arrays storage for all links.

All arrays indexed by link index [0, count). Use SimulationContext::link_names to translate name → index.

Member Function Documentation

◆ count()

int openswmm::LinkData::count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ erase_at()

void openswmm::LinkData::erase_at ( int  idx)
inline

Erase the link at index idx from every parallel array.

Removes the element at idx from every SoA vector. Flat-2D arrays (stat_flow_class, conc, conc_old, stat_total_load) have their full stride for idx removed. Spatial arrays are erased separately by ObjectDeleter.

Here is the caller graph for this function:

◆ grow_to()

void openswmm::LinkData::grow_to ( int  n)
inline

Grow all arrays to hold at least n links, preserving existing data.

Here is the call graph for this function:

◆ reset_state()

void openswmm::LinkData::reset_state ( )
inlinenoexcept
Here is the caller graph for this function:

◆ resize()

void openswmm::LinkData::resize ( int  n)
inline
Here is the caller graph for this function:

◆ resize_loads()

void openswmm::LinkData::resize_loads ( int  n_pollutants)
inline

Resize pollutant load arrays after pollutant count is known.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_quality()

void openswmm::LinkData::resize_quality ( int  n_pollutants)
inline

Resize per-link quality arrays after pollutant count is known.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_state()

void openswmm::LinkData::save_state ( )
inlinenoexcept
Here is the caller graph for this function:

◆ shrink_to_fit()

void openswmm::LinkData::shrink_to_fit ( )
inline

Release excess vector capacity accumulated during parsing.

Here is the caller graph for this function:

Member Data Documentation

◆ barrels

std::vector<int> openswmm::LinkData::barrels

Number of identical barrels (conduits only, default 1).

◆ beta

std::vector<double> openswmm::LinkData::beta

Manning conveyance factor: beta = PHI * sqrt(|slope|) / n.

Q_normal = beta * S(A) where S is the section factor.

See also
Legacy: Conduit[k].beta

◆ cd

std::vector<double> openswmm::LinkData::cd

Discharge coefficient (dimensionless).

◆ comments

std::vector<std::string> openswmm::LinkData::comments

Object comment from the INP file (';'-prefixed lines immediately above this link's data row), joined by literal "\\n". Empty string means no comment.

◆ conc

std::vector<double> openswmm::LinkData::conc

Current quality concentration in each link.

Size = n_links * n_pollutants.

See also
Legacy: Link[i].newQual[]

◆ conc_n_pollutants

int openswmm::LinkData::conc_n_pollutants = 0

Number of pollutants in the quality arrays.

◆ conc_old

std::vector<double> openswmm::LinkData::conc_old

Previous-step quality in each link.

◆ crest_height

std::vector<double> openswmm::LinkData::crest_height

Crest height above upstream node invert (project length units).

◆ culvert_code

std::vector<int> openswmm::LinkData::culvert_code

Culvert type code (1-57, 0 = not a culvert).

See also
Legacy: Link[j].xsect.culvertCode

◆ depth

std::vector<double> openswmm::LinkData::depth

Current water depth at midpoint (project length units).

See also
Legacy: Link[i].newDepth

◆ direction

std::vector<int> openswmm::LinkData::direction

Flow direction: +1 = node1→node2, -1 = reversed.

See also
Legacy: Link[j].direction

◆ dqdh

std::vector<double> openswmm::LinkData::dqdh

Derivative dQ/dH for inlet-controlled culvert flow.

See also
Legacy: Link[j].dqdh

◆ evap_loss_rate

std::vector<double> openswmm::LinkData::evap_loss_rate

Computed conduit evaporation loss rate (cfs per barrel).

See also
Legacy: Conduit[k].evapLossRate

◆ flow

std::vector<double> openswmm::LinkData::flow

Current flow rate (project flow units, +ve = node1→node2).

See also
Legacy: Link[i].newFlow

◆ flow_class

std::vector<FlowClass> openswmm::LinkData::flow_class

Current flow class (DRY, SUBCRITICAL, etc.).

◆ froude

std::vector<double> openswmm::LinkData::froude

Current froude number (absolute).

See also
Legacy: Link[i].froude

◆ full_state

std::vector<int8_t> openswmm::LinkData::full_state

End-of-step full-pipe classification: 0=neither, 1=UP_FULL, 2=DN_FULL, 3=ALL_FULL.

Set by KW/DW/Steady-flow solvers each routing step. Bit 0 = upstream end at or above full depth; bit 1 = downstream end.

See also
Legacy: link_getFullState() in src/legacy/engine/link.c

◆ has_flap_gate

std::vector<uint8_t> openswmm::LinkData::has_flap_gate

Flap gate on this conduit (uint8_t: 0=no, 1=yes).

See also
Legacy: Link[j].hasFlapGate

◆ inlet_control

std::vector<uint8_t> openswmm::LinkData::inlet_control

True if inlet control governs for this culvert link (uint8_t: 0=no, 1=yes).

See also
Legacy: Link[j].inletControl

◆ is_closed

std::vector<uint8_t> openswmm::LinkData::is_closed

True if the link is closed by a control rule (uint8_t: 0=no, 1=yes).

◆ length

std::vector<double> openswmm::LinkData::length

Conduit length (project length units).

◆ loss_avg

std::vector<double> openswmm::LinkData::loss_avg

Average loss coefficient.

See also
Legacy: Link[j].cLossAvg

◆ loss_inlet

std::vector<double> openswmm::LinkData::loss_inlet

Inlet loss coefficient.

See also
Legacy: Link[j].cLossInlet

◆ loss_outlet

std::vector<double> openswmm::LinkData::loss_outlet

Outlet loss coefficient.

See also
Legacy: Link[j].cLossOutlet

◆ mod_length

std::vector<double> openswmm::LinkData::mod_length

Modified conduit length for CFL stability (project length units).

Computed as lengthFactor * length where lengthFactor >= 1.0. Short conduits are virtually lengthened to satisfy the Courant criterion at full-flow conditions.

See also
Legacy: Conduit[k].modLength

◆ N_FLOW_CLASSES

constexpr int openswmm::LinkData::N_FLOW_CLASSES = 7
staticconstexpr

Per-link flow classification step counts.

Flat 2D: [link * N_FLOW_CLASSES + class], where N_FLOW_CLASSES = 7. Indexed by FlowClass enum (DRY=0..DN_CRITICAL=6).

See also
Legacy: LinkStats[i].timeInFlowClass[]

◆ node1

std::vector<int> openswmm::LinkData::node1

Upstream node index.

See also
Legacy: Link[i].node1

◆ node2

std::vector<int> openswmm::LinkData::node2

Downstream node index.

See also
Legacy: Link[i].node2

◆ normal_flow_limited

std::vector<uint8_t> openswmm::LinkData::normal_flow_limited

True if normal flow limitation was applied this step (uint8_t: 0=no, 1=yes).

See also
Legacy: Link[j].normalFlow

◆ offset1

std::vector<double> openswmm::LinkData::offset1

Link offset at upstream node (project length units above invert).

See also
Legacy: Link[i].offset1

◆ offset2

std::vector<double> openswmm::LinkData::offset2

Link offset at downstream node.

See also
Legacy: Link[i].offset2

◆ old_depth

std::vector<double> openswmm::LinkData::old_depth

Depth at the previous timestep.

◆ old_flow

std::vector<double> openswmm::LinkData::old_flow

Flow at the previous timestep.

◆ old_volume

std::vector<double> openswmm::LinkData::old_volume

Volume at the previous timestep.

◆ orate

std::vector<double> openswmm::LinkData::orate

Orifice open/close rate (fraction per second).

Controls how fast setting transitions between 0 and 1. 0 = instantaneous.

See also
Legacy: Orifice[k].orate

◆ param1

std::vector<double> openswmm::LinkData::param1

Parameter 1 (orifice type: 0=BOTTOM, 1=SIDE; weir type encoding).

◆ param2

std::vector<double> openswmm::LinkData::param2

Rated capacity or parameter 2 (weir side slopes, orifice area, etc.).

◆ pump_curve

std::vector<int> openswmm::LinkData::pump_curve

Pump curve index into TableData.

See also
Legacy: TPump.pumpCurve

◆ pump_curve_name

std::vector<std::string> openswmm::LinkData::pump_curve_name

Pump curve name (for deferred resolution).

◆ pump_curve_type

std::vector<int> openswmm::LinkData::pump_curve_type

Pump curve type: 1=TYPE1..5=TYPE5, 6=Ideal, -1=not a pump.

Set by StructureSolver::init(). TYPE4_PUMP is excluded from downstream dQ/dH accumulation in the DW solver.

See also
Legacy: Pump[k].type, dynwave.c:565-575

◆ pump_init_state

std::vector<bool> openswmm::LinkData::pump_init_state

Initial pump on/off state.

◆ pump_shutoff

std::vector<double> openswmm::LinkData::pump_shutoff

Pump shutoff depth (ft).

◆ pump_startup

std::vector<double> openswmm::LinkData::pump_startup

Pump startup depth (ft).

◆ q0

std::vector<double> openswmm::LinkData::q0

Initial flow rate (project flow units).

See also
Legacy: Link[i].q0

◆ q_full

std::vector<double> openswmm::LinkData::q_full

Full-pipe flow rate: q_full = xsect_s_full * beta.

See also
Legacy: Link[j].qFull

◆ q_limit

std::vector<double> openswmm::LinkData::q_limit

Maximum allowable flow rate (project flow units, 0 = unlimited).

See also
Legacy: Link[i].qLimit

◆ q_max

std::vector<double> openswmm::LinkData::q_max

Maximum flow rate at sMax: q_max = xsect_s_max * beta.

See also
Legacy: Conduit[k].qMax

◆ rough_factor

std::vector<double> openswmm::LinkData::rough_factor

Roughness factor for head loss: GRAVITY * (n/PHI)^2.

See also
Legacy: Conduit[k].roughFactor

◆ roughness

std::vector<double> openswmm::LinkData::roughness

Manning's roughness coefficient.

◆ rpt_flag

std::vector<char> openswmm::LinkData::rpt_flag

Whether this link is included in report/output (0=no, 1=yes).

See also
Legacy: Link[j].rptFlag

◆ seep_loss_rate

std::vector<double> openswmm::LinkData::seep_loss_rate

Computed conduit seepage loss rate (cfs per barrel).

See also
Legacy: Conduit[k].seepLossRate

◆ seep_rate

std::vector<double> openswmm::LinkData::seep_rate

User-specified seepage rate (project units).

See also
Legacy: Link[j].seepRate

◆ setting

std::vector<double> openswmm::LinkData::setting

Current link setting (0-1 for pumps/orifices/weirs, 1.0 default for conduits).

See also
Legacy: Link[j].setting

◆ slope

std::vector<double> openswmm::LinkData::slope

Conduit slope (rise/run, dimensionless).

◆ stat_flow_class

std::vector<long> openswmm::LinkData::stat_flow_class

◆ stat_flow_turn_sign

std::vector<int> openswmm::LinkData::stat_flow_turn_sign

Sign of previous flow change for flow-turn detection.

+1 or -1 indicating the sign of (newFlow - oldFlow) at the previous routing step (matching legacy LinkStats[i].flowTurnSign).

See also
Legacy: stats_updateLinkStats()

◆ stat_flow_turns

std::vector<long> openswmm::LinkData::stat_flow_turns

Count of flow direction reversals per link.

Incremented when the sign of (newFlow - oldFlow) reverses and the magnitude exceeds 0.001 (matching legacy LinkStats[i].flowTurns).

See also
Legacy: stats_updateLinkStats()

◆ stat_inlet_ctrl

std::vector<long> openswmm::LinkData::stat_inlet_ctrl

Count of steps with inlet control.

◆ stat_max_filling

std::vector<double> openswmm::LinkData::stat_max_filling

Maximum reported filling ratio (depth / full depth).

See also
Legacy: LinkStats[i].maxFroude

◆ stat_max_flow

std::vector<double> openswmm::LinkData::stat_max_flow

Maximum reported flow rate (project flow units).

See also
Legacy: LinkStats[i].maxFlow

◆ stat_max_flow_date

std::vector<double> openswmm::LinkData::stat_max_flow_date

Date/time when maximum flow occurred (OADate (days since 12/30/1899)).

See also
Legacy: LinkStats[i].maxFlowDate

◆ stat_max_veloc

std::vector<double> openswmm::LinkData::stat_max_veloc

Maximum reported flow velocity (project length/time units).

See also
Legacy: LinkStats[i].maxVeloc

◆ stat_n_pollutants

int openswmm::LinkData::stat_n_pollutants = 0

◆ stat_norm_ltd

std::vector<long> openswmm::LinkData::stat_norm_ltd

Count of steps with normal flow limiting.

◆ stat_pump_cycles

std::vector<int> openswmm::LinkData::stat_pump_cycles

Number of pump on→off + off→on transitions per pump.

◆ stat_pump_energy

std::vector<double> openswmm::LinkData::stat_pump_energy

Total pump energy consumed (kWh).

See also
Legacy PumpStats[].energy, computed as link_getPower(j) * dt / 3600 where link_getPower = |dh| * |q| / 8.814 * KWperHP.

◆ stat_pump_on_time

std::vector<double> openswmm::LinkData::stat_pump_on_time

Time pump was running (seconds).

◆ stat_pump_volume

std::vector<double> openswmm::LinkData::stat_pump_volume

Total volume pumped (ft³).

◆ stat_pump_was_on

std::vector<bool> openswmm::LinkData::stat_pump_was_on

Previous pump state for cycle detection (true = on).

◆ stat_time_capacity_limited

std::vector<double> openswmm::LinkData::stat_time_capacity_limited

Time above full normal flow (seconds).

See also
Legacy: LinkStats[i].timeCapacityLimited

◆ stat_time_courant_critical

std::vector<double> openswmm::LinkData::stat_time_courant_critical

CFL time-step critical count per link.

Incremented when the link's CFL condition produces the smallest adaptive timestep (matching legacy LinkStats[i].timeCourantCritical).

See also
Legacy: stats_updateCriticalTimeCount()

◆ stat_time_full_both

std::vector<double> openswmm::LinkData::stat_time_full_both

Time both ends surcharged (seconds).

See also
Legacy: LinkStats[i].timeFullFlow

◆ stat_time_full_dnstream

std::vector<double> openswmm::LinkData::stat_time_full_dnstream

Time of downstream surcharge (seconds).

See also
Legacy: LinkStats[i].timeFullDnstream

◆ stat_time_full_upstream

std::vector<double> openswmm::LinkData::stat_time_full_upstream

Time of upstream surcharge (seconds).

See also
Legacy: LinkStats[i].timeFullUpstream

◆ stat_time_surcharged

std::vector<double> openswmm::LinkData::stat_time_surcharged

Total duration of surcharge (seconds).

See also
Legacy: LinkStats[i].timeSurcharged

◆ stat_total_load

std::vector<double> openswmm::LinkData::stat_total_load

Cumulative pollutant loads transported through each link.

Flat 2D: [link * n_pollutants + p]. Resized by resize_loads() after pollutant count is known.

See also
Legacy: Link[i].totalLoad[p]

◆ stat_vol_flow

std::vector<double> openswmm::LinkData::stat_vol_flow

Total volume conveyed by this link (project volume units).

See also
Legacy: LinkStats[i].volFlow

◆ tags

std::vector<std::string> openswmm::LinkData::tags

Per-object tag from the INP [TAGS] section.

Free-form string label. Index-keyed so swmm_link_rename keeps the tag attached.

◆ target_setting

std::vector<double> openswmm::LinkData::target_setting

Target setting from control rules.

See also
Legacy: Link[j].targetSetting

◆ time_last_set

std::vector<double> openswmm::LinkData::time_last_set

Absolute date (decimal days) when target_setting last crossed an open<->closed boundary. Consulted by the control engine for LINK_TIMEOPEN / LINK_TIMECLOSED premises. Updated by the routing layer (SWMMEngine::stepRouting) only on open<->closed transitions, matching legacy routing.c:295-299.

See also
Legacy: Link[j].timeLastSet

◆ type

std::vector<LinkType> openswmm::LinkData::type

Link type.

◆ volume

std::vector<double> openswmm::LinkData::volume

Current full-flow volume (project volume units).

See also
Legacy: Link[i].newVolume

◆ xsect_a_bot

std::vector<double> openswmm::LinkData::xsect_a_bot

Bottom area for FILLED_CIRCULAR, RECT_TRIANG shapes.

See also
Legacy: Link[j].xsect.aBot

◆ xsect_a_full

std::vector<double> openswmm::LinkData::xsect_a_full

Full-flow area of cross-section (sq project length units).

◆ xsect_batch_shape

std::vector<int> openswmm::LinkData::xsect_batch_shape

Cached batch (XSectBatch) shape code, translated from XsectShape at init.

Avoids per-timestep translateShape() switch dispatch. Set once by Routing::init() or PostParseResolver.

◆ xsect_curve

std::vector<int> openswmm::LinkData::xsect_curve

Shape curve index (for IRREGULAR / CUSTOM shapes).

-1 for standard shapes.

◆ xsect_r_bot

std::vector<double> openswmm::LinkData::xsect_r_bot

Multi-purpose shape param: wall length (RECT_TRIANG), wetted perimeter (FILLED_CIRCULAR).

See also
Legacy: Link[j].xsect.rBot

◆ xsect_r_full

std::vector<double> openswmm::LinkData::xsect_r_full

Full-pipe hydraulic radius.

See also
Legacy: Link[j].xsect.rFull

◆ xsect_s_bot

std::vector<double> openswmm::LinkData::xsect_s_bot

Multi-purpose shape param: side slope (RECT_TRIANG), C-factor (FORCE_MAIN), number of open sides (RECT_OPEN), etc.

See also
Legacy: Link[j].xsect.sBot

◆ xsect_s_full

std::vector<double> openswmm::LinkData::xsect_s_full

Full-pipe section factor.

See also
Legacy: Link[j].xsect.sFull

◆ xsect_s_max

std::vector<double> openswmm::LinkData::xsect_s_max

Maximum section factor (at depth of max conveyance).

See also
Legacy: Link[j].xsect.sMax

◆ xsect_shape

std::vector<XsectShape> openswmm::LinkData::xsect_shape

Cross-section shape.

◆ xsect_w_max

std::vector<double> openswmm::LinkData::xsect_w_max

Full hydraulic width of cross-section.

◆ xsect_y_bot

std::vector<double> openswmm::LinkData::xsect_y_bot

Bottom depth for FILLED_CIRCULAR, RECT_TRIANG, RECT_ROUND shapes.

See also
Legacy: Link[j].xsect.yBot

◆ xsect_y_full

std::vector<double> openswmm::LinkData::xsect_y_full

Full depth of cross-section (project length units).

◆ xsect_yw_max

std::vector<double> openswmm::LinkData::xsect_yw_max

Depth at maximum width.

See also
Legacy: Link[j].xsect.ywMax

The documentation for this struct was generated from the following file: