On 03.10.2014 04:25, lmz wrote:
Hello -- I am getting an unexpected shortest path (with weighted costs) result. I have isolated it to a simple script to illustrate; the files are at http://www.sfcta.org/downloads/lmz/
Files: - graph: graph_after_1iter_157_277.xml.gz - python script to illustrate my issue: path_debug.py - log file output of python script: path_debug.log The workbook, path_debug.xls, is just an excel version of path_debug.log with a calculated column (in orange) inserted to show what I expect to be the shortest distance to the given vertex.
The script path_debug.py: 1) finds the shortest path from a source to a target and prints the details 2) prints the details of what I expect to be the shortest path
I cannot figure out why the second path has the cost that it's printing... Mostly it's as expected, but the yellow highlighted cells are what baffles me.
You might be hitting the following bug which was fixed a while ago: https://git.skewed.de/count0/graph-tool/issues/188 This fix has not yet made into a release, so you should try the git version. Alternatively, you may get the distances from the shortest_distance function without the 'target' option, and compare. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>