Skip to content

Commit

Permalink
added test refs #14664, #21
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Apr 9, 2024
1 parent 849a8b2 commit 65c2b7c
Show file tree
Hide file tree
Showing 10 changed files with 348 additions and 0 deletions.
Empty file.
2 changes: 2 additions & 0 deletions tests/complex/state/flow_poisson/input_additional.add.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<add>
</add>
4 changes: 4 additions & 0 deletions tests/complex/state/flow_poisson/input_routes.rou.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="DEFAULT_VEHTYPE" sigma="0"/>
<flow id="0" from="0/1to1/1" to="3/1to4/1" begin="0" end="200" period="exp(0.1)"/>
</routes>
9 changes: 9 additions & 0 deletions tests/complex/state/flow_poisson/options.complex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--vehroute-output=vehroutes.xml --no-step-log --no-duration-log
-n input_net.net.xml -r input_routes.rou.xml --save-state.times 50
--save-state.files state.xml
:
--vehroute-output=vehroutes.xml --no-step-log --no-duration-log
-n input_net.net.xml
-r input_routes.rou.xml
--load-state state.xml
tests/complex/state/runner.py
Empty file.
76 changes: 76 additions & 0 deletions tests/complex/state/flow_poisson/state.complex
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-04-09 08:56:22 by Eclipse SUMO sumo Version v1_19_0+1728-849a8b2d627
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<vehroute-output value="vehroutes.xml"/>
<save-state.times value="50"/>
<save-state.files value="state.xml"/>
</output>
<report>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
</configuration>
-->

<snapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/state_file.xsd" version="v1_19_0+1728-849a8b2d627" time="50.00" type="micro">
<route id="!0" state="0" edges="0/1to1/1 3/1to4/1"/>
<route id="!0.0!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.1!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.2!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.3!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.4!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<delay number="5" begin="5" end="0" depart="5.00" time="0.00"/>
<vType id="DEFAULT_VEHTYPE" sigma="0"/>
<vehicle id="0.0" depart="1.15" route="!0.0!var#1" distance="400 1" speedFactor="1.0600" reroute="1" state="262304 2000 1 5.10 0 3.93 49000 0 0" pos="61.60 56.60 10.60" speed="10.60 10.60" angle="90.00" posLat="0.00" waitingTime="100000 0">
<device id="vehroute_0.0" state="0 0.00 0.00 5.10 1 !NULL 2000 !0 device.rerouting -1 0"/>
<device id="routing_0.0" state="0"/>
</vehicle>
<vehicle id="0.1" depart="4.54" route="!0.1!var#1" distance="400 1" speedFactor="0.9383" reroute="1" state="262304 5000 1 5.10 0 1.34 49000 0 0" pos="5.40 0.40 9.38" speed="9.38 9.38" angle="90.00" posLat="0.00" waitingTime="100000 0">
<device id="vehroute_0.1" state="0 0.00 0.00 5.10 1 !NULL 5000 !0 device.rerouting -1 0"/>
<device id="routing_0.1" state="0"/>
</vehicle>
<vehicle id="0.2" depart="35.45" route="!0.2!var#1" distance="0 1" speedFactor="1.0104" reroute="1" state="262304 36000 0 5.10 0 1.46 49000 0 0" pos="121.74 116.74 10.10" speed="10.10 10.10" angle="90.00" posLat="0.00" waitingTime="100000 0">
<device id="vehroute_0.2" state="0 0.00 0.00 5.10 1 !NULL 36000 !0 device.rerouting -1 0"/>
<device id="routing_0.2" state="0"/>
</vehicle>
<vehicle id="0.3" depart="42.55" route="!0.3!var#1" distance="0 1" speedFactor="1.0827" reroute="1" state="262304 43000 0 5.10 0 1.60 49000 0 0" pos="52.75 47.75 10.83" speed="10.83 10.83" angle="90.00" posLat="0.00" waitingTime="100000 0">
<device id="vehroute_0.3" state="0 0.00 0.00 5.10 1 !NULL 43000 !0 device.rerouting -1 0"/>
<device id="routing_0.3" state="0"/>
</vehicle>
<vehicle id="0.4" depart="47.83" route="!0.4!var#1" distance="0 1" speedFactor="1.0303" reroute="1" state="262304 48000 0 5.10 0 0.75 49000 0 0" pos="7.70 2.70 2.60" speed="2.60 0.00" angle="90.00" posLat="0.00" waitingTime="100000 0">
<device id="vehroute_0.4" state="0 0.00 0.00 5.10 1 !NULL 48000 !0 device.rerouting -1 0"/>
<device id="routing_0.4" state="0"/>
</vehicle>
<flowState id="0" begin="0.00" period="exp(0.10)" next="79.15" end="200.00" route="!0" done="5" index="5" reroute="1"/>
<lane id="0/1to1/1_0">
<vehicles value="0.4 0.3 0.2"/>
</lane>
<lane id="1/1to2/1_0">
<vehicles value="0.1 0.0"/>
</lane>
<tlLogic id="0/0" programID="0" phase="2" duration="16000"/>
<tlLogic id="0/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="0/2" programID="0" phase="2" duration="16000"/>
<tlLogic id="1/0" programID="0" phase="4" duration="7000"/>
<tlLogic id="1/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="1/2" programID="0" phase="4" duration="7000"/>
<tlLogic id="2/0" programID="0" phase="4" duration="7000"/>
<tlLogic id="2/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="2/2" programID="0" phase="4" duration="7000"/>
<tlLogic id="3/0" programID="0" phase="4" duration="7000"/>
<tlLogic id="3/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="3/2" programID="0" phase="4" duration="7000"/>
<tlLogic id="4/0" programID="0" phase="2" duration="16000"/>
<tlLogic id="4/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="4/2" programID="0" phase="2" duration="16000"/>
</snapshot>
92 changes: 92 additions & 0 deletions tests/complex/state/flow_poisson/state.complex.meso
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2023-06-28 08:42:52 by Eclipse SUMO sumo Version v1_17_0+1317-06f42fb
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<vehroute-output value="vehroutes.xml"/>
<save-state.times value="50"/>
<save-state.files value="state.xml"/>
</output>
<report>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
<mesoscopic>
<mesosim value="true"/>
</mesoscopic>
</configuration>
-->

<snapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/state_file.xsd" version="v1_17_0+1317-06f42fb" time="50.00" type="meso">
<route id="!0" state="0" edges="0/1to1/1 3/1to4/1"/>
<route id="!0.0!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.1!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.2!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.3!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<route id="!0.4!var#1" state="0" edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
<delay number="5" begin="5" end="0" depart="0.00" time="0.00"/>
<vType id="DEFAULT_VEHTYPE" sigma="0"/>
<vehicle id="0.0" depart="0.00" route="!0.0!var#1" distance="400 1" speedFactor="1.0600" reroute="1" state="262304 0 1 0 1 0 56604 47170 9223372036854775807">
<device id="vehroute_0.0" state="10.60 0.00 1 !NULL 0 !0 device.rerouting -1 0"/>
<device id="routing_0.0" state="0"/>
</vehicle>
<vehicle id="0.1" depart="10.00" route="!0.1!var#1" distance="0 1" speedFactor="0.9383" reroute="1" state="262304 10000 0 0 3 0 52632 41974 9223372036854775807">
<device id="vehroute_0.1" state="9.38 0.00 1 !NULL 10000 !0 device.rerouting -1 0"/>
<device id="routing_0.1" state="0"/>
</vehicle>
<vehicle id="0.2" depart="20.00" route="!0.2!var#1" distance="0 1" speedFactor="1.0104" reroute="1" state="262304 20000 0 0 2 0 49691 39794 9223372036854775807">
<device id="vehroute_0.2" state="10.10 0.00 1 !NULL 20000 !0 device.rerouting -1 0"/>
<device id="routing_0.2" state="0"/>
</vehicle>
<vehicle id="0.3" depart="30.00" route="!0.3!var#1" distance="0 1" speedFactor="1.0827" reroute="1" state="262304 30000 0 0 2 0 57708 48472 9223372036854775807">
<device id="vehroute_0.3" state="10.83 0.00 1 !NULL 30000 !0 device.rerouting -1 0"/>
<device id="routing_0.3" state="0"/>
</vehicle>
<vehicle id="0.4" depart="40.00" route="!0.4!var#1" distance="0 1" speedFactor="1.0303" reroute="1" state="262304 40000 0 0 0 0 49706 40000 9223372036854775807">
<device id="vehroute_0.4" state="10.30 0.00 1 !NULL 40000 !0 device.rerouting -1 0"/>
<device id="routing_0.4" state="0"/>
</vehicle>
<flowState id="0" begin="0.00" period="10.00" next="50.00" end="100.00" route="!0" done="5" index="5" reroute="1"/>
<segment id="0/1to1/1:0">
<vehicles time="41116" value="0.4"/>
</segment>
<segment id="0/1to1/1:1">
<vehicles time="50352" value=""/>
</segment>
<segment id="0/1to1/1:2">
<vehicles time="43854" value="0.3 0.2"/>
</segment>
<segment id="0/1to1/1:3">
<vehicles time="39616" value="0.1"/>
</segment>
<segment id="1/1to2/1:0">
<vehicles time="49050" value=""/>
</segment>
<segment id="1/1to2/1:1">
<vehicles time="-1" value="0.0"/>
</segment>
<tlLogic id="0/0" programID="0" phase="2" duration="16000"/>
<tlLogic id="0/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="0/2" programID="0" phase="2" duration="16000"/>
<tlLogic id="1/0" programID="0" phase="4" duration="7000"/>
<tlLogic id="1/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="1/2" programID="0" phase="4" duration="7000"/>
<tlLogic id="2/0" programID="0" phase="4" duration="7000"/>
<tlLogic id="2/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="2/2" programID="0" phase="4" duration="7000"/>
<tlLogic id="3/0" programID="0" phase="4" duration="7000"/>
<tlLogic id="3/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="3/2" programID="0" phase="4" duration="7000"/>
<tlLogic id="4/0" programID="0" phase="2" duration="16000"/>
<tlLogic id="4/1" programID="0" phase="4" duration="7000"/>
<tlLogic id="4/2" programID="0" phase="2" duration="16000"/>
</snapshot>
89 changes: 89 additions & 0 deletions tests/complex/state/flow_poisson/vehroutes.complex
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-04-09 08:56:22 by Eclipse SUMO sumo Version v1_19_0+1728-849a8b2d627
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
<load-state value="state.xml"/>
</input>
<output>
<vehroute-output value="vehroutes.xml"/>
</output>
<report>
<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="0.0" depart="2.00" arrival="254.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.1" depart="5.00" arrival="260.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.2" depart="36.00" arrival="342.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.3" depart="43.00" arrival="343.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.4" depart="48.00" arrival="345.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.5" depart="80.00" arrival="347.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.6" depart="82.00" arrival="357.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.7" depart="85.00" arrival="359.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.8" depart="115.00" arrival="360.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.9" depart="122.00" arrival="428.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.10" depart="127.00" arrival="429.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.11" depart="159.00" arrival="431.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.12" depart="162.00" arrival="445.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.13" depart="176.00" arrival="447.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.14" depart="182.00" arrival="449.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.15" depart="185.00" arrival="451.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

