PyANGKernel.GKRealDataSet

class GKRealDataSet

A real data set.

Details

A GKRealDataSet is a collection of objects ( GKRealDataSetRestorer ) that can read external detection data into GKTimeSeries.

The GKRealDataSetRestorer can be from ASCII files, relational databases, online data… The developer can create new restorers for any kind of data format and information source.

Data can be filtered either by time and/or by area using a GKRealDataSetFilter .

Inheritance diagram of PyANGKernel.GKRealDataSet

Synopsis

Methods

Static functions

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

PyANGKernel.GKRealDataSet.allVehiclesId
__init__()
addAggregatedObjects(aTarget, aColumnType, aVehicleType)
Parameters:

Add an aggregated object (including objects with retrieved data). * This objects have to refresh their stats in order to get from their including objects (also to check the consistency of the objects)

addDev(col, obj, aVehicleId, when, value[, aLine=-1])
Parameters:

Adds a deviation value to the RDS time series.

addMax(col, obj, aVehicleId, when, value[, aLine=-1])
Parameters:

Adds a Maximum value to the RDS time series.

addMin(col, obj, aVehicleId, when, value[, aLine=-1])
Parameters:

Adds a minimum value to the RDS time series.

addRestorer(restorer)
Parameters:

restorerGKRealDataSetRestorer

Adds a restorer. The pointer is adopted.

addRestorer(byName)
Parameters:

byName – str

Return type:

GKRealDataSetRestorer

Adds a new restorer using its type name and returns a reference to it.

addValue(col, obj, aVehicleId, when, value[, aLine=-1])
Parameters:

Adds a value to the RDS time series.

applyFilter(aDateTime, aObject)
Parameters:
Return type:

bool

Filter registers

checkAggregateDetectorStations()

Refresh the stats from the aggregated objects (filled from addDetectorStationFromStation/addDetectorStationFromDetector)

clearRestorers()

Removes (and deletes) all the restorers in this data set.

converDetector2SectionColumnCountWeighted(column)
Parameters:

columnGKColumn

convertDetector2SectionColumn(column)
Parameters:

columnGKColumn

convertDetector2SectionValues(iColType)
Parameters:

iColTypeColType

convertUnitsDensity(aValue)
Parameters:

aValue – float

Return type:

float

Conversion SI speed values if need it

convertUnitsSpeed(aValue)
Parameters:

aValue – float

Return type:

float

Conversion SI speed values if need it

getAgents()
Return type:

.std.vectorGKObject

Get vehicle types and PTLines from Network

getBaseDate()
Return type:

QDateTime

Returns the Base Date. It is only relevant on Relative Time types

getCurrentRestorerFileName()
Return type:

str

getFilter()
Return type:

GKRealDataSetFilter

Returns the filter.

getFirstIntervalEndDate()
Return type:

QDateTime

First interval end date (available after a restoreData ).

getFirstIntervalStartDate()
Return type:

QDateTime

First interval start date (available after a restoreData ).

getInterval()
Return type:

GKTimeDuration

Returns the data collection interval.

getLastIntervalEndDate()
Return type:

QDateTime

Last interval end date (available after a restoreData ).

getLastIntervalStartDate()
Return type:

QDateTime

Last interval start date (available after a restoreData ).

static getRegisteredRestorers()
Return type:

.list of std.pairQString,QString

getRelatedColumns()
Return type:

.list of GKColumn

Returns the columns that have been created when restoring this real data set.

getRestoredObjects()
Return type:

.QSetGKObject

getRestorers()
Return type:

.list of GKRealDataSetRestorer

Returns all the restorers in this data set.

getRetrievedObjects()
Return type:

Dictionary with keys of type .QString and values of type int.

Get number of retrieved objects by path

static getSectionDetectors(m)
Parameters:

mGKModel

Return type:

.QMapGKSection,list of GKDetector

hasAggregatedStations()
Return type:

bool

Get if RDS has Aggregated Objects(GKDetectorStations)

isValid(aColumnType, aType, atime)
Parameters:
Return type:

bool

Check about the fromTime/Totime of the TSDescription created previously

readed()
Return type:

bool

Returns true if any data has been read using restoreData .

static registerRestorer(name, externalName)
Parameters:
  • name – str

  • externalName – str

removeOldRDSColumns()

Refresh the stats from the aggregated objects (filled from addDetectorStationFromStation/addDetectorStationFromDetector)

removeRestorer(restorer)
Parameters:

restorerGKRealDataSetRestorer

Removes a restorer from this data set. The restorer is not deleted.

restoreData()
Return type:

bool

Reads external data to memory. Returns true if all the data is correctly restored. If a restorer fails, the restoration is aborted.

restoreDataWith(restorersList)
Parameters:

restorersList – .list of GKRealDataSetRestorer

Return type:

bool

Same as ‘ restoreData ‘, but specifying the list of restorers to be used.

setBaseDate(value)
Parameters:

valueQDateTime

Sets the Base Date. It is only relevant on Relative Time types.

setCurrentRestorerFileName(aFilename)
Parameters:

aFilename – str

Set/get current restorer filename to include in the checker

setFirstIntervalEndDate(aFirstIntervalEndDate)
Parameters:

aFirstIntervalEndDateQDateTime

First interval end date (available after a restoreData ).

setFirstIntervalStartDate(aFirstIntervalStartDate)
Parameters:

aFirstIntervalStartDateQDateTime

First interval start date (available after a restoreData ).

setInterval(aInterval)
Parameters:

aIntervalGKTimeDuration

Set interval of the Time Series

setPostRestoreChecks(aPostManageCheks)
Parameters:

aPostManageCheks – bool

Set post restore files checks