fixes #1107, turn restriction combination including overlaps and one-ways
This commit is contained in:
parent
d9666008e3
commit
6fb7c8687e
@ -96,9 +96,8 @@ void RestrictionMap::FixupArrivingTurnRestriction(const NodeID node_u,
|
|||||||
std::vector<NodeID> predecessors;
|
std::vector<NodeID> predecessors;
|
||||||
for (const EdgeID current_edge_id : m_graph->GetAdjacentEdgeRange(node_u))
|
for (const EdgeID current_edge_id : m_graph->GetAdjacentEdgeRange(node_u))
|
||||||
{
|
{
|
||||||
const EdgeData &edge_data = m_graph->GetEdgeData(current_edge_id);
|
|
||||||
const NodeID target = m_graph->GetTarget(current_edge_id);
|
const NodeID target = m_graph->GetTarget(current_edge_id);
|
||||||
if (edge_data.backward && (node_v != target))
|
if (node_v != target)
|
||||||
{
|
{
|
||||||
predecessors.push_back(target);
|
predecessors.push_back(target);
|
||||||
}
|
}
|
||||||
@ -163,11 +162,11 @@ NodeID RestrictionMap::CheckForEmanatingIsOnlyTurn(const NodeID node_u, const No
|
|||||||
return SPECIAL_NODEID;
|
return SPECIAL_NODEID;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto restriction_iter = m_restriction_map.find({node_u, node_v});
|
const auto restriction_iter = m_restriction_map.find({node_u, node_v});
|
||||||
if (restriction_iter != m_restriction_map.end())
|
if (restriction_iter != m_restriction_map.end())
|
||||||
{
|
{
|
||||||
const unsigned index = restriction_iter->second;
|
const unsigned index = restriction_iter->second;
|
||||||
auto &bucket = m_restriction_bucket_list.at(index);
|
const auto &bucket = m_restriction_bucket_list.at(index);
|
||||||
for (const RestrictionTarget &restriction_target : bucket)
|
for (const RestrictionTarget &restriction_target : bucket)
|
||||||
{
|
{
|
||||||
if (restriction_target.is_only)
|
if (restriction_target.is_only)
|
||||||
@ -184,8 +183,6 @@ bool RestrictionMap::CheckIfTurnIsRestricted(const NodeID node_u,
|
|||||||
const NodeID node_v,
|
const NodeID node_v,
|
||||||
const NodeID node_w) const
|
const NodeID node_w) const
|
||||||
{
|
{
|
||||||
// return false;
|
|
||||||
|
|
||||||
BOOST_ASSERT(node_u != SPECIAL_NODEID);
|
BOOST_ASSERT(node_u != SPECIAL_NODEID);
|
||||||
BOOST_ASSERT(node_v != SPECIAL_NODEID);
|
BOOST_ASSERT(node_v != SPECIAL_NODEID);
|
||||||
BOOST_ASSERT(node_w != SPECIAL_NODEID);
|
BOOST_ASSERT(node_w != SPECIAL_NODEID);
|
||||||
@ -195,7 +192,7 @@ bool RestrictionMap::CheckIfTurnIsRestricted(const NodeID node_u,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto restriction_iter = m_restriction_map.find({node_u, node_v});
|
const auto restriction_iter = m_restriction_map.find({node_u, node_v});
|
||||||
if (restriction_iter != m_restriction_map.end())
|
if (restriction_iter != m_restriction_map.end())
|
||||||
{
|
{
|
||||||
const unsigned index = restriction_iter->second;
|
const unsigned index = restriction_iter->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user