diff --git a/routing/edge_estimator.cpp b/routing/edge_estimator.cpp index 90b9f781a9..259789d9ba 100644 --- a/routing/edge_estimator.cpp +++ b/routing/edge_estimator.cpp @@ -74,8 +74,7 @@ double CarEdgeEstimator::CalcSegmentWeight(Segment const & segment, RoadGeometry double const speedMPS = road.GetSpeed() * kKMPH2MPS; double result = TimeBetweenSec(road.GetPoint(segment.GetPointId(false /* front */)), - road.GetPoint(segment.GetPointId(true /* front */)), speedMPS) * - kTimePenalty; + road.GetPoint(segment.GetPointId(true /* front */)), speedMPS); if (m_trafficStash) { @@ -89,7 +88,10 @@ double CarEdgeEstimator::CalcSegmentWeight(Segment const & segment, RoadGeometry SpeedGroup const speedGroup = (it == trafficColoring->cend()) ? SpeedGroup::Unknown : it->second; ASSERT_LESS(speedGroup, SpeedGroup::Count, ()); - result *= CalcTrafficFactor(speedGroup); + double const trafficFactor = CalcTrafficFactor(speedGroup); + result *= trafficFactor; + if (trafficFactor > 1.0) + result *= kTimePenalty; } } diff --git a/routing_common/car_model.cpp b/routing_common/car_model.cpp index 07be768d81..f5d38bb8f4 100644 --- a/routing_common/car_model.cpp +++ b/routing_common/car_model.cpp @@ -8,18 +8,18 @@ namespace { -double constexpr kSpeedMotorwayKMpH = 90.0; +double constexpr kSpeedMotorwayKMpH = 115.37; double constexpr kSpeedMotorwayLinkKMpH = 75.0; -double constexpr kSpeedTrunkKMpH = 85.0; +double constexpr kSpeedTrunkKMpH = 93.89; double constexpr kSpeedTrunkLinkKMpH = 70.0; -double constexpr kSpeedPrimaryKMpH = 65.0; +double constexpr kSpeedPrimaryKMpH = 84.29; double constexpr kSpeedPrimaryLinkKMpH = 60.0; -double constexpr kSpeedSecondaryKMpH = 55.0; +double constexpr kSpeedSecondaryKMpH = 72.23; double constexpr kSpeedSecondaryLinkKMpH = 50.0; -double constexpr kSpeedTertiaryKMpH = 40.0; +double constexpr kSpeedTertiaryKMpH = 62.63; double constexpr kSpeedTertiaryLinkKMpH = 30.0; double constexpr kSpeedResidentialKMpH = 25.0; -double constexpr kSpeedUnclassifiedKMpH = 25.0; +double constexpr kSpeedUnclassifiedKMpH = 51.09; double constexpr kSpeedServiceKMpH = 15.0; double constexpr kSpeedLivingStreetKMpH = 10.0; double constexpr kSpeedRoadKMpH = 10.0;