17 #ifndef PublicTransportEdge_h 18 #define PublicTransportEdge_h 33 template<
class E,
class L,
class N,
class V>
75 double minArrivalSec = std::numeric_limits<double>::max();
76 for (
typename std::multimap<double, Schedule>::const_iterator it =
mySchedules.begin(); it !=
mySchedules.end(); ++it) {
78 if (it->first > minArrivalSec) {
90 const double nextDepart = s.
begin + running * s.
period;
98 return minArrivalSec - time;
101 double getIntended(
const double time, std::string& intended)
const {
103 double minArrivalSec = std::numeric_limits<double>::max();
104 double bestDepartTime = std::numeric_limits<double>::max();
105 for (
typename std::multimap<double, Schedule>::const_iterator it =
mySchedules.begin(); it !=
mySchedules.end(); ++it) {
107 if (it->first > minArrivalSec) {
119 const double nextDepart = s.
begin + running * s.
period;
122 bestDepartTime = nextDepart;
128 return bestDepartTime;
double getTravelTime(const IntermodalTrip< E, N, V > *const, double time) const
const IntermodalEdge< E, L, N, V > * getEntryStop() const
const std::string & getID() const
Returns the id.
const IntermodalEdge< E, L, N, V > *const myEntryStop
std::multimap< double, Schedule > mySchedules
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
the base edge type that is given to the internal router (SUMOAbstractRouter)
Schedule & operator=(const Schedule &src)
Invalidated assignment operator.
const SVCPermissions modeSet
PublicTransportEdge(const std::string id, int numericalID, const IntermodalEdge< E, L, N, V > *entryStop, const E *endEdge, const std::string &line)
the public transport edge type connecting the stop edges
double getIntended(const double time, std::string &intended) const
get intended vehicle id and departure time of next public transport ride
bool includeInRoute(bool) const
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
void addSchedule(const std::string id, const SUMOTime begin, const SUMOTime end, const SUMOTime period, const double travelTimeSec)
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
const double travelTimeSec
Schedule(const std::string &_id, const SUMOTime _begin, const SUMOTime _end, const SUMOTime _period, const double _travelTimeSec)