📅  最后修改于: 2022-03-11 14:59:44.593000             🧑  作者: Mango
def distance(a,b):
return ( nx.dijkstra_path_length(G,a,b, 'day') + len(nx.dijkstra_path(G, a, b)) )
nx.astar_path_length(G, 'A', 'F', heuristic=distance, weight='day')