Skip to content

Commit

Permalink
added test refs #15391, #21
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Aug 28, 2024
1 parent 3509f2a commit 2fd4561
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/sumo/tls/wauts/offset_default/errors.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Warning: Missing yellow phase in tlLogic 'C', program 'progA' for tl-index 0 when switching to phase 1.
Warning: Missing yellow phase in tlLogic 'C', program 'progA' for tl-index 1 when switching to phase 0.
Warning: Missing green phase in tlLogic 'C', program 'progA' for tl-index 2.
Warning: Missing yellow phase in tlLogic 'C', program 'progB' for tl-index 2 when switching to phase 1.
Warning: Missing yellow phase in tlLogic 'C', program 'progB' for tl-index 3 when switching to phase 0.
Warning: Missing green phase in tlLogic 'C', program 'progB' for tl-index 0.
20 changes: 20 additions & 0 deletions tests/sumo/tls/wauts/offset_default/input_additional.add.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd">
<timedEvent dest="tls_state_switch.xml" source="C" type="SaveTLSSwitchStates"/>

<tlLogic id="C" type="static" programID="progA">
<phase duration="10" state="Grrrrrrrrrrrrrrrrrrr"/>
<phase duration="20" state="rGrrrrrrrrrrrrrrrrrr"/>
</tlLogic>
<tlLogic id="C" type="static" programID="progB">
<phase duration="10" state="rrGrrrrrrrrrrrrrrrrr"/>
<phase duration="20" state="rrrGrrrrrrrrrrrrrrrr"/>
</tlLogic>


<WAUT startProg="0" id="w1" period="120">
<wautSwitch to="progA" time="0"/>
<wautSwitch to="progB" time="40"/>
</WAUT>

<wautJunction junctionID="C" wautID="w1"/>
</additional>
5 changes: 5 additions & 0 deletions tests/sumo/tls/wauts/offset_default/options.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--no-step-log --no-duration-log --net-file=net2.net.xml
-a input_additional.add.xml
-b 0
-e 240
-H
Empty file.
61 changes: 61 additions & 0 deletions tests/sumo/tls/wauts/offset_default/tls_state_switch.sumo
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-08-28 21:19:00 by Eclipse SUMO sumo Version v1_20_0+1767-0c0f981c953
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
<sumoConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="net2.net.xml"/>
<additional-files value="input_additional.add.xml"/>
</input>
<output>
<write-license value="true"/>
<human-readable-time value="true"/>
</output>
<time>
<begin value="0"/>
<end value="240"/>
</time>
<processing>
<default.speeddev value="0"/>
</processing>
<report>
<xml-validation value="never"/>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</sumoConfiguration>
-->

<tlsStates xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tlsstates_file.xsd">
<tlsState time="00:00:00" id="C" programID="progA" phase="0" state="Grrrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:00:10" id="C" programID="progA" phase="1" state="rGrrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:00:30" id="C" programID="progA" phase="0" state="Grrrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:00:40" id="C" programID="progB" phase="1" state="rrrGrrrrrrrrrrrrrrrr"/>
<tlsState time="00:01:00" id="C" programID="progB" phase="0" state="rrGrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:01:10" id="C" programID="progB" phase="1" state="rrrGrrrrrrrrrrrrrrrr"/>
<tlsState time="00:01:30" id="C" programID="progB" phase="0" state="rrGrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:01:40" id="C" programID="progB" phase="1" state="rrrGrrrrrrrrrrrrrrrr"/>
<tlsState time="00:02:00" id="C" programID="progA" phase="0" state="Grrrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:02:10" id="C" programID="progA" phase="1" state="rGrrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:02:30" id="C" programID="progA" phase="0" state="Grrrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:02:40" id="C" programID="progB" phase="1" state="rrrGrrrrrrrrrrrrrrrr"/>
<tlsState time="00:03:00" id="C" programID="progB" phase="0" state="rrGrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:03:10" id="C" programID="progB" phase="1" state="rrrGrrrrrrrrrrrrrrrr"/>
<tlsState time="00:03:30" id="C" programID="progB" phase="0" state="rrGrrrrrrrrrrrrrrrrr"/>
<tlsState time="00:03:40" id="C" programID="progB" phase="1" state="rrrGrrrrrrrrrrrrrrrr"/>
</tlsStates>
3 changes: 3 additions & 0 deletions tests/sumo/tls/wauts/testsuite.sumo
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ week

# switch through different plans over the course of one week and stop switch after one week
week_norepeat

# test starting phase when switching between differnt multi-phase programs
offset_default

0 comments on commit 2fd4561

Please sign in to comment.