![]() |
Eclipse SUMO - Simulation of Urban MObility
|
the intermodal network storing edges, connections and the mappings to the "real" edges More...
#include <IntermodalNetwork.h>
Public Types | |
enum | ModeChangeOptions { PARKING_AREAS = 1, PT_STOPS = 2, ALL_JUNCTIONS = 4 } |
where mode changes are possible More... | |
Public Member Functions | |
void | addAccess (const std::string &stopId, const E *stopEdge, const double pos, const double length, const SumoXMLTag category) |
Adds access edges for stopping places to the intermodal network. More... | |
void | addCarEdges (const std::vector< E *> &edges) |
void | addConnectors (_IntermodalEdge *const depConn, _IntermodalEdge *const arrConn, const int index) |
void | addEdge (_IntermodalEdge *edge) |
void | addSchedule (const SUMOVehicleParameter &pars, const std::vector< SUMOVehicleParameter::Stop > *addStops=nullptr) |
const std::vector< _IntermodalEdge * > & | getAllEdges () |
_IntermodalEdge * | getArrivalConnector (const E *e, const int splitIndex=0) const |
Returns the arriving intermodal connector at the given split offset. More... | |
_IntermodalEdge * | getArrivalEdge (const E *e, const double pos) const |
Returns the arriving intermodal edge. More... | |
const EdgePair & | getBothDirections (const E *e) const |
Returns the pair of forward and backward edge. More... | |
_IntermodalEdge * | getCarEdge (const E *e) const |
Returns the associated car edge. More... | |
_IntermodalEdge * | getDepartConnector (const E *e, const int splitIndex=0) const |
Returns the departing intermodal connector at the given split offset. More... | |
const _IntermodalEdge * | getDepartEdge (const E *e, const double pos) const |
Returns the departing intermodal edge. More... | |
_IntermodalEdge * | getStopEdge (const std::string &stopId) const |
Returns the associated stop edge. More... | |
_IntermodalEdge * | getWalkingConnector (const E *e) const |
Returns the outgoing pedestrian edge, which is either a walking area or a walking connector. More... | |
IntermodalNetwork (const std::vector< E *> &edges, const bool pedestrianOnly, const int carWalkTransfer=0) | |
~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) |
Returns where to insert or use the split edge. More... | |
IntermodalNetwork & | operator= (const IntermodalNetwork &s) |
Invalidated assignment operator. More... | |
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) |
Splits an edge (if necessary) and connects it to a stopping edge. More... | |
Private Attributes | |
std::map< _IntermodalEdge *, std::vector< _IntermodalEdge * > > | myAccessSplits |
retrieve the splitted edges for the given "original" More... | |
std::map< const E *, std::vector< _IntermodalEdge * > > | myArrivalLookup |
retrieve the arrival edges for the given input edge E More... | |
std::map< const E *, EdgePair > | myBidiLookup |
retrieve the forward and backward edge for the given input edge E More... | |
std::map< const E *, _IntermodalEdge * > | myCarLookup |
retrieve the car edge for the given input edge E More... | |
const int | myCarWalkTransfer |
std::map< const E *, std::vector< _IntermodalEdge * > > | myDepartLookup |
retrieve the depart edges for the given input edge E More... | |
std::vector< _IntermodalEdge * > | myEdges |
the edge dictionary More... | |
int | myNumericalID |
std::map< std::string, std::vector< _PTEdge * > > | myPTLines |
retrieve the public transport edges for the given line More... | |
std::map< std::string, _IntermodalEdge * > | myStopConnections |
retrieve the representing edge for the given stopping place More... | |
std::map< const N *, _IntermodalEdge * > | myWalkingConnectorLookup |
the walking connector edge (fake walking area) More... | |
the intermodal network storing edges, connections and the mappings to the "real" edges
Definition at line 77 of file IntermodalNetwork.h.
|
private |
Definition at line 80 of file IntermodalNetwork.h.
|
private |
Definition at line 79 of file IntermodalNetwork.h.
|
private |
Definition at line 81 of file IntermodalNetwork.h.
|
private |
Definition at line 82 of file IntermodalNetwork.h.
|
private |
Definition at line 83 of file IntermodalNetwork.h.
enum IntermodalNetwork::ModeChangeOptions |
where mode changes are possible
Enumerator | |
---|---|
PARKING_AREAS | parking areas |
PT_STOPS | public transport stops and access |
ALL_JUNCTIONS | junctions with edges allowing the additional mode |
Definition at line 88 of file IntermodalNetwork.h.
|
inline |
Definition at line 101 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::addConnectors(), IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), IntermodalNetwork< E, L, N, V >::getArrivalConnector(), IntermodalNetwork< E, L, N, V >::getBothDirections(), IntermodalNetwork< E, L, N, V >::getDepartConnector(), L, IntermodalNetwork< E, L, N, V >::myArrivalLookup, IntermodalNetwork< E, L, N, V >::myBidiLookup, IntermodalNetwork< E, L, N, V >::myDepartLookup, IntermodalNetwork< E, L, N, V >::myEdges, IntermodalNetwork< E, L, N, V >::myNumericalID, and IntermodalNetwork< E, L, N, V >::myWalkingConnectorLookup.
|
inline |
Definition at line 258 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::myEdges.
|
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).
[in] | stopId | The id of the stop to add |
[in] | stopEdge | The edge on which the stop is located |
[in] | pos | The relative position on the edge where the stop is located |
[in] | category | The type of stop |
Definition at line 453 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::addConnectors(), IntermodalNetwork< E, L, N, V >::addEdge(), 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, IntermodalNetwork< E, L, N, V >::PARKING_AREAS, IntermodalNetwork< E, L, N, V >::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, and toString().
Referenced by RONet::adaptIntermodalRouter(), and MSNet::adaptIntermodalRouter().
|
inline |
Definition at line 383 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), IntermodalNetwork< E, L, N, V >::ALL_JUNCTIONS, EDGEFUNC_INTERNAL, EDGEFUNC_NORMAL, IntermodalNetwork< E, L, N, V >::getArrivalConnector(), IntermodalNetwork< E, L, N, V >::getBothDirections(), IntermodalNetwork< E, L, N, V >::getCarEdge(), IntermodalNetwork< E, L, N, V >::getDepartConnector(), IntermodalNetwork< E, L, N, V >::getWalkingConnector(), IntermodalNetwork< E, L, N, V >::myCarLookup, IntermodalNetwork< E, L, N, V >::myCarWalkTransfer, and IntermodalNetwork< E, L, N, V >::myNumericalID.
Referenced by IntermodalRouter< E, L, N, V >::createNet().
|
inline |
Definition at line 271 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().
|
inline |
Definition at line 264 of file IntermodalNetwork.h.
References IntermodalEdge< E, L, N, V >::getNumericalID(), and IntermodalNetwork< E, L, N, V >::myEdges.
Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarEdges(), IntermodalNetwork< E, L, N, V >::addConnectors(), IntermodalNetwork< E, L, N, V >::addSchedule(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), and IntermodalNetwork< E, L, N, V >::splitEdge().
|
inline |
Definition at line 546 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::addEdge(), PublicTransportEdge< E, L, N, V >::addSchedule(), IntermodalEdge< E, L, N, V >::addSuccessor(), SUMOVehicleParameter::Stop::busstop, SUMOVehicleParameter::depart, Position::distanceTo(), IntermodalEdge< E, L, N, V >::getEdge(), SUMOVehicleParameter::id, SUMOVehicleParameter::line, IntermodalNetwork< E, L, N, V >::myNumericalID, IntermodalNetwork< E, L, N, V >::myPTLines, IntermodalNetwork< E, L, N, V >::myStopConnections, SUMOVehicleParameter::repetitionNumber, SUMOVehicleParameter::repetitionOffset, SUMOVehicleParameter::stops, SVC_IGNORING, time2string(), SUMOVehicleParameter::Stop::until, and WRITE_WARNING.
Referenced by MSInsertionControl::adaptIntermodalRouter(), RONet::adaptIntermodalRouter(), and MSVehicleControl::adaptIntermodalRouter().
|
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.
[in] | toSplit | The first edge in the split list |
[in] | pos | The relative position on the edge where the stop is located |
[out] | relPos | The relative position on the splitted edge |
[out] | needSplit | whether a new split is needed or we reuse an exisiting one |
Definition at line 640 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::myAccessSplits, POSITION_EPS, and split().
Referenced by IntermodalNetwork< E, L, N, V >::addAccess().
|
inline |
Definition at line 278 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(), IntermodalRouter< E, L, N, V >::writeNetwork(), and IntermodalRouter< E, L, N, V >::writeWeights().
|
inline |
Returns the arriving intermodal connector at the given split offset.
Definition at line 361 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().
|
inline |
Returns the arriving intermodal edge.
Definition at line 345 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::myArrivalLookup.
Referenced by IntermodalRouter< E, L, N, V >::compute().
|
inline |
Returns the pair of forward and backward edge.
Definition at line 283 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::myBidiLookup.
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(), PedestrianRouter< E, L, N, V >::prohibit(), and IntermodalRouter< E, L, N, V >::prohibit().
|
inline |
Returns the associated car edge.
Definition at line 423 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().
|
inline |
Returns the departing intermodal connector at the given split offset.
Definition at line 333 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::myDepartLookup, 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().
|
inline |
Returns the departing intermodal edge.
Definition at line 293 of file IntermodalNetwork.h.
References IntermodalEdge< E, L, N, V >::getLength(), isRailway(), IntermodalNetwork< E, L, N, V >::myDepartLookup, and split().
Referenced by IntermodalRouter< E, L, N, V >::compute().
|
inline |
Returns the associated stop edge.
Definition at line 432 of file IntermodalNetwork.h.
References IntermodalNetwork< E, L, N, V >::myStopConnections.
Referenced by MSNet::adaptIntermodalRouter(), and IntermodalRouter< E, L, N, V >::compute().
|
inline |
Returns the outgoing pedestrian edge, which is either a walking area or a walking connector.
Definition at line 366 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().
|
private |
Invalidated assignment operator.
|
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.
[in] | toSplit | The first edge in the split list |
[in] | afterSplit | The edge to add if a split is performed |
[in] | pos | The relative position on the edge where the stop is located |
[in] | stopConn | The stop edge to connect to |
[in] | forward | whether we are aplitting a forward edge (backward edges get different names) |
[in] | addExit | whether we can just enter the stop or exit as well (cars should not exit yet) |
Definition at line 673 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(), 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().
|
private |
retrieve the splitted edges for the given "original"
Definition at line 748 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().
|
private |
retrieve the arrival edges for the given input edge E
Definition at line 733 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addConnectors(), IntermodalNetwork< E, L, N, V >::getArrivalConnector(), IntermodalNetwork< E, L, N, V >::getArrivalEdge(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().
|
private |
retrieve the forward and backward edge for the given input edge E
Definition at line 727 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::getBothDirections(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().
|
private |
retrieve the car edge for the given input edge E
Definition at line 739 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarEdges(), and IntermodalNetwork< E, L, N, V >::getCarEdge().
|
private |
Definition at line 751 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), and IntermodalNetwork< E, L, N, V >::addCarEdges().
|
private |
retrieve the depart edges for the given input edge E
Definition at line 730 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addConnectors(), IntermodalNetwork< E, L, N, V >::getDepartConnector(), IntermodalNetwork< E, L, N, V >::getDepartEdge(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().
|
private |
the edge dictionary
Definition at line 724 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addEdge(), IntermodalNetwork< E, L, N, V >::getAllEdges(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), and IntermodalNetwork< E, L, N, V >::~IntermodalNetwork().
|
private |
Definition at line 750 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarEdges(), IntermodalNetwork< E, L, N, V >::addSchedule(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), and IntermodalNetwork< E, L, N, V >::splitEdge().
|
private |
retrieve the public transport edges for the given line
Definition at line 742 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::addSchedule().
|
private |
retrieve the representing edge for the given stopping place
Definition at line 745 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().
|
private |
the walking connector edge (fake walking area)
Definition at line 736 of file IntermodalNetwork.h.
Referenced by IntermodalNetwork< E, L, N, V >::getWalkingConnector(), and IntermodalNetwork< E, L, N, V >::IntermodalNetwork().