Skip to content

Commit

Permalink
patching expected results refs #21, #9891
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed May 17, 2024
1 parent d8467e3 commit dc55912
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
2 changes: 0 additions & 2 deletions tests/complex/traci/vehicle/keepAfterArrival/errors.complex
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Error: Answered with error to command 0xa4: Vehicle 'v' is not known.
Error: Answered with error to command 0xa4: Vehicle 'v' is not known.
Error: Answered with error to command 0xa4: Vehicle 'v' is not known.
Error: Answered with error to command 0xa4: Vehicle 'v' is not known.
Error: Answered with error to command 0xa4: Vehicle 'v' is not known.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<vType id="car" sigma="0"/>
<trip id="v" type="car" depart="0" departSpeed="avg" from="A1B1" to="C1D1">
<stop edge="B2C2" duration="5"/>
<param key="has.tripinfo.device" value="true"/>
</trip>
</routes>
8 changes: 6 additions & 2 deletions tests/complex/traci/vehicle/keepAfterArrival/output.complex
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Retrying in 1 seconds
0 steps after arrival: active=() loaded=()
1 steps after arrival: active=() loaded=()
0 steps after arrival: active=() loaded=('v',)
vehData: speed=-1073741824.0 pos=(-1073741824.0, -1073741824.0) lane= edge= stops=(StopData(startPos=90.39999999999999, endPos=90.6, stopFlags=0, duration=5.0, arrival=23.0, depart=28.0),)
vehTripinfo-arrival: time=46.00 lane=C1D1_0 pos=90.60 posLat=0.00 speed=14.72
1 steps after arrival: active=() loaded=('v',)
vehData: speed=-1073741824.0 pos=(-1073741824.0, -1073741824.0) lane= edge= stops=(StopData(startPos=90.39999999999999, endPos=90.6, stopFlags=0, duration=5.0, arrival=23.0, depart=28.0),)
vehTripinfo-arrival: time=46.00 lane=C1D1_0 pos=90.60 posLat=0.00 speed=14.72
2 steps after arrival: active=() loaded=()
3 steps after arrival: active=() loaded=()
4 steps after arrival: active=() loaded=()
18 changes: 13 additions & 5 deletions tests/complex/traci/vehicle/keepAfterArrival/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
traci.start([sumoBinary,
"-n", "input_net4.net.xml",
"-r", "input_routes.rou.xml",
"--no-step-log",
"--stop-output", "stopinfos.xml",
"--vehroute-output", "vehroutes.xml",
"--keep-after-arrival", "3"
"--keep-after-arrival", "3",
"--no-step-log",
] + sys.argv[1:])

Expand All @@ -49,11 +48,20 @@
i,
traci.vehicle.getIDList(),
traci.vehicle.getLoadedIDList()))
print(" vehData: speed=%s pos=%s lane=%s edge=%s" % (
print(" vehData: speed=%s pos=%s lane=%s edge=%s stops=%s" % (
traci.vehicle.getSpeed(vehID),
traci.vehicle.getPosition(vehID),
traci.vehicle.getLane(vehID),
traci.vehicle.getRoadID(vehID)))
traci.vehicle.getLaneID(vehID),
traci.vehicle.getRoadID(vehID),
traci.vehicle.getStops(vehID, -100)
))
print(" vehTripinfo-arrival: time=%s lane=%s pos=%s posLat=%s speed=%s" % (
traci.vehicle.getParameter(vehID, "device.tripinfo.arrivalTime"),
traci.vehicle.getParameter(vehID, "device.tripinfo.arrivalLane"),
traci.vehicle.getParameter(vehID, "device.tripinfo.arrivalPos"),
traci.vehicle.getParameter(vehID, "device.tripinfo.arrivalPosLat"),
traci.vehicle.getParameter(vehID, "device.tripinfo.arrivalSpeed"),
))
except traci.TraCIException:
pass

Expand Down
11 changes: 8 additions & 3 deletions tests/complex/traci/vehicle/keepAfterArrival/vehroutes.complex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-05-17 08:58:30 by Eclipse SUMO sumo Version v1_20_0+0092-c7bc6f6422a
<!-- generated on 2024-05-17 09:33:24 by Eclipse SUMO sumo Version v1_20_0+0093-896caffe5a3
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
Expand All @@ -14,11 +14,15 @@
</output>
<processing>
<keep-after-arrival value="3&#45;&#45;no-step-log"/>
<keep-after-arrival value="3"/>
</processing>
<report>
<no-step-log value="true"/>
</report>
<traci_server>
<remote-port value="57783"/>
<remote-port value="33361"/>
</traci_server>
</configuration>
Expand All @@ -28,6 +32,7 @@
<vehicle id="v" type="car" depart="0.00" departSpeed="13.89" speedFactor="1.0600" arrival="46.00">
<route edges="A1B1 B1B2 B2C2 C2C1 C1D1"/>
<stop edge="B2C2" duration="5.00"/>
<param key="has.tripinfo.device" value="true"/>
</vehicle>

</routes>

0 comments on commit dc55912

Please sign in to comment.