![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <IntermodalRouter.h>
Data Structures | |
struct | TripItem |
Public Types | |
typedef IntermodalNetwork< E, L, N, V > | Network |
typedef double(* | Operation) (const E *const, const IntermodalTrip< E, N, V > *const, double) |
Type of the function that is used to retrieve the edge effort. More... | |
Public Member Functions | |
SUMOAbstractRouter< E, _IntermodalTrip > * | clone () |
bool | compute (const E *, const E *, const _IntermodalTrip *const, SUMOTime, std::vector< const E * > &, bool) |
Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme. More... | |
bool | compute (const E *from, const E *to, const double departPos, const double arrivalPos, const std::string stopID, const double speed, const V *const vehicle, const SVCPermissions modeSet, const SUMOTime msTime, std::vector< TripItem > &into, const double externalFactor=0.) |
Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme. More... | |
bool | compute (const E *from, double fromPos, const E *to, double toPos, const IntermodalTrip< E, N, V > *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false) |
Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme. More... | |
bool | computeLooped (const E *from, const E *to, const IntermodalTrip< E, N, V > *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false) |
Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route. More... | |
void | endQuery (int visits) |
int | getCarWalkTransfer () const |
double | getEffort (const E *const e, const IntermodalTrip< E, N, V > *const v, double t) const |
EffortCalculator * | getExternalEffort () const |
Network * | getNetwork () const |
double | getTravelTime (const E *const e, const IntermodalTrip< E, N, V > *const v, const double t, const double effort) const |
const std::string & | getType () const |
IntermodalRouter (CreateNetCallback callback, const int carWalkTransfer, double taxiWait, const std::string &routingAlgorithm, const int routingMode=0, EffortCalculator *calc=nullptr) | |
Constructor. More... | |
bool | isProhibited (const E *const edge, const IntermodalTrip< E, N, V > *const vehicle) const |
void | prohibit (const std::vector< E * > &toProhibit) |
double | recomputeCosts (const std::vector< const E * > &edges, const IntermodalTrip< E, N, V > *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const |
double | recomputeCosts (const std::vector< const E * > &edges, const IntermodalTrip< E, N, V > *const v, SUMOTime msTime, double *lengthp=nullptr) const |
virtual void | reset (const IntermodalTrip< E, N, V > *const vehicle) |
reset internal caches, used by CHRouter More... | |
void | setAutoBulkMode (const bool mode) |
void | setBulkMode (const bool mode) |
void | startQuery () |
void | updateViaCost (const E *const prev, const E *const e, const IntermodalTrip< E, N, V > *const v, double &time, double &effort, double &length) const |
void | updateViaEdgeCost (const E *viaEdge, const IntermodalTrip< E, N, V > *const v, double &time, double &effort, double &length) const |
void | writeNetwork (OutputDevice &dev) |
void | writeWeights (OutputDevice &dev) |
virtual | ~IntermodalRouter () |
Destructor. More... | |
Protected Attributes | |
bool | myAutoBulkMode |
whether we are currently trying to detect bulk mode automatically More... | |
bool | myBulkMode |
whether we are currently operating several route queries in a bulk More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
const bool | myHavePermissions |
whether edge permissions need to be considered More... | |
const bool | myHaveRestrictions |
whether edge restrictions need to be considered More... | |
Operation | myOperation |
The object's operation to perform. More... | |
std::vector< E * > | myProhibited |
Operation | myTTOperation |
The object's operation to perform for travel times. More... | |
Private Types | |
typedef IntermodalEdge< E, L, N, V > | _IntermodalEdge |
typedef IntermodalTrip< E, N, V > | _IntermodalTrip |
typedef AStarRouter< _IntermodalEdge, _IntermodalTrip > | _InternalAStar |
typedef DijkstraRouter< _IntermodalEdge, _IntermodalTrip > | _InternalDijkstra |
typedef SUMOAbstractRouter< _IntermodalEdge, _IntermodalTrip > | _InternalRouter |
typedef void(* | CreateNetCallback) (IntermodalRouter< E, L, N, V > &) |
Private Member Functions | |
void | createNet () |
IntermodalRouter (Network *net, const int carWalkTransfer, double taxiWait, const std::string &routingAlgorithm, const int routingMode, EffortCalculator *calc) | |
IntermodalRouter & | operator= (const IntermodalRouter &s) |
Invalidated assignment operator. More... | |
Static Private Member Functions | |
static double | getCombined (const _IntermodalEdge *const edge, const _IntermodalTrip *const trip, double time) |
Private Attributes | |
const bool | myAmClone |
CreateNetCallback | myCallback |
const int | myCarWalkTransfer |
EffortCalculator *const | myExternalEffort |
Network * | myIntermodalNet |
_InternalRouter * | myInternalRouter |
long long int | myNumQueries |
long long int | myQueryStartTime |
the time spent querying in milliseconds More... | |
long long int | myQueryTimeSum |
long long int | myQueryVisits |
counters for performance logging More... | |
const std::string | myRoutingAlgorithm |
const int | myRoutingMode |
const double | myTaxiWait |
const std::string | myType |
the type of this router More... | |
The router for pedestrians (on a bidirectional network of sidewalks and crossings)
Definition at line 52 of file IntermodalRouter.h.
|
private |
Definition at line 58 of file IntermodalRouter.h.
|
private |
Definition at line 59 of file IntermodalRouter.h.
|
private |
Definition at line 62 of file IntermodalRouter.h.
|
private |
Definition at line 61 of file IntermodalRouter.h.
|
private |
Definition at line 60 of file IntermodalRouter.h.
|
private |
Definition at line 57 of file IntermodalRouter.h.
typedef IntermodalNetwork<E, L, N, V> IntermodalRouter< E, L, N, V >::Network |
Definition at line 54 of file IntermodalRouter.h.
|
inherited |
Type of the function that is used to retrieve the edge effort.
Definition at line 94 of file SUMOAbstractRouter.h.
|
inline |
Constructor.
Definition at line 83 of file IntermodalRouter.h.
|
inlinevirtual |
Destructor.
Definition at line 93 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::myAmClone, IntermodalRouter< E, L, N, V >::myIntermodalNet, and IntermodalRouter< E, L, N, V >::myInternalRouter.
|
inlineprivate |
Definition at line 254 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::createNet().
|
inlinevirtual |
Implements SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >.
Definition at line 100 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::createNet(), IntermodalRouter< E, L, N, V >::myCarWalkTransfer, IntermodalRouter< E, L, N, V >::myExternalEffort, IntermodalRouter< E, L, N, V >::myIntermodalNet, IntermodalRouter< E, L, N, V >::myRoutingAlgorithm, IntermodalRouter< E, L, N, V >::myRoutingMode, and IntermodalRouter< E, L, N, V >::myTaxiWait.
|
inlinevirtual |
Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme.
Implements SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >.
Definition at line 205 of file IntermodalRouter.h.
|
inline |
Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme.
Definition at line 111 of file IntermodalRouter.h.
References IntermodalTrip< E, N, V >::arrivalPos, SUMOAbstractRouter< E, V >::compute(), IntermodalRouter< E, L, N, V >::createNet(), IntermodalTrip< E, N, V >::departPos, IntermodalNetwork< E, L, N, V >::getArrivalEdge(), IntermodalNetwork< E, L, N, V >::getDepartEdge(), SUMOAbstractRouter< E, V >::getEffort(), Named::getID(), IntermodalNetwork< E, L, N, V >::getStopEdge(), getVehicleClassNames(), IntermodalRouter< E, L, N, V >::myExternalEffort, IntermodalRouter< E, L, N, V >::myIntermodalNet, IntermodalRouter< E, L, N, V >::myInternalRouter, EffortCalculator::output(), STEPS2TIME, TIME2STEPS, toString(), and SUMOAbstractRouter< E, V >::updateViaCost().
Referenced by LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), and MSStageTrip::setArrived().
|
inlineinherited |
Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme.
Definition at line 157 of file SUMOAbstractRouter.h.
|
inlineinherited |
Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route.
Definition at line 172 of file SUMOAbstractRouter.h.
|
inlineprivate |
Definition at line 268 of file IntermodalRouter.h.
References IntermodalNetwork< E, L, N, V >::addCarEdges(), IntermodalNetwork< E, L, N, V >::getAllEdges(), IntermodalRouter< E, L, N, V >::getCombined(), IntermodalEdge< E, L, N, V >::getEffortStatic(), IntermodalEdge< E, L, N, V >::getTravelTimeAggregated(), IntermodalEdge< E, L, N, V >::getTravelTimeStatic(), IntermodalEdge< E, L, N, V >::getTravelTimeStaticRandomized(), gWeightsRandomFactor, EffortCalculator::init(), IntermodalRouter< E, L, N, V >::myCallback, IntermodalRouter< E, L, N, V >::myCarWalkTransfer, IntermodalRouter< E, L, N, V >::myExternalEffort, IntermodalRouter< E, L, N, V >::myIntermodalNet, IntermodalRouter< E, L, N, V >::myInternalRouter, IntermodalRouter< E, L, N, V >::myRoutingAlgorithm, IntermodalRouter< E, L, N, V >::myRoutingMode, and IntermodalRouter< E, L, N, V >::myTaxiWait.
Referenced by IntermodalRouter< E, L, N, V >::clone(), IntermodalRouter< E, L, N, V >::compute(), IntermodalRouter< E, L, N, V >::IntermodalRouter(), IntermodalRouter< E, L, N, V >::prohibit(), IntermodalRouter< E, L, N, V >::writeNetwork(), and IntermodalRouter< E, L, N, V >::writeWeights().
|
inlineinherited |
Definition at line 279 of file SUMOAbstractRouter.h.
|
inline |
Definition at line 105 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::myCarWalkTransfer.
Referenced by MSNet::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().
|
inlinestaticprivate |
Definition at line 264 of file IntermodalRouter.h.
References IntermodalTrip< E, N, V >::calc, IntermodalTrip< E, N, V >::externalFactor, EffortCalculator::getEffort(), IntermodalEdge< E, L, N, V >::getNumericalID(), and IntermodalEdge< E, L, N, V >::getTravelTime().
Referenced by IntermodalRouter< E, L, N, V >::createNet().
|
inlineinherited |
Definition at line 270 of file SUMOAbstractRouter.h.
|
inline |
Definition at line 249 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::myExternalEffort.
Referenced by MSNet::adaptIntermodalRouter().
|
inline |
Definition at line 245 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::myIntermodalNet.
Referenced by MSNet::adaptIntermodalRouter(), MSInsertionControl::adaptIntermodalRouter(), MSVehicleControl::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().
|
inlineinherited |
Definition at line 207 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 143 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 201 of file SUMOAbstractRouter.h.
|
private |
Invalidated assignment operator.
|
inlinevirtual |
Reimplemented from SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >.
Definition at line 210 of file IntermodalRouter.h.
References IntermodalRouter< E, L, N, V >::createNet(), IntermodalNetwork< E, L, N, V >::getBothDirections(), IntermodalNetwork< E, L, N, V >::getCarEdge(), IntermodalRouter< E, L, N, V >::myIntermodalNet, IntermodalRouter< E, L, N, V >::myInternalRouter, and SUMOAbstractRouter< E, V >::prohibit().
|
inlineinherited |
Definition at line 258 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 237 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
reset internal caches, used by CHRouter
Definition at line 139 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 288 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 284 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 274 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 221 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 211 of file SUMOAbstractRouter.h.
|
inline |
Definition at line 221 of file IntermodalRouter.h.
References OutputDevice::closeTag(), IntermodalRouter< E, L, N, V >::createNet(), IntermodalNetwork< E, L, N, V >::getAllEdges(), IntermodalRouter< E, L, N, V >::myIntermodalNet, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_ATTR_LENGTH, SUMO_ATTR_LINE, SUMO_TAG_EDGE, SVC_IGNORING, toString(), and OutputDevice::writeAttr().
Referenced by RONet::writeIntermodal().
|
inline |
Definition at line 233 of file IntermodalRouter.h.
References OutputDevice::closeTag(), IntermodalRouter< E, L, N, V >::createNet(), DEFAULT_PEDESTRIAN_SPEED, IntermodalNetwork< E, L, N, V >::getAllEdges(), IntermodalRouter< E, L, N, V >::myIntermodalNet, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_TAG_EDGE, SVC_BICYCLE, SVC_BUS, SVC_PASSENGER, and OutputDevice::writeAttr().
Referenced by RONet::writeIntermodal().
|
private |
Definition at line 306 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::~IntermodalRouter().
|
protectedinherited |
whether we are currently trying to detect bulk mode automatically
Definition at line 306 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether we are currently operating several route queries in a bulk
Definition at line 303 of file SUMOAbstractRouter.h.
|
private |
Definition at line 309 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::createNet().
|
private |
Definition at line 310 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::clone(), IntermodalRouter< E, L, N, V >::createNet(), and IntermodalRouter< E, L, N, V >::getCarWalkTransfer().
|
protectedinherited |
the handler for routing errors
Definition at line 294 of file SUMOAbstractRouter.h.
|
private |
Definition at line 314 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::clone(), IntermodalRouter< E, L, N, V >::compute(), IntermodalRouter< E, L, N, V >::createNet(), and IntermodalRouter< E, L, N, V >::getExternalEffort().
|
protectedinherited |
whether edge permissions need to be considered
Definition at line 309 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether edge restrictions need to be considered
Definition at line 312 of file SUMOAbstractRouter.h.
|
private |
Definition at line 308 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::clone(), IntermodalRouter< E, L, N, V >::compute(), IntermodalRouter< E, L, N, V >::createNet(), IntermodalRouter< E, L, N, V >::getNetwork(), IntermodalRouter< E, L, N, V >::prohibit(), IntermodalRouter< E, L, N, V >::writeNetwork(), IntermodalRouter< E, L, N, V >::writeWeights(), and IntermodalRouter< E, L, N, V >::~IntermodalRouter().
|
private |
Definition at line 307 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::compute(), IntermodalRouter< E, L, N, V >::createNet(), IntermodalRouter< E, L, N, V >::prohibit(), and IntermodalRouter< E, L, N, V >::~IntermodalRouter().
|
privateinherited |
Definition at line 322 of file SUMOAbstractRouter.h.
|
protectedinherited |
The object's operation to perform.
Definition at line 297 of file SUMOAbstractRouter.h.
|
protectedinherited |
Definition at line 314 of file SUMOAbstractRouter.h.
|
privateinherited |
the time spent querying in milliseconds
Definition at line 324 of file SUMOAbstractRouter.h.
|
privateinherited |
Definition at line 325 of file SUMOAbstractRouter.h.
|
privateinherited |
counters for performance logging
Definition at line 321 of file SUMOAbstractRouter.h.
|
private |
Definition at line 312 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::clone(), and IntermodalRouter< E, L, N, V >::createNet().
|
private |
Definition at line 313 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::clone(), and IntermodalRouter< E, L, N, V >::createNet().
|
private |
Definition at line 311 of file IntermodalRouter.h.
Referenced by IntermodalRouter< E, L, N, V >::clone(), and IntermodalRouter< E, L, N, V >::createNet().
|
protectedinherited |
The object's operation to perform for travel times.
Definition at line 300 of file SUMOAbstractRouter.h.
|
privateinherited |
the type of this router
Definition at line 318 of file SUMOAbstractRouter.h.