diff --git a/Trajectories/trajectories.py b/Trajectories/trajectories.py index b4abed16c0595e04dbc5970a8a145f60dc9c261d..7742cf5cfdf9812729517943b5b7517b65639954 100755 --- a/Trajectories/trajectories.py +++ b/Trajectories/trajectories.py @@ -96,6 +96,8 @@ expanded_traj = [] # an element of expanded_traj is a trajectory, # represented by a list of instantaneous eddies if "cost_function" in g.edge_properties: + # Build my_subgraphs, a dictionary of nodes at each date: + my_subgraphs = {} for v in g.vertices(): @@ -109,6 +111,8 @@ if "cost_function" in g.edge_properties: my_subgraphs[date_index] = [int(v)] for date_index in sorted(my_subgraphs): + # Consider all outgoing edges at a given date: + edges = [] all_cost = []