Skip to content

Commit

Permalink
added test refs #21, #8353
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Dec 6, 2024
1 parent 3f53ed1 commit 5139f6f
Show file tree
Hide file tree
Showing 23 changed files with 584 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/duarouter/meta/help/output.duarouter
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Eclipse SUMO duarouter Version v1_21_0+0881-109d9298130
Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
Copyright (C) 2001-2024 German Aerospace Center (DLR) and others; https://sumo.dlr.de
Shortest path router and DUE computer for the microscopic, multi-modal traffic
simulation SUMO.
Expand Down Expand Up @@ -136,6 +136,10 @@ Processing Options:
ALT-variant from the given file
--astar.save-landmark-distances FILE Save lookup table for astar ALT-variant
to the given file
--scale FLOAT Scale demand by the given factor (by
discarding or duplicating vehicles)
--scale-suffix STR Suffix to be added when creating ids for
cloned vehicles
--gawron.beta FLOAT Use FLOAT as Gawron's beta
--gawron.a FLOAT Use FLOAT as Gawron's a
--keep-all-routes Save routes with near zero probability
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-11-21 13:04:00 by Eclipse SUMO duarouter Version v1_21_0+0881-109d9298130
<!-- generated on 2024-12-06 13:15:06 by Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
-->

<duarouterConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
Expand Down Expand Up @@ -204,6 +204,12 @@
<!-- Save lookup table for astar ALT-variant to the given file -->
<astar.save-landmark-distances value="" type="FILE"/>

<!-- Scale demand by the given factor (by discarding or duplicating vehicles) -->
<scale value="1" type="FLOAT"/>

<!-- Suffix to be added when creating ids for cloned vehicles -->
<scale-suffix value="." type="STR"/>

<!-- Use FLOAT as Gawron&apos;s beta -->
<gawron.beta value="0.9" synonymes="gBeta" type="FLOAT"/>

Expand Down
4 changes: 3 additions & 1 deletion tests/duarouter/meta/write_template_full/cfg.duarouter
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-11-21 13:03:58 by Eclipse SUMO duarouter Version v1_21_0+0881-109d9298130
<!-- generated on 2024-12-06 13:15:06 by Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
-->

<duarouterConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
Expand Down Expand Up @@ -78,6 +78,8 @@
<astar.all-distances value="" type="FILE" help="Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)"/>
<astar.landmark-distances value="" type="FILE" help="Initialize lookup table for astar ALT-variant from the given file"/>
<astar.save-landmark-distances value="" type="FILE" help="Save lookup table for astar ALT-variant to the given file"/>
<scale value="1" type="FLOAT" help="Scale demand by the given factor (by discarding or duplicating vehicles)"/>
<scale-suffix value="." type="STR" help="Suffix to be added when creating ids for cloned vehicles"/>
<gawron.beta value="0.9" synonymes="gBeta" type="FLOAT" help="Use FLOAT as Gawron&apos;s beta"/>
<gawron.a value="0.5" synonymes="gA" type="FLOAT" help="Use FLOAT as Gawron&apos;s a"/>
<keep-all-routes value="false" type="BOOL" help="Save routes with near zero probability"/>
Expand Down
57 changes: 57 additions & 0 deletions tests/duarouter/person/scale_3/alts.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-12-06 13:17:46 by Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
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
<duarouterConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<output-file value="routes.rou.xml"/>
<write-license value="true"/>
</output>
<processing>
<scale value="3"/>
</processing>
<report>
<xml-validation value="never"/>
<no-step-log value="true"/>
</report>
</duarouterConfiguration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<person id="p0" depart="0.00">
<personTrip from="beg" to="end" walkFactor="0.75" costs="1440.00"/>
</person>
<person id="p0.1" depart="0.00">
<personTrip from="beg" to="end" walkFactor="0.75" costs="1440.00"/>
</person>
<person id="p0.2" depart="0.00">
<personTrip from="beg" to="end" walkFactor="0.75" costs="1440.00"/>
</person>
<person id="p1" depart="0.00">
<personTrip from="end" to="beg" walkFactor="0.75" costs="1440.00"/>
</person>
<person id="p1.1" depart="0.00">
<personTrip from="end" to="beg" walkFactor="0.75" costs="1440.00"/>
</person>
<person id="p1.2" depart="0.00">
<personTrip from="end" to="beg" walkFactor="0.75" costs="1440.00"/>
</person>
</routes>
Empty file.
9 changes: 9 additions & 0 deletions tests/duarouter/person/scale_3/input_routes.rou.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<routes>
<person id="p0" depart="0">
<walk from="beg" to="end"/>
</person>
<person id="p1" depart="0">
<walk from="end" to="beg"/>
</person>

