PyANGKernel.GKDestinationChange¶
- class GKDestinationChange¶
A traffic management action to change the destination
Details
Changes the destination of a vehicle to a new centroid. Valid only when using OD matrices.
Synopsis¶
Methods¶
def
__init__()
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__()¶
- addNewDestinationCentroid(aCentroid, aPercentage)¶
- Parameters:
aCentroid –
GKCentroidaPercentage – float
If ‘aCentroid’ is not amongst the destination centroids and is not null, it will be added with ‘aPercentage’ assigned
- clearNewDestinationCentroids()¶
Erases all destination centroids and their stored percentage [Used in Editor]
- containsNewDestinationCentroid(centroid)¶
- Parameters:
centroid –
GKCentroid- Return type:
Helper to know if the centroid is already in the list of destination centroids or not
- getCentroidConfiguration()¶
- Return type:
The centroid configuration
Gets the destination centroid or centroid grouping of the affected car. Can be NULL, means ANY.
- getNewDestinationCentroidAt(i)¶
- Parameters:
i – int
- Return type:
Returns the destination centroid stored at the i-th position. Precondition i: [0, size)
- getNewDestinationCentroidPercentage(aCentroid)¶
- Parameters:
aCentroid –
GKCentroid- Return type:
Returns the percentage assigned to the destination centroid ‘aCentroid’, if ‘aCentroid’ is not amongst the destination centroids, returns 0.0
Returns the percentage assigned to the destination centroid at position ‘pos’
Gets the origin centroid or centroid grouping of the affected car. Can be NULL, means ANY.
- joinNewDestinationCentroids(masterCentroid, otherCentroid)¶
- Parameters:
masterCentroid –
GKCentroidotherCentroid –
GKCentroid
If masterCentroid and otherCentroid are amongst the destination centroids, it removes otherCentroid and sums its percentage to masterCentroid’s assigned percentage
Returns de number of destination centroids stored in this Destination Change
- removeNewDestinationCentroid(aCentroid)¶
- Parameters:
aCentroid –
GKCentroid
If ‘aCentroid’ is amongst the destination centroids, it will be removed
- removeNewDestinationCentroidAt(pos)¶
- Parameters:
pos – int
Removes the destination centroid at position ‘pos’. Precondition pos: [0, size)
- revertJoinNewDestinationCentroids(masterCentroid, otherCentroid, otherCentroidPercentage)¶
- Parameters:
masterCentroid –
GKCentroidotherCentroid –
GKCentroidotherCentroidPercentage – float
If masterCentroid is amongst the destination centroids and otherCentroid is not, it adds otherCentroid with ‘otherCentroidPercentage’ assigned and the remaining percentage to masterCentroid
- setCentroidConfiguration(config)¶
- Parameters:
config –
GKCentroidConfiguration
The centroid configuration
Sets the destination centroid or centroid grouping of the affected car. Can be NULL, means ANY.
- setNewDestinationCentroidPercentage(aCentroid, aPercentage)¶
- Parameters:
aCentroid –
GKCentroidaPercentage – float
If ‘aCentroid’ is among the destination centroids: Modifies the percentage assigned to the destination centroid ‘aCentroid’
- setNewDestinationCentroidPercentageAt(pos, aPercentage)¶
- Parameters:
pos – int
aPercentage – float
Modifies the percentage assigned to the destination centroid at position ‘pos’
Sets the origin centroid or centroid grouping of the affected car. Can be NULL, means ANY.
- sortByCentroidID()¶
Keeps structure sorted by centroid ID.
Returns the sum of the percentages of the destination centroids