33template<
class E,
class L,
class N,
class V>
39 CarEdge(
int numericalID,
const E* edge,
const double pos = -1.) :
52 FXMutexLock locker(myLock);
54 typename std::map<SUMOVehicleClass, std::vector<_IntermodalEdge*> >::const_iterator i =
myClassesSuccessorMap.find(vClass);
62 if (!e->includeInRoute(
false) || e->getEdge() == this->
getEdge() || classedCarFollowers.count(e->getEdge()) > 0) {
75 FXMutexLock locker(myLock);
78 typename std::map<SUMOVehicleClass, std::vector<std::pair<const _IntermodalEdge*, const _IntermodalEdge*> > >::const_iterator i = viaMap.find(vClass);
79 if (i != viaMap.end()) {
84 std::set<const E*> classedCarFollowers;
85 for (
const auto& pair : this->
getEdge()->getViaSuccessors(vClass)) {
86 classedCarFollowers.insert(pair.first);
88 for (
const std::pair<const _IntermodalEdge*, const _IntermodalEdge*>& e : this->
myFollowingViaEdges) {
89 if (!e.first->includeInRoute(
false) || e.first->getEdge() == this->
getEdge() || classedCarFollowers.count(e.first->getEdge()) > 0) {
90 viaMap[vClass].push_back(e);
93 return viaMap[vClass];
114 assert(E::getTravelTimeStatic(this->
getEdge(), trip->
vehicle, time) >= 0.);
119 assert(E::getTravelTimeAggregated(this->
getEdge(), trip->
vehicle, time) >= 0.);
135 assert(fullTravelTime * distTravelled / this->
getEdge()->
getLength() >= 0.);
136 return fullTravelTime * distTravelled / this->
getEdge()->getLength();
147 mutable std::map<SUMOVehicleClass, std::vector<std::pair<const _IntermodalEdge*, const _IntermodalEdge*> > >
myClassesViaSuccessorMap;
152 mutable FXMutex myLock;
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
the car edge type that is given to the internal router (SUMOAbstractRouter)
std::map< SUMOVehicleClass, std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > > myOrigClassesViaSuccessorMap
CarEdge(int numericalID, const E *edge, const double pos=-1.)
std::map< SUMOVehicleClass, std::vector< _IntermodalEdge * > > myClassesSuccessorMap
The successors available for a given vClass.
double getTravelTimeAggregated(const IntermodalTrip< E, N, V > *const trip, double time) const
std::map< SUMOVehicleClass, std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > > myClassesViaSuccessorMap
The successors available for a given vClass.
double getStartPos() const
double getPartialTravelTime(double fullTravelTime, const IntermodalTrip< E, N, V > *const trip) const
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
bool includeInRoute(bool) const
double getTravelTime(const IntermodalTrip< E, N, V > *const trip, double time) const
const std::vector< _IntermodalEdge * > & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
virtual const std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
double getPartialLength(const IntermodalTrip< E, N, V > *const trip) const
const double myStartPos
the starting position for split edges
IntermodalEdge< E, L, N, V > _IntermodalEdge
the base edge type that is given to the internal router (SUMOAbstractRouter)
const E * getEdge() const
std::vector< IntermodalEdge * > myFollowingEdges
List of edges that may be approached from this edge.
double getLength() const
required by DijkstraRouter et al for external effort computation
std::vector< std::pair< const IntermodalEdge *, const IntermodalEdge * > > myFollowingViaEdges
List of edges that may be approached from this edge with optional internal vias.
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
const std::string & getID() const
Returns the id.