compress traffic signals
- handle penalties within edges (not phantom nodes) - changes model from providing penalties on turns to using additional segments
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace extractor
|
||||
@@ -36,7 +38,11 @@ class CompressedEdgeContainer
|
||||
const EdgeWeight weight1,
|
||||
const EdgeWeight weight2,
|
||||
const EdgeDuration duration1,
|
||||
const EdgeDuration duration2);
|
||||
const EdgeDuration duration2,
|
||||
// node-penalties can be added before/or after the traversal of an edge which
|
||||
// depends on whether we traverse the link forwards or backwards.
|
||||
const boost::optional<EdgeWeight> node_weight_penalty = boost::none,
|
||||
const boost::optional<EdgeDuration> node_duration_penalty = boost::none);
|
||||
|
||||
void AddUncompressedEdge(const EdgeID edge_id,
|
||||
const NodeID target_node,
|
||||
|
||||
@@ -40,7 +40,7 @@ class ExtractionContainers
|
||||
using NameOffsets = std::vector<unsigned>;
|
||||
|
||||
std::vector<OSMNodeID> barrier_nodes;
|
||||
std::vector<OSMNodeID> traffic_lights;
|
||||
std::vector<OSMNodeID> traffic_signals;
|
||||
NodeIDVector used_node_id_list;
|
||||
NodeVector all_nodes_list;
|
||||
EdgeVector all_edges_list;
|
||||
|
||||
@@ -22,6 +22,14 @@ struct ExtractionTurn
|
||||
{
|
||||
}
|
||||
|
||||
ExtractionTurn(const bool has_traffic_light = false)
|
||||
: angle(0), turn_type(guidance::TurnType::NoTurn),
|
||||
direction_modifier(guidance::DirectionModifier::Straight),
|
||||
has_traffic_light(has_traffic_light), weight(0.), duration(0.), source_restricted(false),
|
||||
target_restricted(false)
|
||||
{
|
||||
}
|
||||
|
||||
const double angle;
|
||||
const guidance::TurnType::Enum turn_type;
|
||||
const guidance::DirectionModifier::Enum direction_modifier;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef GEOMETRY_COMPRESSOR_HPP
|
||||
#define GEOMETRY_COMPRESSOR_HPP
|
||||
|
||||
#include "extractor/scripting_environment.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include "util/node_based_graph.hpp"
|
||||
@@ -24,6 +25,7 @@ class GraphCompressor
|
||||
public:
|
||||
void Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const std::unordered_set<NodeID> &traffic_lights,
|
||||
ScriptingEnvironment &scripting_environment,
|
||||
std::vector<TurnRestriction> &turn_restrictions,
|
||||
util::NodeBasedDynamicGraph &graph,
|
||||
CompressedEdgeContainer &geometry_compressor);
|
||||
|
||||
Reference in New Issue
Block a user