PyANGKernel.GKPublicLine¶
- class GKPublicLine¶
A transit line consists of a transit route, its stops and the associated timetables.
Details
The internal name of the transit line folder is: “GKModel::publicLines”. The external name is “Transit Lines”.
Synopsis¶
Methods¶
def
__init__()def
addTimeTable()def
getDistance()def
getProblemNet()def
getSREMRole()def
getSREMSubrole()def
getSections()def
getStops()def
getTimeTables()def
isCorrect()def
isStopUsed()def
reroute()def
setProblemNet()def
setSREMRole()def
setSREMSubrole()def
setStops()
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__()¶
- addStopToStopMark(ptSectionIndex)¶
- Parameters:
ptSectionIndex – int
Marks the
StopToStopin TransitNetwork using this transit line mark color + 1.- addTimeTable(tt)¶
- Parameters:
Adds a timetable. The pointer is adopted.
- clearStopToStopFunctions()¶
Removes all stop to stop functions defined
- clearStopToStopMarks()¶
Clear all
StopToStopmarks.- createRouteAndStops()¶
Set the route and the stops of this Transit Line reading the info stored in its ptSections.
- crowdDiscomfortFunction()¶
- Return type:
Get the crowd discomfort function
See also
Gets the boarding fare for this line.
- getDelayFunction(origin, destination)¶
- Parameters:
- Return type:
Get the delay time function for given origin and destination Transit Stop
- getDistance(origin, destination)¶
Get the distance between the two stops
Gets the distance fare for this line.
- getFareFunction(origin, destination)¶
- Parameters:
- Return type:
Get the distance fare function from Transit Stop origin to Transit Stop destination
- getFreeFlowTravelTime(origin, destination)¶
Get the free flow travel time between the two stops
- getIndexAppearance(stop, indexRoute)¶
Returns the number stop appearances before position indexRoute (indexRoute is also considered).
- getIndexSection(stop, indexAppearance)¶
Returns the index section (1..N) of the stop considering the index appearance of the stop.
- getPTSectionData()¶
- Return type:
.list of GKPTSectionData
Get the route and delay functions for each consecutive pair of stops
- getProblemNet()¶
- Return type:
Returns the Subnetwork this transit line belongs to
- getSectionAppearances(section, indexRoute)¶
Returns the number section appearances before position indexRoute (indexRoute is also considered).
- getSections(origin, destination)¶
Returns all transit sections between origin and destination stop
- getStopToStopMarks()¶
- Return type:
.QSetquint32
Get the
StopToStopmark set.Returns all the transit stops of this line. It will return a vector with as many positions as sections in the transit line, with NULLs where there is no stop.
- getTimeTableStopToStopDelay(origin, destination, iExperiment)¶
- Parameters:
origin –
GKBusStopdestination –
GKBusStopiExperiment –
GKGenericExperiment
- Return type:
Gets the average delay from stop to stop for active scenario (weighted by schedule duration)
- getTimeTables()¶
- Return type:
.list of GKPublicLineTimeTable
Returns all the timetables of this line.
- isCorrect(scenario)¶
- Parameters:
scenario –
GKGenericScenario- Return type:
* See
GKRoute.Returns true if the stop is used in this line.
- removeStopToStopMark(ptSectionIndex)¶
- Parameters:
ptSectionIndex – int
Unmarks the
StopToStop.- removeTimeTable(tt)¶
- Parameters:
Removes the specified timetable from the timetables list of this line. The timetable itself is not deleted.
- removeTimeTables()¶
Removes and deletes all the timetables from the timetables list of this line. The timetables themselves are not deleted.
- reroute(origin, destination, iRoute)¶
- setBoardingFare(iFare)¶
- Parameters:
iFare – float
Sets the boarding fare for this line.
- setCrowdDiscomfortFunction(aFunction)¶
- Parameters:
aFunction –
GKFunctionCost
Set the crowd discomfort function
See also
- setDelayFunction(origin, destination, iDelayFunction)¶
- Parameters:
origin –
GKBusStopdestination –
GKBusStopiDelayFunction –
GKFunctionCost
Set the delay time function from Transit Stop origin to Transit Stop destination
- setDistanceFare(iFare)¶
- Parameters:
iFare – float
Sets the distance fare for this line.
- setFareFunction(origin, destination, iFareFunction)¶
- Parameters:
origin –
GKBusStopdestination –
GKBusStopiFareFunction –
GKFunctionCost
Set the distance fare function from Transit Stop origin to Transit Stop destination
- setOcitLineNumber(value)¶
- Parameters:
value – int
- setOcitRouteNumber(value)¶
- Parameters:
value – int
- setOcitTrainLength(value)¶
- Parameters:
value – int
- setProblemNet(aProblemNet)¶
- Parameters:
aProblemNet –
GKProblemNet
Sets the Subnetwork this transit line belongs to
- setSREMRole(role)¶
- Parameters:
role – int
- setSREMSubrole(value)¶
- Parameters:
value – int
- setStops(_stops)¶
- Parameters:
_stops – .list of GKBusStop
Sets all the transit stops of this line. The vector has to have as many positions as sections in the transit line, with NULLs where there is no stop.