PyANGKernel.GKPublicLineTimeTableSchedule¶
- class GKPublicLineTimeTableSchedule¶
-
Synopsis¶
Methods¶
def
__init__()def
addStop()def
getDuration()def
getEndTime()def
getStopTime()def
getStopTimes()def
getTime()def
removeStop()def
removeStops()def
setDuration()def
setPedestrians()def
setStopTime()def
setTime()
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 schedule of a transit line.
A schedule has a time in where the simulator will apply it. For example 08:00:00 (08:00 AM) means that this schedule starts at 8:00. If the simulation starts at 7:00 another schedule can be used until 8:00, then this one will be used. If the simulation starts at 9:00 and no other transit line schedule is defined between 08:00:00 and 09:00:00, this schedule will not be used. But if there is no other schedule defined between 08:00:00 and 09:00:00, then this schedule will be used.
The schedule has all the stop times (
GKPublicLineTimeTableScheduleStopTime) for all the stops in the line. The user can set to 0 a stop time to remove a stop during this schedule.The last piece of information is the departures schedule for the Transit Vehicles (
GKPublicLineTimeTableScheduleDeparture). Departures can be defined by interval (every 5 minutes for example. In this case only oneGKPublicLineTimeTableScheduleDeparturewill be in the schedule) or at fixed times (8:00, 8:05, 8:10, 8:25…).See
GKPublicLineTimeTablefor more information about how to create these objects.- class GKPublicLineTimeTableScheduleDepartureType¶
Departure type: - fixed: this schedule will have one or more
GKPublicLineTimeTableScheduleDepartureentries. - interval: this schedule will have only oneGKPublicLineTimeTableScheduleDepartureentry. Vehicles will be generated considering the time interval defined. - intervalExits: this schedule will have only oneGKPublicLineTimeTableScheduleDepartureentry. Each vehicle will be generated considering the departure time of the previous vehicle plus the time interval defined.
- addDepartureTime(departure)¶
- Parameters:
departure –
GKPublicLineTimeTableScheduleDeparture
Adds a departure to this schedule.
Adds stop information (the stop must be in the line already) to this schedule. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
Returns true if the offsets defined in the stop times are to be consider by the simulation model or false if they are to be * considered just as informative values, for the API for example.
- getDepartureTime(pos)¶
- Parameters:
pos – int
- Return type:
Gets the departure at “pos”.
- getDepartureTimes()¶
- Return type:
Returns all the departures.
- getDepartureType()¶
- Return type:
Returns the departure type: - fixed: this schedule will have one or more
GKPublicLineTimeTableScheduleDepartureentries. - interval: this schedule will have only oneGKPublicLineTimeTableScheduleDepartureentry.- getDuration()¶
- Return type:
Returns the duration of this schedule
Gets the stop time for the specified stop and the specified appearance. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
Returns the time starting from which this schedule is valid.
- removeDepartureTime(pos)¶
- Parameters:
pos – int
Removes the departure at “pos” from the list of departures of this schedule. The departure itself is not deleted.
- removeDepartureTimes()¶
Removes all the departures from the list of departures of this schedule. The departures themselves are not deleted.
Removes the information of the specified stop at the specified indexAppearance position from this schedule. The stop itself is not deleted. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
- removeStops()¶
Removes all the stops’ information for this schedule. The stops themselves are not deleted.
- setAlightPedsIsPercentage(alight)¶
- Parameters:
alight – bool
- setConsiderOffsetsInModel(value)¶
- Parameters:
value – bool
Sets the offsets defined in the stop times to be consider by the simulation model (if value is true) or just as informative * values, for the API for example, if value is false.
- setDepartureTime(pos, departure)¶
- Parameters:
pos – int
departure –
GKPublicLineTimeTableScheduleDeparture
Sets the departure at a position (0 to N-1 in the list of departures) in this schedule.
- setDepartureType(atype)¶
- Parameters:
Sets the departure type: - fixed: this schedule will have one or more
GKPublicLineTimeTableScheduleDepartureentries. - interval: this schedule will have only oneGKPublicLineTimeTableScheduleDepartureentry.- setDuration(aduration)¶
- Parameters:
aduration –
GKTimeDuration
Sets the duration of this schedule
Adds pedestrians information to the stop (the stop must be in the line already) to this schedule. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
- setPedestrians(stop, indexAppearance, secondsByPedestrian, _pedestriansGen, _genDeviation, _pedestrianGat, _gatDeviation)
- Parameters:
stop –
GKBusStopindexAppearance – int
secondsByPedestrian – float
_pedestriansGen – float
_genDeviation – float
_pedestrianGat – float
_gatDeviation – float
Adds pedestrians information to the stop (the stop must be in the line already) to this schedule. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
Adds stop information (the stop must be in the line already) to this schedule with the specified time information. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
- setStopTime(stop, indexAppearance, mean, deviation[, offset=0.0f])
- Parameters:
stop –
GKBusStopindexAppearance – int
mean – float
deviation – float
offset – float
Adds stop information (the stop must be in the line already) to this schedule with the specified time information. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, …)
Sets the time starting from which this schedule is valid.
- sortDepartureTimes()¶
Sorts departures by departure time.