aequilibrae.paths.PathResults#

class aequilibrae.paths.PathResults[source]#

Path computation result holder

>>> from aequilibrae import Project
>>> from aequilibrae.paths.results import PathResults

>>> proj = Project.from_path("/tmp/test_project")
>>> proj.network.build_graphs()

# Mode c is car in this project
>>> car_graph = proj.network.graphs['c']

# minimize distance
>>> car_graph.set_graph('distance')

# If you want to compute skims
# It does increase path computation time substantially
>>> car_graph.set_skimming(['distance', 'free_flow_time'])

>>> res = PathResults()
>>> res.prepare(car_graph)
>>> res.compute_path(1, 17)

# res.milepost contains the milepost corresponding to each node along the path
# res.path_nodes contains the sequence of nodes that form the path
# res.path  contains the sequence of links that form the path
# res.path_link_directions contains the link directions corresponding to the above links
# res.skims contain all skims requested when preparing the graph

# Update all the outputs mentioned above for destination 9. Same origin: 1
>>> res.update_trace(9)

# clears all computation results
>>> res.reset()
__init__() None[source]#

Methods

__init__()

compute_path(origin, destination[, ...])

Computes the path between two nodes in the network.

get_heuristics()

Return the availiable heuristics.

prepare(graph)

Prepares the object with dimensions corresponding to the graph object

reset()

Resets object to prepared and pre-computation state

set_heuristic(heuristic)

Set the heuristics to be used in A*.

update_trace(destination)

Updates the path's nodes, links, skims and mileposts