20 #ifndef PedestrianRouter_h 21 #define PedestrianRouter_h 54 template<
class E,
class L,
class N,
class V,
class INTERNALROUTER>
90 SUMOTime msTime,
const N* onlyNode, std::vector<const E*>& into,
bool allEdges =
false) {
92 if (getSidewalk<E, L>(from) == 0) {
93 WRITE_WARNING(
"Departure edge '" + from->getID() +
"' does not allow pedestrians.");
96 if (getSidewalk<E, L>(to) == 0) {
97 WRITE_WARNING(
"Destination edge '" + to->getID() +
"' does not allow pedestrians.");
100 _IntermodalTrip trip(from, to, departPos, arrivalPos, speed, msTime, onlyNode);
101 std::vector<const _IntermodalEdge*> intoPed;
104 &trip, msTime, intoPed);
106 for (
int i = 0; i < (int)intoPed.size(); ++i) {
107 if (intoPed[i]->includeInRoute(allEdges)) {
108 into.push_back(intoPed[i]->getEdge());
112 #ifdef PedestrianRouter_DEBUG_ROUTES 114 for (
int i = 0; i < intoPed.size(); ++i) {
117 std::cout <<
TIME2STEPS(msTime) <<
" trip from " << from->getID() <<
" to " << to->getID()
118 <<
" departPos=" << departPos
119 <<
" arrivalPos=" << arrivalPos
120 <<
" onlyNode=" << (onlyNode == 0 ?
"NULL" : onlyNode->getID())
122 <<
" resultEdges=" <<
toString(into)
132 bool compute(
const E*,
const E*,
const _IntermodalTrip*
const,
142 std::vector<_IntermodalEdge*> toProhibitPE;
143 for (
typename std::vector<E*>::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) {
163 template<
class E,
class L,
class N,
class V>
165 DijkstraRouterTT<IntermodalEdge<E, L, N, V>, IntermodalTrip<E, N, V>, prohibited_withPermissions<IntermodalEdge<E, L, N, V>, IntermodalTrip<E, N, V> > > > { };
const std::vector< _IntermodalEdge * > & getAllEdges()
bool compute(const E *from, const E *to, SUMOReal departPos, SUMOReal arrivalPos, SUMOReal 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...
INTERNALROUTER * myInternalRouter
IntermodalNetwork< E, L, N, V > _IntermodalNetwork
SUMOReal recomputeCosts(const std::vector< const E * > &, const _IntermodalTrip *const, SUMOTime) const
PedestrianRouter()
Constructor.
_IntermodalEdge * getDepartEdge(const E *e, const SUMOReal pos=-1.)
Returns the departing Intermodal edge.
PedestrianRouter(_IntermodalNetwork *net)
virtual SUMOAbstractRouter< E, _IntermodalTrip > * clone()
IntermodalEdge< E, L, N, V > _IntermodalEdge
PedestrianRouter & operator=(const PedestrianRouter &s)
Invalidated assignment operator.
bool compute(const E *, const E *, const _IntermodalTrip *const, SUMOTime, std::vector< const E * > &)
Builds the route between the given edges using the minimum effort at the given time The definition of...
#define WRITE_WARNING(msg)
_IntermodalEdge * getArrivalEdge(const E *e, const SUMOReal pos=-1.)
Returns the arriving Intermodal edge.
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
the pedestrian network storing edges, connections and the mappings to the "real" edges ...
the base edge type that is given to the internal router (SUMOAbstractRouter)
const EdgePair & getBothDirections(const E *e)
Returns the pair of forward and backward edge.
static SUMOReal getTravelTimeStatic(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, SUMOReal time)
_IntermodalNetwork * myPedNet
virtual ~PedestrianRouter()
Destructor.
void prohibit(const std::vector< E * > &toProhibit)
IntermodalTrip< E, N, V > _IntermodalTrip