Skip to content

Commit

Permalink
save orig short stop id
Browse files Browse the repository at this point in the history
  • Loading branch information
kuanb committed Mar 6, 2018
1 parent 716486a commit 65503e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion peartree/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,14 @@ def make_synthetic_system_network(
# Mutates the G network object
sid_lookup_sub = _add_nodes_and_edges(G, name, nodes, edges)

# Update teh parent sid with new values
# Update the parent sid with new values
for key, val in sid_lookup_sub.items():
sid_lookup[key] = val

# TODO(kuanb): Can this be consolidated with _add_nodes_and_edges?
# Update node stop_id name to prepare it for generate_cross_feed_edges
# check steps, which require name to include graph name as well
nodes['orig_stop_id'] = nodes['stop_id'].copy()
nodes['stop_id'] = '{}_'.format(name) + nodes['stop_id']

# Then add to the running tally of nodes
Expand All @@ -247,6 +248,10 @@ def make_synthetic_system_network(
exempt_nodes,
connection_threshold)

# TODO(kuanb): This is a hack to deal with the inconsistent use of the
# sid_lookup table - should see if we can remove its need
# at this stage and just have full stop_id already here
nodes['stop_id'] = nodes['orig_stop_id'].copy()
# Mutates the G network object
_add_cross_feed_edges(G, sid_lookup, cross_feed_edges, walk_speed_kmph)

Expand Down

0 comments on commit 65503e5

Please sign in to comment.