Skip to content

Commit

Permalink
added test refs #14554, #21
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 20, 2024
1 parent ce33cf9 commit 9d51eef
Show file tree
Hide file tree
Showing 10 changed files with 432 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/sumo/rail/rail_signal/reversal_before_signal/errors.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Warning: Found circular block after railSignal junction 'B', link 0 (1 edges, length 200.10)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Wed Sep 9 10:11:50 2020 by Eclipse SUMO duarouter Version v1_7_0+0007-9073c1719d
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
<input>
<net-file value="net.net.xml"/>
<additional-files value="input_additional.add.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<output-file value="input_routes.rou.xml.rou.xml"/>
<alternatives-output value="input_routes.rou.xml.rou.alt.xml"/>
</output>
<report>
<ignore-errors 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">
<vType id="train" length="50.00" vClass="rail"/>
<vehicle id="t0" type="train" depart="0.00" departSpeed="max">
<route edges="b -b -a a"/>
<stop edge="b" duration="0" jump="0"/>
<stop edge="-b" duration="0"/>
<stop edge="-a" duration="0" jump="0"/>
<stop edge="a" duration="0"/>
</vehicle>
</routes>
93 changes: 93 additions & 0 deletions tests/sumo/rail/rail_signal/reversal_before_signal/net.net.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-20 23:51:22 by Eclipse SUMO netedit Version v1_19_0+1436-ce33cf99c4c
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/neteditConfiguration.xsd">
<input>
<sumo-net-file value="net.net.xml"/>
</input>
<output>
<output-file value="net.net.xml"/>
</output>
<processing>
<geometry.min-radius.fix.railways value="false"/>
<geometry.max-grade.fix value="false"/>
<offset.disable-normalization value="true"/>
<lefthand value="0"/>
</processing>
<junctions>
<no-internal-links value="false"/>
<no-turnarounds value="true"/>
<junctions.corner-detail value="5"/>
<junctions.limit-turn-speed value="5.50"/>
<rectangular-lane-cut value="0"/>
</junctions>
<pedestrian>
<walkingareas value="0"/>
</pedestrian>
</configuration>
-->

<net version="1.20" junctionCornerDetail="5" limitTurnSpeed="5.50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/net_file.xsd">

<location netOffset="0.00,0.00" convBoundary="-200.00,0.00,400.00,0.00" origBoundary="-10000000000.00,-10000000000.00,10000000000.00,10000000000.00" projParameter="!"/>

<edge id=":B_0" function="internal" bidi=":B_1">
<lane id=":B_0_0" index="0" allow="rail" speed="13.89" length="0.10" shape="0.00,0.00 0.00,0.00"/>
</edge>
<edge id=":B_1" function="internal" bidi=":B_0">
<lane id=":B_1_0" index="0" allow="rail" speed="13.89" length="0.10" shape="0.00,0.00 0.00,0.00"/>
</edge>
<edge id=":C_0" function="internal" bidi=":C_1">
<lane id=":C_0_0" index="0" allow="rail" speed="13.89" length="0.10" shape="200.00,0.00 200.00,0.00"/>
</edge>
<edge id=":C_1" function="internal" bidi=":C_0">
<lane id=":C_1_0" index="0" allow="rail" speed="13.89" length="0.10" shape="200.00,0.00 200.00,0.00"/>
</edge>

<edge id="-a" from="B" to="A" priority="-1" spreadType="center" bidi="a">
<lane id="-a_0" index="0" allow="rail" speed="13.89" length="200.00" shape="0.00,0.00 -200.00,0.00"/>
</edge>
<edge id="-b" from="C" to="B" priority="-1" spreadType="center" bidi="b">
<lane id="-b_0" index="0" allow="rail" speed="13.89" length="200.00" shape="200.00,0.00 0.00,0.00"/>
</edge>
<edge id="-c" from="D" to="C" priority="-1" spreadType="center" bidi="c">
<lane id="-c_0" index="0" allow="rail" speed="13.89" length="200.00" shape="400.00,0.00 200.00,0.00"/>
</edge>
<edge id="a" from="A" to="B" priority="-1" spreadType="center" bidi="-a">
<lane id="a_0" index="0" allow="rail" speed="13.89" length="200.00" shape="-200.00,0.00 0.00,0.00"/>
</edge>
<edge id="b" from="B" to="C" priority="-1" spreadType="center" bidi="-b">
<lane id="b_0" index="0" allow="rail" speed="13.89" length="200.00" shape="0.00,0.00 200.00,0.00"/>
</edge>
<edge id="c" from="C" to="D" priority="-1" spreadType="center" bidi="-c">
<lane id="c_0" index="0" allow="rail" speed="13.89" length="200.00" shape="200.00,0.00 400.00,0.00"/>
</edge>

