HydroCouple's interfaces that have a time varying component. More...
Classes | |
| class | IDateTime |
| IDateTime interface based on a Julian day. More... | |
| class | ITimeIdBasedComponentDataItem |
| ITimeIdBasedComponentDataItem is an IComponentDataItem with both temporal and identifier-based dimensions for accessing multi-dimensional time-series data. More... | |
| class | ITimeModelComponent |
| ITimeModelComponent is an IModelComponent that advances through time during simulation and provides access to the current simulation time. More... | |
| class | ITimeSeriesComponentDataItem |
| ITimeSeriesComponentDataItem is an IComponentItem with a temporal attribute. More... | |
| class | ITimeSpan |
| ITimeSpan specifies an interval of time. More... | |
Enumerations | |
| enum class | TimeKind : uint8_t { Unknown = 0 , Instantaneous , IntervalMean , IntervalMinimum , IntervalMaximum , Accumulated } |
| What a value's time coordinate refers to. More... | |
| enum class | TimeInterpolation : uint8_t { Unknown = 0 , None , Previous , Nearest , Linear } |
| How a provider produces a value at an instant that is between two it holds. More... | |
| enum class | TimeExtrapolation : uint8_t { Unknown = 0 , Refuse , HoldLast , Linear } |
| How a provider produces a value at an instant beyond the last (or before the first) it holds. More... | |
Variables | |
| constexpr double | TIME_EQUALITY_TOLERANCE_DAYS = 1.0e-8 |
| Two instants are the same instant when their Julian days differ by no more than this (1e-8 days, about 0.86 ms). | |
| constexpr double | INTERVAL_LENGTH_CONTIGUOUS = -1.0 |
| The intervalLength() a time-series item returns when its intervals are contiguous but not of one length (calendar months, an irregular record). | |
HydroCouple's interfaces that have a time varying component.
|
strong |
How a provider produces a value at an instant beyond the last (or before the first) it holds.
|
strong |
How a provider produces a value at an instant that is between two it holds.
|
strong |
What a value's time coordinate refers to.
A time-series item carries times and values but does not say whether a value is a reading at that instant, a mean over the interval that ended there, or an accumulation. Those are three different numbers, and coupling a model that reports means to one that expects instants is wrong in a way that produces plausible output and no error.
It is not a hypothetical failure. A daily report in this ecosystem drifted from noon to five in the afternoon over a simulated year, aliasing a diurnal cycle into a seasonal signal, and it was found by checking a figure caption against its own timestamps rather than by anything in the data saying what the timestamps meant.
|
constexpr |
The intervalLength() a time-series item returns when its intervals are contiguous but not of one length (calendar months, an irregular record).
Interval i then runs from time i-1 to time i, and interval 0 from the start of timeSpan(). Any negative intervalLength() has this meaning; this is the value to return.
|
constexpr |
Two instants are the same instant when their Julian days differ by no more than this (1e-8 days, about 0.86 ms).
Time coordinates are Julian-day doubles. Near the present a double resolves a Julian day to about 40 µs, so instants computed on the two sides of a coupling (an accumulated step on one, a parsed timestamp on the other) rarely agree to the last bit. Every comparison the standard calls "exact" — TimeInterpolation::None, matching a consumer's times() against a provider's — uses this tolerance. It sits well above the resolution and below a millisecond, so no time step a coupling exchanges on collapses under it.