42 template<
class E,
class L,
class N,
class V>
48 CarEdge(
int numericalID,
const E* edge,
const double pos = -1.) :
49 _IntermodalEdge(edge->
getID() +
"_car" +
toString(pos), numericalID, edge,
"!car"),
61 FXMutexLock locker(myLock);
63 typename std::map<SUMOVehicleClass, std::vector<_IntermodalEdge*> >::const_iterator i =
myClassesSuccessorMap.find(vClass);
69 const std::set<const E*> classedCarFollowers = std::set<const E*>(this->
getEdge()->getSuccessors(vClass).begin(), this->
getEdge()->getSuccessors(vClass).end());
71 if (!e->includeInRoute(
false) || e->getEdge() == this->
getEdge() || classedCarFollowers.count(e->getEdge()) > 0) {
86 const double travelTime = E::getTravelTimeStatic(this->
getEdge(), trip->
vehicle, time);
95 return travelTime * distTravelled / this->
getEdge()->getLength();
106 mutable FXMutex myLock;
113 template<
class E,
class L,
class N,
class V>
116 StopEdge(
const std::string
id,
int numericalID,
const E* edge) :
130 template<
class E,
class L,
class N,
class V>
135 : begin(_begin), end(_end), period(_period), travelTimeSec(_travelTimeSec) {}
147 IntermodalEdge<E, L, N, V>(line +
":" + (id !=
"" ? id : endEdge->
getID()), numericalID, endEdge, line), myEntryStop(entryStop) { }
161 mySchedules.insert(std::make_pair(
STEPS2TIME(begin),
Schedule(begin, end, period, travelTimeSec)));
165 double minArrivalSec = std::numeric_limits<double>::max();
166 for (
typename std::multimap<double, Schedule>::const_iterator it = mySchedules.begin(); it != mySchedules.end(); ++it) {
167 if (it->first > minArrivalSec) {
172 const SUMOTime nextDepart = it->second.begin + running * it->second.period;
173 minArrivalSec =
MIN2(
STEPS2TIME(nextDepart) + it->second.travelTimeSec, minArrivalSec);
180 return minArrivalSec - time;
191 template<
class E,
class L,
class N,
class V>
197 AccessEdge(
int numericalID,
const _IntermodalEdge* inEdge,
const _IntermodalEdge* outEdge,
199 _IntermodalEdge(inEdge->
getID() +
":" + outEdge->
getID(), numericalID, outEdge->
getEdge(),
"!access"),
200 myTransferTime(transferTime) { }
203 return myTransferTime;
StopEdge(const std::string id, int numericalID, const E *edge)
CarEdge(int numericalID, const E *edge, const double pos=-1.)
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
const std::vector< _IntermodalEdge * > & getSuccessors(SUMOVehicleClass vClass) const
double getTravelTime(const IntermodalTrip< E, N, V > *const, double time) const
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool includeInRoute(bool) const
AccessEdge(int numericalID, const _IntermodalEdge *inEdge, const _IntermodalEdge *outEdge, const double transferTime=NUMERICAL_EPS)
IntermodalEdge & operator=(const IntermodalEdge &src)
Invalidated assignment operator.
IntermodalEdge< E, L, N, V > _IntermodalEdge
the car edge type that is given to the internal router (SUMOAbstractRouter)
const double myTransferTime
void addSchedule(const SUMOTime begin, const SUMOTime end, const SUMOTime period, const double travelTimeSec)
std::vector< IntermodalEdge * > myFollowingEdges
List of edges that may be approached from this edge.
const IntermodalEdge< E, L, N, V > * getEntryStop() const
const std::string & getID() const
Returns the id.
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
const IntermodalEdge< E, L, N, V > *const myEntryStop
std::multimap< double, Schedule > mySchedules
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)
const SVCPermissions modeSet
IntermodalEdge< E, L, N, V > _IntermodalEdge
bool includeInRoute(bool) const
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
const double myStartPos
the starting position for split edges
the base edge type that is given to the internal router (SUMOAbstractRouter)
Schedule(const SUMOTime _begin, const SUMOTime _end, const SUMOTime _period, const double _travelTimeSec)
PublicTransportEdge(const std::string id, int numericalID, const IntermodalEdge< E, L, N, V > *entryStop, const E *endEdge, const std::string &line)
double getTravelTime(const IntermodalTrip< E, N, V > *const trip, double time) const
the public transport edge type connecting the stop edges
bool includeInRoute(bool) const
double getTravelTime(const IntermodalTrip< E, N, V > *const, double) const
the stop edge type representing bus and train stops
const double travelTimeSec
vehicles ignoring classes
the access edge connecting different modes that is given to the internal router (SUMOAbstractRouter) ...