Skip to content

Commit

Permalink
removed newline. refs eclipse-sumo#8517
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Apr 27, 2021
1 parent e72f588 commit b0f2855
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 0 additions & 6 deletions tests/complex/traci/person/trip_chain/output.complex
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
Retrying in 1 seconds

<personTrip to="1/3to0/3" arrivalPos="55.00"/>

<ride to="0/4to1/4" arrivalPos="92.00" lines="train0"/>

<personTrip to="1/4to2/4" arrivalPos="45.00"/>

<stop edge="1/4to2/4" endPos="45.00 duration="20.0" actType="chew bubblegum""/>

<ride to="3/4to4/4" arrivalPos="92.00" lines="car0"/>


<walk edges="2/3to1/3 1/3to0/3" busStop="busStop0"/>

10 changes: 5 additions & 5 deletions tools/traci/_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def toXML(self, firstStage=True, isPerson=True, extra=[]):
if self.travelTime >= 0:
other += ' duration="%s"' % self.travelTime
other += ''.join([' %s="%s"' % i for i in extra])
return '<stop%s%s"/>\n' % (to, other)
return '<stop%s%s"/>' % (to, other)

elif self.type == tc.STAGE_DRIVING:
fro = ' from="%s"' % self.edges[0] if firstStage else ''
Expand All @@ -109,15 +109,15 @@ def toXML(self, firstStage=True, isPerson=True, extra=[]):
if self.depart != tc.INVALID_DOUBLE_VALUE:
other += ' depart="%s"' % self.depart
other += ''.join([' %s="%s"' % i for i in extra])
return '<%s%s%s%s/>\n' % (elem, fro, to, other)
return '<%s%s%s%s/>' % (elem, fro, to, other)

elif self.type == tc.STAGE_WALKING:
to = ' arrivalPos="%.2f"' % self.arrivalPos
if self.destStop:
to = ' busStop="%s"' % self.destStop
edges = ' edges="%s"' % ' '.join(self.edges)
other = ''.join([' %s="%s"' % i for i in extra])
return '<walk%s%s%s/>\n' % (edges, to, other)
return '<walk%s%s%s/>' % (edges, to, other)

elif self.type == tc.STAGE_TRIP:
fro = ' from="%s"' % self.edges[0] if firstStage else ''
Expand All @@ -128,15 +128,15 @@ def toXML(self, firstStage=True, isPerson=True, extra=[]):
if self.vType:
other += ' vTypes="%s"' % self.vType
other += ''.join([' %s="%s"' % i for i in extra])
return '<personTrip%s%s%s/>\n' % (fro, to, other)
return '<personTrip%s%s%s/>' % (fro, to, other)

elif self.type == tc.STAGE_TRANSHIP:
fro = ' from="%s"' % self.edges[0] if firstStage else ''
to = ' to="%s" arrivalPos="%.2f"' % (self.edges[-1], self.arrivalPos)
if self.destStop:
to = ' busStop="%s"' % self.destStop
other = ''.join([' %s="%s"' % i for i in extra])
return '<tranship%s%s%s/>\n' % (fro, to, other)
return '<tranship%s%s%s/>' % (fro, to, other)

else:
# STAGE_ACCESS and STAGE_WAITING_FOR_DEPART are never read from xml
Expand Down

0 comments on commit b0f2855

Please sign in to comment.