PyANGKernel.GKTrafficDemandItem¶
- class GKTrafficDemandItem¶
-
Inherited by:
GKTrafficState,GKODMatrix,GKCentroidVectorSynopsis¶
Methods¶
def
__init__()def
equivalent()def
getDuration()def
getFrom()def
getProblemNet()def
getPurpose()def
getUserClass()def
getVehicle()def
setDuration()def
setFrom()def
setInterval()def
setProblemNet()def
setUserClass()def
setVehicle()
Virtual methods¶
def
getTotalTrips()
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
Detailed Description¶
A traffic demand item, either a OD matrix (
GKODMatrix) or a traffic state (GKTrafficState).It is valid for a vehicle type and a time interval (defined by an initial time and a duration).
It contains some informative attributes to classify the conditions and origin of this demand (Day, Season, Weather…)
- __init__()¶
- __init__(src)
- Parameters:
src –
GKTrafficDemandItem
Copy constructor
Warning
Only ‘methodologyData’ is actually duplicated. All any other data including ID and external objects are shared between the new object and the source one.
- equivalent(ti)¶
- Parameters:
ti –
GKTrafficDemandItem- Return type:
Return true if the vehicle, from and duration are equals.
- equivalent(uc, f, d)
- Parameters:
uc –
GKUserClassf –
QTimed –
GKTimeDuration
- Return type:
Return true if the vehicle, from and duration are equals.
- getDuration()¶
- Return type:
Demand item duration
Demand item initial time
- getModeChoiceClass()¶
- Return type:
Mode Choice Class (contains the availableModes, hence the vehicles)
Gets the name of this object automatically based on the vehicle type, the from and the duration. The string will be: - if longName is true: - if longName is false:
- getProblemNet()¶
- Return type:
Is a demand item for a subnetwork or for the whole network
- getPurpose()¶
- Return type:
Get the trip purpose
Returns the total number of trips in this Demand Item. The unit for OD matrix (
GKODMatrix) is vehicles and for traffic state (GKTrafficState) vehicles/hour.- getUserClass()¶
- Return type:
User class (contains the vehicle)
- getVehicle()¶
- Return type:
Helper, equivalent to
getUserClass()->getVehicle()- setDuration(aduration)¶
- Parameters:
aduration –
GKTimeDuration
Demand item duration
Demand item initial time
- setInterval(afrom, aduration)¶
- Parameters:
afrom –
QTimeaduration –
GKTimeDuration
Demand item initial time and duration
- setModeChoiceClass(aModeChoiceClass)¶
- Parameters:
aModeChoiceClass –
GKModeChoiceClass
User class (contains the availableModes, hence the vehicles)
- setProblemNet(apnet)¶
- Parameters:
apnet –
GKProblemNet
Is a demand item for a subnetwork or for the whole network
- setUserClass(userClass)¶
- Parameters:
userClass –
GKUserClass
User class (contains the vehicle)
- setVehicle(avehicle)¶
- Parameters:
avehicle –
GKMobileAgent
Deprecated. It is equivalent to: myUserClass =
createUserClass(getModel(), avehicle, nullptr ); myUserClass->setVehicle(avehicle);So it is safier to get the userClass first (or even create it by
createUserClass) and then set the vehicle; otherwise, it is actually creating userClasses without warning or modifying those user classes that you might not really want to change.