Aimsun Next Scripting
22
|
Public Types | |
enum | ExtraInfo { eNone , eDeviation , eBands } |
Public Member Functions | |
GKTimeSerie () | |
GKTimeSerie (GKTSDescription *) | |
virtual | ~GKTimeSerie () |
int | size () const |
int | dimensions () const |
void | clear () |
void | setDescription (GKTSDescription *aDescription) |
const GKTSDescription * | getDescription () const |
ExtraInfo | getExtraInfo () const |
virtual void | setValue (GKTimeSerieIndex index, double value, double deviation=-1.0, double lowerValue=-1.0) |
virtual double | getValue (GKTimeSerieIndex index, bool *=NULL) const |
virtual double | getValue (const GKContext &, bool *=NULL) const |
virtual double | getDeviation (GKTimeSerieIndex index, bool *=NULL) const |
virtual double | getDeviation (const GKContext &, bool *=NULL) const |
virtual QPair< double, double > | getBand (GKTimeSerieIndex index, bool *valid=NULL) const |
virtual QPair< double, double > | getBand (const GKContext &context, bool *valid=NULL) const |
double | getMean (int dimension, const QDateTime &from=QDateTime(), const QDateTime &to=QDateTime(), bool useDate=true) const |
double | getSum (int dimension, const QDateTime &from=QDateTime(), const QDateTime &to=QDateTime(), bool useDate=true) const |
double | getMax (int dimension, const QDateTime &from=QDateTime(), const QDateTime &to=QDateTime(), bool useDate=true) const |
double | getMin (int dimension=0, const QDateTime &from=QDateTime(), const QDateTime &to=QDateTime(), bool useDate=true) const |
void | setCustomAggregatedValue (int dimension, double value, double deviation=-1.0) |
double | getCustomAggregatedValue (int dimension=0) const |
double | getCustomAggregatedDeviation (int dimension=0) const |
double | getAggregatedValue (int dimension=0) const |
double | getAggregatedDeviation (int dimension=0) const |
double | getStdDev (int dimension=0) const |
double | getSEMean (const GKTimeSerie &) const |
double | getTheilU (const GKTimeSerie &) const |
void | getTheilUmUcUs (const GKTimeSerie &, double, double *, double *, double *) const |
double | getRMS (const GKTimeSerie &) const |
The description contains either a calendar (non-periodic) or information about the time range, the interval between each value, units... This description is shared among all the TS that uses it.
It can have, optionally, either a deviation for each value or a band (high and low values).
A time series can be multi dimensional (for example, speed by different lanes or vehicle types). Use the GKTimeSerie::dimensions to know the number of dimensions available.
Use a suitable dimension (from 0 to GKTimeSerie::dimensions - 1) to set or get the data.
A time series has at least one dimension.
GKTimeSerie::GKTimeSerie | ( | ) |
GKTimeSerie::GKTimeSerie | ( | GKTSDescription * | ) |
|
virtual |
void GKTimeSerie::clear | ( | ) |
Removes all the values in this attribute.
int GKTimeSerie::dimensions | ( | ) | const |
Return the number of dimensions in this attribute.
double GKTimeSerie::getAggregatedDeviation | ( | int | dimension = 0 | ) | const |
Returns the aggregated deviation corresponding to the description's aggregationType:
double GKTimeSerie::getAggregatedValue | ( | int | dimension = 0 | ) | const |
According to the description's aggregationType, returns getMean(), getSum() or getAggregatedValue(), or -1.0f.
|
virtual |
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 -1 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]
|
virtual |
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 -1 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]
double GKTimeSerie::getCustomAggregatedDeviation | ( | int | dimension = 0 | ) | const |
Returns the external aggregated deviation previously set if any or -1 if not set.
double GKTimeSerie::getCustomAggregatedValue | ( | int | dimension = 0 | ) | const |
Returns the external aggregated value previously set.
const GKTSDescription * GKTimeSerie::getDescription | ( | ) | const |
The description fo this TS
|
virtual |
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 -1 is returned and valid will be set to false.
|
virtual |
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 -1 is returned and valid will be set to false.
ExtraInfo GKTimeSerie::getExtraInfo | ( | ) | const |
It has a deviation for each value or a band or none?.
double GKTimeSerie::getMax | ( | int | dimension, |
const QDateTime & | from = QDateTime() , |
||
const QDateTime & | to = QDateTime() , |
||
bool | useDate = true |
||
) | const |
Returns the maximum value among all the values.
double GKTimeSerie::getMean | ( | int | dimension, |
const QDateTime & | from = QDateTime() , |
||
const QDateTime & | to = QDateTime() , |
||
bool | useDate = true |
||
) | const |
Returns the mean among all the values. If an interval of time [from, to] is specified, only the data in these dates will be considered. If usedate is true then the date in the date/time will be used, otherwise only the time info will be used.
double GKTimeSerie::getMin | ( | int | dimension = 0 , |
const QDateTime & | from = QDateTime() , |
||
const QDateTime & | to = QDateTime() , |
||
bool | useDate = true |
||
) | const |
Returns the minimum value among all the values.
double GKTimeSerie::getRMS | ( | const GKTimeSerie & | ) | const |
Return the RMS (Root Mean Squared) error.
double GKTimeSerie::getSEMean | ( | const GKTimeSerie & | ) | const |
square error mean
double GKTimeSerie::getStdDev | ( | int | dimension = 0 | ) | const |
standar deviation
double GKTimeSerie::getSum | ( | int | dimension, |
const QDateTime & | from = QDateTime() , |
||
const QDateTime & | to = QDateTime() , |
||
bool | useDate = true |
||
) | const |
Returns the sum among all the values.If an inetrval of time [from, to] is specified, only the data in these dates will be considered. If usedate is true then the date in the date/time will be used, otherwise only the time info will be used.
double GKTimeSerie::getTheilU | ( | const GKTimeSerie & | ) | const |
Theil's U_statistic: "this" is the observed series, "serie2" is the forecasted series.
void GKTimeSerie::getTheilUmUcUs | ( | const GKTimeSerie & | , |
double | , | ||
double * | , | ||
double * | , | ||
double * | |||
) | const |
Theil's statistics: "this" is the observed series, "serie2" is the forecasted series. The SEm is the squared mean returned by function getSEMean.
|
virtual |
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 -1 is returned and valid will be set to false.
|
virtual |
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 -1 is returned and valid will be set to false.
void GKTimeSerie::setCustomAggregatedValue | ( | int | dimension, |
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
void GKTimeSerie::setDescription | ( | GKTSDescription * | aDescription | ) |
The description for this TS
|
virtual |
Sets the value and deviation for an interval. If the interval to be set is greater than the current number of intervals, empty intervals are add (values for these intervals will be -1).
If lowerValue is >= 0 then deviation will be use as the higher value of the band (and lowerValue as the lower one).
int GKTimeSerie::size | ( | ) | const |
Return the number of values in this attribute.