PyANGKernel.GKPublicLineTimeTableSchedule

class GKPublicLineTimeTableSchedule

Inheritance diagram of PyANGKernel.GKPublicLineTimeTableSchedule

Synopsis

Methods

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 one GKPublicLineTimeTableScheduleDeparture will be in the schedule) or at fixed times (8:00, 8:05, 8:10, 8:25…).

See GKPublicLineTimeTable for more information about how to create these objects.

class GKPublicLineTimeTableScheduleDepartureType

Departure type: - fixed: this schedule will have one or more GKPublicLineTimeTableScheduleDeparture entries. - interval: this schedule will have only one GKPublicLineTimeTableScheduleDeparture entry. Vehicles will be generated considering the time interval defined. - intervalExits: this schedule will have only one GKPublicLineTimeTableScheduleDeparture entry. Each vehicle will be generated considering the departure time of the previous vehicle plus the time interval defined.

__init__(model)
Parameters:

modelGKModel

addDepartureTime(departure)
Parameters:

departureGKPublicLineTimeTableScheduleDeparture

Adds a departure to this schedule.

addStop(stop, indexAppearance)
Parameters:

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, …)

getAlightPedsIsPercentage()
Return type:

bool

getConsiderOffsetsInModel()
Return type:

bool

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:

GKPublicLineTimeTableScheduleDeparture

Gets the departure at “pos”.

getDepartureTimes()
Return type:

.list of GKPublicLineTimeTableScheduleDeparture

Returns all the departures.

getDepartureType()
Return type:

GKPublicLineTimeTableScheduleDepartureType

Returns the departure type: - fixed: this schedule will have one or more GKPublicLineTimeTableScheduleDeparture entries. - interval: this schedule will have only one GKPublicLineTimeTableScheduleDeparture entry.

getDuration()
Return type:

GKTimeDuration

Returns the duration of this schedule

getEndTime()
Return type:

QTime

getStopTime(stop, indexAppearance)
Parameters:
Return type:

GKPublicLineTimeTableScheduleStopTime

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, …)

getStopTimes(arg__1)
Parameters:

arg__1GKBusStop

Return type:

.list of GKPublicLineTimeTableScheduleStopTime

getTime()
Return type:

QTime

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.

removeStop(stop, indexAppearance)
Parameters:

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:

Sets the departure at a position (0 to N-1 in the list of departures) in this schedule.

setDepartureType(atype)
Parameters:

atypeGKPublicLineTimeTableScheduleDepartureType

Sets the departure type: - fixed: this schedule will have one or more GKPublicLineTimeTableScheduleDeparture entries. - interval: this schedule will have only one GKPublicLineTimeTableScheduleDeparture entry.

setDuration(aduration)
Parameters:

adurationGKTimeDuration

Sets the duration of this schedule

setPedestrians(stop, indexAppearance, time)
Parameters:

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:
  • stopGKBusStop

  • indexAppearance – 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, …)

setStopTime(stop, indexAppearance, time)
Parameters:

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:
  • stopGKBusStop

  • indexAppearance – 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, …)

setTime(atime)
Parameters:

atimeQTime

Sets the time starting from which this schedule is valid.

sortDepartureTimes()

Sorts departures by departure time.