diff --git a/Trajectories/cost_function.py b/Trajectories/cost_function.py index 1f43541e4cd40f763ba34d8d5c1853457b0ac2df..e0b7abaea7301f2b93f388ddaaa5723bdbbca02c 100755 --- a/Trajectories/cost_function.py +++ b/Trajectories/cost_function.py @@ -1,20 +1,20 @@ #!/usr/bin/env python3 -"""This script takes the graph of segments without cost and computes -the cost applied to edges. +"""This script takes a graph of segments and computes the cost applied +to edges. Input: --- the graph of segments without cost; +-- the graph of segments; -- the SHPC. Output: the graph of segments with cost. The inst_eddies property of vertices is not modified by this -script. All the content of the input graph is part of the output graph -so the input file may be removed, if desired, after running this -script. +script. The cost is an internal property of the output graph. This +internal property is created if it was not already in the input +graph. The cost is overwritten if it was already in the input graph. """ @@ -217,7 +217,18 @@ delta_r_std = 8.6953e3 # in m # Load the graph_tool file: print("Loading graph...") -g = graph_tool.load_graph(args.input_segments) +g = graph_tool.load_graph( + args.input_segments, + ignore_vp=[ + "pos_first", + "pos_last", + "first_av_rad", + "first_av_ros", + "last_av_rad", + "last_av_ros", + ], + ignore_ep=["cost_function"], +) print("Loading done...") print("Input graph:") print("Number of vertices:", g.num_vertices())