Skip to content

Commit

Permalink
Merge branch 'tests' of https://github.com/DLR-VF/UrMoAC
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrajzew committed Feb 24, 2021
2 parents 7fa71b3 + 97641bc commit 0d7908f
Show file tree
Hide file tree
Showing 51 changed files with 430 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/config_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
home_operating_system:posix
kill_timeout:300
7 changes: 7 additions & 0 deletions tests/runUrMoACTests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set TEXTTEST_HOME=%~dp0
set URMOAC_BINARY=%~dp0\..\bin\UrMoAC.jar
set PYTHON=python

SET TEXTTESTPY=texttest.exe

start %TEXTTESTPY% -a urmoac
10 changes: 10 additions & 0 deletions tests/urmoac/bugs/missing_dot_at_double/errors.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The 'from' parameter is missing
The 'to' parameter is missing
The 'net' parameter is missing
The 'mode' parameter is missing
The 'time' parameter is missing
The 'epsg' parameter is missing
Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double
at de.dlr.ivf.helper.options.OptionsHelper.isDoubleOrUnset(OptionsHelper.java:69)
at de.dlr.ivf.urmo.UrMoAccessibilityComputer.getCMDOptions(UrMoAccessibilityComputer.java:376)
at de.dlr.ivf.urmo.UrMoAccessibilityComputer.main(UrMoAccessibilityComputer.java:424)
1 change: 1 addition & 0 deletions tests/urmoac/bugs/missing_dot_at_double/exitcode.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
2 changes: 2 additions & 0 deletions tests/urmoac/bugs/missing_dot_at_double/options.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--max-tt 1800

Empty file.
4 changes: 4 additions & 0 deletions tests/urmoac/bugs/testsuite.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# missing double dot
missing_dot_at_double


15 changes: 15 additions & 0 deletions tests/urmoac/config.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import_config_file:../config_all
binary:$URMOAC_BINARY
copy_test_path:network.csv
copy_test_path:sources.csv
copy_test_path:destinations.csv

[collate_file]
o2r_output:o2r_output.csv
d2r_output:d2r_output.csv
od_output:od_output.csv

[floating_point_tolerance]
output:0.0101


2 changes: 2 additions & 0 deletions tests/urmoac/environment.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CLASSPATH:..\..\bin\UrMoAC.jar

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2000;10001;450.0;0.0;-200.0;0.0;-200.0;0.0
2001;10001;350.0;0.0;-100.0;0.0;-100.0;0.0
2002;10001;250.0;0.0;0.0;0.0;0.0;0.0
2003;10001;150.0;0.0;100.0;0.0;100.0;0.0
2004;10001;50.0;0.0;200.0;0.0;200.0;0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#id;x;y;[var]
2000;-200;0
2001;-100;0
2002;0;0
2003;100;0
2004;200;0
3 changes: 3 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_no_offset/errors.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
4 changes: 4 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_no_offset/network.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#id;fromNode;toNode;foot;bicycle;passenger;speed;length;coords...
10000;0;1;true;true;true;50;500;-250;0;250;0
10001;1;0;true;true;true;50;500;250;0;-250;0

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1000;10001;500.0;0.0;-250.0;0.0;-250.0;0.0
1001;10001;400.0;0.0;-150.0;0.0;-150.0;0.0
1002;10001;300.0;0.0;-50.0;0.0;-50.0;0.0
1003;10001;250.0;0.0;0.0;0.0;0.0;0.0
1004;10001;200.0;0.0;50.0;0.0;50.0;0.0
1005;10001;100.0;0.0;150.0;0.0;150.0;0.0
1006;10001;0.0;0.0;250.0;0.0;250.0;0.0
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_no_offset/output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

done.
8 changes: 8 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_no_offset/sources.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#id;x;y;[var]
1000;-250;0
1001;-150;0
1002;-50;0
1003;0;0
1004;50;0
1005;150;0
1006;250;0
5 changes: 5 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/d2r_output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2000;10000;50.0;10.0;-200.0;0.0;-200.0;-10.0
2003;10000;350.0;10.0;100.0;0.0;100.0;-10.0
2001;10001;350.0;10.0;-100.0;0.0;-100.0;10.0
2002;10001;250.0;0.0;0.0;0.0;0.0;0.0
2004;10001;50.0;10.0;200.0;0.0;200.0;10.0
6 changes: 6 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/destinations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#id;x;y;[var]
2000;-200;-10
2001;-100;10
2002;0;0
2003;100;-10
2004;200;10
3 changes: 3 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/errors.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
4 changes: 4 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/network.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#id;fromNode;toNode;foot;bicycle;passenger;speed;length;coords...
10000;0;1;true;true;true;50;500;-250;0;250;0
10001;1;0;true;true;true;50;500;250;0;-250;0

