Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
IntermodalNetwork< E, L, N, V > Class Template Reference

the intermodal network storing edges, connections and the mappings to the "real" edges More...

#include <IntermodalNetwork.h>

Public Member Functions

void addAccess (const std::string &stopId, const E *stopEdge, const double startPos, const double endPos, const double length, const SumoXMLTag category, bool isAccess, double taxiWait)
 Adds access edges for stopping places to the intermodal network.
 
void addCarAccess (const E *edge, SUMOVehicleClass svc, double traveltime)
 Adds access edges for transfering from walking to vehicle use.
 
void addCarEdges (const std::vector< E * > &edges, double taxiWait)
 
void addConnectors (_IntermodalEdge *const depConn, _IntermodalEdge *const arrConn, const int index)
 
void addEdge (_IntermodalEdge *edge)
 
void addRestrictedCarExit (_IntermodalEdge *from, _IntermodalEdge *to, SVCPermissions vehicleRestriction)
 Adds access edges for transfering from driving to walking that are only usable by a particular vehicle class.
 
void addSchedule (const SUMOVehicleParameter &pars, const std::vector< SUMOVehicleParameter::Stop > *addStops=nullptr)
 
const std::vector< _IntermodalEdge * > & getAllEdges ()
 
_IntermodalEdgegetArrivalConnector (const E *e, const int splitIndex=0) const
 Returns the arriving intermodal connector at the given split offset.
 
_IntermodalEdgegetArrivalEdge (const E *e, const double pos) const
 Returns the arriving intermodal edge.
 
const EdgePairgetBothDirections (const E *e) const
 Returns the pair of forward and backward edge.
 
_IntermodalEdgegetCarEdge (const E *e) const
 Returns the associated car edge.
 
_IntermodalEdgegetDepartConnector (const E *e, const int splitIndex=0) const
 Returns the departing intermodal connector at the given split offset.
 
const _IntermodalEdgegetDepartEdge (const E *e, const double pos) const
 Returns the departing intermodal edge.
 
_IntermodalEdgegetStopEdge (const std::string &stopId) const
 Returns the associated stop edge.
 
_IntermodalEdgegetWalkingConnector (const E *e) const
 Returns the outgoing pedestrian edge, which is either a walking area or a walking connector.
 
 IntermodalNetwork (const std::vector< E * > &edges, const bool pedestrianOnly, const int carWalkTransfer=0)
 
bool isLooped (const std::string lineID) const
 
 ~IntermodalNetwork ()
 

Private Types

typedef AccessEdge< E, L, N, V > _AccessEdge
 
typedef IntermodalEdge< E, L, N, V > _IntermodalEdge
 
typedef PedestrianEdge< E, L, N, V > _PedestrianEdge
 
typedef PublicTransportEdge< E, L, N, V > _PTEdge
 
typedef std::pair< _IntermodalEdge *, _IntermodalEdge * > EdgePair
 

Private Member Functions

int findSplitIndex (_IntermodalEdge *const toSplit, const double pos, double &relPos, bool &needSplit) const
 Returns where to insert or use the split edge.
 
IntermodalNetworkoperator= (const IntermodalNetwork &s)
 Invalidated assignment operator.
 
void splitEdge (_IntermodalEdge *const toSplit, int splitIndex, _IntermodalEdge *afterSplit, const double relPos, const double length, const bool needSplit, _IntermodalEdge *const stopConn, const bool forward=true, const bool addExit=true, const bool addEntry=true)
 Splits an edge (if necessary) and connects it to a stopping edge.
 

Private Attributes

std::map< _IntermodalEdge *, std::vector< _IntermodalEdge * > > myAccessSplits
 retrieve the splitted edges for the given "original"
 
std::map< const E *, std::vector< _IntermodalEdge * > > myArrivalLookup
 retrieve the arrival edges for the given input edge E
 
std::map< const E *, EdgePairmyBidiLookup
 retrieve the forward and backward edge for the given input edge E
 
std::map< const E *, _IntermodalEdge *, ComparatorNumericalIdLessmyCarLookup
 retrieve the car edge for the given input edge E
 
const int myCarWalkTransfer
 
std::map< const E *, std::vector< _IntermodalEdge * > > myDepartLookup
 retrieve the depart edges for the given input edge E
 
std::vector< _IntermodalEdge * > myEdges
 the edge dictionary
 
std::set< std::string > myLoopedLines
 looped lines need extra checking when building itineraries
 
int myNumericalID
 
std::map< std::string, std::vector< _PTEdge * > > myPTLines
 retrieve the public transport edges for the given line
 
std::map< std::string, _IntermodalEdge * > myStopConnections
 retrieve the representing edge for the given stopping place
 
std::map< const N *, _IntermodalEdge * > myWalkingConnectorLookup
 the walking connector edge (fake walking area)
 

Detailed Description

template<class E, class L, class N, class V>
class IntermodalNetwork< E, L, N, V >

the intermodal network storing edges, connections and the mappings to the "real" edges

Definition at line 76 of file IntermodalNetwork.h.

Member Typedef Documentation

◆ _AccessEdge

template<class E , class L , class N , class V >
typedef AccessEdge<E, L, N, V> IntermodalNetwork< E, L, N, V >::_AccessEdge
private

Definition at line 79 of file IntermodalNetwork.h.

◆ _IntermodalEdge

template<class E , class L , class N , class V >
typedef IntermodalEdge<E, L, N, V> IntermodalNetwork< E, L, N, V >::_IntermodalEdge
private

Definition at line 78 of file IntermodalNetwork.h.

◆ _PedestrianEdge

template<class E , class L , class N , class V >
typedef PedestrianEdge<E, L, N, V> IntermodalNetwork< E, L, N, V >::_PedestrianEdge
private

Definition at line 80 of file IntermodalNetwork.h.

◆ _PTEdge

template<class E , class L , class N , class V >
typedef PublicTransportEdge<E, L, N, V> IntermodalNetwork< E, L, N, V >::_PTEdge
private

Definition at line 81 of file IntermodalNetwork.h.

◆ EdgePair

template<class E , class L , class N , class V >
typedef std::pair<_IntermodalEdge*, _IntermodalEdge*> IntermodalNetwork< E, L, N, V >::EdgePair
private

Definition at line 82 of file IntermodalNetwork.h.

Constructor & Destructor Documentation

◆ IntermodalNetwork()

◆ ~IntermodalNetwork()

template<class E , class L , class N , class V >
IntermodalNetwork< E, L, N, V >::~IntermodalNetwork ( )
inline

Definition at line 272 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myEdges.

Member Function Documentation

◆ addAccess()

template<class E , class L , class N , class V >
void IntermodalNetwork< E, L, N, V >::addAccess ( const std::string &  stopId,
const E *  stopEdge,
const double  startPos,
const double  endPos,
const double  length,
const SumoXMLTag  category,
bool  isAccess,
double  taxiWait 
)
inline

Adds access edges for stopping places to the intermodal network.

This method creates an intermodal stop edge to represent the stopping place (if not present yet) and determines the edges which need to be splitted (usually the forward and the backward pedestrian edges and the car edge) and calls splitEdge for the actual split and the connection of the stop edge with access edges. After that it adds and adapts the depart and arrival connectors to the new edge(s).

Parameters
[in]stopIdThe id of the stop to add
[in]stopEdgeThe edge on which the stop is located
[in]startPosThe relative position on the edge where the stop starts
[in]endPosThe relative position on the edge where the stop ends
[in]lengthThe length of the access edge to build
[in]categoryThe type of stop
[in]isAccessWhether an <access> element is being connected
[in]taxiWaitExpected time to wait for a taxi

Definition at line 510 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::addConnectors(), IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalNetwork< E, L, N, V >::addRestrictedCarExit(), IntermodalEdge< E, L, N, V >::addSuccessor(), IntermodalNetwork< E, L, N, V >::findSplitIndex(), IntermodalNetwork< E, L, N, V >::getArrivalConnector(), IntermodalNetwork< E, L, N, V >::getBothDirections(), IntermodalNetwork< E, L, N, V >::getDepartConnector(), IntermodalEdge< E, L, N, V >::getLength(), L, IntermodalNetwork< E, L, N, V >::myAccessSplits, IntermodalNetwork< E, L, N, V >::myCarLookup, IntermodalNetwork< E, L, N, V >::myCarWalkTransfer, IntermodalNetwork< E, L, N, V >::myDepartLookup, IntermodalNetwork< E, L, N, V >::myNumericalID, IntermodalNetwork< E, L, N, V >::myStopConnections, PARKING_AREAS, PT_STOPS, IntermodalEdge< E, L, N, V >::removeSuccessor(), IntermodalEdge< E, L, N, V >::setLength(), IntermodalNetwork< E, L, N, V >::splitEdge(), SUMO_TAG_BUS_STOP, SUMO_TAG_PARKING_AREA, SVC_IGNORING, SVC_TAXI, TAXI_DROPOFF_PT, TAXI_PICKUP_PT, and toString().

Referenced by MSNet::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().

Here is the caller graph for this function:

◆ addCarAccess()

template<class E , class L , class N , class V >
void IntermodalNetwork< E, L, N, V >::addCarAccess ( const E *  edge,
SUMOVehicleClass  svc,
double  traveltime 
)
inline

Adds access edges for transfering from walking to vehicle use.

Parameters
[in]edgeThe edge on which the transfer takes place
[in]svcThe permitted vehicle class for transfering

Definition at line 733 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), IntermodalNetwork< E, L, N, V >::myBidiLookup, IntermodalNetwork< E, L, N, V >::myCarLookup, IntermodalNetwork< E, L, N, V >::myNumericalID, and SVC_IGNORING.

Referenced by MSNet::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().

Here is the caller graph for this function:

◆ addCarEdges()

◆ addConnectors()

template<class E , class L , class N , class V >
void IntermodalNetwork< E, L, N, V >::addConnectors ( _IntermodalEdge *const  depConn,
_IntermodalEdge *const  arrConn,
const int  index 
)
inline

Definition at line 285 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalEdge< E, L, N, V >::getEdge(), IntermodalNetwork< E, L, N, V >::myArrivalLookup, and IntermodalNetwork< E, L, N, V >::myDepartLookup.

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().

Here is the caller graph for this function:

◆ addEdge()

◆ addRestrictedCarExit()

template<class E , class L , class N , class V >
void IntermodalNetwork< E, L, N, V >::addRestrictedCarExit ( _IntermodalEdge from,
_IntermodalEdge to,
SVCPermissions  vehicleRestriction 
)
inline

Adds access edges for transfering from driving to walking that are only usable by a particular vehicle class.

Parameters
[in]fromThe origin edge of the transfer
[in]toThe destination edge of the transfer
[in]svcThe permitted vehicle class for transfering

Definition at line 751 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), IntermodalNetwork< E, L, N, V >::myNumericalID, and SVC_IGNORING.

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), and IntermodalNetwork< E, L, N, V >::addCarEdges().

Here is the caller graph for this function:

◆ addSchedule()

◆ findSplitIndex()

template<class E , class L , class N , class V >
int IntermodalNetwork< E, L, N, V >::findSplitIndex ( _IntermodalEdge *const  toSplit,
const double  pos,
double &  relPos,
bool &  needSplit 
) const
inlineprivate

Returns where to insert or use the split edge.

This method determines whether an edge needs to be split at the given position (if there is not already a split nearby) and returns the corresponding index in the split list.

Parameters
[in]toSplitThe first edge in the split list
[in]posThe relative position on the edge where the stop is located
[out]relPosThe relative position on the splitted edge
[out]needSplitwhether a new split is needed or we reuse an exisiting one
Returns
the index in the split list where the split edge needs to be added or reused

Definition at line 774 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myAccessSplits, and split().

Referenced by IntermodalNetwork< E, L, N, V >::addAccess().

Here is the caller graph for this function:

◆ getAllEdges()

template<class E , class L , class N , class V >
const std::vector< _IntermodalEdge * > & IntermodalNetwork< E, L, N, V >::getAllEdges ( )
inline

Definition at line 292 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myEdges.

Referenced by IntermodalRouter< E, L, N, V >::createNet(), PedestrianRouter< E, L, N, V >::PedestrianRouter(), PedestrianRouter< E, L, N, V >::PedestrianRouter(), IntermodalRouter< E, L, N, V >::writeNetwork(), and IntermodalRouter< E, L, N, V >::writeWeights().

Here is the caller graph for this function:

◆ getArrivalConnector()

template<class E , class L , class N , class V >
_IntermodalEdge * IntermodalNetwork< E, L, N, V >::getArrivalConnector ( const E *  e,
const int  splitIndex = 0 
) const
inline

Returns the arriving intermodal connector at the given split offset.

