Aimsun Next Scripting  24.0
Public Member Functions | List of all members
GKExpandableTimeSerie Class Reference
Inheritance diagram for GKExpandableTimeSerie:

Public Member Functions

 GKExpandableTimeSerie (GKTSDescription *aDescription)
 
unsigned int size () const
 
void clear ()
 
void setValue (unsigned int interval, double value, double deviation=-1.0, double lowerValue=-1.0)
 
double getValue (unsigned int interval, bool *valid=nullptr) const
 
double getDeviation (unsigned int interval, bool *valid=nullptr) const
 
QPair< double, double > getBand (unsigned int interval, bool *valid=nullptr) const
 
void setCustomAggregatedValue (double value, double deviation=-1.0)
 
double getCustomAggregatedValue () const
 
double getCustomAggregatedDeviation () const
 
bool hasAnyData () const
 

Detailed Description

It inherits from the GKTimeSerie class.

The TSDescription contains information about the time range, the interval between each value, units... This description is shared among all the TS that use it. The methods included in the GKTSDescription which can changed the number of intervals are allowed: setToTime, expand, setTime, etc.

It can have, optionally, either a deviation for each value or a band (a Max and a min value).

They are included in "entries" (QVariant* container of GKRow).

See also
GKTSDescription
GKTimeSerie

Constructor & Destructor Documentation

◆ GKExpandableTimeSerie()

GKExpandableTimeSerie::GKExpandableTimeSerie ( GKTSDescription aDescription)
explicit

Member Function Documentation

◆ clear()

void GKExpandableTimeSerie::clear ( )

◆ getBand()

QPair< double, double > GKExpandableTimeSerie::getBand ( unsigned int  interval,
bool *  valid = nullptr 
) const

Returns the band for an interval and the optional valid value is set to true. If the interval is greater than the current number of intervals then nullValue is returned and valid will be set to false.

If the TS contains only deviations it returns a band calculated using the deviation [Value+DEV,Value-DEV]

◆ getCustomAggregatedDeviation()

double GKExpandableTimeSerie::getCustomAggregatedDeviation ( ) const

Returns the external aggregated deviation previously set if any or nullValue if not set.

◆ getCustomAggregatedValue()

double GKExpandableTimeSerie::getCustomAggregatedValue ( ) const

Returns the external aggregated value previously set.

◆ getDeviation()

double GKExpandableTimeSerie::getDeviation ( unsigned int  interval,
bool *  valid = nullptr 
) const

Returns the deviation for an interval and the optional valid value is set to true. If the interval is greater than the current number of intervals then nullValue is returned and valid will be set to false.

◆ getValue()

double GKExpandableTimeSerie::getValue ( unsigned int  interval,
bool *  valid = nullptr 
) const

Returns the value for an interval and the optional valid value is set to true. If the interval is greater than the current number of intervals then nullValue is returned and valid will be set to false.

◆ hasAnyData()

bool GKExpandableTimeSerie::hasAnyData ( ) const

Returns true if this object has data: at least one element that is not null.

◆ setCustomAggregatedValue()

void GKExpandableTimeSerie::setCustomAggregatedValue ( double  value,
double  deviation = -1.0 
)

Sets the aggregated value in case the type of aggregation is set to eAggregated, what means that it cannot be calculated and it needs to be user-specified.

◆ setValue()

void GKExpandableTimeSerie::setValue ( unsigned int  interval,
double  value,
double  deviation = -1.0,
double  lowerValue = -1.0 
)

Sets the value and deviation or band for an interval. If the interval to be set is greater than the current number of intervals, empty intervals are added (values for these intervals will be -1).

If lowerValue is >= 0 then deviation will be used as the higher value of the band (and lowerValue as the lower one).

◆ size()

unsigned int GKExpandableTimeSerie::size ( ) const

© Aimsun SLU
Aimsun ®