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”.

Inheritance diagram of PyANGKernel.GKPublicLine

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

__init__()
addStopToStopMark(ptSectionIndex)
Parameters:

ptSectionIndex – int

Marks the StopToStop in TransitNetwork using this transit line mark color + 1.

addTimeTable(tt)
Parameters:

ttGKPublicLineTimeTable

Adds a timetable. The pointer is adopted.

clearStopToStopFunctions()

Removes all stop to stop functions defined

clearStopToStopMarks()

Clear all StopToStop marks.

createRouteAndStops()

Set the route and the stops of this Transit Line reading the info stored in its ptSections.

crowdDiscomfortFunction()
Return type:

GKFunctionCost

Get the crowd discomfort function

getBoardingFare()
Return type:

float

Gets the boarding fare for this line.

getDelayFunction(origin, destination)
Parameters:
Return type:

GKFunctionCost

Get the delay time function for given origin and destination Transit Stop

getDistance(origin, destination)
Parameters:
Return type:

float

Get the distance between the two stops

getDistanceFare()
Return type:

float

Gets the distance fare for this line.

getFareFunction(origin, destination)
Parameters:
Return type:

GKFunctionCost

Get the distance fare function from Transit Stop origin to Transit Stop destination

getFreeFlowTravelTime(origin, destination)
Parameters:
Return type:

float

Get the free flow travel time between the two stops

getIndexAppearance(stop, indexRoute)
Parameters:
Return type:

int

Returns the number stop appearances before position indexRoute (indexRoute is also considered).

getIndexSection(stop, indexAppearance)
Parameters:
Return type:

int

Returns the index section (1..N) of the stop considering the index appearance of the stop.

getOcitLineNumber()
Return type:

int

getOcitRouteNumber()
Return type:

int

getOcitTrainLength()
Return type:

int

getPTSectionData()
Return type:

.list of GKPTSectionData

Get the route and delay functions for each consecutive pair of stops

getProblemNet()
Return type:

GKProblemNet

Returns the Subnetwork this transit line belongs to

getSREMRole()
Return type:

int

getSREMSubrole()
Return type:

int

getSectionAppearances(section, indexRoute)
Parameters:
Return type:

int

Returns the number section appearances before position indexRoute (indexRoute is also considered).

getSections(origin, destination)
Parameters:
Return type:

.list of GKSection

Returns all transit sections between origin and destination stop

getStopToStopMarks()
Return type:

.QSetquint32

Get the StopToStop mark set.

getStops()
Return type:

.list of GKBusStop

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:
Return type:

float

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:

scenarioGKGenericScenario

Return type:

bool

* See GKRoute .

isStopUsed(stop)
Parameters:

stopGKBusStop

Return type:

bool

Returns true if the stop is used in this line.

removeStopToStopMark(ptSectionIndex)
Parameters:

ptSectionIndex – int

Unmarks the StopToStop .

removeTimeTable(tt)
Parameters:

ttGKPublicLineTimeTable

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)
Parameters:
setBoardingFare(iFare)
Parameters:

iFare – float

Sets the boarding fare for this line.

setCrowdDiscomfortFunction(aFunction)
Parameters:

aFunctionGKFunctionCost

Set the crowd discomfort function

setDelayFunction(origin, destination, iDelayFunction)
Parameters:

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:

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:

aProblemNetGKProblemNet

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.