From 45c863ad7fb8c3dc82b4d054f748f4484a27f53f Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Wed, 26 Sep 2018 19:01:18 +0300 Subject: [PATCH] More routing quality tests and some factor updates. --- .../bigger_roads_tests.cpp | 24 ++++++- .../passby_roads_tests.cpp | 65 ++++++++++++++++++- routing_common/car_model.cpp | 4 +- 3 files changed, 88 insertions(+), 5 deletions(-) diff --git a/routing/routing_quality/routing_quality_tests/bigger_roads_tests.cpp b/routing/routing_quality/routing_quality_tests/bigger_roads_tests.cpp index 75cb7bbbe5..768c77dbd1 100644 --- a/routing/routing_quality/routing_quality_tests/bigger_roads_tests.cpp +++ b/routing/routing_quality/routing_quality_tests/bigger_roads_tests.cpp @@ -7,11 +7,31 @@ using namespace routing_quality; // Test on preferring better but longer roads should be grouped in this file. namespace { -UNIT_TEST(RoutingQuality_MoscowTushino) +UNIT_TEST(RoutingQuality_RussiaMoscowTushino) { - // Test in Tushino on routing along big routes. TEST(CheckCarRoute({55.84398, 37.45018} /* start */, {55.85489, 37.43784} /* finish */, {{{55.84343, 37.43949}}} /* reference track */), ()); } + +UNIT_TEST(RoutingQuality_TurkeyIzmirArea) +{ + TEST(CheckCarRoute({38.80146, 26.97696} /* start */, {39.06835, 26.88686} /* finish */, + {{{39.08146, 27.11798}}} /* reference track */), + ()); +} + +UNIT_TEST(RoutingQuality_BosniaAndHerzegovina) +{ + TEST(CheckCarRoute({42.71401, 18.30412} /* start */, {42.95101, 18.08966} /* finish */, + {{{42.88222,17.9919}}} /* reference track */), + ()); +} + +UNIT_TEST(RoutingQuality_CzechiaPrague) +{ + TEST(CheckCarRoute({50.10159, 14.43324} /* start */, {50.20976, 14.43361} /* finish */, + {{{50.15078, 14.49205}}} /* reference track */), + ()); +} } // namespace diff --git a/routing/routing_quality/routing_quality_tests/passby_roads_tests.cpp b/routing/routing_quality/routing_quality_tests/passby_roads_tests.cpp index f49b1a912c..2b12f44bc5 100644 --- a/routing/routing_quality/routing_quality_tests/passby_roads_tests.cpp +++ b/routing/routing_quality/routing_quality_tests/passby_roads_tests.cpp @@ -29,7 +29,70 @@ UNIT_TEST(RoutingQuality_BelarusKobrin) { // Test on using a passby road around Kobirn. TEST(CheckCarRoute({52.18429, 24.20225} /* start */, {52.24404, 24.45842} /* finish */, - {{{52.18694, 24.39903}}} /* reference track */), + {{{52.18694, 24.39903}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_BelarusBobruisk) +{ + TEST(CheckCarRoute({53.24596, 28.93816} /* start */, {53.04386, 29.58098} /* finish */, + {{{53.24592, 29.29409}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_RussiaStPiterburg) +{ + TEST(CheckCarRoute({60.08634, 30.10277} /* start */, {59.94584, 30.57703} /* finish */, + {{{60.03478, 30.44084}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_BelarusMinsk) +{ + TEST(CheckCarRoute({53.75958, 28.005} /* start */, {54.03957, 26.83097} /* finish */, + {{{53.70668, 27.4487}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_EnglandLondon) +{ + TEST(CheckCarRoute({51.90356, -0.20133} /* start */, {51.23253, -0.33076} /* finish */, + {{{51.57098, -0.53503}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_UkraineChernigov) +{ + TEST(CheckCarRoute({51.29419, 31.25718} /* start */, {51.62678, 31.21787} /* finish */, + {{{51.48362, 31.18757}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_PolandSiedlce) +{ + TEST(CheckCarRoute({52.17525, 22.19702} /* start */, {52.119802, 22.35855} /* finish */, + {{{52.14355, 22.231}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_HungarySzolnok) +{ + TEST(CheckCarRoute({47.18462, 20.04432} /* start */, {47.17919, 20.33486} /* finish */, + {{{47.14467, 20.17032}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_USATexasAbilene) +{ + TEST(CheckCarRoute({32.46041, -99.93058} /* start */, {32.43085, -99.59475} /* finish */, + {{{32.49038, -99.7269}}} /* reference point */), + ()); +} + +UNIT_TEST(RoutingQuality_ItalyParma) +{ + TEST(CheckCarRoute({44.81937, 10.2403} /* start */, {44.78228, 10.38824} /* finish */, + {{{44.81625, 10.34545}}} /* reference point */), ()); } } // namespace diff --git a/routing_common/car_model.cpp b/routing_common/car_model.cpp index d706147ce6..1aa3d1c686 100644 --- a/routing_common/car_model.cpp +++ b/routing_common/car_model.cpp @@ -23,9 +23,9 @@ using SpeedKMpH = VehicleModel::SpeedKMpH; // in city out city InOutCitySpeedKMpH const kSpeedMotorwayKMpH(SpeedKMpH(115.37), SpeedKMpH(115.37)); InOutCitySpeedKMpH const kSpeedMotorwayLinkKMpH(SpeedKMpH(60.0), SpeedKMpH(60.0)); -InOutCitySpeedKMpH const kSpeedTrunkKMpH(SpeedKMpH(80.0), SpeedKMpH(93.89)); +InOutCitySpeedKMpH const kSpeedTrunkKMpH(SpeedKMpH(80.0), SpeedKMpH(100.0)); InOutCitySpeedKMpH const kSpeedTrunkLinkKMpH(SpeedKMpH(50.0), SpeedKMpH(50.0)); -InOutCitySpeedKMpH const kSpeedPrimaryKMpH(SpeedKMpH(60.0), SpeedKMpH(84.29)); +InOutCitySpeedKMpH const kSpeedPrimaryKMpH(SpeedKMpH(60.0), SpeedKMpH(90.0)); InOutCitySpeedKMpH const kSpeedPrimaryLinkKMpH(SpeedKMpH(30.0), SpeedKMpH(60.0)); InOutCitySpeedKMpH const kSpeedSecondaryKMpH(SpeedKMpH(45.0), SpeedKMpH(72.23)); InOutCitySpeedKMpH const kSpeedSecondaryLinkKMpH(SpeedKMpH(25.0), SpeedKMpH(50.0));