37#ifndef OPENSWMMVIS_CORE_GAGEBLEND_H
38#define OPENSWMMVIS_CORE_GAGEBLEND_H
134[[nodiscard]]
double boxDepth(
const QVector<Box> &boxes);
143[[nodiscard]]
double engineDepth(
const QVector<SeriesPoint> &points,
146 double scaleFactor = 1.0);
164[[nodiscard]] BlendResult
blend(
const QVector<SourceGage> &sources,
165 const QVector<double> &weights);
int e
Definition inpmeshreader.cpp:41
QPointer< OpenSWMMVisLayer > source
Definition maskclipresolver.cpp:30
Definition gageblend.h:46
double boxDepth(const QVector< Box > &boxes)
Total depth carried by a box list.
Definition gageblend.cpp:88
constexpr int kMaxGridCells
Ceiling on grid cells, so a pathological gcd cannot melt the model.
Definition gageblend.h:57
QVector< Box > toBoxes(const SourceGage &source)
Expand one source into explicit intensity boxes.
Definition gageblend.cpp:36
BlendResult blend(const QVector< SourceGage > &sources, const QVector< double > &weights)
Blend sources under weights into one INTENSITY series.
Definition gageblend.cpp:109
constexpr double kVolumeTolerance
Relative tolerance for the volume-conservation check.
Definition gageblend.h:60
double engineDepth(const QVector< SeriesPoint > &points, qint64 intervalSec, RainType rainType=RainType::Intensity, double scaleFactor=1.0)
Total depth of an emitted series under the ENGINE's boxcar rule.
Definition gageblend.cpp:96
RainType
Rain-data format, matching SWMM_GageRainType.
Definition gageblend.h:50
@ Intensity
Value is a rate (depth/hour).
@ Volume
Value is depth accumulated over one interval.
@ Cumulative
Value is a running total; deltas carry the depth.
Outcome of one blend.
Definition gageblend.h:89
qint64 intervalSec
gcd of the source intervals.
Definition gageblend.h:91
double referenceDepth
Weighted sum of the sources' depths.
Definition gageblend.h:94
bool volumeOk() const
True when the blend conserved volume within tolerance.
Definition gageblend.h:103
double peakReference
Weighted sum of the sources' peaks.
Definition gageblend.h:98
double peakBlended
Max emitted intensity.
Definition gageblend.h:97
double peakRetention() const
Fraction of the reference peak that survived, or 1 when flat. Reported, never enforced — attenuation ...
Definition gageblend.h:111
double relativeError
|blended - reference| / max(reference, eps).
Definition gageblend.h:95
QString error
Non-empty means nothing was produced.
Definition gageblend.h:100
QVector< SeriesPoint > points
Emitted series; INTENSITY.
Definition gageblend.h:90
double blendedDepth
Total depth of points.
Definition gageblend.h:93
A constant-intensity interval, [t0, t1), in depth/hour.
Definition gageblend.h:81
double intensity
Definition gageblend.h:84
qint64 t1
Definition gageblend.h:83
qint64 t0
Definition gageblend.h:82
One (time, value) entry of a rainfall series.
Definition gageblend.h:64
double value
In the series' own rain type and units.
Definition gageblend.h:66
qint64 t
Seconds since the epoch.
Definition gageblend.h:65
A contributing gage: its series plus everything needed to read it.
Definition gageblend.h:71
QString name
For diagnostics only.
Definition gageblend.h:76
double scaleFactor
Folded into the blend.
Definition gageblend.h:75
QVector< SeriesPoint > points
Strictly increasing in t.
Definition gageblend.h:72
RainType rainType
Definition gageblend.h:74
qint64 intervalSec
Gage recording interval.
Definition gageblend.h:73