18#ifndef OPENSWMM_INFLOW_HPP
19#define OPENSWMM_INFLOW_HPP
25struct SimulationContext;
105 std::vector<TimePattern> patterns_;
108 double getPatternFactor(
int pat_idx,
int month,
int day,
int hour)
const;
void init(SimulationContext &ctx)
Definition Inflow.cpp:59
void computeAll(SimulationContext &ctx, double current_date, double dt)
Compute all external + DWF inflows and add to node lateral flow.
Definition Inflow.cpp:157
constexpr int WEEKEND_PATTERN
Definition Inflow.hpp:36
constexpr int MONTHLY_PATTERN
Definition Inflow.hpp:33
constexpr int HOURLY_PATTERN
Definition Inflow.hpp:35
constexpr int DAILY_PATTERN
Definition Inflow.hpp:34
Definition Controls.cpp:24
Central, reentrant simulation context.
Definition SimulationContext.hpp:141
void resize(int n)
Definition Inflow.cpp:34
int count
Definition Inflow.hpp:59
std::vector< int > node_idx
Which node.
Definition Inflow.hpp:60
std::vector< double > avg_value
Average DWF value.
Definition Inflow.hpp:61
std::vector< int > pat_weekend
Weekend pattern index (-1 = none)
Definition Inflow.hpp:65
std::vector< int > pat_hourly
Hourly pattern index (-1 = none)
Definition Inflow.hpp:64
std::vector< int > pat_monthly
Monthly pattern index (-1 = none)
Definition Inflow.hpp:62
std::vector< int > pat_daily
Daily pattern index (-1 = none)
Definition Inflow.hpp:63
std::vector< int > ts_idx
Timeseries index (-1 = none)
Definition Inflow.hpp:45
int count
Definition Inflow.hpp:43
void resize(int n)
Definition Inflow.cpp:23
std::vector< double > scale_factor
Timeseries scaling factor.
Definition Inflow.hpp:48
std::vector< double > conv_factor
Units conversion factor.
Definition Inflow.hpp:49
std::vector< int > node_idx
Which node this inflow applies to.
Definition Inflow.hpp:44
std::vector< int > base_pat_idx
Baseline pattern index (-1 = none)
Definition Inflow.hpp:46
std::vector< double > baseline
Constant baseline value.
Definition Inflow.hpp:47
int type
0=monthly, 1=daily, 2=hourly, 3=weekend
Definition Inflow.hpp:75
double factors[24]
Up to 24 factors (monthly=12, daily=7, hourly=24)
Definition Inflow.hpp:76