13#ifndef OPENSWMM_SOURCE_CLOCK_GROUPS_HPP
14#define OPENSWMM_SOURCE_CLOCK_GROUPS_HPP
45 std::vector<SourceForcingInterval>
pending;
74 bool hydraulic_returns =
false);
88 std::string
stage(
int group,
double end,
double completed_through);
94 std::string
commit(
int group);
104 const std::vector<SourceClockGroup>&
groups()
const {
return groups_; }
125 std::vector<double> times, rates;
126 double period = 0.0, override_rate = -1.0;
128 double prescribed = 0.0;
130 bool initialized_ =
false, ignore_rain_ =
false, dry_only_ =
false;
131 double start_date_ = 0.0, duration_ = 0.0, rain_ucf_ = 1.0, evap_ucf_ = 1.0;
134 std::array<double, 12> monthly_evap_{}, adjust_evap_{}, adjust_rain_{}, infil_{}, recovery_{};
135 std::vector<double> evap_times_, evap_values_, rain_scale_;
136 std::vector<int> source_gage_, source_group_;
137 std::vector<RainSeries> gages_;
138 std::vector<SourceClockGroup> groups_;
Climate processing — evaporation, temperature, wind.
Per-element runtime forcing state — SoA layout.
Subcatchment runoff generation — batch-oriented nonlinear reservoir.
Definition CompletedSourceArchive.hpp:25
Definition SourceClockGroups.hpp:54
std::string initialize(const SimulationContext &ctx, const std::vector< int > &seeds, bool hydraulic_returns=false)
Build selected connected source groups and snapshot their forcing inputs.
Definition SourceClockGroups.cpp:50
std::string stage(int group, double end, double completed_through)
Resolve and stage contiguous forcing from a group's accepted boundary.
Definition SourceClockGroups.cpp:277
const std::vector< SourceClockGroup > & groups() const
Borrow the group membership, accepted clocks and pending forcing.
Definition SourceClockGroups.hpp:104
std::string commit(int group)
Advance a group's accepted clock to the last staged forcing endpoint.
Definition SourceClockGroups.cpp:357
void cancel(int group)
Drop staged forcing without changing the accepted clock or water stores.
Definition SourceClockGroups.cpp:365
int groupForSubcatch(int source) const
Look up selected component membership without scanning the graph.
Definition SourceClockGroups.cpp:272
void checkpoint(detail::CompletedSourceArchive &archive, bool model)
Stream model forcing/membership or accepted source-clock restart state.
Definition SourceClockCheckpoint.cpp:17
EvapMethod
Definition Climate.hpp:56
@ CONSTANT
Definition Climate.hpp:57
Definition OutfallExchange.hpp:17
Definition ExplicitInertialSolver.hpp:68
ForcingMode
Definition ForcingData.hpp:55
@ NONE
Use model-computed value (no forcing)
Definition ForcingData.hpp:56
Definition ForcingData.hpp:70
Central, reentrant simulation context.
Definition SimulationContext.hpp:390
One weakly connected runoff/LID/snow-transfer component. subcatches/lid_usages contain model indices;...
Definition SourceClockGroups.hpp:42
std::vector< int > lid_usages
Definition SourceClockGroups.hpp:43
std::vector< SourceForcingInterval > pending
Definition SourceClockGroups.hpp:45
std::vector< int > subcatches
Definition SourceClockGroups.hpp:43
double completed_end
Definition SourceClockGroups.hpp:44
Piecewise-constant forcing over [start,end) in elapsed seconds. month is zero-based; infil_factor/rec...
Definition SourceClockGroups.hpp:32
std::vector< RunoffSourceForcing > sources
Definition SourceClockGroups.hpp:36
double recovery_factor
Definition SourceClockGroups.hpp:35
double infil_factor
Definition SourceClockGroups.hpp:35
double start
Definition SourceClockGroups.hpp:33
double end
Definition SourceClockGroups.hpp:33
int month
Definition SourceClockGroups.hpp:34