43 template<
class E,
class L,
class N,
class V>
49 CarEdge(
int numericalID,
const E* edge,
const double pos = -1.) :
50 _IntermodalEdge(edge->
getID() +
"_car" +
toString(pos), numericalID, edge,
"!car"),
62 FXMutexLock locker(myLock);
64 typename std::map<SUMOVehicleClass, std::vector<_IntermodalEdge*> >::const_iterator i =
myClassesSuccessorMap.find(vClass);
70 const std::set<const E*> classedCarFollowers = std::set<const E*>(this->
getEdge()->getSuccessors(vClass).begin(), this->
getEdge()->getSuccessors(vClass).end());
72 if (!(*e)->includeInRoute(
true) || (*e)->getEdge() == this->
getEdge() || classedCarFollowers.count((*e)->getEdge()) > 0) {
87 const double travelTime = E::getTravelTimeStatic(this->
getEdge(), trip->
vehicle, time);
96 return travelTime * distTravelled / this->
getEdge()->getLength();
107 mutable FXMutex myLock;
114 template<
class E,
class L,
class N,
class V>
117 StopEdge(
const std::string
id,
int numericalID,
const E* edge) :
131 template<
class E,
class L,
class N,
class V>
136 : begin(_begin), end(_end), period(_period), travelTimeSec(_travelTimeSec) {}
148 IntermodalEdge<E, L, N, V>(line +
":" + (id !=
"" ? id : endEdge->
getID()), numericalID, endEdge, line), myEntryStop(entryStop) { }
162 mySchedules.insert(std::make_pair(
STEPS2TIME(begin),
Schedule(begin, end, period, travelTimeSec)));
167 for (
typename std::multimap<double, Schedule>::const_iterator it = mySchedules.begin(); it != mySchedules.end(); ++it) {
168 if (it->first > minArrivalSec) {
173 const SUMOTime nextDepart = it->second.begin + running * it->second.period;
174 minArrivalSec =
MIN2(
STEPS2TIME(nextDepart) + it->second.travelTimeSec, minArrivalSec);
181 return minArrivalSec - time;
192 template<
class E,
class L,
class N,
class V>
198 AccessEdge(
int numericalID,
const _IntermodalEdge* inEdge,
const _IntermodalEdge* outEdge,
200 _IntermodalEdge(inEdge->
getID() +
":" + outEdge->
getID(), numericalID, outEdge->
getEdge(),
"!access"),
201 myTransferTime(transferTime) { }
204 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) ...