Aimsun Next Scripting
22
|
Public Types | |
enum | GKCentroidPercentages { eNothing , eOrigin , eDestination , eBoth , eSame } |
enum | GKCentroidTraversalTypes { eNoTraversal , eInTraversal , eOutTraversal } |
![]() | |
enum | GKObjectsClassification { eAll , eOnlyNodesAndSections } |
![]() | |
enum | GKGeoContainer { eNothing = 0 , ePartially = 1 , eTotally = 2 } |
![]() | |
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 |
Public Member Functions | |
GKCentroid () | |
virtual GKPoint | getPosition () const |
virtual void | setFromPosition (const GKPoint &p) |
void | setConsideredPercentages (GKCentroidPercentages) |
const GKCentroidPercentages | getConsideredPercentages () const |
void | setUseBestEntrance (bool) |
bool | getUseBestEntrance () const |
void | addConnection (GKObjectConnection *) |
GK::ODType | getCentroidType () const |
bool | isOrigin () const |
bool | isDestination () const |
GK::ODType | objectODType (const GKGeoObject *object=NULL) const |
void | setCentroidTraversalType (GKCentroidTraversalTypes _type) |
GKCentroidTraversalTypes | getCentroidTraversalType () const |
void | setPositionByConnections () |
void | setCentroidConfiguration (GKCentroidConfiguration *) |
GKCentroidConfiguration * | getCentroidConfiguration () const |
virtual bool | canBeDeleted () const |
virtual bool | canBeModified () const |
void | changeConnectionsToAnotherObject (GKGeoObject *oldObject, GKGeoObject *newObject, GK::ConnectionType connectionType) |
bool | isActive () const |
bool | useInMatrix () const |
void | setUseInMatrix (bool) |
bool | isLessThan (const GKCentroid &) const |
void | recalculatePercentages (quint32 scenarioId=0) |
uint | getNumberConnectionsFrom () const |
uint | getNumberConnectionsTo () const |
void | setManualPosition (GKPoint p) |
![]() | |
GKPolygon () | |
void | setBrushColor (const QColor &color) |
const QColor & | getBrushColor () const |
void | setBrushStyle (const Qt::BrushStyle &astyle) |
virtual GKGeoContainer | doGetContainedWay (const GKBBox &myBBox, const GKPoints &points, const GKBBox &bboxPoints) const |
bool | isFilled () const |
void | setTopTexture (const QString &textureName, int horizontalReps, int verticalReps) |
const GKTextureApplied & | getTopTexture () const |
void | setBottomTexture (const QString &textureName, int horizontalReps, int verticalReps) |
const GKTextureApplied & | getBottomTexture () const |
QSet< GKGeoObject * > | classifyObjects (qint32 scenarioId, GKObjectsClassification objsToClassify, GKLayer *layer=NULL) const |
QSet< GKGeoObject * > | classifyObjects (qint32 scenarioId) const |
QSet< GKGeoObject * > | classifyObjectsInside (qint32 scenarioId, GKLayer *layer=NULL) const |
QSet< GKGeoObject * > | classifyObjectsPartiallyInside (qint32 scenarioId, GKLayer *layer=NULL) const |
![]() | |
GKPolyline () | |
uint | nbPoints () const |
const GKPoint & | getPoint (uint at) const |
void | setPoint (uint at, const GKPoint &p) |
const GKPoints & | getPoints () const |
virtual void | addPoint (const GKPoint &p) |
virtual void | addPointAt (int pos, const GKPoint &p) |
virtual void | removePoint (uint pos) |
virtual void | setPoints (const GKPoints &ps) |
virtual GKCoord | length2D () const |
virtual GKCoord | length3D () const |
virtual bool | canPointBeAdded (uint pos) const |
virtual void | join (const GKPolyline *pol, bool atStart) |
virtual void | removePoints (uint nbPoints, bool atStart) |
virtual bool | canBeJoined (const GKPolyline *pol) const |
void | prepend (const GKPoints &ps) |
void | add (const GKPoints &ps) |
void | setPointSelected (uint p, bool value) |
bool | isPointSelected (uint p) const |
void | selectAllPoints () |
void | unselectAllPoints () |
int | getNbSelPoints () const |
virtual void | changeDirection () |
GKCoord | getSlope (int segmentPos) const |
GKBBox | getBBox () const |
void | setPenColor (const QColor &color) |
virtual const QColor & | getPenColor () const |
void | setPenStyle (const Qt::PenStyle &astyle) |
const Qt::PenStyle & | getPenStyle () const |
void | setPenSize (float size) |
float | getPenSize () const |
void | setPenSizeUnits (const GK::SizeUnits &units) |
const GK::SizeUnits & | getPenSizeUnits () const |
![]() | |
GKGeoObject () | |
virtual void | setSelected (bool newState) |
virtual bool | isSelected () const |
bool | canBeModified () const |
bool | canBeEdited () const |
virtual bool | canBeGrouped () const |
int | getMark () const |
void | setMark (int newMark) |
void | addMark (int newMark) |
void | unmark () |
const QVector< int > * | getMarks () const |
uint | getNumberOfMarks () const |
GKLayer * | getLayer () const |
void | setLayer (GKLayer *alayer) |
virtual void | translate (const GKPoint &delta) |
virtual void | rotate (const GKPoint ¢er, double angle) |
virtual void | scale (const GKPoint &) |
virtual GKCoord | getAltitude () const |
virtual void | setAltitude (GKCoord value) |
void | addTopObject (GKGeoObject *) |
QSet< GKGeoObject * > * | getTopObjects () const |
GKGeoObject * | getBottomObject () const |
void | setLabeled (bool value) |
bool | isLabeled () const |
GKGeoContainer | getContainedWay (const GKPoints &points, const GKBBox &bboxPoints) const |
virtual GKGeoContainer | doGetContainedWay (const GKBBox &myBBox, const GKPoints &points, const GKBBox &bboxPoints) const |
GK::ConnectionType | objectConnectionType (const GKGeoObject *object) const |
QSet< GKObjectConnection * > | getConnections () const |
QSet< GKObjectConnection * > | getConnections (const GKGeoObject *) const |
bool | anyConnection (const GKGeoObject *) const |
virtual void | addConnection (GKObjectConnection *) |
virtual void | removeConnection (GKObjectConnection *, GK::ObjectDeletionBehaviour) |
virtual void | changeConnectionObject (GKGeoObject *oldObject, GKGeoObject *newObject, GK::ConnectionType connectionType=GK::eConnectionUndefined) |
virtual void | removeAllConnections (GK::ObjectDeletionBehaviour) |
virtual bool | acceptConnection (GKGeoObject *object) const |
virtual GKGeoObjectCutCmd * | getCutCmd (const GKPoint &from, const GKPoint &to, bool keepConnection) |
virtual bool | exists (quint32 scenarioId) 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 |
Static Public Attributes | |
static uint | centroidConfigurationAttr |
static uint | centroidTypeAttr |
static uint | centroidConsiderPercentagesAttr |
static uint | parkAndRideFunctionAtt |
static uint | parkAndRideCapacityAtt |
static uint | parkAndRidePriceAtt |
![]() | |
static uint | markAtt |
static uint | altitudeAtt |
static uint | numberOfConnectionsAtt |
static uint | layerAtt |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
A centroid is an origin and/or destination of trips. It is connected to several objects (either sections and/or nodes). A connection can be of two types:
A centroid is, based on the type of connections that it have, an origin, a destination or both. If all the connections are TO it is a origin. If all the connections are FROM it is a destination. If it have FROM and TO it is an origin and a destination.
Information for each connection is stored in GKCenConnection.
The number of trips generated or that arrive to a centroid is specified in a GKODMatrix. But is possible to create centroids that will not be part of a OD matrix. Use the method GKCentrod::useInMatrix to set this attribute. By default is true (the centroid will be used in the OD matrices).
A centroid can be active or inactive (GKCentroid::isActive). An active centroid will be used in simulations. An inactive centroid will not. From the simulation point of view an inactive centroid does not exist. By default is active.
Centroids are both in the catalog, sorted by GKCentroid type, and in its corresponding Centroid Configuration (GKCentroidConfiguration). To access the centroids of a matrix never look in the catalog as it will list all the centroids no matter the configuration, use the configuration instead (to look in the centroids for a particular configuration).
GKCentroid::GKCentroid | ( | ) |
|
virtual |
Adds a connection. The connection object is adopted. Rewrited to calculate automatically the percentages (if needed).
Reimplemented from GKGeoObject.
|
virtual |
Returns if the centroid is deletable or not
Reimplemented from GKObject.
|
virtual |
Returns if the centroid can be modified or not
Reimplemented from GKObject.
void GKCentroid::changeConnectionsToAnotherObject | ( | GKGeoObject * | oldObject, |
GKGeoObject * | newObject, | ||
GK::ConnectionType | connectionType | ||
) |
Deprecated. Alias to GKGeoObject::changeConnectionObject(oldObject,newObject,connectionType).
GKCentroidConfiguration * GKCentroid::getCentroidConfiguration | ( | ) | const |
Get the centroid configuration where this centroid lives
GKCentroidTraversalTypes GKCentroid::getCentroidTraversalType | ( | ) | const |
Gets the centroid traversal type
GK::ODType GKCentroid::getCentroidType | ( | ) | const |
Return the type of the centroid based on its connections.
const GKCentroidPercentages GKCentroid::getConsideredPercentages | ( | ) | const |
Returns the considered percentages type
uint GKCentroid::getNumberConnectionsFrom | ( | ) | const |
Returns the number of sections that have this centroid as destination
uint GKCentroid::getNumberConnectionsTo | ( | ) | const |
Returns the number of sections that have this centroid as origin
|
virtual |
Returns the center of the zone.
Reimplemented in GKPedestrianCentroid.
bool GKCentroid::getUseBestEntrance | ( | ) | const |
Returns the Use Best Entrance value
bool GKCentroid::isActive | ( | ) | const |
Return if a centroid is active.
bool GKCentroid::isDestination | ( | ) | const |
Return true if the centroid is an destination
bool GKCentroid::isLessThan | ( | const GKCentroid & | ) | const |
Returns truen if the identifier of this centroid is less than identifier of centroid 'cen'
bool GKCentroid::isOrigin | ( | ) | const |
Return true if the centroid is an origin
GK::ODType GKCentroid::objectODType | ( | const GKGeoObject * | object = NULL | ) | const |
Convience function. Alias to GK::ToODType( GKGeoObject::objectConnectionType(object) ).
void GKCentroid::recalculatePercentages | ( | quint32 | scenarioId = 0 | ) |
Recalculates the percentages of each connection when:
Called automatically when a new connection is added/removed. It can also we called at any moment to recalculate the percentages.
void GKCentroid::setCentroidConfiguration | ( | GKCentroidConfiguration * | ) |
Set the centroid configuration where this centroid lives
void GKCentroid::setCentroidTraversalType | ( | GKCentroidTraversalTypes | _type | ) |
Sets the centroid traversal type:
void GKCentroid::setConsideredPercentages | ( | GKCentroidPercentages | ) |
Sets the way percentages are considered among the different options:
|
virtual |
Set the coordinates of the centroid from a single point.
Reimplemented in GKPedestrianCentroid.
void GKCentroid::setManualPosition | ( | GKPoint | p | ) |
Sets the position of the centroid independently of the polygon.
void GKCentroid::setPositionByConnections | ( | ) |
Sets the position of this centroid using the position of the objects where it is attached.
void GKCentroid::setUseBestEntrance | ( | bool | ) |
The Use Best Entrance parameter sets whether the route choice algorithm will take into account, for each origin centroid and for each calculation, only the one shortest path from the entrance with the lowest cost (Use Best Entrance checked) or one shortest path from each entrance section (Use Best Entrance not checked).
void GKCentroid::setUseInMatrix | ( | bool | ) |
Set the useInMatrix attribute
bool GKCentroid::useInMatrix | ( | ) | const |
Return if a centroid has to be used in a OD matrix.
|
static |
|
static |
|
static |
|
static |
Contains the park and ride capacity.
|
static |
Contains the park and ride function.
|
static |
Contains the park and ride price.