7 changes: 7 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/o2r_output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1000;10000;0.0;20.0;-250.0;0.0;-250.0;-20.0
1003;10000;250.0;10.0;0.0;0.0;0.0;-10.0
1001;10001;400.0;10.0;-150.0;0.0;-150.0;10.0
1002;10001;300.0;0.0;-50.0;0.0;-50.0;0.0
1004;10001;200.0;20.0;50.0;0.0;50.0;20.0
1005;10001;100.0;0.0;150.0;0.0;150.0;0.0
1006;10001;0.0;10.0;250.0;0.0;250.0;10.0
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

done.
8 changes: 8 additions & 0 deletions tests/urmoac/mapping/one_bidir_road_offsets/sources.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#id;x;y;[var]
1000;-250;-20
1001;-150;10
1002;-50;0
1003;0;-10
1004;50;20
1005;150;0
1006;250;10
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2000;10000;50.0;0.0;-200.0;0.0;-200.0;0.0
2001;10000;150.0;0.0;-100.0;0.0;-100.0;0.0
2002;10000;250.0;0.0;0.0;0.0;0.0;0.0
2003;10000;350.0;0.0;100.0;0.0;100.0;0.0
2004;10000;450.0;0.0;200.0;0.0;200.0;0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#id;x;y;[var]
2000;-200;0
2001;-100;0
2002;0;0
2003;100;0
2004;200;0
3 changes: 3 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_no_offset/errors.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_no_offset/network.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#id;fromNode;toNode;foot;bicycle;passenger;speed;length;coords...
10000;0;1;true;true;true;50;500;-250;0;250;0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1000;10000;0.0;0.0;-250.0;0.0;-250.0;0.0
1001;10000;100.0;0.0;-150.0;0.0;-150.0;0.0
1002;10000;200.0;0.0;-50.0;0.0;-50.0;0.0
1003;10000;250.0;0.0;0.0;0.0;0.0;0.0
1004;10000;300.0;0.0;50.0;0.0;50.0;0.0
1005;10000;400.0;0.0;150.0;0.0;150.0;0.0
1006;10000;500.0;0.0;250.0;0.0;250.0;0.0
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_no_offset/output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

done.
8 changes: 8 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_no_offset/sources.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#id;x;y;[var]
1000;-250;0
1001;-150;0
1002;-50;0
1003;0;0
1004;50;0
1005;150;0
1006;250;0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2000;10000;50.0;10.0;-200.0;0.0;-200.0;-10.0
2001;10000;150.0;10.0;-100.0;0.0;-100.0;10.0
2002;10000;250.0;0.0;0.0;0.0;0.0;0.0
2003;10000;350.0;10.0;100.0;0.0;100.0;-10.0
2004;10000;450.0;10.0;200.0;0.0;200.0;10.0
6 changes: 6 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_offsets/destinations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#id;x;y;[var]
2000;-200;-10
2001;-100;10
2002;0;0
2003;100;-10
2004;200;10
3 changes: 3 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_offsets/errors.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_offsets/network.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#id;fromNode;toNode;foot;bicycle;passenger;speed;length;coords...
10000;0;1;true;true;true;50;500;-250;0;250;0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1000;10000;0.0;20.0;-250.0;0.0;-250.0;-20.0
1001;10000;100.0;10.0;-150.0;0.0;-150.0;10.0
1002;10000;200.0;0.0;-50.0;0.0;-50.0;0.0
1003;10000;250.0;10.0;0.0;0.0;0.0;-10.0
1004;10000;300.0;20.0;50.0;0.0;50.0;20.0
1005;10000;400.0;0.0;150.0;0.0;150.0;0.0
1006;10000;500.0;10.0;250.0;0.0;250.0;10.0
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_offsets/output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

