Aimsun Next Scripting  22
Public Member Functions | Static Public Member Functions | List of all members
GKTSDescription Class Reference

Public Member Functions

 GKTSDescription (GKColumn *col, const QString &)
 
 ~GKTSDescription ()
 
void setTime (const QDateTime &, const QDateTime &, const GKTimeDuration &)
 
void setFromTime (const QDateTime &)
 
void setToTime (const QDateTime &)
 
void setIntervalTime (const GKTimeDuration &)
 
void expand (const QDateTime &)
 
void setToTimeKnow (bool)
 
const QDateTime & getFromTime () const
 
const QDateTime & getToTime () const
 
const GKTimeDurationgetIntervalTime () const
 
QDateTime getTimeFromInterval (int pos) const
 
const GKTimeDuration getDuration (const GKTimeSerie *) const
 
int getInterval (const QDateTime &) const
 
int getInterval (const QTime &) const
 
bool isMultidimensional () const
 
void setMultidimensional (bool value)
 
int dimensions () const
 
GKContext toContext () const
 
const QString & getTypeName () const
 
void setTypeName (const QString &)
 
void setAggregationType (GK::AggregationType type)
 
GK::AggregationType getAggregationType () const
 
void setConversion (const GK::Conversion)
 
const GK::Conversion getConversion () const
 
void setNullValue (double)
 
bool hasNullValue () const
 
double getNullValue () const
 
bool isNull (double) const
 
void setMinMax (double, double)
 
void expandMaxMin (double)
 
void resetMinMax ()
 
double getMinimum () const
 
double getMaximum () const
 
GKTimeSerie::ExtraInfo getExtraInfo () const
 
void setExtraInfo (GKTimeSerie::ExtraInfo avalue)
 
const QString & getUniqueName () const
 

Static Public Member Functions

static GKTSDescriptiongetCreateDescription (GKColumn *col, const QString &uniqueName)
 
static void findCommonDates (const GKTSDescription *t1, const GKTSDescription *t2, QDateTime &from, QDateTime &to)
 
static void findCommonTimes (const GKTSDescription *t1, const GKTSDescription *t2, QTime &from, QTime &to)
 

Detailed Description

Each time series (GKTimeSerie) has an associated description. Two (or more) time series can share the same description if their data is compatible (same time intervals and duration, same data type).

Constructor & Destructor Documentation

◆ GKTSDescription()

GKTSDescription::GKTSDescription ( GKColumn col,
const QString &   
)

◆ ~GKTSDescription()

GKTSDescription::~GKTSDescription ( )

Member Function Documentation

◆ dimensions()

int GKTSDescription::dimensions ( ) const

Returns max number of the dimensions used by TS with this description.

◆ expand()

void GKTSDescription::expand ( const QDateTime &  )

◆ expandMaxMin()

void GKTSDescription::expandMaxMin ( double  )

Recalculates the maximum and minimum values taking into account value (that is a value in that has been added to a time series).

◆ findCommonDates()

static void GKTSDescription::findCommonDates ( const GKTSDescription t1,
const GKTSDescription t2,
QDateTime &  from,
QDateTime &  to 
)
static

Find common dates (from, to) in to Timeseries that have a common interval.

◆ findCommonTimes()

static void GKTSDescription::findCommonTimes ( const GKTSDescription t1,
const GKTSDescription t2,
QTime &  from,
QTime &  to 
)
static

Find common times (from, to) in to Timeseries that have a common interval. The date in the date and time information is not used.

◆ getAggregationType()

GK::AggregationType GKTSDescription::getAggregationType ( ) const

When aggregating data, gives what is relevant: the mean or the sum.

◆ getConversion()

const GK::Conversion GKTSDescription::getConversion ( ) const

Units of this TS.

◆ getCreateDescription()

static GKTSDescription * GKTSDescription::getCreateDescription ( GKColumn col,
const QString &  uniqueName 
)
static

Find (and create a new one if none is found) a TS description by uniqueName.

◆ getDuration()

const GKTimeDuration GKTSDescription::getDuration ( const GKTimeSerie ) const

Calculates the duration of a TS based on its from and to data or the interval.

◆ getExtraInfo()

