Skip to content

Commit

Permalink
getMaxTLLinkIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
aminissn authored and namdre committed Feb 21, 2024
1 parent b2d17d9 commit e925368
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tools/sumolib/net/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,14 @@ 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

def getMaxTLLinkIndex(self):
idx = []
if self.getType()=='traffic_light':
for conn in self.getConnections():
idx.append(conn.getTLLinkIndex())
return(max(idx))
else:
return None

0 comments on commit e925368

Please sign in to comment.