19 #ifndef PedestrianEdge_h 20 #define PedestrianEdge_h 28 #define TL_RED_PENALTY 20 37 template<
class E,
class L,
class N,
class V>
40 PedestrianEdge(
int numericalID,
const E* edge,
const L* lane,
bool forward,
const double pos = -1.) :
41 IntermodalEdge<E, L, N, V>(edge->
getID() + (edge->isWalkingArea() ?
"" : (forward ?
"_fwd" :
"_bwd")) +
toString(pos), numericalID, edge,
"!ped"),
47 return allEdges || (!this->
getEdge()->isCrossing() && !this->
getEdge()->isWalkingArea() && !this->
getEdge()->isInternal());
51 if (trip->
node == 0) {
56 return (this->
getEdge()->getFromJunction() != trip->
node 57 && this->getEdge()->getToJunction() != trip->
node);
83 #ifdef IntermodalRouter_DEBUG_EFFORTS 84 std::cout <<
" effort for " << trip->
getID() <<
" at " << time <<
" edge=" << edge->getID() <<
" effort=" << length / trip->
speed + tlsDelay <<
" l=" << length <<
" s=" << trip->
speed <<
" tlsDelay=" << tlsDelay <<
"\n";
86 return length / trip->
speed + tlsDelay;
virtual double getTravelTime(const IntermodalTrip< E, N, V > *const trip, double time) const
std::string getID() const
const std::string & getID() const
Returns the id.
const double myStartPos
the starting position for split edges
const E * getEdge() const
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const bool myForward
the direction of this edge
const L * myLane
the original edge
const SUMOTime departTime
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
the base edge type that is given to the internal router (SUMOAbstractRouter)
The link has red light (must brake)
double getStartPos() const
the pedestrian edge type that is given to the internal router (SUMOAbstractRouter) ...
PedestrianEdge(int numericalID, const E *edge, const L *lane, bool forward, const double pos=-1.)
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
bool includeInRoute(bool allEdges) const