44 template<
class E,
class L,
class N,
class V>
82 double compute(
const E* from,
const E* to,
double departPos,
double arrivalPos,
double speed,
83 SUMOTime msTime,
const N* onlyNode, std::vector<const E*>& into,
bool allEdges =
false) {
84 if (getSidewalk<E, L>(from) == 0) {
85 WRITE_WARNING(
"Departure edge '" + from->getID() +
"' does not allow pedestrians.");
88 if (getSidewalk<E, L>(to) == 0) {
89 WRITE_WARNING(
"Destination edge '" + to->getID() +
"' does not allow pedestrians.");
92 _IntermodalTrip trip(from, to, departPos, arrivalPos, speed, msTime, onlyNode);
93 std::vector<const _IntermodalEdge*> intoPed;
96 &trip, msTime, intoPed);
100 if (pedEdge->includeInRoute(allEdges)) {
101 into.push_back(pedEdge->getEdge());
106 #ifdef PedestrianRouter_DEBUG_ROUTES
107 std::cout <<
TIME2STEPS(msTime) <<
" trip from " << from->getID() <<
" to " << to->getID()
108 <<
" departPos=" << departPos
109 <<
" arrivalPos=" << arrivalPos
110 <<
" onlyNode=" << (onlyNode == 0 ?
"NULL" : onlyNode->getID())
112 <<
" resultEdges=" <<
toString(into)
116 return success ? time : -1.;
122 SUMOTime, std::vector<const E*>&,
bool) {
127 std::vector<_IntermodalEdge*> toProhibitPE;
128 for (
typename std::vector<E*>::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) {
#define WRITE_WARNING(msg)
double gWeightsRandomFactor
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Computes the shortest path through a network using the Dijkstra algorithm.
bool compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)
Builds the route between the given edges using the minimum effort at the given time The definition of...
the base edge type that is given to the internal router (SUMOAbstractRouter)
static double getTravelTimeStatic(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, double time)
static double getTravelTimeStaticRandomized(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, double time)
the intermodal network storing edges, connections and the mappings to the "real" edges
_IntermodalEdge * getArrivalConnector(const E *e, const int splitIndex=0) const
Returns the arriving intermodal connector at the given split offset.
const EdgePair & getBothDirections(const E *e) const
Returns the pair of forward and backward edge.
const std::vector< _IntermodalEdge * > & getAllEdges()
_IntermodalEdge * getDepartConnector(const E *e, const int splitIndex=0) const
Returns the departing intermodal connector at the given split offset.
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
void prohibit(const std::vector< E * > &toProhibit)
DijkstraRouter< _IntermodalEdge, _IntermodalTrip > _InternalRouter
_IntermodalNetwork * myPedNet
PedestrianRouter & operator=(const PedestrianRouter &s)
Invalidated assignment operator.
IntermodalTrip< E, N, V > _IntermodalTrip
PedestrianRouter(_IntermodalNetwork *net)
IntermodalNetwork< E, L, N, V > _IntermodalNetwork
bool compute(const E *, const E *, const _IntermodalTrip *const, SUMOTime, std::vector< const E * > &, bool)
Builds the route between the given edges using the minimum effort at the given time The definition of...
PedestrianRouter()
Constructor.
virtual SUMOAbstractRouter< E, _IntermodalTrip > * clone()
IntermodalEdge< E, L, N, V > _IntermodalEdge
double compute(const E *from, const E *to, double departPos, double arrivalPos, double speed, SUMOTime msTime, const N *onlyNode, std::vector< const E * > &into, bool allEdges=false)
Builds the route between the given edges using the minimum effort at the given time The definition of...
virtual ~PedestrianRouter()
Destructor.
_InternalRouter * myInternalRouter
virtual void prohibit(const std::vector< E * > &toProhibit)
double getEffort(const E *const e, const V *const v, double t) const