Skip to content

Commit

Permalink
get max TLIndex in a node
Browse files Browse the repository at this point in the history
  • Loading branch information
aminissn authored and namdre committed Feb 21, 2024
1 parent bcb7c32 commit b2d17d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/sumolib/net/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,11 @@ def getNeighboringNodes(self, outgoingNodes=True, incomingNodes=True):
neighboring.append(e.getToNode())
return neighboring

def getMaxTLLinkIndex(self):
idx = []
for conn in self.getConnections():
idx.append(conn.getTLLinkIndex())
return(max(idx))

def __repr__(self):
return '<junction id="%s"/>' % self._id

0 comments on commit b2d17d9

Please sign in to comment.