<junction id="A" type="dead_end" x="-200.00" y="0.00" incLanes="-a_0" intLanes="" shape="-200.00,1.60 -200.00,-1.60 -200.00,1.60 -200.00,-1.60"/>
<junction id="B" type="rail_signal" x="0.00" y="0.00" incLanes="-b_0 a_0" intLanes=":B_0_0 :B_1_0" shape="0.00,1.60 0.00,-1.60 0.00,1.60">
<request index="0" response="00" foes="00" cont="0"/>
<request index="1" response="00" foes="00" cont="0"/>
</junction>
<junction id="C" type="rail_signal" x="200.00" y="0.00" incLanes="-c_0 b_0" intLanes=":C_0_0 :C_1_0" shape="200.00,1.60 200.00,-1.60 200.00,1.60">
<request index="0" response="00" foes="00" cont="0"/>
<request index="1" response="00" foes="00" cont="0"/>
</junction>
<junction id="D" type="dead_end" x="400.00" y="0.00" incLanes="c_0" intLanes="" shape="400.00,-1.60 400.00,1.60 400.00,-1.60 400.00,1.60"/>

<connection from="-b" to="-a" fromLane="0" toLane="0" via=":B_0_0" tl="B" linkIndex="0" dir="s" state="O"/>
<connection from="-c" to="-b" fromLane="0" toLane="0" via=":C_0_0" tl="C" linkIndex="0" dir="s" state="O"/>
<connection from="a" to="b" fromLane="0" toLane="0" via=":B_1_0" tl="B" linkIndex="1" dir="s" state="O"/>
<connection from="b" to="c" fromLane="0" toLane="0" via=":C_1_0" tl="C" linkIndex="1" dir="s" state="O"/>

<connection from=":B_0" to="-a" fromLane="0" toLane="0" dir="s" state="M"/>
<connection from=":B_1" to="b" fromLane="0" toLane="0" dir="s" state="M"/>
<connection from=":C_0" to="-b" fromLane="0" toLane="0" dir="s" state="M"/>
<connection from=":C_1" to="c" fromLane="0" toLane="0" dir="s" state="M"/>

</net>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--no-step-log --no-duration-log --net-file=net.net.xml -r=input_routes.rou.xml --tripinfo-output=tripinfos.xml
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-20 23:54:01 by Eclipse SUMO sumo Version v1_19_0+1436-ce33cf99c4c
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="net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<write-license value="true"/>
<tripinfo-output value="tripinfos.xml"/>
<railsignal-block-output value="railsignal_blocks.xml"/>
</output>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</configuration>
-->

<railsignal-block-output>
<railSignal id="B">
<link linkIndex="0" from="-b_0" to=":B_0_0">
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
<driveWay edges="-a">
<forward lanes=":B_0_0 -a_0"/>
<bidi lanes=":B_1_0 a_0"/>
<flank lanes=""/>
<protectingSwitches links=""/>
<conflictLinks signals=""/>
</driveWay>
</link>
<link linkIndex="1" from="a_0" to=":B_1_0"/>
</railSignal>
<railSignal id="C">
<link linkIndex="0" from="-c_0" to=":C_0_0"/>
<link linkIndex="1" from="b_0" to=":C_1_0"/>
</railSignal>
</railsignal-block-output>
42 changes: 42 additions & 0 deletions tests/sumo/rail/rail_signal/reversal_before_signal/tripinfos.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-03-20 23:54:01 by Eclipse SUMO sumo Version v1_19_0+1436-ce33cf99c4c
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="net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<write-license value="true"/>
<tripinfo-output value="tripinfos.xml"/>
<railsignal-block-output value="railsignal_blocks.xml"/>
</output>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</configuration>
-->

<tripinfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tripinfo_file.xsd">
<tripinfo id="t0" depart="0.00" departLane="b_0" departPos="50.10" departSpeed="13.89" departDelay="0.00" arrival="98.00" arrivalLane="a_0" arrivalPos="200.00" arrivalSpeed="0.25" duration="98.00" routeLength="750.00" waitingTime="2.00" waitingCount="2" stopTime="4.00" timeLoss="47.19" rerouteNo="0" devices="tripinfo_t0" vType="train" speedFactor="1.00" vaporized=""/>
</tripinfos>

0 comments on commit 9d51eef

Please sign in to comment.