</routes>
73 changes: 73 additions & 0 deletions tests/complex/state/flow_poisson/vehroutes.complex.meso
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2022-03-31 10:26:14 by Eclipse SUMO sumo Version v1_12_0+1808-7caee96
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
<load-state value="state.xml"/>
</input>
<output>
<vehroute-output value="vehroutes.xml"/>
</output>
<processing>
<pedestrian.model value="nonInteracting"/>
</processing>
<report>
<duration-log.disable value="true"/>
<no-step-log value="true"/>
</report>
<mesoscopic>
<mesosim value="true"/>
</mesoscopic>
</configuration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vehicle id="0.0" depart="0.00" arrival="151.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.1" depart="10.00" arrival="181.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.2" depart="20.00" arrival="183.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.3" depart="30.00" arrival="185.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.4" depart="40.00" arrival="196.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.5" depart="50.00" arrival="243.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.6" depart="60.00" arrival="245.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.7" depart="70.00" arrival="251.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.8" depart="80.00" arrival="253.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

<vehicle id="0.9" depart="90.00" arrival="277.00">
<route edges="0/1to1/1 1/1to2/1 2/1to3/1 3/1to4/1"/>
</vehicle>

</routes>
3 changes: 3 additions & 0 deletions tests/complex/state/testsuite.complex
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ rerouting
# flow saved and loaded
flow

# flow saved and loaded
flow_poisson

# multique saved and loaded, tests also human readable time
multique
save_accel
Expand Down

0 comments on commit 65c2b7c

Please sign in to comment.