 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
35 template<
class E,
class L,
class N,
class V>
41 CarEdge(
int numericalID,
const E* edge,
const double pos = -1.) :
54 FXMutexLock locker(myLock);
56 typename std::map<SUMOVehicleClass, std::vector<_IntermodalEdge*> >::const_iterator i =
myClassesSuccessorMap.find(vClass);
64 if (!e->includeInRoute(
false) || e->getEdge() == this->
getEdge() || classedCarFollowers.count(e->getEdge()) > 0) {
77 FXMutexLock locker(myLock);
79 typename std::map<SUMOVehicleClass, std::vector<std::pair<const _IntermodalEdge*, const _IntermodalEdge*> > >::const_iterator i =
myClassesViaSuccessorMap.find(vClass);
85 std::set<const E*> classedCarFollowers;
86 for (
const auto& pair : this->
getEdge()->getViaSuccessors(vClass)) {
87 classedCarFollowers.insert(pair.first);
89 for (
const std::pair<const _IntermodalEdge*, const _IntermodalEdge*>& e : this->
myFollowingViaEdges) {
90 if (!e.first->includeInRoute(
false) || e.first->getEdge() == this->
getEdge() || classedCarFollowers.count(e.first->getEdge()) > 0) {
103 const double travelTime = E::getTravelTimeStatic(this->
getEdge(), trip->
vehicle, time);
104 double distTravelled = this->
getLength();
112 return travelTime * distTravelled / this->
getEdge()->getLength();
131 mutable std::map<SUMOVehicleClass, std::vector<std::pair<const _IntermodalEdge*, const _IntermodalEdge*> > >
myClassesViaSuccessorMap;
134 mutable FXMutex myLock;
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
bool includeInRoute(bool) const
virtual const std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
const std::vector< _IntermodalEdge * > & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
the base edge type that is given to the internal router (SUMOAbstractRouter)
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
the car edge type that is given to the internal router (SUMOAbstractRouter)
std::vector< std::pair< const IntermodalEdge *, const IntermodalEdge * > > myFollowingViaEdges
List of edges that may be approached from this edge with optional internal vias.
CarEdge(int numericalID, const E *edge, const double pos=-1.)
double getStartPos() const
std::map< SUMOVehicleClass, std::vector< std::pair< const _IntermodalEdge *, const _IntermodalEdge * > > > myClassesViaSuccessorMap
The successors available for a given vClass.
const E * getEdge() const
double getTravelTime(const IntermodalTrip< E, N, V > *const trip, double time) const
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const double myStartPos
the starting position for split edges
vehicles ignoring classes
std::map< SUMOVehicleClass, std::vector< _IntermodalEdge * > > myClassesSuccessorMap
The successors available for a given vClass.
const std::string & getID() const
Returns the id.
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
std::vector< IntermodalEdge * > myFollowingEdges
List of edges that may be approached from this edge.
IntermodalEdge< E, L, N, V > _IntermodalEdge