Skip to content

Commit

Permalink
Merge pull request #94 from lmanan/main
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Apr 24, 2024
2 parents 5415cd4 + 06608fe commit 1216dec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions motile/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ def get_selected_subgraph(
selected_graph = TrackGraph()

for node_id, node in self.graph.nodes.items():
if solution[node_selected[node_id]]:
if solution[node_selected[node_id]] > 0.5:
selected_graph.add_node(node_id, node)

for edge_id, edge in self.graph.edges.items():
if solution[edge_selected[edge_id]]:
if solution[edge_selected[edge_id]] > 0.5:
selected_graph.add_edge(edge_id, edge)

return selected_graph

0 comments on commit 1216dec

Please sign in to comment.