Commit 38ffff62 authored by 张晓彤's avatar 张晓彤

解决路网问题

parent 6268ed28
...@@ -508,8 +508,9 @@ class Topo(): ...@@ -508,8 +508,9 @@ class Topo():
self.cross_bf_lanes = [] self.cross_bf_lanes = []
for node_id, Type in self.load_G.nodes.data('name'): for node_id, Type in self.load_G.nodes.data('name'):
if Type == 'None': if Type == 'None':
self.cross_bf_lanes.append(str(session_postgre.query(Lane).filter_by(EndNodeId=node_id).first().Id)) lanes = session_postgre.query(Lane).filter_by(EndNodeId=node_id).first()
if lanes is not None:
self.cross_bf_lanes.append(str(lanes.Id))
def get_cross_nodes(self): def get_cross_nodes(self):
return self.cross_nodes return self.cross_nodes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment