Skip to content

Commit

Permalink
correct condition and parking ID ref eclipse-sumo#13563
Browse files Browse the repository at this point in the history
Signed-off-by: m-kro <m.barthauer@t-online.de>
  • Loading branch information
m-kro committed Jul 10, 2023
1 parent f54f5e2 commit 2db816a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/generateParkingAreas.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def main(options):
break
laneIndex = lane.getIndex()
if options.onRoad and options.onRoadLaneOffset > -1:
if options.onRoadLaneOffset < laneIndex:
if options.onRoadLaneOffset > laneIndex:
continue
elif options.onRoadLaneOffset > laneIndex:
elif options.onRoadLaneOffset < laneIndex:
break
if lane.allows(options.vclass):
if random.random() < options.probability:
Expand All @@ -137,8 +137,9 @@ def main(options):
width = '' if options.width is None else ' width="%s"' % options.width
onRoad = '' if not options.onRoad else ' onRoad="true"'
lefthand = '' if not options.lefthand else ' lefthand="true"'
idSuffix = '' if not options.onRoad else '_%s' % laneIndex
outf.write(' <parkingArea id="%s%s%s" lane="%s" roadsideCapacity="%s"%s%s%s%s%s/>\n' % (
options.prefix, edge.getID(), laneIndex, lane.getID(),
options.prefix, edge.getID(), idSuffix, lane.getID(),
capacity, length, width, angle, lefthand, onRoad))
if not options.onRoad:
break
Expand Down

0 comments on commit 2db816a

Please sign in to comment.