Skip to content

Commit

Permalink
added rerouter tests with stops. refs #21
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 27, 2024
1 parent 135a212 commit 1afbc30
Show file tree
Hide file tree
Showing 13 changed files with 213 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">
<rerouter id="rerouter" edges="beg">
<interval begin="20" end="86400">
<closingReroute id="middle"/>
</interval>
</rerouter>
</additional>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="DEFAULT_VEHTYPE" accel="2.6" decel="4.5" sigma="0" length="3" minGap="2" maxSpeed="70"/>

<route id="r0" edges="beg middle end">
<stop edge="end" duration="5" endPos="50"/>
</route>

<flow id="flow_detour" begin="0" period="10" number="5" route="r0">
</flow>

</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--no-step-log -b 0 --no-duration-log --net-file=three_split.net.xml --route-files=input_routes.rou.xml --additional-files=input_additional.add.xml --vehroutes=vehroutes.xml
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-27 15:08:22 by Eclipse SUMO sumo Version v1_19_0+1556-21d71cc5145
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License 2.0 are satisfied: GNU General Public License, version 2
or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="three_split.net.xml"/>
<route-files value="input_routes.rou.xml"/>
<additional-files value="input_additional.add.xml"/>
</input>
<output>
<write-license value="true"/>
<vehroute-output value="vehroutes.xml"/>
</output>
<time>
<begin value="0"/>
</time>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</configuration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vehicle id="flow_detour.0" depart="0.00" arrival="201.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="20.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.1" depart="10.00" arrival="211.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="20.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.2" depart="20.00" arrival="221.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="20.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.3" depart="30.00" arrival="231.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="30.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.4" depart="40.00" arrival="241.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="40.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

</routes>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">
<rerouter id="rerouter" edges="beg">
<interval begin="20" end="86400">
<closingReroute id="middle"/>
</interval>
</rerouter>
</additional>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="DEFAULT_VEHTYPE" accel="2.6" decel="4.5" sigma="0" length="3" minGap="2" maxSpeed="70"/>

<route id="r0" edges="beg middle end"/>

<flow id="flow_detour" begin="0" period="10" number="5" route="r0">
<stop edge="end" duration="5" endPos="50"/>
</flow>

</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--no-step-log -b 0 --no-duration-log --net-file=three_split.net.xml --route-files=input_routes.rou.xml --additional-files=input_additional.add.xml --vehroutes=vehroutes.xml
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-27 15:08:22 by Eclipse SUMO sumo Version v1_19_0+1556-21d71cc5145
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License 2.0 are satisfied: GNU General Public License, version 2
or later which is available at
https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="three_split.net.xml"/>
<route-files value="input_routes.rou.xml"/>
<additional-files value="input_additional.add.xml"/>
</input>
<output>
<write-license value="true"/>
<vehroute-output value="vehroutes.xml"/>
</output>
<time>
<begin value="0"/>
</time>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</configuration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vehicle id="flow_detour.0" depart="0.00" arrival="201.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="20.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.1" depart="10.00" arrival="211.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="20.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.2" depart="20.00" arrival="221.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="20.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.3" depart="30.00" arrival="231.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="30.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

<vehicle id="flow_detour.4" depart="40.00" arrival="241.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="40.00" probability="0" edges="beg middle end"/>
<route edges="beg beg2right right right2end end"/>
</routeDistribution>
<stop edge="end" endPos="50.00" duration="5.00"/>
</vehicle>

</routes>
6 changes: 6 additions & 0 deletions tests/sumo/extended/rerouter/testsuite.sumo
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ closing_disconnects_dest_disallow_destProb
# a vehicle on an internal edge suddenly has its follower edge disallowed
disallowed_while_on_internal

# vehicle should keep stop after reroute
closing_keep_vehicle_stop

# vehicle should keep stop after reroute
closing_keep_route_stop

# the route is terminated on an edge, which the vehicle already passed
terminateRoute_on_jumped_edge
terminateRoute_on_depart
Expand Down

0 comments on commit 1afbc30

Please sign in to comment.