PyANGKernel.GKPublicLinePlan¶
- class GKPublicLinePlan¶
-
Synopsis¶
Methods¶
def
__init__()def
addTimeTable()def
getNbPTLines()def
getProblemNet()def
getPublicLines()def
getTimeTables()def
isEmpty()def
setProblemNet()def
uses()def
usesTimeTable()
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 transit plan is used by the simulator to know what lines will be simulated and with what schedules.
Transit line plans are contained in a folder. The internal name of the transit plans folder is: “GKModel::publicPlans”. The external name is “Transit Plans”.
- __init__()¶
- addTimeTable(tt)¶
- Parameters:
Adds a timetable to the Transit plan.
Returns the number of Transit Lines on this plan.
- getOrderedTimeTables(iLine)¶
- Parameters:
iLine –
GKPublicLine- Return type:
.std.vectorstd.pairstd.pairQTime,GKTimeDuration,GKPublicLineTimeTable
- getProblemNet()¶
- Return type:
Returns the Subnetwork this transit plan belongs to
- getPublicLines()¶
- Return type:
.QSetconst GKPublicLine
Returns the Transit Lines on this plan.
- getPublicLinesSortered()¶
- Return type:
.std.vectorconst GKPublicLine
Returns the Transit Lines on this plan ordered by increasing ID.
- getTimeTables()¶
- Return type:
.list of GKPublicLineTimeTable
Returns a vector with all the timetables in the transit plan.
- getTotalNumberOfVehicles(iLine, iStart, iEnd)¶
- Parameters:
iLine –
GKPublicLineiStart –
QDateTimeiEnd –
QDateTime
- Return type:
Dictionary with keys of type .const GKVehicle and values of type double.
Get total number of vehicles.
Returns a list of the vehicles used in this transit plan.
- getUsedVehicles(ptline)
- Parameters:
ptline –
GKPublicLine- Return type:
.list of GKVehicle
Returns the list of vehicles used by the ptline. It can return an empty vector
Returns true if no item is contained in the transit plan.
- removeTimeTable(tt)¶
- Parameters:
Removes the specified timetable from the list of timetables of the transit plan. The timetable itself is not deleted.
- removeTimeTables()¶
Removes all the timetables from the list of timetables of the transit plan. The timetables themselves are not deleted.
- setProblemNet(aProblemNet)¶
- Parameters:
aProblemNet –
GKProblemNet
Sets the Subnetwork this transit plan belongs to
- uses(publicLine)¶
- Parameters:
publicLine –
GKPublicLine- Return type:
Returns true if this plan uses any timetable of the specified line.
- usesTimeTable(timeTable)¶
- Parameters:
timeTable –
GKPublicLineTimeTable- Return type:
Returns true if this plan uses the specified timetable.