PyANGKernel.GKODMatrixReaderODBC

class GKODMatrixReaderODBC

Store or Restore an ODMatrix from an ODBC database.

Details

This class can be used at any moment to store or restore an existing matrix as long as the database connection data (db, username, password) and the setMode are correct.

It will read or write the following information: - From Time - Duration - Trips - OD Route usage - Weekday - Season - Weather - Event - Vehicle Type (CTYPE)

CTYPE is set using the vehicle type name (GKODMatrix::getVehicle, GKVehicle::getName) as: - 0: No vehicle set. - 1: Car - 2: LGV - 3: HGV The match is case insensitive.

Example:

GKODMatrix                              *matrix;
GKODMatrixReaderODBC    readerODBC;
GKDataBaseInfo                  dbinfo;

dbinfo.setDatabaseName( "DB_NAME" );
dbinfo.setUserName( "USER_NAME" );
dbinfo.setPassword( "PASSWORD" );

readerODBC.setDbInfo( dbinfo );
readerODBC.setMode( GKODMatrix::eEID );
readerODBC.write( matrix );

Inheritance diagram of PyANGKernel.GKODMatrixReaderODBC

Synopsis

Methods

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

__init__()
getDbInfo()
Return type:

GKDataBaseInfo

Get the database to be used.

setDbInfo(adbInfo)
Parameters:

adbInfoGKDataBaseInfo

Set the database to be used.

setIdInDB(aidInDB)
Parameters:

aidInDB – int

Sets the matrix id in the database

setRID(arid)
Parameters:

arid – int

Extra parameters … no coded in Aimsun DB but supported in the ODBC DB.

Sets the identifier of the real data used to adjust a matrix.

setTimeInt(atimeInt)
Parameters:

atimeInt – int

Extra parameters … no coded in Aimsun DB but supported in the ODBC DB.

Sets the number of intervals in the real data used to adjust a matrix.