Aimsun Next Scripting
22
|
Public Member Functions | |
GKModel () | |
void | initNewModel () |
const QString & | getDocumentFileName () const |
QDir | getDocumentDirectory () const |
bool | structuredFolders () const |
bool | isStorageFileBased () const |
bool | fork () |
bool | createRevision (const QString &configName, int newInitialId) |
void | consolidateRevision () |
bool | isARevision () const |
void | setRevisionFlag (bool set=true) |
QString | getConfigurationName () const |
QString | getBaseNetworkFileName () const |
const GKCatalog & | getCatalog () const |
GKObject * | newObject (const QString &) |
GKObject * | newObject (GKType *) |
GKCommand * | createNewCmd (GKType *type) const |
const GKDataBaseInfo & | getProjectDatabase () const |
void | setProjectDatabase (const GKDataBaseInfo &adatabase) |
GKModelLog & | getLog () |
GKCommander & | getCommander () |
GKGeoModel & | getGeoModel () |
void | setUnitSystem (GK::UnitSystem) |
GK::UnitSystem | getUnitSystem () const |
GKCoord | distanceGuiToModel (GKCoord) const |
GKCoord | speedGuiToModel (GKCoord) const |
GKCoord | preciseSpeedGuiToModel (GKCoord) const |
GKCoord | accelerationGuiToModel (GKCoord) const |
GKCoord | densityGuiToModel (GKCoord) const |
GKCoord | areaGuiToModel (GKCoord area) const |
GKCoord | temperatureGuiToModel (GKCoord temperature) const |
GKCoord | weightGuiToModel (GKCoord temperature) const |
GKCoord | weightHorsePowerGuiToModel (GKCoord temperature) const |
GKCoord | weightFrontAreaGuiToModel (GKCoord temperature) const |
GKCoord | distanceModelToGui (GKCoord) const |
GKCoord | speedModelToGui (GKCoord) const |
GKCoord | preciseSpeedModelToGui (GKCoord) const |
GKCoord | accelerationModelToGui (GKCoord) const |
GKCoord | densityModelToGui (GKCoord) const |
GKCoord | areaModelToGui (GKCoord area) const |
GKCoord | temperatureModelToGui (GKCoord temperature) const |
GKCoord | weightModelToGui (GKCoord temperature) const |
GKCoord | weightHorsePowerModelToGui (GKCoord temperature) const |
GKCoord | weightFrontAreaModelToGui (GKCoord temperature) const |
QString | distanceName () const |
QString | speedName () const |
QString | preciseSpeedName () const |
QString | accelerationName () const |
QString | densityName () const |
QString | areaName () const |
QString | weightName () const |
QString | weightHorsePowerName () const |
QString | weightFrontAreaName () const |
GKPreferencesValues & | setPreferences () |
const GKPreferencesValues & | getPreferences () const |
void | reportError (const QString &, const QString &) |
bool | checkAndFixPath (QString &, const QString &) |
void | removeColumn (GKColumn *, bool) |
void | resetColumn (GKColumn *) |
const QString & | getAuthor () const |
void | setAuthor (const QString &anAuthor) |
const QDateTime & | getCreationTime () const |
void | setCreationTime (const QDateTime &atime) |
const QDateTime & | getLastModificationTime () const |
void | setLastModificationTime (const QDateTime &atime) |
bool | importFile (const QString &fileName, GKLayer *mainLayer, const GKPoint &p, const GKBBox &filterArea) |
QVector< GKType * > | getTypes () const |
foreach (GKType *type, sipCpp->getTypes()) | |
End GKType * | getTypeCreation (const QString &typeName) |
GKType * | getType (const QString &typeName) const |
GKType * | registerType (const QString &typeName, const QString &superType) |
GKType * | registerType (GKType *atype) |
bool | inherits (const QString &typeName, const QString &superType) const |
void | registerColumn (GKColumn *col) |
void | unregisterColumn (GKColumn *col) |
GKColumn * | getColumn (uint uniqueID) const |
GKColumn * | getColumn (const QString &uniqueName) const |
uint | getNewId () |
void | setActiveExperiment (GKGenericExperiment *experiment) |
GKGenericExperiment * | getActiveExperiment () const |
void | setActiveReplication (const GKReplication *replication) |
quint32 | getActiveScenarioId () const |
GKGenericScenario * | getActiveScenario () const |
GKReplication * | getActiveReplication () const |
void | rebuildRealityBasedOnGeometryConfigurations (const GKGenericScenario *iScenario) |
bool | inSimulation () const |
const GKModelConnection & | getModelConnection () const |
void | setActiveCentroidConfiguration (GKCentroidConfiguration *cenConf) |
GKCentroidConfiguration * | getActiveCentroidConfiguration (bool createIt=false) |
void | setActivePedestrianCentroidConfiguration (GKCentroidConfiguration *cenConf) |
GKCentroidConfiguration * | getActivePedestrianCentroidConfiguration (bool createIt=false) |
void | setIdentifierForm (GKObject::IdentifierForm form) |
GKObject::IdentifierForm | getIdentifierForm () const |
![]() | |
GKObject () | |
GKObject (const GKObject &o) | |
virtual void | addedToCatalog () |
virtual void | removedFromCatalog () |
uint | getTick () const |
virtual void | increaseTick () |
void | setTick (uint t) |
virtual GKObject * | clone (bool addItToModel=true) const |
virtual GKObject * | cloneAsTemporary (bool addItToModel=true) const |
GKFolder * | getCreateRootFolder () |
GKFolder * | getRootFolder () const |
void | setRootFolder (GKFolder *afolder) |
GKFolder * | findFolder (const QString &byName) const |
QVector< GKFolder * > | getParentFolders () const |
bool | isDataValueNull (const GKColumn *attr) const |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
virtual void | setDataValue (const GKColumn *attr, const QVariant &v) |
void | setDataValueByID (uint attrId, const QVariant &v) |
virtual void | setDataValueObject (const GKColumn *attr, const GKObject *obj) |
void | setDataValueObjectByID (uint attrId, const GKObject *obj) |
virtual void | setDataValueDouble (const GKColumn *attr, double v) |
void | setDataValueDoubleByID (uint attrId, double v) |
virtual double | getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const |
double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const |
bool | hasAnyTSWithData () const |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const |
GKTimeSerie * | getDataValueTSByID (uint attrId) const |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInSingleTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription) |
void | setDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL) |
void | setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL) |
virtual void | clearDataValueTS (const GKColumn *attr, GKTSDescription *aDescription=NULL) |
void | clearDataValueTSByID (uint attrId, GKTSDescription *aDescription=NULL) |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
void | removeDataValue (const GKColumn *attr) |
void | removeDataValueByID (uint attrId) |
const QString & | getDescription () const |
void | setDescription (const QString &adescription) |
const QString & | getExternalId () const |
void | setExternalId (const QString &anId) |
virtual GKObjectDelCmd * | getDelCmd () |
virtual GKObjectConnectionDelCmd * | getDelConnectionCmd (GKObject *target) |
virtual void | nonCommandObjectRemoved (GKObject *) |
virtual void | init () |
virtual void | setId (uint aid, GKModel *model) |
uint | getId () const |
QUuid | getUUID () const |
virtual void | setName (const QString &aname) |
const QString & | getName () const |
QString | getExtendedId (IdentifierForm form=eIdentifierDefault) const |
QString | getNameOrExtendedId (IdentifierForm form=eIdentifierDefault) const |
virtual const QString & | getTypeName () const |
virtual QString | getTypeExternalName () const |
const GKObject * | getMaster () const |
GKType * | getType () const |
virtual void | setType (GKType *atype) |
bool | isA (const GKType *atype) const |
bool | isA (const QString &typeName) const |
virtual void | setModel (GKModel *amodel) |
GKModel * | getModel () const |
virtual void | setLock (GKLockType atype) |
GKLockType | getLock () const |
virtual bool | canBeDeleted () const |
virtual bool | canBeModified () const |
virtual bool | canBeEdited () const |
GKObjectStatus | getStatus () const |
virtual void | setStatus (const GKObjectStatus astatus) |
void | notifyStatusChange () |
bool | isTemporary () const |
void | setTemporary (bool value) |
bool | isExternal () const |
void | setExternal (bool value) |
virtual void | preferencesChanged () |
void | removeColumn (GKColumn *column) |
void | resetColumn (GKColumn *column) |
![]() | |
GKBaseObject () | |
if (base) | |
virtual uint | getId () const =0 |
virtual const QString & | getTypeName () const =0 |
virtual QString | getTypeExternalName () const =0 |
virtual const GKObject * | getMaster () const =0 |
virtual const QString & | getName () const =0 |
virtual const QString & | getExternalId () const =0 |
virtual const QString & | getDescription () const =0 |
virtual GKModel * | getModel () const =0 |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const =0 |
virtual GKTimeSerie * | getDataValueTSByID (uint attrId) const =0 |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
Public Attributes | |
MethodCode | sipRes = new QVector<GKType *>() |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
Additional Inherited Members | |
![]() | |
enum | IdentifierFormFlag { eIdentifierDefault , eIdentifierId , eIdentifierName , eIdentifierExternalId , eIdentifierTypeExternalName , eIdentifierDescription , eIdentifierStandard , eIdentifierStandardWithType , eIdentifierAll } |
enum | GKLockType { eNone , eModification , eDelete , eModificationDelete } |
enum | GKObjectStatus { eNew , eSaved , eModified , eDeleted } |
typedef QFlags< GKObject::IdentifierFormFlag > | IdentifierForm |
![]() | |
static uint | typeNameAtt |
static uint | typeExternalNameAtt |
static uint | revisedAtt |
![]() | |
Py_END_ALLOW_THREADS static End uint | idAtt |
static uint | nameAtt |
static uint | externalIdAtt |
static uint | descriptionAtt |
The entire object model is organized around the GKModel class. This class contains all the objects in a model (in our context a model is a document. For example a CAD map of a city will be the document, or model, in a CAD application).
Each time the user creates or open a new document an instance of GKModel is created. Each time the user saves the document to disk, all the data in the GKModel is saved.
A model is a collection of GKObjects instances (in fact of subclasses of GKObject). A line, a road, an OD matrix... they are instances of a subclass of GKObject. An instance of a GKObject has a unique identifier (assigned when the object is first created and immutable during the live of the object) and a type.
The model contains preferences available using the GKModel::getPreferences method.
The model holds all the data in a catalog (an instance of GKCatalog). This catalog keeps the data organized by type and identifier. It also keeps all the visible geo objects (instances of GKGeoObject sub-classes) in the GKGeoModel. And it can also keep objects inside its root folder.
The main difference between these three types of containers (catalog, geo-model and folder) is that the catalog has all the
objects in the model created using the new commands or the GKSystem::newObject function, either graphical and non-graphical. The geo-model contains only graphical objects that are shown at this moment (a graphical object will not be draw if is not in the geo-model). The root folder willl contain any object (usually non-graphical) that will be shown in the GListViewForModel (see GKFolder).
When an object is deleted all the relationships with it must destroyed too. If the deleted object is the owner of the relationship the solution is simple, this will be done at the object delete command. The problem is when the owner of the relationship is not the deleted object. This owner must be informed of the destruction to react acordly.
As is possible that the deleted object do not know this relationship the GKModel implements a simple mechanist to be informed of when an object is deleted. In fact what is expedted is that the owner of the relationship not only updates it but also support a possible UNDO.
When an object is "interested" in another and the target object is deleted the deleted object will ask the model for all the interested objects (unknowns to it until this moment) and will ask these "interested" objects to generate a GKObjectConnectionDelCmd command (see GKObject::getDelConnectionCmd) with the information that will be deleted or modified to support a possible UNDO.
If the deleted object is removed outside a command (no UNDO will be possible) then the object or editor that deletes it must call GKModel::nonCommandObjectRemoved to inforn any interested objet of this deletion. This method will call then to GKObject::nonCommandObjectRemoved for each interested object.
GKModel::GKModel | ( | ) |
GKCoord GKModel::accelerationGuiToModel | ( | GKCoord | ) | const |
From an acceleration in m/s2 or f/s2 it returns the acceleration in m/s2.
GKCoord GKModel::accelerationModelToGui | ( | GKCoord | ) | const |
From an acceleration in m/s2 to acceleration in m/s2 or f/s2 depending of the units.
QString GKModel::accelerationName | ( | ) | const |
Returns the accelaration name, either m/s^2 or f/s^2 depending of the units.
GKCoord GKModel::areaGuiToModel | ( | GKCoord | area | ) | const |
From an area in m2 or sqft returns it in m2.
GKCoord GKModel::areaModelToGui | ( | GKCoord | area | ) | const |
From an area in m2 to m2 or sqft depending of the units.
QString GKModel::areaName | ( | ) | const |
Returns the area name, either m^2 or sqft depending of the units.
bool GKModel::checkAndFixPath | ( | QString & | , |
const QString & | |||
) |
Check if the external file at "location" (path to a file including the file name) can be found. If not it will look in the searchPaths folders to locate the file. If it fails to it will ask the user for the new location (and will add the folder to the searchPaths variable) if the GUI is available.
If the file is found ina location different from the supplied one the variable "location" will be updated with the new file location.
Returns true if the file exists (note that this do not mean that it can be opened) or false otherwise.
description holds a single line description of what is missing. This string will appear as the title of the file dialog used to look for the missing file.
void GKModel::consolidateRevision | ( | ) |
Stops current model for being a revision. Most specifically, it clears the configuration name & revision flag (base network information is kept, however)
Creates a creation cmd for a type. Note that not all the types can have an associated creation command. After creating the command it should be customized (if required) and added to the commander for execution. Upon execution the user can get the created object using GKCommand::createdObject. Example:
bool GKModel::createRevision | ( | const QString & | configName, |
int | newInitialId | ||
) |
"Forks" the model as a revision. First, saves the base model. Then, it calls fork(), sets revision flag, configuration name and registers the new base ID for newly created objects. To finish, the revision file is saved.
GKCoord GKModel::densityGuiToModel | ( | GKCoord | ) | const |
From a density in veh/km or veh/mi it returns the density in veh/km.
GKCoord GKModel::densityModelToGui | ( | GKCoord | ) | const |
From a density in veh/km to density in veh/km or veh/mi depending of the units.
QString GKModel::densityName | ( | ) | const |
Returns the density name, either veh/km or veh/mi depending of the units.
GKCoord GKModel::distanceGuiToModel | ( | GKCoord | ) | const |
From a distance in m or feet it returns the distance in m.
GKCoord GKModel::distanceModelToGui | ( | GKCoord | ) | const |
From a distance in m to distance in m or feet depending of the units.
QString GKModel::distanceName | ( | ) | const |
Returns the distance name, either km or Milles depending of the units.
bool GKModel::fork | ( | ) |
"Forks" the model by storing current filename & UID as the base network information (unless the model is a revision, in which case the base network information is maintained), and then resets UID to a new value.
Called whenever the model is going to be saved under a different filename or when creating a revision, to preserve history.
GKCentroidConfiguration * GKModel::getActiveCentroidConfiguration | ( | bool | createIt = false | ) |
Returns the active centroid configuration.
GKGenericExperiment * GKModel::getActiveExperiment | ( | ) | const |
In which experiment (if any) is the user working?
GKCentroidConfiguration * GKModel::getActivePedestrianCentroidConfiguration | ( | bool | createIt = false | ) |
Returns the active pedestrian configuration. Only available with Legion for Aimsun Simulator.
GKReplication * GKModel::getActiveReplication | ( | ) | const |
In which replication (if any) is the user working?
GKGenericScenario * GKModel::getActiveScenario | ( | ) | const |
quint32 GKModel::getActiveScenarioId | ( | ) | const |
In which scenario (if any) is the user working?
const QString & GKModel::getAuthor | ( | ) | const |
Author of this network.
QString GKModel::getBaseNetworkFileName | ( | ) | const |
The base network of this derived network. Empty for a base network.
const GKCatalog & GKModel::getCatalog | ( | ) | const |
Returns the catalog.
GKColumn * GKModel::getColumn | ( | const QString & | uniqueName | ) | const |
Get a column by its internal name (that is unique)
GKColumn * GKModel::getColumn | ( | uint | uniqueID | ) | const |
Get a column by its id (that is unique)
GKCommander & GKModel::getCommander | ( | ) |
Returns the Commander.
QString GKModel::getConfigurationName | ( | ) | const |
The configuration name. Empty for a base network.
const QDateTime & GKModel::getCreationTime | ( | ) | const |
Creation Date.
QDir GKModel::getDocumentDirectory | ( | ) | const |
Directory of the loaded document. Only usable if GKModel::isStorageFileBased is true.
const QString & GKModel::getDocumentFileName | ( | ) | const |
Path and file name of the loaded document if GKModel::isStorageFileBased. The document URL otherwise.
GKGeoModel & GKModel::getGeoModel | ( | ) |
Returns the GeoModel
GKObject::IdentifierForm GKModel::getIdentifierForm | ( | ) | const |
const QDateTime & GKModel::getLastModificationTime | ( | ) | const |
Last Modification Date.
GKModelLog & GKModel::getLog | ( | ) |
Returns the system log.
const GKModelConnection & GKModel::getModelConnection | ( | ) | const |
Returns the model connection for the active experiment.
uint GKModel::getNewId | ( | ) |
const GKPreferencesValues & GKModel::getPreferences | ( | ) | const |
Get the preferences for this model.
const GKDataBaseInfo & GKModel::getProjectDatabase | ( | ) | const |
The database info (but not the database) that holds project external data (Sim Stats, external OD matrices, Real Data Sets values...).
GKType * GKModel::getType | ( | const QString & | typeName | ) | const |
Get a type by name, if the type do not exist NULL is returned.
End GKType * GKModel::getTypeCreation | ( | const QString & | typeName | ) |
Get a type by name, if the type do not exist it is created.
QVector< GKType * > GKModel::getTypes | ( | ) | const |
Returns all types in this model.
GK::UnitSystem GKModel::getUnitSystem | ( | ) | const |
Returns the network units
bool GKModel::importFile | ( | const QString & | fileName, |
GKLayer * | mainLayer, | ||
const GKPoint & | p, | ||
const GKBBox & | filterArea | ||
) |
Imports a file into the current model. It look for all the registered filters until it finds one that can load the file (GKFilterDescription::canImport).
Returns true if the file has been imported.
bool GKModel::inherits | ( | const QString & | typeName, |
const QString & | superType | ||
) | const |
Return true if typeName inherits superType (that is: if "superType" its a super type of "typeName"). If typeName is equal to superType true is returned.
void GKModel::initNewModel | ( | ) |
Init a new created model (not from restore)
bool GKModel::inSimulation | ( | ) | const |
Returns true if the model is currently being simulated and false otherwise
bool GKModel::isARevision | ( | ) | const |
Returns true if this network is a revision (of another network)
bool GKModel::isStorageFileBased | ( | ) | const |
Returns true if the document is stored in a file, false for: DB, stream and unkown storage.
GKObject * GKModel::newObject | ( | const QString & | ) |
A method equivalent to this call:
GKCoord GKModel::preciseSpeedGuiToModel | ( | GKCoord | ) | const |
From a speed in m/s or feet/s it returns the speed in m/s.
GKCoord GKModel::preciseSpeedModelToGui | ( | GKCoord | ) | const |
From a speed in m/s to speed in m/s or feet/s depending of the units.
QString GKModel::preciseSpeedName | ( | ) | const |
Returns the speed name, either m/s or f/s depending of the units.
void GKModel::rebuildRealityBasedOnGeometryConfigurations | ( | const GKGenericScenario * | iScenario | ) |
Recreate the reality after a Scenario change.
void GKModel::registerColumn | ( | GKColumn * | col | ) |
Register a columun. The pointer is adopted.
GKType * GKModel::registerType | ( | const QString & | typeName, |
const QString & | superType | ||
) |
Register a type creating it is needed and assigning to it a super type (that is also created if needed). The just created type is returned.
void GKModel::removeColumn | ( | GKColumn * | , |
bool | |||
) |
Remove a column from the model. That means that will be removed from the type and from all the objects in the catalog that use it.
Note that only external attributes can be removed.
If keepUsedColumns is true (recommended) columns in triggers and styles will not be removed.
void GKModel::reportError | ( | const QString & | , |
const QString & | |||
) |
Report an error in an operation. This method will write the title and the message in the model log and, if there is a GUI available, it will show a QMessageBox::critical. Use this function to report critical errors.
void GKModel::resetColumn | ( | GKColumn * | ) |
Removes the value on the column from this object. A time series or a string will be cleared, a scalar value will be set (if a number) to -1, a bool wil be set to false...
Note that only external attributes can be reset.
void GKModel::setActiveCentroidConfiguration | ( | GKCentroidConfiguration * | cenConf | ) |
Sets the active centroid configuration.
void GKModel::setActiveExperiment | ( | GKGenericExperiment * | experiment | ) |
Sets the experiment to be working on
void GKModel::setActivePedestrianCentroidConfiguration | ( | GKCentroidConfiguration * | cenConf | ) |
Sets the active pedestrian configuration. Only available with Legion for Aimsun Simulator.
void GKModel::setActiveReplication | ( | const GKReplication * | replication | ) |
In which replication (if any) is the user working?
void GKModel::setAuthor | ( | const QString & | anAuthor | ) |
Author of this network.
void GKModel::setCreationTime | ( | const QDateTime & | atime | ) |
Creation Date.
void GKModel::setIdentifierForm | ( | GKObject::IdentifierForm | form | ) |
void GKModel::setLastModificationTime | ( | const QDateTime & | atime | ) |
Last Modification Date.
GKPreferencesValues & GKModel::setPreferences | ( | ) |
Get the preferences for this model for modification.
void GKModel::setProjectDatabase | ( | const GKDataBaseInfo & | adatabase | ) |
The database info (but not the database) that holds project external data (Sim Stats, external OD matrices, Real Data Sets values...).
void GKModel::setRevisionFlag | ( | bool | set = true | ) |
Sets revision flag to the given state
void GKModel::setUnitSystem | ( | GK::UnitSystem | ) |
Sets the network units type that will be used to present information to the user. Note that units used internally in this application are in Metric system.
GKCoord GKModel::speedGuiToModel | ( | GKCoord | ) | const |
From a speed in km/h or m/h it returns the speed in km/h.
GKCoord GKModel::speedModelToGui | ( | GKCoord | ) | const |
From a speed in km/h to speed in km/h or mi/h depending of the units.
QString GKModel::speedName | ( | ) | const |
Returns the speed name, either km/h or M/h depending of the units.
bool GKModel::structuredFolders | ( | ) | const |
Returns true if the model uses a fixed folder estructure for projects
GKCoord GKModel::temperatureGuiToModel | ( | GKCoord | temperature | ) | const |
From a temperature in Celsius or Fahrenheit, transform it into Celsius.
GKCoord GKModel::temperatureModelToGui | ( | GKCoord | temperature | ) | const |
From a temperature in Celsius, transform it into Celsius or Fahrenheit, depending on the units.
void GKModel::unregisterColumn | ( | GKColumn * | col | ) |
Unregister a columns (that will be remove). The pointer is not deleted. This is a responsibility of the caller. See GKModel::removeColumn
Note that only external attributes can be removed.
GKCoord GKModel::weightFrontAreaGuiToModel | ( | GKCoord | temperature | ) | const |
From a weight/frontal area in kg/m2 or lbs/sq.ft depending of the units to kg/m2.
GKCoord GKModel::weightFrontAreaModelToGui | ( | GKCoord | temperature | ) | const |
From a weight/frontal area in kg/m2 to kg/m2 or lbs/sq.ft depending of the units.
QString GKModel::weightFrontAreaName | ( | ) | const |
Returns the weight / front area name, either Kg/m^2 or lb/ft^2 depending of the units.
GKCoord GKModel::weightGuiToModel | ( | GKCoord | temperature | ) | const |
From a weight in kg or lbs depending of the units to kg.
GKCoord GKModel::weightHorsePowerGuiToModel | ( | GKCoord | temperature | ) | const |
From a weight/horse power in kg/hp or lbs/hp depending of the units to kg/hp.
GKCoord GKModel::weightHorsePowerModelToGui | ( | GKCoord | temperature | ) | const |
From a weight/horse power in kg/hp to kg/hp or lbs/hp depending of the units.
QString GKModel::weightHorsePowerName | ( | ) | const |
Returns the weight / hore power name, either Kg/hp or lb/hp depending of the units.
GKCoord GKModel::weightModelToGui | ( | GKCoord | temperature | ) | const |
From a weight in kg to kg or lbs depending of the units.
QString GKModel::weightName | ( | ) | const |
Returns the weight name, either Kg or lb depending of the units.