MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / edgeID

Method edgeID

limsim/simModel/common/carFactory.py:164–180  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162
163 @property
164 def edgeID(self) -> str:
165 if self.routeIdxQ:
166 currIdx = self.routeIdxQ[-1]
167 currEdge = self.routes[currIdx]
168 if currIdx < len(self.routes) - 1:
169 searchLanes = self.LLRDict[currEdge]['edgeLanes'] | self.LLRDict[currEdge]['junctionLanes']
170 else:
171 searchLanes = self.LLRDict[currEdge]['edgeLanes']
172 if self.laneID in searchLanes:
173 return currEdge
174 else:
175 if currIdx != 0:
176 return self.routes[currIdx-1]
177 else:
178 return currEdge
179 else:
180 raise TypeError('Please call Model.updateVeh() at first.')
181
182 @property
183 def nextEdgeID(self) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected