36template <
class E,
class L>
38 if (edge ==
nullptr) {
42 const std::vector<L*>& lanes = edge->getLanes();
43 for (
const L*
const lane : lanes) {
44 if (lane->getPermissions() == svc) {
48 for (
const L*
const lane : lanes) {
49 if (lane->allowsVehicleClass(svc)) {
55 for (
const L*
const lane : lanes) {
60 for (
const L*
const lane : lanes) {
75template<
class E,
class L,
class N,
class V>
78 IntermodalEdge(
const std::string
id,
int numericalID,
const E* edge,
const std::string& line,
const double length = -1) :
92 inline const std::string&
getLine()
const {
124 if (viaIt->first == edge) {
168 virtual inline double getIntended(
const double , std::string& )
const {
173 return edge ==
nullptr ? 0. : edge->
getTravelTime(trip, time);
221 return myEdge !=
nullptr ?
myEdge->getSpeedLimit() : 200. / 3.6;
226 return myEdge !=
nullptr ?
myEdge->getLengthGeometryFactor() : 1;
const L * getSidewalk(const E *edge, SUMOVehicleClass svc=SVC_PEDESTRIAN)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_PEDESTRIAN
pedestrian
double gWeightsRandomFactor
#define UNUSED_PARAMETER(x)
the base edge type that is given to the internal router (SUMOAbstractRouter)
double getSpeedLimit() const
static double getTravelTimeStatic(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, double time)
double getMinimumTravelTime(const IntermodalTrip< E, N, V > *const trip) const
double getLengthGeometryFactor() const
const std::string & getLine() const
const E * getEdge() const
IntermodalEdge & operator=(const IntermodalEdge &src)
Invalidated assignment operator.
void setLength(const double length)
virtual double getTravelTime(const IntermodalTrip< E, N, V > *const, double) const
virtual bool restricts(const IntermodalTrip< E, N, V > *const) const
void transferSuccessors(IntermodalEdge *to)
std::vector< IntermodalEdge * > myFollowingEdges
List of edges that may be approached from this edge.
virtual double getPartialLength(const IntermodalTrip< E, N, V > *const) const
bool removeSuccessor(const IntermodalEdge *const edge)
double myLength
adaptable length (for splitted edges)
void addSuccessor(IntermodalEdge *const s, IntermodalEdge *const via=nullptr)
ValueTimeLine< double > * myEfforts
Container for passing effort varying over time for the edge.
double getLength() const
required by DijkstraRouter et al for external effort computation
std::vector< std::pair< const IntermodalEdge *, const IntermodalEdge * > > myFollowingViaEdges
List of edges that may be approached from this edge with optional internal vias.
double getDistanceTo(const IntermodalEdge *other) const
const E *const myEdge
the original edge
int getNumericalID() const
virtual double getStartPos() const
virtual bool prohibits(const IntermodalTrip< E, N, V > *const) const
virtual ~IntermodalEdge()
virtual double getIntended(const double, std::string &) const
get intended vehicle id and departure time of next public transport ride
virtual const std::vector< IntermodalEdge * > & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
IntermodalEdge(const IntermodalEdge &src)
Invalidated copy constructor.
virtual double getEffort(const IntermodalTrip< E, N, V > *const, double) const
static double getEffortStatic(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, double time)
virtual bool hasEffort() const
virtual bool includeInRoute(bool) const
IntermodalEdge(const std::string id, int numericalID, const E *edge, const std::string &line, const double length=-1)
virtual double getEndPos() const
static double getTravelTimeAggregated(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, double time)
virtual const std::vector< std::pair< const IntermodalEdge *, const IntermodalEdge * > > & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
virtual double getTravelTimeAggregated(const IntermodalTrip< E, N, V > *const trip, double time) const
const int myNumericalID
the index in myEdges
IntermodalEdge * getBidiEdge() const
only used by mono-modal routing
const std::string myLine
public transport line or ped vs car
static double getTravelTimeStaticRandomized(const IntermodalEdge *const edge, const IntermodalTrip< E, N, V > *const trip, double time)
the "vehicle" type that is given to the internal router (SUMOAbstractRouter)
double getMaxSpeed() const
Base class for objects which have an id.
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)