wip
This commit is contained in:
@@ -60,6 +60,7 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(
|
||||
const CompressedEdgeContainer &compressed_edge_container,
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const TrafficSignals &traffic_signals,
|
||||
const StopSigns &stop_signs,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const NameTable &name_table,
|
||||
const std::unordered_set<EdgeID> &segregated_edges,
|
||||
@@ -67,7 +68,7 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(
|
||||
: m_edge_based_node_container(node_data_container), m_connectivity_checksum(0),
|
||||
m_number_of_edge_based_nodes(0), m_coordinates(coordinates),
|
||||
m_node_based_graph(node_based_graph), m_barrier_nodes(barrier_nodes),
|
||||
m_traffic_signals(traffic_signals), m_compressed_edge_container(compressed_edge_container),
|
||||
m_traffic_signals(traffic_signals), m_stop_signs(stop_signs), m_compressed_edge_container(compressed_edge_container),
|
||||
name_table(name_table), segregated_edges(segregated_edges),
|
||||
lane_description_map(lane_description_map)
|
||||
{
|
||||
@@ -643,6 +644,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
// the traffic signal direction was potentially ambiguously annotated on the junction
|
||||
// node But we'll check anyway.
|
||||
const auto is_traffic_light = m_traffic_signals.HasSignal(from_node, intersection_node);
|
||||
const auto is_stop_sign = m_stop_signs.HasSignal(from_node, intersection_node);
|
||||
std::cerr << "IS STOP SIGN " << is_stop_sign << std::endl;
|
||||
const auto is_uturn =
|
||||
guidance::getTurnDirection(turn_angle) == guidance::DirectionModifier::UTurn;
|
||||
|
||||
@@ -652,6 +655,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
road_legs_on_the_right.size() + road_legs_on_the_left.size() + 2 - is_uturn,
|
||||
is_uturn,
|
||||
is_traffic_light,
|
||||
is_stop_sign,
|
||||
m_edge_based_node_container.GetAnnotation(edge_data1.annotation_data)
|
||||
.is_left_hand_driving,
|
||||
// source info
|
||||
|
||||
@@ -413,11 +413,14 @@ void ExtractionContainers::PrepareData(ScriptingEnvironment &scripting_environme
|
||||
const auto restriction_ways = IdentifyRestrictionWays();
|
||||
const auto maneuver_override_ways = IdentifyManeuverOverrideWays();
|
||||
const auto traffic_signals = IdentifyTrafficSignals();
|
||||
const auto stop_signs = IdentifyStopSigns();
|
||||
|
||||
PrepareNodes();
|
||||
PrepareEdges(scripting_environment);
|
||||
|
||||
PrepareTrafficSignals(traffic_signals);
|
||||
PrepareStopSigns(stop_signs);
|
||||
|
||||
PrepareManeuverOverrides(maneuver_override_ways);
|
||||
PrepareRestrictions(restriction_ways);
|
||||
WriteCharData(name_file_name);
|
||||
@@ -979,6 +982,54 @@ void ExtractionContainers::PrepareTrafficSignals(
|
||||
log << "ok, after " << TIMER_SEC(prepare_traffic_signals) << "s";
|
||||
}
|
||||
|
||||
// TODO: copy-paste
|
||||
void ExtractionContainers::PrepareStopSigns(const ReferencedStopSigns &referenced_stop_signs) {
|
||||
const auto &bidirectional_signal_nodes = referenced_stop_signs.first;
|
||||
const auto &unidirectional_signal_segments = referenced_stop_signs.second;
|
||||
|
||||
util::UnbufferedLog log;
|
||||
log << "Preparing traffic light signals for " << bidirectional_signal_nodes.size()
|
||||
<< " bidirectional, " << unidirectional_signal_segments.size()
|
||||
<< " unidirectional nodes ...";
|
||||
TIMER_START(prepare_traffic_signals);
|
||||
|
||||
std::unordered_set<NodeID> bidirectional;
|
||||
std::unordered_set<std::pair<NodeID, NodeID>, boost::hash<std::pair<NodeID, NodeID>>>
|
||||
unidirectional;
|
||||
|
||||
for (const auto &osm_node : bidirectional_signal_nodes)
|
||||
{
|
||||
const auto node_id = mapExternalToInternalNodeID(
|
||||
used_node_id_list.begin(), used_node_id_list.end(), osm_node);
|
||||
if (node_id != SPECIAL_NODEID)
|
||||
{
|
||||
bidirectional.insert(node_id);
|
||||
}
|
||||
}
|
||||
for (const auto &to_from : unidirectional_signal_segments)
|
||||
{
|
||||
const auto to_node_id = mapExternalToInternalNodeID(
|
||||
used_node_id_list.begin(), used_node_id_list.end(), to_from.first);
|
||||
const auto from_node_id = mapExternalToInternalNodeID(
|
||||
used_node_id_list.begin(), used_node_id_list.end(), to_from.second);
|
||||
if (from_node_id != SPECIAL_NODEID && to_node_id != SPECIAL_NODEID)
|
||||
{
|
||||
unidirectional.insert({from_node_id, to_node_id});
|
||||
}
|
||||
}
|
||||
|
||||
internal_stop_signs.bidirectional_nodes = std::move(bidirectional);
|
||||
internal_stop_signs.unidirectional_segments = std::move(unidirectional);
|
||||
|
||||
TIMER_STOP(prepare_traffic_signals);
|
||||
log << "ok, after " << TIMER_SEC(prepare_traffic_signals) << "s";
|
||||
}
|
||||
|
||||
// void ExtractionContainers::PrepareGiveWays(const ReferencedGiveWays &referenced_give_ways) {
|
||||
|
||||
// }
|
||||
|
||||
|
||||
void ExtractionContainers::PrepareManeuverOverrides(const ReferencedWays &maneuver_override_ways)
|
||||
{
|
||||
auto const osm_node_to_internal_nbn = [&](auto const osm_node) {
|
||||
@@ -1159,6 +1210,95 @@ ExtractionContainers::ReferencedWays ExtractionContainers::IdentifyRestrictionWa
|
||||
return restriction_ways;
|
||||
}
|
||||
|
||||
// TODO: copy-paste
|
||||
ExtractionContainers::ReferencedStopSigns ExtractionContainers::IdentifyStopSigns()
|
||||
{
|
||||
util::UnbufferedLog log;
|
||||
log << "Collecting traffic signal information on " << external_stop_signs.size()
|
||||
<< " signals...";
|
||||
TIMER_START(identify_traffic_signals);
|
||||
|
||||
// Temporary store for nodes containing a unidirectional signal.
|
||||
std::unordered_map<OSMNodeID, StopSign::Direction> unidirectional_signals;
|
||||
|
||||
// For each node that has a unidirectional traffic signal, we store the node(s)
|
||||
// that lead up to the signal.
|
||||
std::unordered_multimap<OSMNodeID, OSMNodeID> signal_segments;
|
||||
|
||||
std::unordered_set<OSMNodeID> bidirectional_signals;
|
||||
|
||||
const auto mark_signals = [&](auto const &traffic_signal) {
|
||||
if (traffic_signal.second == StopSign::DIRECTION_FORWARD ||
|
||||
traffic_signal.second == StopSign::DIRECTION_REVERSE)
|
||||
{
|
||||
unidirectional_signals.insert({traffic_signal.first, traffic_signal.second});
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_ASSERT(traffic_signal.second == StopSign::DIRECTION_ALL);
|
||||
bidirectional_signals.insert(traffic_signal.first);
|
||||
}
|
||||
};
|
||||
std::for_each(external_stop_signs.begin(), external_stop_signs.end(), mark_signals);
|
||||
|
||||
// Extract all the segments that lead up to unidirectional traffic signals.
|
||||
const auto set_segments = [&](const size_t way_list_idx, auto const & /*unused*/) {
|
||||
const auto node_start_offset =
|
||||
used_node_id_list.begin() + way_node_id_offsets[way_list_idx];
|
||||
const auto node_end_offset =
|
||||
used_node_id_list.begin() + way_node_id_offsets[way_list_idx + 1];
|
||||
|
||||
for (auto node_it = node_start_offset; node_it < node_end_offset; node_it++)
|
||||
{
|
||||
const auto sig = unidirectional_signals.find(*node_it);
|
||||
if (sig != unidirectional_signals.end())
|
||||
{
|
||||
if (sig->second == StopSign::DIRECTION_FORWARD)
|
||||
{
|
||||
if (node_it != node_start_offset)
|
||||
{
|
||||
// Previous node leads to signal
|
||||
signal_segments.insert({*node_it, *(node_it - 1)});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_ASSERT(sig->second == StopSign::DIRECTION_REVERSE);
|
||||
if (node_it + 1 != node_end_offset)
|
||||
{
|
||||
// Next node leads to signal
|
||||
signal_segments.insert({*node_it, *(node_it + 1)});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
util::for_each_indexed(ways_list.cbegin(), ways_list.cend(), set_segments);
|
||||
|
||||
util::for_each_pair(
|
||||
signal_segments, [](const auto pair_a, const auto pair_b) {
|
||||
if (pair_a.first == pair_b.first)
|
||||
{
|
||||
// If a node is appearing multiple times in this map, then it's ambiguous.
|
||||
// The node is an intersection and the traffic direction is being use for multiple
|
||||
// ways. We can't be certain of the original intent. See:
|
||||
// https://wiki.openstreetmap.org/wiki/Key:traffic_signals:direction
|
||||
|
||||
// OSRM will include the signal for all intersecting ways in the specified
|
||||
// direction, but let's flag this as a concern.
|
||||
util::Log(logWARNING)
|
||||
<< "OSM node " << pair_a.first
|
||||
<< " has a unidirectional traffic signal ambiguously applied to multiple ways";
|
||||
}
|
||||
});
|
||||
|
||||
TIMER_STOP(identify_traffic_signals);
|
||||
log << "ok, after " << TIMER_SEC(identify_traffic_signals) << "s";
|
||||
|
||||
return {std::move(bidirectional_signals), std::move(signal_segments)};
|
||||
}
|
||||
|
||||
|
||||
ExtractionContainers::ReferencedTrafficSignals ExtractionContainers::IdentifyTrafficSignals()
|
||||
{
|
||||
util::UnbufferedLog log;
|
||||
|
||||
@@ -226,6 +226,8 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
parsed_osm_data.turn_restrictions,
|
||||
parsed_osm_data.unresolved_maneuver_overrides,
|
||||
parsed_osm_data.traffic_signals,
|
||||
parsed_osm_data.stop_signs,
|
||||
|
||||
std::move(parsed_osm_data.barriers),
|
||||
std::move(parsed_osm_data.osm_coordinates),
|
||||
std::move(parsed_osm_data.osm_node_ids),
|
||||
@@ -283,6 +285,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
node_based_graph_factory.GetCompressedEdges(),
|
||||
barrier_nodes,
|
||||
parsed_osm_data.traffic_signals,
|
||||
parsed_osm_data.stop_signs,
|
||||
restriction_graph,
|
||||
segregated_edges,
|
||||
name_table,
|
||||
@@ -649,6 +652,7 @@ Extractor::ParsedOSMData Extractor::ParseOSMData(ScriptingEnvironment &scripting
|
||||
std::move(extraction_containers.turn_restrictions),
|
||||
std::move(extraction_containers.internal_maneuver_overrides),
|
||||
std::move(extraction_containers.internal_traffic_signals),
|
||||
std::move(extraction_containers.internal_stop_signs),
|
||||
std::move(extraction_containers.used_barrier_nodes),
|
||||
std::move(osm_coordinates),
|
||||
std::move(osm_node_ids),
|
||||
@@ -725,6 +729,7 @@ EdgeID Extractor::BuildEdgeExpandedGraph(
|
||||
const CompressedEdgeContainer &compressed_edge_container,
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const TrafficSignals &traffic_signals,
|
||||
const StopSigns &stop_signs,
|
||||
const RestrictionGraph &restriction_graph,
|
||||
const std::unordered_set<EdgeID> &segregated_edges,
|
||||
const NameTable &name_table,
|
||||
@@ -746,6 +751,7 @@ EdgeID Extractor::BuildEdgeExpandedGraph(
|
||||
compressed_edge_container,
|
||||
barrier_nodes,
|
||||
traffic_signals,
|
||||
stop_signs,
|
||||
coordinates,
|
||||
name_table,
|
||||
segregated_edges,
|
||||
|
||||
@@ -82,6 +82,15 @@ void ExtractorCallbacks::ProcessNode(const osmium::Node &input_node,
|
||||
{
|
||||
external_memory.external_traffic_signals.push_back({id, result_node.traffic_lights});
|
||||
}
|
||||
// if (result_node.give_way != GiveWay::Direction::NONE)
|
||||
// {
|
||||
// external_memory.external_give_ways.push_back({id, result_node.give_way});
|
||||
// }
|
||||
if (result_node.stop_sign != StopSign::Direction::NONE)
|
||||
{
|
||||
std::cerr << "FOUND STOP SIGN\n";
|
||||
external_memory.external_stop_signs.push_back({id, result_node.stop_sign});
|
||||
}
|
||||
}
|
||||
|
||||
void ExtractorCallbacks::ProcessRestriction(const InputTurnRestriction &restriction)
|
||||
|
||||
@@ -23,6 +23,7 @@ static constexpr int SECOND_TO_DECISECOND = 10;
|
||||
|
||||
void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const TrafficSignals &traffic_signals,
|
||||
const StopSigns &stop_signs,
|
||||
ScriptingEnvironment &scripting_environment,
|
||||
std::vector<TurnRestriction> &turn_restrictions,
|
||||
std::vector<UnresolvedManeuverOverride> &maneuver_overrides,
|
||||
@@ -212,11 +213,15 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const bool has_forward_signal = traffic_signals.HasSignal(node_u, node_v);
|
||||
const bool has_reverse_signal = traffic_signals.HasSignal(node_w, node_v);
|
||||
|
||||
const bool has_forward_stop_sign = stop_signs.HasSignal(node_u, node_v);
|
||||
const bool has_reverse_stop_sign = stop_signs.HasSignal(node_w, node_v);
|
||||
|
||||
// TODO: can we have a case when we have both traffic signal and stop sign? how should we handle it?
|
||||
EdgeDuration forward_node_duration_penalty = MAXIMAL_EDGE_DURATION;
|
||||
EdgeWeight forward_node_weight_penalty = INVALID_EDGE_WEIGHT;
|
||||
EdgeDuration reverse_node_duration_penalty = MAXIMAL_EDGE_DURATION;
|
||||
EdgeWeight reverse_node_weight_penalty = INVALID_EDGE_WEIGHT;
|
||||
if (has_forward_signal || has_reverse_signal)
|
||||
if (has_forward_signal || has_reverse_signal || has_forward_stop_sign || has_reverse_stop_sign)
|
||||
{
|
||||
// we cannot handle this as node penalty, if it depends on turn direction
|
||||
if (fwd_edge_data1.flags.restricted != fwd_edge_data2.flags.restricted)
|
||||
@@ -228,7 +233,8 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
ExtractionTurn extraction_turn(0,
|
||||
2,
|
||||
false,
|
||||
true,
|
||||
has_forward_signal || has_reverse_signal,
|
||||
has_forward_stop_sign || has_reverse_stop_sign,
|
||||
false,
|
||||
false,
|
||||
TRAVEL_MODE_DRIVING,
|
||||
@@ -258,8 +264,11 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
EdgeWeight &weight_penalty) {
|
||||
if (signal)
|
||||
{
|
||||
std::cerr << "DUR = " << extraction_turn.duration << " WEIGHT = " << extraction_turn.weight << std::endl;
|
||||
duration_penalty = extraction_turn.duration * SECOND_TO_DECISECOND;
|
||||
weight_penalty = extraction_turn.weight * weight_multiplier;
|
||||
|
||||
std::cerr << "DUR = " << duration_penalty << " WEIGHT = " << weight_penalty << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -269,6 +278,12 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
update_direction_penalty(has_reverse_signal,
|
||||
reverse_node_duration_penalty,
|
||||
reverse_node_weight_penalty);
|
||||
update_direction_penalty(has_forward_stop_sign,
|
||||
forward_node_duration_penalty,
|
||||
forward_node_weight_penalty);
|
||||
update_direction_penalty(has_reverse_stop_sign,
|
||||
reverse_node_duration_penalty,
|
||||
reverse_node_weight_penalty);
|
||||
}
|
||||
|
||||
// Get weights before graph is modified
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "extractor/node_based_graph_factory.hpp"
|
||||
#include "extractor/files.hpp"
|
||||
#include "extractor/graph_compressor.hpp"
|
||||
#include "extractor/traffic_signals.hpp"
|
||||
#include "storage/io.hpp"
|
||||
|
||||
#include "util/log.hpp"
|
||||
@@ -20,6 +21,7 @@ NodeBasedGraphFactory::NodeBasedGraphFactory(
|
||||
std::vector<TurnRestriction> &turn_restrictions,
|
||||
std::vector<UnresolvedManeuverOverride> &maneuver_overrides,
|
||||
const TrafficSignals &traffic_signals,
|
||||
const StopSigns &stop_signs,
|
||||
std::unordered_set<NodeID> &&barriers,
|
||||
std::vector<util::Coordinate> &&coordinates,
|
||||
extractor::PackedOSMIDs &&osm_node_ids,
|
||||
@@ -29,7 +31,7 @@ NodeBasedGraphFactory::NodeBasedGraphFactory(
|
||||
coordinates(std::move(coordinates)), osm_node_ids(std::move(osm_node_ids))
|
||||
{
|
||||
BuildCompressedOutputGraph(edge_list);
|
||||
Compress(scripting_environment, turn_restrictions, maneuver_overrides, traffic_signals);
|
||||
Compress(scripting_environment, turn_restrictions, maneuver_overrides, traffic_signals, stop_signs);
|
||||
CompressGeometry();
|
||||
CompressAnnotationData();
|
||||
}
|
||||
@@ -74,11 +76,13 @@ void NodeBasedGraphFactory::BuildCompressedOutputGraph(const std::vector<NodeBas
|
||||
void NodeBasedGraphFactory::Compress(ScriptingEnvironment &scripting_environment,
|
||||
std::vector<TurnRestriction> &turn_restrictions,
|
||||
std::vector<UnresolvedManeuverOverride> &maneuver_overrides,
|
||||
const TrafficSignals &traffic_signals)
|
||||
const TrafficSignals &traffic_signals,
|
||||
const StopSigns &stop_signs)
|
||||
{
|
||||
GraphCompressor graph_compressor;
|
||||
graph_compressor.Compress(barriers,
|
||||
traffic_signals,
|
||||
stop_signs,
|
||||
scripting_environment,
|
||||
turn_restrictions,
|
||||
maneuver_overrides,
|
||||
|
||||
@@ -294,6 +294,24 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
extractor::TrafficLightClass::DIRECTION_FORWARD,
|
||||
"direction_reverse",
|
||||
extractor::TrafficLightClass::DIRECTION_REVERSE);
|
||||
context.state.new_enum("stop_sign",
|
||||
"none",
|
||||
extractor::StopSign::NONE,
|
||||
"direction_all",
|
||||
extractor::StopSign::DIRECTION_ALL,
|
||||
"direction_forward",
|
||||
extractor::StopSign::DIRECTION_FORWARD,
|
||||
"direction_reverse",
|
||||
extractor::StopSign::DIRECTION_REVERSE);
|
||||
context.state.new_enum("give_way",
|
||||
"none",
|
||||
extractor::GiveWay::NONE,
|
||||
"direction_all",
|
||||
extractor::GiveWay::DIRECTION_ALL,
|
||||
"direction_forward",
|
||||
extractor::GiveWay::DIRECTION_FORWARD,
|
||||
"direction_reverse",
|
||||
extractor::GiveWay::DIRECTION_REVERSE);
|
||||
|
||||
context.state.new_usertype<ExtractionNode>(
|
||||
"ResultNode",
|
||||
@@ -318,6 +336,18 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
node.traffic_lights = val;
|
||||
}
|
||||
}),
|
||||
"stop_sign",
|
||||
sol::property([](const ExtractionNode &node) { return node.stop_sign; },
|
||||
[](ExtractionNode &node, const sol::object &obj) {
|
||||
BOOST_ASSERT(obj.is<StopSign::Direction>());
|
||||
node.stop_sign = obj.as<StopSign::Direction>();
|
||||
}),
|
||||
"give_way",
|
||||
sol::property([](const ExtractionNode &node) { return node.give_way; },
|
||||
[](ExtractionNode &node, const sol::object &obj) {
|
||||
BOOST_ASSERT(obj.is<GiveWay::Direction>());
|
||||
node.give_way = obj.as<GiveWay::Direction>();
|
||||
}),
|
||||
"barrier",
|
||||
&ExtractionNode::barrier);
|
||||
|
||||
@@ -640,6 +670,8 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
}),
|
||||
"has_traffic_light",
|
||||
&ExtractionTurn::has_traffic_light,
|
||||
"has_stop_sign",
|
||||
&ExtractionTurn::has_stop_sign,
|
||||
"weight",
|
||||
&ExtractionTurn::weight,
|
||||
"duration",
|
||||
@@ -765,7 +797,6 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
&ExtractionTurn::has_traffic_light,
|
||||
"is_left_hand_driving",
|
||||
&ExtractionTurn::is_left_hand_driving,
|
||||
|
||||
"source_restricted",
|
||||
&ExtractionTurn::source_restricted,
|
||||
"source_mode",
|
||||
@@ -1125,15 +1156,23 @@ void Sol2ScriptingEnvironment::ProcessTurn(ExtractionTurn &turn)
|
||||
case 2:
|
||||
if (context.has_turn_penalty_function)
|
||||
{
|
||||
std::cerr << "GOT TURN " << turn.has_stop_sign << " " << turn.has_traffic_light << std::endl;
|
||||
|
||||
context.turn_function(context.profile_table, std::ref(turn));
|
||||
|
||||
// Turn weight falls back to the duration value in deciseconds
|
||||
// or uses the extracted unit-less weight value
|
||||
if (context.properties.fallback_to_duration)
|
||||
if (context.properties.fallback_to_duration) {
|
||||
std::cerr << "FALLBACK\n";
|
||||
turn.weight = turn.duration;
|
||||
else
|
||||
// cap turn weight to max turn weight, which depend on weight precision
|
||||
}
|
||||
|
||||
else {
|
||||
// cap turn weight to max turn weight, which depend on weight precision
|
||||
turn.weight = std::min(turn.weight, context.properties.GetMaxTurnWeight());
|
||||
std::cerr << "NO FALLBACK " << turn.weight << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1171,7 +1210,7 @@ void Sol2ScriptingEnvironment::ProcessTurn(ExtractionTurn &turn)
|
||||
}
|
||||
|
||||
// Add traffic light penalty, back-compatibility of api_version=0
|
||||
if (turn.has_traffic_light)
|
||||
if (turn.has_traffic_light || turn.has_stop_sign)
|
||||
turn.duration += context.properties.GetTrafficSignalPenalty();
|
||||
|
||||
// Turn weight falls back to the duration value in deciseconds
|
||||
|
||||
Reference in New Issue
Block a user