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

Public Member Functions

 GKConstantTimeSerie (GKTSDescription *aDescription)
 
 ~GKConstantTimeSerie ()
 
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 not 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 and handled by a GKTSPoolManager.

See also
GKTSDescription
GKTimeSerie

Constructor & Destructor Documentation

◆ GKConstantTimeSerie()

GKConstantTimeSerie::GKConstantTimeSerie ( GKTSDescription aDescription)
explicit

◆ ~GKConstantTimeSerie()

GKConstantTimeSerie::~GKConstantTimeSerie ( )

Member Function Documentation

◆ clear()

void GKConstantTimeSerie::clear ( )

Removes all the values in this attribute.

◆ getBand()

QPair< double, double > GKConstantTimeSerie::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 GKConstantTimeSerie::getCustomAggregatedDeviation ( ) const

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

◆ getCustomAggregatedValue()

double GKConstantTimeSerie::getCustomAggregatedValue ( ) const

Returns the external aggregated value previously set.

◆ getDeviation()

double GKConstantTimeSerie::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 GKConstantTimeSerie::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 GKConstantTimeSerie::hasAnyData ( ) const

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

◆ setCustomAggregatedValue()

void GKConstantTimeSerie::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 GKConstantTimeSerie::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 GKConstantTimeSerie::size ( ) const

Return the number of values in this attribute.

© Aimsun SLU
Aimsun ®