![]() |
Eclipse SUMO - Simulation of Urban MObility
|
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 StopParVector *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. | |
| _IntermodalEdge * | getArrivalEdge (const E *e, const double pos) const |
| Returns the arriving intermodal edge. | |
| const EdgePair & | getBothDirections (const E *e) const |
| Returns the pair of forward and backward edge. | |
| _IntermodalEdge * | getCarEdge (const E *e) const |
| Returns the associated car edge. | |
| _IntermodalEdge * | getDepartConnector (const E *e, const int splitIndex=0) const |
| Returns the departing intermodal connector at the given split offset. | |
| const _IntermodalEdge * | getDepartEdge (const E *e, const double pos) const |
| Returns the departing intermodal edge. | |
| _IntermodalEdge * | getStopEdge (const std::string &stopId) const |
| Returns the associated stop edge. | |
| _IntermodalEdge * | getWalkingConnector (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. | |
| IntermodalNetwork & | operator= (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 *, EdgePair > | myBidiLookup |
| retrieve the forward and backward edge for the given input edge E | |
| std::map< const E *, _IntermodalEdge *, ComparatorNumericalIdLess > | myCarLookup |
| 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) | |
the intermodal network storing edges, connections and the mappings to the "real" edges
Definition at line 76 of file IntermodalNetwork.h.
|
private |
Definition at line 79 of file IntermodalNetwork.h.
|
private |
Definition at line 78 of file IntermodalNetwork.h.
|
private |
Definition at line 80 of file IntermodalNetwork.h.
|
private |
Definition at line 81 of file IntermodalNetwork.h.
|
private |
Definition at line 82 of file IntermodalNetwork.h.
|
inline |
Definition at line 89 of file IntermodalNetwork.h.
References addConnectors(), addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), getArrivalConnector(), getBothDirections(), getDepartConnector(), Named::getID(), getSidewalk(), L, myArrivalLookup, myBidiLookup, myCarWalkTransfer, myDepartLookup, myEdges, myNumericalID, and myWalkingConnectorLookup.
Referenced by operator=().
|
inline |
Definition at line 272 of file IntermodalNetwork.h.
References 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] | startPos | The relative position on the edge where the stop starts |
| [in] | endPos | The relative position on the edge where the stop ends |
| [in] | length | The length of the access edge to build |
| [in] | category | The type of stop |
| [in] | isAccess | Whether an <access> element is being connected |
| [in] | taxiWait | Expected time to wait for a taxi |
Definition at line 514 of file IntermodalNetwork.h.
References addConnectors(), addEdge(), addRestrictedCarExit(), IntermodalEdge< E, L, N, V >::addSuccessor(), findSplitIndex(), getArrivalConnector(), getBothDirections(), getDepartConnector(), IntermodalEdge< E, L, N, V >::getLength(), getSidewalk(), IntermodalEdge< E, L, N, V >::getSuccessors(), AccessEdge< E, L, N, V >::getVehicleRetriction(), L, myAccessSplits, myCarLookup, myCarWalkTransfer, myDepartLookup, myNumericalID, myStopConnections, PARKING_AREAS, PT_STOPS, IntermodalEdge< E, L, N, V >::removeSuccessor(), IntermodalEdge< E, L, N, V >::setLength(), splitEdge(), SUMO_TAG_BUS_STOP, SUMO_TAG_PARKING_AREA, SVC_IGNORING, SVC_TAXI, TAXI_DROPOFF_PARKING_AREAS, TAXI_DROPOFF_PT, TAXI_PICKUP_PARKING_AREAS, TAXI_PICKUP_PT, and toString().
Referenced by MSNet::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().
|
inline |
Adds access edges for transfering from walking to vehicle use.
| [in] | edge | The edge on which the transfer takes place |
| [in] | svc | The permitted vehicle class for transfering |
Definition at line 752 of file IntermodalNetwork.h.
References addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), myBidiLookup, myCarLookup, myNumericalID, and SVC_IGNORING.
Referenced by MSNet::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().
|
inline |
Definition at line 395 of file IntermodalNetwork.h.
References addEdge(), addRestrictedCarExit(), IntermodalEdge< E, L, N, V >::addSuccessor(), ALL_JUNCTIONS, getArrivalConnector(), getBothDirections(), getCarEdge(), getDepartConnector(), getSidewalk(), getWalkingConnector(), INTERNAL, myCarLookup, myCarWalkTransfer, myNumericalID, NORMAL, SVC_IGNORING, SVC_TAXI, SVCAll, TAXI_DROPOFF_ANYWHERE, and TAXI_PICKUP_ANYWHERE.
|
inline |
Definition at line 285 of file IntermodalNetwork.h.
References addEdge(), IntermodalEdge< E, L, N, V >::getEdge(), myArrivalLookup, and myDepartLookup.
Referenced by addAccess(), and IntermodalNetwork().
|
inline |
Definition at line 278 of file IntermodalNetwork.h.
References IntermodalEdge< E, L, N, V >::getNumericalID(), and myEdges.
Referenced by addAccess(), addCarAccess(), addCarEdges(), addConnectors(), addRestrictedCarExit(), addSchedule(), IntermodalNetwork(), and splitEdge().
|
inline |
Adds access edges for transfering from driving to walking that are only usable by a particular vehicle class.
| [in] | from | The origin edge of the transfer |
| [in] | to | The destination edge of the transfer |
| [in] | svc | The permitted vehicle class for transfering |
Definition at line 770 of file IntermodalNetwork.h.
References addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), myNumericalID, and SVC_IGNORING.
Referenced by addAccess(), and addCarEdges().
|
inline |
Definition at line 662 of file IntermodalNetwork.h.
References 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, myLoopedLines, myNumericalID, myPTLines, myStopConnections, SUMOVehicleParameter::repetitionNumber, SUMOVehicleParameter::repetitionOffset, SUMOVehicleParameter::stops, SVC_IGNORING, time2string(), TL, SUMOVehicleParameter::Stop::until, and WRITE_WARNINGF.
Referenced by MSInsertionControl::adaptIntermodalRouter(), MSVehicleControl::adaptIntermodalRouter(), and RONet::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 793 of file IntermodalNetwork.h.
References myAccessSplits, and split().
Referenced by addAccess().
|
inline |
Definition at line 292 of file IntermodalNetwork.h.
References myEdges.
|
inline |
Returns the arriving intermodal connector at the given split offset.
Definition at line 373 of file IntermodalNetwork.h.
References myArrivalLookup.
Referenced by addAccess(), addCarEdges(), and IntermodalNetwork().
|
inline |
Returns the arriving intermodal edge.
Definition at line 353 of file IntermodalNetwork.h.
References myArrivalLookup, and TLF.
|
inline |
Returns the pair of forward and backward edge.
Definition at line 297 of file IntermodalNetwork.h.
References myBidiLookup, and TLF.
Referenced by addAccess(), addCarEdges(), getWalkingConnector(), and IntermodalNetwork().
|
inline |
Returns the associated car edge.
Definition at line 477 of file IntermodalNetwork.h.
References myCarLookup.
Referenced by addCarEdges().
|
inline |
Returns the departing intermodal connector at the given split offset.
Definition at line 341 of file IntermodalNetwork.h.
References myDepartLookup, TLF, and toString().
Referenced by addAccess(), addCarEdges(), and IntermodalNetwork().
|
inline |
Returns the departing intermodal edge.
Definition at line 307 of file IntermodalNetwork.h.
References myDepartLookup, split(), SVC_PEDESTRIAN, and TLF.
|
inline |
Returns the associated stop edge.
Definition at line 489 of file IntermodalNetwork.h.
References myStopConnections.
Referenced by MSNet::adaptIntermodalRouter().
|
inline |
Returns the outgoing pedestrian edge, which is either a walking area or a walking connector.
Definition at line 378 of file IntermodalNetwork.h.
References getBothDirections(), getSidewalk(), L, and myWalkingConnectorLookup.
Referenced by addCarEdges().
|
inline |
Definition at line 777 of file IntermodalNetwork.h.
References myLoopedLines.
|
private |
Invalidated assignment operator.
References IntermodalNetwork().
|
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 826 of file IntermodalNetwork.h.
References addEdge(), IntermodalEdge< E, L, N, V >::addSuccessor(), Named::getID(), IntermodalEdge< E, L, N, V >::getLength(), MAX2(), myAccessSplits, myNumericalID, Named::setID(), IntermodalEdge< E, L, N, V >::setLength(), and IntermodalEdge< E, L, N, V >::transferSuccessors().
Referenced by addAccess().
|
private |
retrieve the splitted edges for the given "original"
Definition at line 903 of file IntermodalNetwork.h.
Referenced by addAccess(), findSplitIndex(), and splitEdge().
|
private |
retrieve the arrival edges for the given input edge E
Definition at line 888 of file IntermodalNetwork.h.
Referenced by addConnectors(), getArrivalConnector(), getArrivalEdge(), and IntermodalNetwork().
|
private |
retrieve the forward and backward edge for the given input edge E
Definition at line 882 of file IntermodalNetwork.h.
Referenced by addCarAccess(), getBothDirections(), and IntermodalNetwork().
|
private |
retrieve the car edge for the given input edge E
Definition at line 894 of file IntermodalNetwork.h.
Referenced by addAccess(), addCarAccess(), addCarEdges(), and getCarEdge().
|
private |
Definition at line 909 of file IntermodalNetwork.h.
Referenced by addAccess(), addCarEdges(), and IntermodalNetwork().
|
private |
retrieve the depart edges for the given input edge E
Definition at line 885 of file IntermodalNetwork.h.
Referenced by addAccess(), addConnectors(), getDepartConnector(), getDepartEdge(), and IntermodalNetwork().
|
private |
the edge dictionary
Definition at line 879 of file IntermodalNetwork.h.
Referenced by addEdge(), getAllEdges(), IntermodalNetwork(), and ~IntermodalNetwork().
|
private |
looped lines need extra checking when building itineraries
Definition at line 906 of file IntermodalNetwork.h.
Referenced by addSchedule(), and isLooped().
|
private |
Definition at line 908 of file IntermodalNetwork.h.
Referenced by addAccess(), addCarAccess(), addCarEdges(), addRestrictedCarExit(), addSchedule(), IntermodalNetwork(), and splitEdge().
|
private |
retrieve the public transport edges for the given line
Definition at line 897 of file IntermodalNetwork.h.
Referenced by addSchedule().
|
private |
retrieve the representing edge for the given stopping place
Definition at line 900 of file IntermodalNetwork.h.
Referenced by addAccess(), addSchedule(), and getStopEdge().
|
private |
the walking connector edge (fake walking area)
Definition at line 891 of file IntermodalNetwork.h.
Referenced by getWalkingConnector(), and IntermodalNetwork().