25#define TL_RED_PENALTY 20
34template<
class E,
class L,
class N,
class V>
37 PedestrianEdge(
int numericalID,
const E* edge,
const L* lane,
bool forward,
const double pos = -1.) :
38 IntermodalEdge<E,
L, N, V>(edge->
getID() + (edge->isWalkingArea() ?
"" : (forward ?
"_fwd" :
"_bwd")) +
toString(pos), numericalID, edge,
"!ped"),
46 const L* sidewalk = getSidewalk<E, L>(edge);
47 if (sidewalk !=
nullptr && sidewalk->getPermissions() !=
SVC_PEDESTRIAN) {
55 return allEdges || (!this->
getEdge()->isCrossing() && !this->
getEdge()->isWalkingArea() && !this->
getEdge()->isInternal());
59 if (trip->
node == 0) {
64 return (this->
getEdge()->getFromJunction() != trip->
node
65 && this->getEdge()->getToJunction() != trip->
node);
84 length =
MAX2(length, NUMERICAL_EPS);
96 if (this->
getEdge()->isCrossing()) {
97 tlsDelay += this->
getEdge()->getTimePenalty();
99#ifdef IntermodalRouter_DEBUG_EFFORTS
100 std::cout <<
" effort for " << trip->
getID() <<
" at " << time <<
" edge=" << this->
getID() <<
" effort=" << length / trip->
speed + tlsDelay <<
" l=" << length <<
" fullLength=" << this->
getLength() <<
" s=" << trip->
speed <<
" tlsDelay=" << tlsDelay <<
"\n";
@ SVC_PEDESTRIAN
pedestrian
@ LINKSTATE_TL_RED
The link has red light (must brake)
double gWeightsWalkOppositeFactor
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
the base edge type that is given to the internal router (SUMOAbstractRouter)
const E * getEdge() const
double getLength() const
required by DijkstraRouter et al for external effort computation
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
std::string getID() const
const SUMOTime departTime
const std::string & getID() const
Returns the id.
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.)
const bool myForward
the direction of this edge
const L * myLane
the original edge
double getPartialLength(const IntermodalTrip< E, N, V > *const trip) const
const double myStartPos
the starting position for split edges
bool includeInRoute(bool allEdges) const
double getStartPos() const
double getTravelTime(const IntermodalTrip< E, N, V > *const trip, double time) const
bool myIsOpposite
whether this edge goes against the flow of traffic
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const