transbigdata.get_shortest_path

transbigdata.get_shortest_path(G, stop, ostation, dstation)

Obtain the travel path of shortest path from the metro nextwork

参数:
  • G (networkx.classes.graph.Graph) – metro network

  • stop (DataFrame) – metro stop dataframe

  • ostation (str) – O station name

  • dstation (str) – D station name

返回:

path – travel path: list of station names

返回类型:

list