Skip to content

Commit

Permalink
added test refs #4031
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Jul 2, 2018
1 parent 32548ca commit abcb09e
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 1 deletion.
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">
<route id="r0" edges="beg middle end rend"/>
<route id="r1" edges="beg beg2left left left2end end rend"/>
<route id="r2" edges="beg beg2right right right2end end rend"/>

<rerouter id="rerouter" edges="beg" file="input_definition.def.xml" vTypes="canReroute"/>
</additional>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<rerouter>
<interval begin="0" end="86400">
<routeProbReroute id="r0" probability="1"/>
<routeProbReroute id="r1" probability="1"/>
<routeProbReroute id="r2" probability="1"/>
</interval>
</rerouter>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="noReroute" sigma="0"/>
<vType id="canReroute" sigma="0"/>


<flow id="noReroute" type="noReroute" begin="0" end="100" number="10" route="r0"/>
<flow id="canReroute" type="canReroute" begin="5" end="105" number="10" route="r0"/>

</routes>
1 change: 1 addition & 0 deletions tests/sumo/extended/rerouter/routeProb_type/options.sumo
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.
146 changes: 146 additions & 0 deletions tests/sumo/extended/rerouter/routeProb_type/vehroutes.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Mon Jul 2 09:05:36 2018 by Eclipse SUMO Version 32548ca
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
SPDX-License-Identifier: EPL-2.0
<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>
<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="noReroute.0" type="noReroute" depart="0.00" arrival="95.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="noReroute.1" type="noReroute" depart="10.00" arrival="105.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="canReroute.1" type="canReroute" depart="15.00" arrival="110.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="15.00" probability="0" edges="beg middle end rend"/>
<route edges="beg middle end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="noReroute.2" type="noReroute" depart="20.00" arrival="115.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="canReroute.2" type="canReroute" depart="25.00" arrival="120.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="25.00" probability="0" edges="beg middle end rend"/>
<route edges="beg middle end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="noReroute.3" type="noReroute" depart="30.00" arrival="125.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="noReroute.4" type="noReroute" depart="40.00" arrival="135.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="canReroute.4" type="canReroute" depart="45.00" arrival="140.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="45.00" probability="0" edges="beg middle end rend"/>
<route edges="beg middle end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="noReroute.5" type="noReroute" depart="50.00" arrival="145.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="noReroute.6" type="noReroute" depart="60.00" arrival="155.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="noReroute.7" type="noReroute" depart="70.00" arrival="165.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="noReroute.8" type="noReroute" depart="80.00" arrival="175.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="canReroute.8" type="canReroute" depart="85.00" arrival="180.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="85.00" probability="0" edges="beg middle end rend"/>
<route edges="beg middle end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="noReroute.9" type="noReroute" depart="90.00" arrival="185.00">
<route edges="beg middle end rend"/>
</vehicle>

<vehicle id="canReroute.9" type="canReroute" depart="95.00" arrival="190.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="95.00" probability="0" edges="beg middle end rend"/>
<route edges="beg middle end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="canReroute.0" type="canReroute" depart="5.00" arrival="212.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="5.00" probability="0" edges="beg middle end rend"/>
<route edges="beg beg2right right right2end end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="canReroute.3" type="canReroute" depart="35.00" arrival="242.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="35.00" probability="0" edges="beg middle end rend"/>
<route edges="beg beg2right right right2end end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="canReroute.5" type="canReroute" depart="55.00" arrival="262.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="55.00" probability="0" edges="beg middle end rend"/>
<route edges="beg beg2right right right2end end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="canReroute.6" type="canReroute" depart="65.00" arrival="272.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="65.00" probability="0" edges="beg middle end rend"/>
<route edges="beg beg2right right right2end end rend"/>
</routeDistribution>
</vehicle>

<vehicle id="canReroute.7" type="canReroute" depart="75.00" arrival="282.00">
<routeDistribution>
<route replacedOnEdge="beg" reason="rerouter" replacedAtTime="75.00" probability="0" edges="beg middle end rend"/>
<route edges="beg beg2right right right2end end rend"/>
</routeDistribution>
</vehicle>

</routes>
5 changes: 4 additions & 1 deletion tests/sumo/extended/rerouter/testsuite.sumo
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ closing_and_dest_prob_and_specialDestinations
# Vehicles that do not drive through the closed area should not be affected
closing_and_dest_prob_unaffected

# routeProbRreroute that filters by vehicle type
#
routeProb_type

# closing an edge with probability 0.5
closing_with_prob

Expand Down Expand Up @@ -52,4 +56,3 @@ closingLane

# closing 2 lanes from a 3-lane road which results in reduced flow and causes some vehicles to reroute
closingLane_with_rerouting

0 comments on commit abcb09e

Please sign in to comment.