36 template<
class E,
class L,
class N,
class V>
42 CarEdge(
int numericalID,
const E* edge,
const double pos = -1.) :
43 _IntermodalEdge(edge->
getID() +
"_car" +
toString(pos), numericalID, edge,
"!car"),
55 FXMutexLock locker(myLock);
57 typename std::map<SUMOVehicleClass, std::vector<_IntermodalEdge*> >::const_iterator i =
myClassesSuccessorMap.find(vClass);
63 const std::set<const E*> classedCarFollowers = std::set<const E*>(this->
getEdge()->getSuccessors(vClass).begin(), this->
getEdge()->getSuccessors(vClass).end());
65 if (!e->includeInRoute(
false) || e->getEdge() == this->
getEdge() || classedCarFollowers.count(e->getEdge()) > 0) {
78 FXMutexLock locker(myLock);
80 typename std::map<SUMOVehicleClass, std::vector<std::pair<const _IntermodalEdge*, const _IntermodalEdge*> > >::const_iterator i =
myClassesViaSuccessorMap.find(vClass);
86 const std::set<std::pair<const E*, const E*> > classedCarFollowers = std::set<std::pair<const E*, const E*> >(this->
getEdge()->getViaSuccessors(vClass).begin(), this->
getEdge()->getViaSuccessors(vClass).end());
87 for (
const std::pair<const _IntermodalEdge*, const _IntermodalEdge*>& e : this->
myFollowingViaEdges) {
88 const auto viaPair = std::make_pair(e.first->getEdge(), e.second ==
nullptr ? nullptr : e.second->getEdge());
89 if (!e.first->includeInRoute(
false) || e.first->getEdge() == this->
getEdge() || classedCarFollowers.count(viaPair) > 0) {
102 const double travelTime = E::getTravelTimeStatic(this->
getEdge(), trip->
vehicle, time);
103 double distTravelled = this->
getLength();
111 return travelTime * distTravelled / this->
getEdge()->getLength();
130 mutable std::map<SUMOVehicleClass, std::vector<std::pair<const _IntermodalEdge*, const _IntermodalEdge*> > >
myClassesViaSuccessorMap;
133 mutable FXMutex myLock;
virtual const std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
CarEdge(int numericalID, const E *edge, const double pos=-1.)
std::vector< std::pair< const IntermodalEdge *, const IntermodalEdge * > > myFollowingViaEdges
List of edges that may be approached from this edge with optional internal vias.
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool includeInRoute(bool) const
the car edge type that is given to the internal router (SUMOAbstractRouter)
std::vector< IntermodalEdge * > myFollowingEdges
List of edges that may be approached from this edge.
const std::string & getID() const
Returns the id.
const E * getEdge() const
std::map< SUMOVehicleClass, std::vector< _IntermodalEdge * > > myClassesSuccessorMap
The successors available for a given vClass.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
IntermodalEdge< E, L, N, V > _IntermodalEdge
const double myStartPos
the starting position for split edges
the base edge type that is given to the internal router (SUMOAbstractRouter)
std::map< SUMOVehicleClass, std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > > myClassesViaSuccessorMap
The successors available for a given vClass.
double getStartPos() const
double getTravelTime(const IntermodalTrip< E, N, V > *const trip, double time) const
const std::vector< _IntermodalEdge * > & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
vehicles ignoring classes