30template<
class E,
class L,
class N,
class V>
39 std::vector<std::string>
ids;
74 if (begin > s.
begin) {
89 mySchedules.insert(std::make_pair(begin,
Schedule(
id, begin,
MAX2(repetitionNumber, 1), MAX2<SUMOTime>(period, 1), travelTime)));
96 for (
typename std::multimap<SUMOTime, Schedule>::const_iterator it =
mySchedules.begin(); it !=
mySchedules.end(); ++it) {
98 if (it->first > minArrival) {
102 int running = (int)(offset / s.
period);
103 if (offset % s.
period != 0) {
119 return std::numeric_limits<double>::max();
123 double getIntended(
const double time, std::string& intended)
const {
126 double bestDepartTime = std::numeric_limits<double>::max();
128 for (
typename std::multimap<SUMOTime, Schedule>::const_iterator it =
mySchedules.begin(); it !=
mySchedules.end(); ++it) {
130 if (it->first > minArrival) {
134 int running = (int)(offset / s.
period);
135 if (offset % s.
period != 0) {
144 if (s.
ids.size() == 1 || running >= (
int)s.
ids.size()) {
147 intended = s.
ids[running];
152 return bestDepartTime;
@ SVC_BUS
vehicle is a bus
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
the base edge type that is given to the internal router (SUMOAbstractRouter)
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
const SVCPermissions modeSet
const std::string & getID() const
Returns the id.
the public transport edge type connecting the stop edges
bool hasSchedule(const SUMOTime begin) const
bool prohibits(const IntermodalTrip< E, N, V > *const trip) const
PublicTransportEdge(const std::string id, int numericalID, const IntermodalEdge< E, L, N, V > *entryStop, const E *endEdge, const std::string &line, const double length)
const IntermodalEdge< E, L, N, V > * getEntryStop() const
bool includeInRoute(bool) const
const IntermodalEdge< E, L, N, V > *const myEntryStop
double getIntended(const double time, std::string &intended) const
get intended vehicle id and departure time of next public transport ride
std::multimap< SUMOTime, Schedule > mySchedules
void addSchedule(const std::string id, const SUMOTime begin, const int repetitionNumber, const SUMOTime period, const SUMOTime travelTime)
double getTravelTime(const IntermodalTrip< E, N, V > *const, double time) const
Schedule(const std::string &_id, const SUMOTime _begin, const int _repetitionNumber, const SUMOTime _period, const SUMOTime _travelTime)
std::vector< std::string > ids
const SUMOTime travelTime