</routes>
2 changes: 2 additions & 0 deletions tests/duarouter/person/scale_3/options.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--net-file=input_net.net.xml --route-files=input_routes.rou.xml -o routes.rou.xml
--scale 3
1 change: 1 addition & 0 deletions tests/duarouter/person/scale_3/output.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Success.
57 changes: 57 additions & 0 deletions tests/duarouter/person/scale_3/routes.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-12-06 13:17:46 by Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
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
<duarouterConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_routes.rou.xml"/>
</input>
<output>
<output-file value="routes.rou.xml"/>
<write-license value="true"/>
</output>
<processing>
<scale value="3"/>
</processing>
<report>
<xml-validation value="never"/>
<no-step-log value="true"/>
</report>
</duarouterConfiguration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<person id="p0" depart="0.00">
<walk edges="beg middle end"/>
</person>
<person id="p0.1" depart="0.00">
<walk edges="beg middle end"/>
</person>
<person id="p0.2" depart="0.00">
<walk edges="beg middle end"/>
</person>
<person id="p1" depart="0.00">
<walk edges="end middle beg"/>
</person>
<person id="p1.1" depart="0.00">
<walk edges="end middle beg"/>
</person>
<person id="p1.2" depart="0.00">
<walk edges="end middle beg"/>
</person>
</routes>
3 changes: 3 additions & 0 deletions tests/duarouter/person/testsuite.duarouter
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ stoppingPlace

# mismatch between vehicle stoppingPlace and ride stoppingPlace
stoppingPlace_mismatch

# Copy of basic
scale_3
66 changes: 66 additions & 0 deletions tests/duarouter/trips/scale_0.5/alts.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-12-06 13:16:36 by Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
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
<duarouterConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_trips.trips.xml"/>
</input>
<output>
<output-file value="routes.rou.xml"/>
<write-license value="true"/>
</output>
<processing>
<scale value="0.5"/>
<scale-suffix value="#"/>
</processing>
<report>
<xml-validation value="never"/>
<no-step-log value="true"/>
</report>
</duarouterConfiguration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="0"/>
<vehicle id="0" type="0" depart="0.00">
<routeDistribution last="0">
<route cost="125.90" probability="1.00000000" edges="beg middle end rend"/>
</routeDistribution>
</vehicle>
<vehicle id="2" type="0" depart="0.00">
<routeDistribution last="0">
<route cost="125.90" probability="1.00000000" edges="beg middle end rend"/>
</routeDistribution>
</vehicle>
<vehicle id="4" type="0" depart="0.00">
<routeDistribution last="0">
<route cost="125.90" probability="1.00000000" edges="beg middle end rend"/>
</routeDistribution>
</vehicle>
<vehicle id="6" type="0" depart="0.00">
<routeDistribution last="0">
<route cost="125.90" probability="1.00000000" edges="beg middle end rend"/>
</routeDistribution>
</vehicle>
<vehicle id="8" type="0" depart="0.00">
<routeDistribution last="0">
<route cost="125.90" probability="1.00000000" edges="beg middle end rend"/>
</routeDistribution>
</vehicle>
</routes>
Empty file.
13 changes: 13 additions & 0 deletions tests/duarouter/trips/scale_0.5/input_trips.trips.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="0"/>
<trip id="0" depart="0" from="beg" to="rend" type="0"/>
<trip id="1" depart="0" from="beg" to="rend" type="0"/>
<trip id="2" depart="0" from="beg" to="rend" type="0"/>
<trip id="3" depart="0" from="beg" to="rend" type="0"/>
<trip id="4" depart="0" from="beg" to="rend" type="0"/>
<trip id="5" depart="0" from="beg" to="rend" type="0"/>
<trip id="6" depart="0" from="beg" to="rend" type="0"/>
<trip id="7" depart="0" from="beg" to="rend" type="0"/>
<trip id="8" depart="0" from="beg" to="rend" type="0"/>
<trip id="9" depart="0" from="beg" to="rend" type="0"/>
</routes>
2 changes: 2 additions & 0 deletions tests/duarouter/trips/scale_0.5/options.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--net-file=input_net.net.xml --route-files=input_trips.trips.xml -o routes.rou.xml
--scale 0.5 --scale-suffix #
1 change: 1 addition & 0 deletions tests/duarouter/trips/scale_0.5/output.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Success.
56 changes: 56 additions & 0 deletions tests/duarouter/trips/scale_0.5/routes.duarouter
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-12-06 13:16:36 by Eclipse SUMO duarouter Version v1_21_0+1212-c8e3c67cccc
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
<duarouterConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/duarouterConfiguration.xsd">
<input>
<net-file value="input_net.net.xml"/>
<route-files value="input_trips.trips.xml"/>
</input>
<output>
<output-file value="routes.rou.xml"/>
<write-license value="true"/>
</output>
<processing>
<scale value="0.5"/>
<scale-suffix value="#"/>
</processing>
<report>
<xml-validation value="never"/>
<no-step-log value="true"/>
</report>
</duarouterConfiguration>
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="0"/>
<vehicle id="0" type="0" depart="0.00">
<route edges="beg middle end rend"/>
</vehicle>
<vehicle id="2" type="0" depart="0.00">
<route edges="beg middle end rend"/>
</vehicle>
<vehicle id="4" type="0" depart="0.00">
<route edges="beg middle end rend"/>
</vehicle>
<vehicle id="6" type="0" depart="0.00">
<route edges="beg middle end rend"/>
</vehicle>
<vehicle id="8" type="0" depart="0.00">
<route edges="beg middle end rend"/>
</vehicle>
</routes>
Loading

0 comments on commit 5139f6f

Please sign in to comment.