done.
8 changes: 8 additions & 0 deletions tests/urmoac/mapping/one_unidir_road_offsets/sources.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#id;x;y;[var]
1000;-250;-20
1001;-150;10
1002;-50;0
1003;0;-10
1004;50;20
1005;150;0
1006;250;10
2 changes: 2 additions & 0 deletions tests/urmoac/mapping/options.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--from file;sources.csv --to file;destinations.csv --net file;network.csv --origins-to-road-output file;o2r_output.csv --destinations-to-road-output file;d2r_output.csv --epsg 0 --mode foot --time 0

12 changes: 12 additions & 0 deletions tests/urmoac/mapping/testsuite.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# simple allocation along a unidirectional single road
one_unidir_road_no_offset

# simple allocation along a bidirectional single road
one_bidir_road_no_offset

# simple allocation along a unidirectional single road with different offsets
one_unidir_road_offsets

# simple allocation along a bidirectional single road with different offsets
one_bidir_road_offsets

Empty file.
1 change: 1 addition & 0 deletions tests/urmoac/meta/help_long/options.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--help
95 changes: 95 additions & 0 deletions tests/urmoac/meta/help_long/output.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
usage: UrMoAccessibilityComputer
-?,--help Prints the help screen.
-d,--direct-output <arg> Defines the direct output.
--date <arg> The date for which the
accessibilities shall be
computed.
--destinations-to-road-output <arg> The name of the file to write
the mapping between to-objects
to the road to.
-dropprevious When set, previous output with
the same name is replaced.
-E,--entrainment <arg> Data source for entrainment
description.
-e,--edges-output <arg> Defines the edges output.
--epsg <arg> The EPSG projection to use.
--ext-nm-output <arg> Defines the extended n:m output.
-F,--from-filter <arg> Defines a filter for origins to
load.
-f,--from Defines the data source of
origins.
--from-agg <arg> Defines the data source of
origin aggregation areas.
--from-agg.geom <arg> Defines the column name of the
origins aggregations'
geometries.
--from-agg.id <arg> Defines the column name of the
origins aggregations' ids.
--from.geom <arg> Defines the column name of the
origins' geometries.
--from.id <arg> Defines the column name of the
origins' ids.
-i,--interchanges-output <arg> Defines the interchanges output.
-m,--mode <arg> The mode to use ['passenger',
'foot', 'bicycle'].
--max-distance <arg> The maximum distance to check.
--max-number <arg> The maximum number of
destinations to visit.
--max-tt <arg> The maximum travel time to
check.
--max-variable-sum <arg> The maximum sum of variable's
values to collect.
--measure <arg> The measure to use during the
routing ['tt_mode', 'price_tt',
'interchanges_tt',
'maxinterchanges_tt'].
--measure-param1 <arg> !!!!.
--measure-param2 <arg> !!!!.
-n,--net <arg> Defines the road network to
load.
-o,--nm-output <arg> Defines the n:m output.
--origins-to-road-output <arg> The name of the file to write
the mapping between from-objects
to the road to.
--output-steps <arg> !!!Pseudo-steps.
-P,--pt-restriction <arg> Restrictions to usable GTFS
modes.
-p,--pt <arg> Defines the GTFS-based public
transport representation.
--pt-boundary <arg> Defines the data source of the
boundary for the PT offer.
--pt-output <arg> Defines the public transport
output.
-requirespt When set, only information that
contains a PT part are stored.
-shortest Searches only one destination
per origin.
--stat-nm-output <arg> Defines the n:m statistics
output.
-subnets When set, unconnected network
parts are not removed.
-T,--to-filter <arg> Defines a filter for
destinations to load.
-t,--to <arg> Defines the data source of
destinations.
--threads <arg> The number of threads.
--time <arg> The time the trips start at in
seconds.
--to-agg <arg> Defines the data source of
destination aggregation areas.
--to-agg.geom <arg> Defines the column name of the
destination aggregations'
geometries.
--to-agg.id <arg> Defines the column name of the
destination aggregations' ids.
--to.geom <arg> Defines the column name of the
destinations' geometries.
--to.id <arg> Defines the column name of the
destinations' ids.
--traveltimes <arg> Defines the data source of
traveltimes.
-V,--variable <arg> An optional destinations'
variable to collect.
-v,--verbose Prints what is being done.
-W,--weight <arg> An optional weighting attribute
for the origins.
Empty file.
1 change: 1 addition & 0 deletions tests/urmoac/meta/help_short/options.urmoac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-?
Loading

0 comments on commit 0d7908f

Please sign in to comment.