PyANGKernel.GKScheduleDemandItem¶
- class GKScheduleDemandItem¶
An entry (by time and user class (vehicle type+purpose)) for a
GKTrafficDemand.Details
The time information is coded in this object; the vehicle type and purpose, that is, the user class, are coded in the OD or the traffic state. Note that the time information is also in the traffic demand item. The information in this object is the one that will be used by the simulator.
Synopsis¶
Methods¶
def
__init__()def
fromString()def
getDuration()def
getFactor()def
getFactorValue()def
getFrom()def
__lt__()def
__le__()def
__eq__()def
__gt__()def
__ge__()def
overlaps()def
setDuration()def
setFactor()def
setFrom()
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__()¶
- __init__(src)
- Parameters:
src –
GKScheduleDemandItem
Copy constructor.
Warning
: It doesn’t duplicate internal pointers, so it can only be used to create temporary copies of the element.
Returns the from time as a string.
Gets the duration in seconds.
Returns the percentage of the traffic demand to be used. 100 means all the traffic, 50 half the traffic, 200 two times the traffic found in the demand item, etc.
- getFactorValue([exp=None])¶
- Parameters:
exp –
GKGenericExperiment- Return type:
Returns the ‘factor’ value as a number. If the factor is defined through a variable, then the given experiment will be used to get the value. If the factor is not defined in the experiment, 100.0 will be returned.
Gets the start time in seconds in reference to 00:00:00 or 00:00AM from the first day of the initial demand.
- getTrafficDemandItem()¶
- Return type:
Returns the traffic demand item (OD or traffic state) in this entry.
- __lt__(item)¶
- Parameters:
item –
GKScheduleDemandItem- Return type:
Returns true if this item’s ‘from time’ is earlier than the parameter’s from time.
- __le__(item)¶
- Parameters:
item –
GKScheduleDemandItem- Return type:
Returns true if this item’s ‘from time’ is earlier or equal to the parameter’s from time.
- __eq__(item)¶
- Parameters:
item –
GKScheduleDemandItem- Return type:
Compares by item, from time and duration.
- __gt__(item)¶
- Parameters:
item –
GKScheduleDemandItem- Return type:
Returns true if this item’s ‘from time’ is later than the parameter’s from time.
- __ge__(item)¶
- Parameters:
item –
GKScheduleDemandItem- Return type:
Returns true if this item’s ‘from time’ is later or equal to the parameter’s from time.
- overlaps(item)¶
- Parameters:
item –
GKScheduleDemandItem- Return type:
Returns true if this item overlaps with another item.
- setDuration(seconds)¶
- Parameters:
seconds – int
Sets the duration in seconds.
- setFactor(afactor)¶
- Parameters:
afactor – str
Sets the percentage of the traffic demand to be used. 100 means all the traffic, 50 half the traffic, 200 two times the traffic found in the demand item, etc.
- setFrom(seconds)¶
- Parameters:
seconds – int
Sets the start time in seconds in reference to 00:00:00 or 00:00AM from the first day of the initial demand.
- setTrafficDemandItem(ademand)¶
- Parameters:
ademand –
GKTrafficDemandItem
Sets the traffic demand item (OD or traffic state) in this entry.