fixes issue #161

This commit is contained in:
DennisOSRM 2012-03-05 09:36:20 +01:00
parent 22e1e6c92f
commit 77d5c44664
2 changed files with 4 additions and 2 deletions

View File

@ -28,7 +28,7 @@
#include "EdgeBasedGraphFactory.h" #include "EdgeBasedGraphFactory.h"
template<> template<>
EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdge> & inputEdges, std::vector<NodeID> & bn, std::vector<NodeID> & tl, std::vector<_Restriction> & irs, std::vector<NodeInfo> & nI, boost::property_tree::ptree speedProfile, std::string & srtm) : inputNodeInfoList(nI), numberOfTurnRestrictions(irs.size()) { EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdge> & inputEdges, std::vector<NodeID> & bn, std::vector<NodeID> & tl, std::vector<_Restriction> & irs, std::vector<NodeInfo> & nI, boost::property_tree::ptree speedProfile, std::string & srtm) : inputNodeInfoList(nI), numberOfTurnRestrictions(irs.size()), trafficSignalPenalty(0) {
INFO("Nodes size: " << inputNodeInfoList.size()); INFO("Nodes size: " << inputNodeInfoList.size());
BOOST_FOREACH(_Restriction & restriction, irs) { BOOST_FOREACH(_Restriction & restriction, irs) {
std::pair<NodeID, NodeID> restrictionSource = std::make_pair(restriction.fromNode, restriction.viaNode); std::pair<NodeID, NodeID> restrictionSource = std::make_pair(restriction.fromNode, restriction.viaNode);
@ -64,6 +64,8 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdg
} }
} }
INFO("traffic signal penalty: " << trafficSignalPenalty);
BOOST_FOREACH(NodeID id, bn) BOOST_FOREACH(NodeID id, bn)
_barrierNodes[id] = true; _barrierNodes[id] = true;
BOOST_FOREACH(NodeID id, tl) BOOST_FOREACH(NodeID id, tl)

View File

@ -100,7 +100,6 @@ private:
std::vector<EmanatingRestrictionsVector> _restrictionBucketVector; std::vector<EmanatingRestrictionsVector> _restrictionBucketVector;
RestrictionMap _restrictionMap; RestrictionMap _restrictionMap;
int trafficSignalPenalty;
std::vector<EdgeBasedEdge> edgeBasedEdges; std::vector<EdgeBasedEdge> edgeBasedEdges;
std::vector<EdgeBasedNode> edgeBasedNodes; std::vector<EdgeBasedNode> edgeBasedNodes;
@ -116,6 +115,7 @@ private:
double GetAngleBetweenTwoEdges(const CoordinateT& A, const CoordinateT& C, const CoordinateT& B) const; double GetAngleBetweenTwoEdges(const CoordinateT& A, const CoordinateT& C, const CoordinateT& B) const;
// SRTMLookup srtmLookup; // SRTMLookup srtmLookup;
unsigned numberOfTurnRestrictions; unsigned numberOfTurnRestrictions;
unsigned trafficSignalPenalty;
public: public:
template< class InputEdgeT > template< class InputEdgeT >