hydrobricks
Loading...
Searching...
No Matches
TimeSeriesDistributed Class Reference
Inheritance diagram for TimeSeriesDistributed:
TimeSeries

Public Member Functions

 TimeSeriesDistributed (VariableType type)
 
void AddData (std::unique_ptr< TimeSeriesData > data, int unitId)
 
bool SetCursorToDate (double date) override
 
bool AdvanceOneTimeStep () override
 
bool IsDistributed () const override
 
double GetStart () const override
 
double GetEnd () const override
 
double GetTotal (const SettingsBasin *basinSettings) override
 
TimeSeriesDataGetDataPointer (int unitId) override
 
bool IsValid () const override
 
void Validate () const override
 
- Public Member Functions inherited from TimeSeries
 TimeSeries (VariableType type)
 
VariableType GetVariableType () const
 

Protected Attributes

vecInt _unitIds
 
std::vector< std::unique_ptr< TimeSeriesData > > _data
 
- Protected Attributes inherited from TimeSeries
VariableType _type
 

Additional Inherited Members

- Static Public Member Functions inherited from TimeSeries
static bool Parse (const string &path, vector< TimeSeries * > &vecTimeSeries)
 
static TimeSeriesCreate (const string &varName, const axd &time, const axi &ids, const axxd &data)
 

Member Function Documentation

◆ AddData()

void TimeSeriesDistributed::AddData ( std::unique_ptr< TimeSeriesData > data,
int unitId )

Add data to the time series.

Parameters
datapointer to the time series data (ownership transferred).
unitIdID of the unit.

◆ AdvanceOneTimeStep()

bool TimeSeriesDistributed::AdvanceOneTimeStep ( )
nodiscardoverridevirtual

Advance the internal cursor to the next time step.

Returns
true if the cursor was successfully advanced to the next time step.

Implements TimeSeries.

◆ GetDataPointer()

TimeSeriesData * TimeSeriesDistributed::GetDataPointer ( int unitId)
overridevirtual

Get the data pointer for the provided unit ID.

Parameters
unitIdID of the unit.
Returns
pointer to the time series data for the provided unit ID.

Implements TimeSeries.

◆ GetEnd()

double TimeSeriesDistributed::GetEnd ( ) const
overridevirtual

Get the time end of the time series.

Returns
the time end of the time series.

Implements TimeSeries.

◆ GetStart()

double TimeSeriesDistributed::GetStart ( ) const
overridevirtual

Get the time start of the time series.

Returns
the time start of the time series.

Implements TimeSeries.

◆ GetTotal()

double TimeSeriesDistributed::GetTotal ( const SettingsBasin * basinSettings)
overridevirtual

Get the sum of the time series data for the provided basin settings.

Parameters
basinSettingssettings of the basin.
Returns
the sum of the time series data.

Implements TimeSeries.

◆ IsDistributed()

bool TimeSeriesDistributed::IsDistributed ( ) const
inlineoverridevirtual

Check if the time series is distributed.

Returns
true if the time series is distributed.

Implements TimeSeries.

◆ IsValid()

bool TimeSeriesDistributed::IsValid ( ) const
nodiscardoverridevirtual

Check if the time series is valid. Verifies that the time series has data and proper configuration.

Returns
true if the time series is valid, false otherwise.

Implements TimeSeries.

◆ SetCursorToDate()

bool TimeSeriesDistributed::SetCursorToDate ( double date)
nodiscardoverridevirtual

Set the internal cursor to the provided date.

Parameters
datedate to set the cursor to.
Returns
true if the cursor was successfully set to the provided date.

Implements TimeSeries.

◆ Validate()

void TimeSeriesDistributed::Validate ( ) const
overridevirtual

Validate the time series. Throws an exception if the time series is invalid.

Exceptions
ModelConfigErrorif validation fails.

Reimplemented from TimeSeries.


The documentation for this class was generated from the following files: