diff --git a/routing/edge_estimator.cpp b/routing/edge_estimator.cpp index d929ccbc8a..9d6f3c48f4 100644 --- a/routing/edge_estimator.cpp +++ b/routing/edge_estimator.cpp @@ -10,6 +10,10 @@ namespace { double CalcTrafficFactor(SpeedGroup speedGroup) { + double constexpr kImpossibleDrivingFactor = 1e4; + if (speedGroup == SpeedGroup::TempBlock) + return kImpossibleDrivingFactor; + double const percentage = 0.01 * static_cast(kSpeedGroupThresholdPercentage[static_cast(speedGroup)]); CHECK_GREATER(percentage, 0.0, ("Speed group:", speedGroup)); diff --git a/traffic/speed_groups.hpp b/traffic/speed_groups.hpp index 91f81786d4..9942d5e93f 100644 --- a/traffic/speed_groups.hpp +++ b/traffic/speed_groups.hpp @@ -37,6 +37,7 @@ static_assert(static_cast(SpeedGroup::Count) <= 8, ""); // special groups where V is unknown or not defined. extern uint32_t const kSpeedGroupThresholdPercentage[static_cast(SpeedGroup::Count)]; +/// \note This method is used while traffic jam generation. SpeedGroup GetSpeedGroupByPercentage(double p); string DebugPrint(SpeedGroup const & group);