GKTimeSerie::ExtraInfo GKTSDescription::getExtraInfo ( ) const

Has deviation or bands for each value in the time series?

◆ getFromTime()

const QDateTime & GKTSDescription::getFromTime ( ) const

◆ getInterval() [1/2]

int GKTSDescription::getInterval ( const QDateTime &  ) const

Returns the interval (the position in the time series array of value) in where time is truncated to the nearest integer.

If time is not in the interval -1 is returned.

◆ getInterval() [2/2]

int GKTSDescription::getInterval ( const QTime &  ) const

Returns the interval (the position in the time series array of value) in where time is truncated to the nearest integer. QDate info is not used in the from and to times, only the QTime part.

If time is not in the interval -1 is returned.

◆ getIntervalTime()

const GKTimeDuration & GKTSDescription::getIntervalTime ( ) const

◆ getMaximum()

double GKTSDescription::getMaximum ( ) const

Returns the maximum value of all the TS that uses this description.

◆ getMinimum()

double GKTSDescription::getMinimum ( ) const

Returns the minimum value of all the TS that uses this description.

◆ getNullValue()

double GKTSDescription::getNullValue ( ) const

Returns the NULL value for this TS description. Test firts if a NULL has been defined using GKTSDescription::hasNullValue

◆ getTimeFromInterval()

QDateTime GKTSDescription::getTimeFromInterval ( int  pos) const

Returns the time for a given interval position (based on from time and interval time)

◆ getToTime()

const QDateTime & GKTSDescription::getToTime ( ) const

◆ getTypeName()

const QString & GKTSDescription::getTypeName ( ) const

◆ getUniqueName()

const QString & GKTSDescription::getUniqueName ( ) const

◆ hasNullValue()

bool GKTSDescription::hasNullValue ( ) const

Returns true if a NULL value for this TS description has been set.

◆ isMultidimensional()

bool GKTSDescription::isMultidimensional ( ) const

Is the associated Time Series multidimensional?

◆ isNull()

bool GKTSDescription::isNull ( double  ) const

Returns true if "value" is a NULL (as defined with GKTSDescription::setNullValue).

◆ resetMinMax()

void GKTSDescription::resetMinMax ( )

Resets the maximum and minimum values

◆ setAggregationType()

void GKTSDescription::setAggregationType ( GK::AggregationType  type)

When aggregating data, sets what is relevant: the mean or the sum.

◆ setConversion()

void GKTSDescription::setConversion ( const GK::Conversion  )

Units of this TS.

◆ setExtraInfo()

void GKTSDescription::setExtraInfo ( GKTimeSerie::ExtraInfo  avalue)

Has deviation or bands for each value in the time series? Called automatically by the time series when a value with deviation or band is set.

◆ setFromTime()

void GKTSDescription::setFromTime ( const QDateTime &  )

◆ setIntervalTime()

void GKTSDescription::setIntervalTime ( const GKTimeDuration )

◆ setMinMax()

void GKTSDescription::setMinMax ( double  ,
double   
)

Sets the maximum and minimum values of the time series.

◆ setMultidimensional()

void GKTSDescription::setMultidimensional ( bool  value)

Set to true if the Time Series is multidimensional, false otherwise.

◆ setNullValue()

void GKTSDescription::setNullValue ( double  )

Sets the valuev to be used as NULL (no value)

◆ setTime()

void GKTSDescription::setTime ( const QDateTime &  ,
const QDateTime &  ,
const GKTimeDuration  
)

◆ setToTime()

void GKTSDescription::setToTime ( const QDateTime &  )

◆ setToTimeKnow()

void GKTSDescription::setToTimeKnow ( bool  )

If true the end time will be used (even if no data is found) when computing the duration (in GKTSDescription::getDuration). If false the duration will be computed using the the interval time and the data in the TS.

Set it to true (the default) when the end time is well known, to false when the TS is dynamic and the end time is not known.

◆ setTypeName()

void GKTSDescription::setTypeName ( const QString &  )

◆ toContext()

GKContext GKTSDescription::toContext ( ) const

Returns the time information of this description as a GKContext.

© Aimsun SLU
Aimsun ®