Definition at line 369 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myArrivalLookup.

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarEdges(), PedestrianRouter< E, L, N, V >::compute(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().

Here is the caller graph for this function:

◆ getArrivalEdge()

template<class E , class L , class N , class V >
_IntermodalEdge * IntermodalNetwork< E, L, N, V >::getArrivalEdge ( const E *  e,
const double  pos 
) const
inline

Returns the arriving intermodal edge.

Definition at line 353 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myArrivalLookup, and TLF.

Referenced by IntermodalRouter< E, L, N, V >::compute().

Here is the caller graph for this function:

◆ getBothDirections()

template<class E , class L , class N , class V >
const EdgePair & IntermodalNetwork< E, L, N, V >::getBothDirections ( const E *  e) const
inline

Returns the pair of forward and backward edge.

Definition at line 297 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myBidiLookup, and TLF.

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarEdges(), IntermodalNetwork< E, L, N, V >::getWalkingConnector(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), IntermodalRouter< E, L, N, V >::prohibit(), and PedestrianRouter< E, L, N, V >::prohibit().

Here is the caller graph for this function:

◆ getCarEdge()

template<class E , class L , class N , class V >
_IntermodalEdge * IntermodalNetwork< E, L, N, V >::getCarEdge ( const E *  e) const
inline

Returns the associated car edge.

Definition at line 473 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myCarLookup.

Referenced by IntermodalNetwork< E, L, N, V >::addCarEdges(), and IntermodalRouter< E, L, N, V >::prohibit().

Here is the caller graph for this function:

◆ getDepartConnector()

template<class E , class L , class N , class V >
_IntermodalEdge * IntermodalNetwork< E, L, N, V >::getDepartConnector ( const E *  e,
const int  splitIndex = 0 
) const
inline

Returns the departing intermodal connector at the given split offset.

Definition at line 341 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myDepartLookup, TLF, and toString().

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarEdges(), PedestrianRouter< E, L, N, V >::compute(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().

Here is the caller graph for this function:

◆ getDepartEdge()

template<class E , class L , class N , class V >
const _IntermodalEdge * IntermodalNetwork< E, L, N, V >::getDepartEdge ( const E *  e,
const double  pos 
) const
inline

Returns the departing intermodal edge.

Definition at line 307 of file IntermodalNetwork.h.

References IntermodalEdge< E, L, N, V >::getEndPos(), IntermodalEdge< E, L, N, V >::getLength(), IntermodalNetwork< E, L, N, V >::myDepartLookup, split(), SVC_PEDESTRIAN, and TLF.

Referenced by IntermodalRouter< E, L, N, V >::compute().

Here is the caller graph for this function:

◆ getStopEdge()

template<class E , class L , class N , class V >
_IntermodalEdge * IntermodalNetwork< E, L, N, V >::getStopEdge ( const std::string &  stopId) const
inline

Returns the associated stop edge.

Definition at line 485 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myStopConnections.

Referenced by MSNet::adaptIntermodalRouter(), and IntermodalRouter< E, L, N, V >::compute().

Here is the caller graph for this function:

◆ getWalkingConnector()

template<class E , class L , class N , class V >
_IntermodalEdge * IntermodalNetwork< E, L, N, V >::getWalkingConnector ( const E *  e) const
inline

Returns the outgoing pedestrian edge, which is either a walking area or a walking connector.

Definition at line 374 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::getBothDirections(), L, and IntermodalNetwork< E, L, N, V >::myWalkingConnectorLookup.

Referenced by IntermodalNetwork< E, L, N, V >::addCarEdges().

Here is the caller graph for this function:

◆ isLooped()

template<class E , class L , class N , class V >
bool IntermodalNetwork< E, L, N, V >::isLooped ( const std::string  lineID) const
inline

Definition at line 758 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::myLoopedLines.

Referenced by IntermodalRouter< E, L, N, V >::loopedLineTransfer().

Here is the caller graph for this function:

◆ operator=()

template<class E , class L , class N , class V >
IntermodalNetwork & IntermodalNetwork< E, L, N, V >::operator= ( const IntermodalNetwork< E, L, N, V > &  s)
private

Invalidated assignment operator.

◆ splitEdge()

template<class E , class L , class N , class V >
void IntermodalNetwork< E, L, N, V >::splitEdge ( _IntermodalEdge *const  toSplit,
int  splitIndex,
_IntermodalEdge afterSplit,
const double  relPos,
const double  length,
const bool  needSplit,
_IntermodalEdge *const  stopConn,
const bool  forward = true,
const bool  addExit = true,
const bool  addEntry = true 
)
inlineprivate

Splits an edge (if necessary) and connects it to a stopping edge.

This method determines whether an edge needs to be split at the given position (if there is not already a split nearby) and connects the stop edge via new access edges.

Parameters
[in]toSplitThe first edge in the split list
[in]afterSplitThe edge to add if a split is performed
[in]posThe relative position on the edge where the stop is located
[in]stopConnThe stop edge to connect to
[in]forwardwhether we are aplitting a forward edge (backward edges get different names)
[in]addExitwhether we can just enter the stop or exit as well (cars should not exit yet)

Definition at line 807 of file IntermodalNetwork.h.

References IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), Named::getID(), IntermodalEdge< E, L, N, V >::getLength(), MAX2(), IntermodalNetwork< E, L, N, V >::myAccessSplits, IntermodalNetwork< E, L, N, V >::myNumericalID, Named::setID(), IntermodalEdge< E, L, N, V >::setLength(), and IntermodalEdge< E, L, N, V >::transferSuccessors().

Referenced by IntermodalNetwork< E, L, N, V >::addAccess().

Here is the caller graph for this function:

Field Documentation

◆ myAccessSplits

template<class E , class L , class N , class V >
std::map<_IntermodalEdge*, std::vector<_IntermodalEdge*> > IntermodalNetwork< E, L, N, V >::myAccessSplits
private

retrieve the splitted edges for the given "original"

Definition at line 884 of file IntermodalNetwork.h.

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::findSplitIndex(), and IntermodalNetwork< E, L, N, V >::splitEdge().

◆ myArrivalLookup

template<class E , class L , class N , class V >
std::map<const E*, std::vector<_IntermodalEdge*> > IntermodalNetwork< E, L, N, V >::myArrivalLookup
private

◆ myBidiLookup

template<class E , class L , class N , class V >
std::map<const E*, EdgePair> IntermodalNetwork< E, L, N, V >::myBidiLookup
private

retrieve the forward and backward edge for the given input edge E

Definition at line 863 of file IntermodalNetwork.h.

Referenced by IntermodalNetwork< E, L, N, V >::addCarAccess(), IntermodalNetwork< E, L, N, V >::getBothDirections(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().

◆ myCarLookup

template<class E , class L , class N , class V >
std::map<const E*, _IntermodalEdge*, ComparatorNumericalIdLess> IntermodalNetwork< E, L, N, V >::myCarLookup
private

◆ myCarWalkTransfer

template<class E , class L , class N , class V >
const int IntermodalNetwork< E, L, N, V >::myCarWalkTransfer
private

◆ myDepartLookup

template<class E , class L , class N , class V >
std::map<const E*, std::vector<_IntermodalEdge*> > IntermodalNetwork< E, L, N, V >::myDepartLookup
private

◆ myEdges

◆ myLoopedLines

template<class E , class L , class N , class V >
std::set<std::string > IntermodalNetwork< E, L, N, V >::myLoopedLines
private

looped lines need extra checking when building itineraries

Definition at line 887 of file IntermodalNetwork.h.

Referenced by IntermodalNetwork< E, L, N, V >::addSchedule(), and IntermodalNetwork< E, L, N, V >::isLooped().

◆ myNumericalID

◆ myPTLines

template<class E , class L , class N , class V >
std::map<std::string, std::vector<_PTEdge*> > IntermodalNetwork< E, L, N, V >::myPTLines
private

retrieve the public transport edges for the given line

Definition at line 878 of file IntermodalNetwork.h.

Referenced by IntermodalNetwork< E, L, N, V >::addSchedule().

◆ myStopConnections

template<class E , class L , class N , class V >
std::map<std::string, _IntermodalEdge*> IntermodalNetwork< E, L, N, V >::myStopConnections
private

retrieve the representing edge for the given stopping place

Definition at line 881 of file IntermodalNetwork.h.

Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addSchedule(), and IntermodalNetwork< E, L, N, V >::getStopEdge().

◆ myWalkingConnectorLookup

template<class E , class L , class N , class V >
std::map<const N*, _IntermodalEdge*> IntermodalNetwork< E, L, N, V >::myWalkingConnectorLookup
private

the walking connector edge (fake walking area)

Definition at line 872 of file IntermodalNetwork.h.

Referenced by IntermodalNetwork< E, L, N, V >::getWalkingConnector(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().


The documentation for this class was generated from the following file: