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

#include <AFRouter.h>

Inheritance diagram for AFRouter< E, N, V, M >:
[legend]
Collaboration diagram for AFRouter< E, N, V, M >:
[legend]

Data Structures

class  EdgeInfoComparator

Public Types

typedef KDTreePartition< E, N, V >::Cell Cell
typedef AFInfo< E >::FlagInfo FlagInfo
typedef AbstractLookupTable< FlippedEdge< E, N, V >, V > FlippedLookupTable
typedef AbstractLookupTable< E, V > LookupTable
typedef double(* Operation) (const E *const, const V *const, double)
 Type of the function that is used to retrieve the edge effort.
typedef std::map< const E *, double > Prohibitions
 Prohibitions and their estimated end time.

Public Member Functions

 AFRouter (const std::vector< E * > &edges, const KDTreePartition< E, N, V > *partition, bool unbuildIsWarning, typename SUMOAbstractRouter< E, V >::Operation operation, typename SUMOAbstractRouter< FlippedEdge< E, N, V >, V >::Operation flippedOperation, SUMOTime weightPeriod, const std::shared_ptr< const LookupTable > lookup=nullptr, const std::shared_ptr< const FlippedLookupTable > flippedLookup=nullptr, const bool havePermissions=false, const bool haveRestrictions=false)
 Constructor.
 AFRouter (const std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo > &edgeInfos, const KDTreePartition< E, N, V > *partition, bool unbuildIsWarning, typename SUMOAbstractRouter< E, V >::Operation operation, std::vector< FlagInfo * > *flagInfos, const std::shared_ptr< const LookupTable > lookup=nullptr, const bool havePermissions=false, const bool haveRestrictions=false)
 Special cloning constructor, only for time-independent instances which never rebuild arc infos.
 AFRouter (const std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo > &edgeInfos, const std::vector< E * > &edges, const KDTreePartition< E, N, V > *partition, bool unbuildIsWarning, typename SUMOAbstractRouter< E, V >::Operation operation, typename SUMOAbstractRouter< FlippedEdge< E, N, V >, V >::Operation flippedOperation, SUMOTime weightPeriod, const std::shared_ptr< const LookupTable > lookup=nullptr, const std::shared_ptr< const FlippedLookupTable > flippedLookup=nullptr, const bool havePermissions=false, const bool haveRestrictions=false)
 "Normal" cloning constructor for uninitialized or time-dependent instances
void buildPathFrom (const typename SUMOAbstractRouter< E, V >::EdgeInfo *rbegin, std::vector< const E * > &edges)
 Builds the path from marked edges.
virtual SUMOAbstractRouter< E, V > * clone ()
 Cloning method.
bool compute (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)
 Builds the route between the given edges using the minimum travel time param[in] from The from-/start/source/head edge param[in] to The to-/end/target/tail edge param[in] vehicle The vehicle param[in] msTime The start time of the routes in milliseconds param[out] into The vector of edges, into which the solution route is written.
bool compute (const E *from, double fromPos, const E *to, double toPos, const 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.
bool computeLooped (const E *from, const E *to, const 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.
SUMOAbstractRouter< E, V >::EdgeInfoedgeInfo (const E *const edge)
 Returns the edge information for the passed edge.
const SUMOAbstractRouter< E, V >::EdgeInfoedgeInfo (const E *const edge) const
 Returns the edge information for the passed edge.
void endQuery (int visits)
 Stop timer for query time sum.
std::tuple< int, int, bool > flagContext (const E *settledEdge, const E *targetEdge)
 Returns the flag context for a route query from given settled edge to the target edge.
std::tuple< int, int, bool > flagContextNaive (const E *settledEdge, const E *targetEdge)
 Kept for runtime comparisons.
std::vector< bool > & flags (const E *edge)
 Returns the arc flags of the passed edge.
const SUMOAbstractRouter< E, V >::EdgeInfogetEdgeInfo (int index) const
double getEffort (const E *const e, const V *const v, double t) const
double getTravelTime (const E *const e, const V *const v, const double t, const double effort) const
const std::string & getType () const
void init (const int edgeID, const SUMOTime msTime)
 Initialize the arc flag router param[in] edgeID The edge id(entifier) param[in] msTime The start time of the routes in milliseconds.
bool isProhibited (const E *const edge, const V *const vehicle) const
bool isValid (const std::vector< const E * > &edges, const V *const v) const
virtual void prohibit (const Prohibitions &toProhibit)
virtual double recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const
double recomputeCostsPos (const std::vector< const E * > &edges, const V *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const
void reportStatistics ()
 Report query time statistics.
virtual void reset (const V *const vehicle)
 Trigger arc flags rebuild.
void resetStatistics ()
 Reset query time statistics.
void setAutoBulkMode (const bool mode)
virtual void setBulkMode (const bool mode)
 Bulk mode is not supported.
double setHint (const typename std::vector< const E * >::const_iterator routeBegin, const typename std::vector< const E * >::const_iterator routeEnd, const V *const v, SUMOTime msTime)
void startQuery ()
 Start timer for query time sum.
void updateViaCost (const E *const prev, const E *const e, const V *const v, double &time, double &effort, double &length) const
void updateViaEdgeCost (const E *viaEdge, const V *const v, double &time, double &effort, double &length) const
virtual ~AFRouter ()
 Destructor.

Static Public Member Functions

static bool flag (const FlagInfo *flagInfo, const std::tuple< int, int, bool > flagContext)
 Returns the arc flag of the edge in flagInfo wrt flagContext.
static int partitionLevel2SHARCLevel (int partitionLevel, int numberOfPartitionLevels)
 Converts a partition level number to a SHARC level number.
static int sHARCLevel2PartitionLevel (int sHARCLevel, int numberOfPartitionLevels)
 Converts a SHARC level number to a partition level number.

Protected Attributes

bool myAmClean
 whether we are already initialized
bool myAutoBulkMode
 whether we are currently trying to detect bulk mode automatically
AFBuilder< E, N, V, M > * myBuilder
 The builder.
bool myBulkMode
 whether we are currently operating several route queries in a bulk
EdgeInfoComparator myComparator
 The comparator for edge information.
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfomyEdgeInfos
 The container of edge information.
MsgHandler *const myErrorMsgHandler
 the handler for routing errors
std::vector< FlagInfo * > * myFlagInfos
 Edge infos containing the associated edge and its arc flags.
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo * > myFound
 list of visited Edges (for resetting)
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo * > myFrontierList
 A container for reusage of the min edge heap.
const bool myHavePermissions
 whether edge permissions need to be considered
const bool myHaveRestrictions
 whether edge restrictions need to be considered
const std::shared_ptr< const LookupTablemyLookupTable
 The lookup table for travel time heuristics.
double myMaxSpeed
 The maximum speed in the network.
long long int myNumQueries
Operation myOperation
 The object's operation to perform.
const KDTreePartition< E, N, V > * myPartition
 The partition.
Prohibitions myProhibited
 The list of explicitly prohibited edges and estimated end time of prohibition.
long long int myQueryStartTime
 The time spent querying in milliseconds.
long long int myQueryTimeSum
long long int myQueryVisits
 Counters for performance logging.
Operation myTTOperation
 The object's operation to perform for travel times.
const std::string myType
 The type of this router.
SUMOTime myValidUntil
 The validity duration of the current flag infos (exclusive).
const SUMOTime myWeightPeriod
 The validity duration of one weight interval.

Private Attributes

std::tuple< int, int, bool > myLastFlagContext
 The last flag context.
const CellmyLastSettledEdgeCell
 The cell of the last settled edge.
const CellmyTargetEdgeCellLevel0
 The cell of the target edge at SHARC level 0.

Detailed Description

template<class E, class N, class V, class M>
class AFRouter< E, N, V, M >

Computes the shortest path through a network with an arc flag routing algorithm (Hilger et al.) in its multi-level variant (also called "stripped SHARC" by Delling et al.)

The template parameters are:

Parameters
EThe edge class to use (MSEdge/ROEdge)
NThe node class to use (MSJunction/RONode)
VThe vehicle class to use (MSVehicle/ROVehicle)

The router is edge-based It must know the number of edges for internal reasons and whether a missing connection between two given edges (unbuild route) shall be reported as an error or as a warning

Definition at line 91 of file AFRouter.h.

Member Typedef Documentation

◆ Cell

template<class E, class N, class V, class M>
typedef KDTreePartition<E,N,V>::Cell AFRouter< E, N, V, M >::Cell

Definition at line 94 of file AFRouter.h.

◆ FlagInfo

template<class E, class N, class V, class M>
typedef AFInfo<E>::FlagInfo AFRouter< E, N, V, M >::FlagInfo

Definition at line 95 of file AFRouter.h.

◆ FlippedLookupTable

template<class E, class N, class V, class M>
typedef AbstractLookupTable<FlippedEdge<E, N, V>, V> AFRouter< E, N, V, M >::FlippedLookupTable

Definition at line 96 of file AFRouter.h.

◆ LookupTable

template<class E, class N, class V, class M>
typedef AbstractLookupTable<E, V> AFRouter< E, N, V, M >::LookupTable

Definition at line 93 of file AFRouter.h.

◆ Operation

template<class E, class V>
typedef double(* SUMOAbstractRouter< E, V >::Operation) (const E *const, const V *const, double)
inherited

Type of the function that is used to retrieve the edge effort.

Definition at line 95 of file SUMOAbstractRouter.h.

◆ Prohibitions

template<class E, class V>
typedef std::map<const E*, double> SUMOAbstractRouter< E, V >::Prohibitions
inherited

Prohibitions and their estimated end time.

Definition at line 98 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ AFRouter() [1/3]

template<class E, class N, class V, class M>
AFRouter< E, N, V, M >::AFRouter ( const std::vector< E * > & edges,
const KDTreePartition< E, N, V > * partition,
bool unbuildIsWarning,
typename SUMOAbstractRouter< E, V >::Operation operation,
typename SUMOAbstractRouter< FlippedEdge< E, N, V >, V >::Operation flippedOperation,
SUMOTime weightPeriod,
const std::shared_ptr< const LookupTable > lookup = nullptr,
const std::shared_ptr< const FlippedLookupTable > flippedLookup = nullptr,
const bool havePermissions = false,
const bool haveRestrictions = false )
inline

Constructor.

Parameters
[in]edgesThe edges
[in]partitionA partition of the router's network wrt a k-d tree subdivision scheme
[in]unbuildIsWarningThe flag indicating whether network unbuilds should issue warnings or errors
[in]operationThe operation for a forward graph
[in]flippedOperationThe operation for a backward graph with flipped edges
[in]weightPeriodThe validity duration of one weight interval
[in]lookupThe lookup table for a forward graph
[in]flippedLookupThe lookup table for a backward graph with flipped edges
[in]havePermissionsThe boolean flag indicating whether edge permissions need to be considered or not
[in]haveRestrictionsThe boolean flag indicating whether edge restrictions need to be considered or not

Definition at line 150 of file AFRouter.h.

References MAX2(), myBuilder, SUMOAbstractRouter< E, V >::myEdgeInfos, myFlagInfos, myLastSettledEdgeCell, myLookupTable, myMaxSpeed, myNumQueries, myPartition, myQueryStartTime, myQueryTimeSum, myQueryVisits, myTargetEdgeCellLevel0, myType, myValidUntil, myWeightPeriod, and SUMOAbstractRouter< E, V >::SUMOAbstractRouter().

Referenced by clone().

Here is the caller graph for this function:

◆ AFRouter() [2/3]

template<class E, class N, class V, class M>
AFRouter< E, N, V, M >::AFRouter ( const std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo > & edgeInfos,
const std::vector< E * > & edges,
const KDTreePartition< E, N, V > * partition,
bool unbuildIsWarning,
typename SUMOAbstractRouter< E, V >::Operation operation,
typename SUMOAbstractRouter< FlippedEdge< E, N, V >, V >::Operation flippedOperation,
SUMOTime weightPeriod,
const std::shared_ptr< const LookupTable > lookup = nullptr,
const std::shared_ptr< const FlippedLookupTable > flippedLookup = nullptr,
const bool havePermissions = false,
const bool haveRestrictions = false )
inline

"Normal" cloning constructor for uninitialized or time-dependent instances

Parameters
[in]edgesThe edges
[in]partitionA partition of the router's network wrt a k-d tree subdivision scheme
[in]unbuildIsWarningThe flag indicating whether network unbuilds should issue warnings or errors
[in]operationThe operation for a forward graph
[in]flippedOperationThe operation for a backward graph with flipped edges
[in]weightPeriodThe validity duration of one weight interval
[in]lookupThe lookup table for a forward graph
[in]flippedLookupThe lookup table for a backward graph with flipped edges
[in]havePermissionsThe boolean flag indicating whether edge permissions need to be considered
[in]haveRestrictionsThe boolean flag indicating whether edge restrictions need to be considered

Definition at line 195 of file AFRouter.h.

References edgeInfo(), MAX2(), myBuilder, SUMOAbstractRouter< E, V >::myEdgeInfos, myFlagInfos, myLastSettledEdgeCell, myLookupTable, myMaxSpeed, myNumQueries, myPartition, myQueryStartTime, myQueryTimeSum, myQueryVisits, myTargetEdgeCellLevel0, myType, myValidUntil, myWeightPeriod, and SUMOAbstractRouter< E, V >::SUMOAbstractRouter().

◆ AFRouter() [3/3]

template<class E, class N, class V, class M>
AFRouter< E, N, V, M >::AFRouter ( const std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo > & edgeInfos,
const KDTreePartition< E, N, V > * partition,
bool unbuildIsWarning,
typename SUMOAbstractRouter< E, V >::Operation operation,
std::vector< FlagInfo * > * flagInfos,
const std::shared_ptr< const LookupTable > lookup = nullptr,
const bool havePermissions = false,
const bool haveRestrictions = false )
inline

Special cloning constructor, only for time-independent instances which never rebuild arc infos.

Parameters
[in]edgeInfosThe vector of edge information
[in]partitionA partition of the router's network wrt a k-d tree subdivision scheme
[in]unbuildIsWarningThe flag indicating whether network unbuilds should issue warnings or errors
[in]operationThe operation for a forward graph
[in]flagInfosThe vector of arc flag information
[in]lookupThe lookup table for a forward graph
[in]havePermissionsThe boolean flag indicating whether edge permissions need to be considered
[in]haveRestrictionsThe boolean flag indicating whether edge restrictions need to be considered

Definition at line 240 of file AFRouter.h.

References edgeInfo(), MAX2(), myBuilder, SUMOAbstractRouter< E, V >::myEdgeInfos, myFlagInfos, myLastSettledEdgeCell, myLookupTable, myMaxSpeed, myNumQueries, myPartition, myQueryStartTime, myQueryTimeSum, myQueryVisits, myTargetEdgeCellLevel0, myType, myValidUntil, myWeightPeriod, SUMOAbstractRouter< E, V >::SUMOAbstractRouter(), and SUMOTime_MAX.

◆ ~AFRouter()

template<class E, class N, class V, class M>
virtual AFRouter< E, N, V, M >::~AFRouter ( )
inlinevirtual

Destructor.

Definition at line 272 of file AFRouter.h.

References myBuilder.

Member Function Documentation

◆ buildPathFrom()

template<class E, class V>
void SUMOAbstractRouter< E, V >::buildPathFrom ( const typename SUMOAbstractRouter< E, V >::EdgeInfo * rbegin,
std::vector< const E * > & edges )
inlineinherited

Builds the path from marked edges.

Definition at line 382 of file SUMOAbstractRouter.h.

Referenced by AFRouter< E, N, V, M >::compute(), AStarRouter< _IntermodalEdge, _IntermodalTrip, _MapMatcher >::compute(), DijkstraRouter< _IntermodalEdge, _IntermodalTrip >::compute(), and Node2EdgeRouter< E, N, V, M >::computeNode2Edge().

Here is the caller graph for this function:

◆ clone()

◆ compute() [1/2]

template<class E, class N, class V, class M>
bool AFRouter< E, N, V, M >::compute ( const E * from,
const E * to,
const V *const vehicle,
SUMOTime msTime,
std::vector< const E * > & into,
bool silent = false )
inlinevirtual

Builds the route between the given edges using the minimum travel time param[in] from The from-/start/source/head edge param[in] to The to-/end/target/tail edge param[in] vehicle The vehicle param[in] msTime The start time of the routes in milliseconds param[out] into The vector of edges, into which the solution route is written.

Parameters
[in]silentThe boolean flag indicating whether the method stays silent or puts out messages

Implements SUMOAbstractRouter< E, V >.

Definition at line 391 of file AFRouter.h.

References AFInfo< E >::FlagInfo::arcFlags, SUMOAbstractRouter< E, V >::buildPathFrom(), endQuery(), flag(), flagContext(), SysUtils::getCurrentMillis(), SUMOAbstractRouter< E, V >::getEffort(), Named::getIDSecure(), SUMOAbstractRouter< E, V >::getTravelTime(), init(), MAX2(), MIN2(), SUMOAbstractRouter< E, V >::myAmClean, myBuilder, myComparator, SUMOAbstractRouter< E, V >::myEdgeInfos, SUMOAbstractRouter< E, V >::myErrorMsgHandler, SUMOAbstractRouter< E, V >::myFound, SUMOAbstractRouter< E, V >::myFrontierList, myLookupTable, myMaxSpeed, myValidUntil, myWeightPeriod, reset(), startQuery(), SVC_IGNORING, UNREACHABLE, and SUMOAbstractRouter< E, V >::updateViaEdgeCost().

◆ compute() [2/2]

template<class E, class V>
bool SUMOAbstractRouter< E, V >::compute ( const E * from,
double fromPos,
const E * to,
double toPos,
const V *const vehicle,
SUMOTime msTime,
std::vector< const E * > & into,
bool silent = false )
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 191 of file SUMOAbstractRouter.h.

◆ computeLooped()

template<class E, class V>
bool SUMOAbstractRouter< E, V >::computeLooped ( const E * from,
const E * to,
const V *const vehicle,
SUMOTime msTime,
std::vector< const E * > & into,
bool silent = false )
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 206 of file SUMOAbstractRouter.h.

Referenced by SUMOAbstractRouter< MSEdge, SUMOVehicle >::compute(), MSBaseVehicle::optimizeSkipped(), MSBaseVehicle::reroute(), and MSBaseVehicle::routeAlongStops().

Here is the caller graph for this function:

◆ edgeInfo() [1/2]

template<class E, class N, class V, class M>
SUMOAbstractRouter< E, V >::EdgeInfo * AFRouter< E, N, V, M >::edgeInfo ( const E *const edge)
inline

Returns the edge information for the passed edge.

Parameters
[in]edgeThe edge
Note
Non-const version
Returns
The edge information

Definition at line 103 of file AFRouter.h.

References SUMOAbstractRouter< E, V >::myEdgeInfos.

Referenced by AFRouter(), AFRouter(), and init().

Here is the caller graph for this function:

◆ edgeInfo() [2/2]

template<class E, class N, class V, class M>
const SUMOAbstractRouter< E, V >::EdgeInfo * AFRouter< E, N, V, M >::edgeInfo ( const E *const edge) const
inline

Returns the edge information for the passed edge.

Parameters
[in]edgeThe edge
Note
Const version
Returns
The edge information

Definition at line 112 of file AFRouter.h.

References SUMOAbstractRouter< E, V >::myEdgeInfos.

◆ endQuery()

template<class E, class N, class V, class M>
void AFRouter< E, N, V, M >::endQuery ( int visits)

Stop timer for query time sum.

Definition at line 749 of file AFRouter.h.

References SUMOAbstractRouter< E, V >::endQuery(), SysUtils::getCurrentMillis(), myQueryStartTime, myQueryTimeSum, and myQueryVisits.

Referenced by compute().

Here is the caller graph for this function:

◆ flag()

template<class E, class N, class V, class M>
bool AFRouter< E, N, V, M >::flag ( const FlagInfo * flagInfo,
const std::tuple< int, int, bool > flagContext )
inlinestatic

Returns the arc flag of the edge in flagInfo wrt flagContext.

Parameters
[in]flagInfoThe arc flag information
[in]flagContextThe flag context tuple
Returns
The flag indicating whether the arc flag is set or not, wrt given arc flag information and context

Definition at line 335 of file AFRouter.h.

References AFInfo< E >::FlagInfo::arcFlags, and flagContext().

Referenced by compute().

Here is the caller graph for this function:

◆ flagContext()

template<class E, class N, class V, class M>
std::tuple< int, int, bool > AFRouter< E, N, V, M >::flagContext ( const E * settledEdge,
const E * targetEdge )

Returns the flag context for a route query from given settled edge to the target edge.

Parameters
[in]settledEdgeThe settled edge
[in]targetEdgeThe target edge

Definition at line 680 of file AFRouter.h.

References KDTreePartition< E, N, V >::Cell::contains(), flagContext(), KDTreePartition< E, N, V >::Cell::getSupercell(), KDTreePartition< E, N, V >::Cell::isLeftOrLowerCell(), myLastFlagContext, myLastSettledEdgeCell, myPartition, myTargetEdgeCellLevel0, and sHARCLevel2PartitionLevel().

Referenced by compute(), flag(), and flagContext().

Here is the caller graph for this function:

◆ flagContextNaive()

template<class E, class N, class V, class M>
std::tuple< int, int, bool > AFRouter< E, N, V, M >::flagContextNaive ( const E * settledEdge,
const E * targetEdge )

◆ flags()

template<class E, class N, class V, class M>
std::vector< bool > & AFRouter< E, N, V, M >::flags ( const E * edge)

Returns the arc flags of the passed edge.

Parameters
[in]edgeThe edge
Returns
The arc flags of the given edge

Definition at line 613 of file AFRouter.h.

References myFlagInfos.

◆ getEdgeInfo()

template<class E, class V>
const SUMOAbstractRouter< E, V >::EdgeInfo & SUMOAbstractRouter< E, V >::getEdgeInfo ( int index) const
inlineinherited

Definition at line 177 of file SUMOAbstractRouter.h.

◆ getEffort()

◆ getTravelTime()

template<class E, class V>
double SUMOAbstractRouter< E, V >::getTravelTime ( const E *const e,
const V *const v,
const double t,
const double effort ) const
inlineinherited

◆ getType()

template<class E, class V>
const std::string & SUMOAbstractRouter< E, V >::getType ( ) const
inlineinherited

Definition at line 173 of file SUMOAbstractRouter.h.

◆ init()

template<class E, class N, class V, class M>
void AFRouter< E, N, V, M >::init ( const int edgeID,
const SUMOTime msTime )

Initialize the arc flag router param[in] edgeID The edge id(entifier) param[in] msTime The start time of the routes in milliseconds.

Definition at line 622 of file AFRouter.h.

References edgeInfo(), SUMOAbstractRouter< E, V >::myEdgeInfos, SUMOAbstractRouter< E, V >::myFound, SUMOAbstractRouter< E, V >::myFrontierList, myTargetEdgeCellLevel0, and STEPS2TIME.

Referenced by compute().

Here is the caller graph for this function:

◆ isProhibited()

template<class E, class V>
bool SUMOAbstractRouter< E, V >::isProhibited ( const E *const edge,
const V *const vehicle ) const
inlineinherited

Definition at line 235 of file SUMOAbstractRouter.h.

Referenced by SUMOAbstractRouter< MSEdge, SUMOVehicle >::isValid(), Node2EdgeRouter< E, N, V, M >::recomputeCostsNoLastEdge(), and SUMOAbstractRouter< MSEdge, SUMOVehicle >::setHint().

Here is the caller graph for this function:

◆ isValid()

template<class E, class V>
bool SUMOAbstractRouter< E, V >::isValid ( const std::vector< const E * > & edges,
const V *const v ) const
inlineinherited

Definition at line 268 of file SUMOAbstractRouter.h.

Referenced by RORouteDef::addAlternative().

Here is the caller graph for this function:

◆ partitionLevel2SHARCLevel()

template<class E, class N, class V, class M>
int AFRouter< E, N, V, M >::partitionLevel2SHARCLevel ( int partitionLevel,
int numberOfPartitionLevels )
inlinestatic

Converts a partition level number to a SHARC level number.

Parameters
[in]partitionLevelThe partition level
[in]numberOfPartitionLevelsThe number of partition levels
Returns
The SHARC level number

Definition at line 299 of file AFRouter.h.

Referenced by AFBuild< E, N, V, M >::partitionLevel2SHARCLevel().

Here is the caller graph for this function:

◆ prohibit()

template<class E, class V>
virtual void SUMOAbstractRouter< E, V >::prohibit ( const Prohibitions & toProhibit)
inlinevirtualinherited

◆ recomputeCosts()

◆ recomputeCostsPos()

template<class E, class V>
double SUMOAbstractRouter< E, V >::recomputeCostsPos ( const std::vector< const E * > & edges,
const V *const v,
double fromPos,
double toPos,
SUMOTime msTime,
double * lengthp = nullptr ) const
inlineinherited

Definition at line 295 of file SUMOAbstractRouter.h.

Referenced by MSDispatch::computeDetourTime(), MSBaseVehicle::optimizeSkipped(), MSBaseVehicle::reroute(), and MSBaseVehicle::routeAlongStops().

Here is the caller graph for this function:

◆ reportStatistics()

template<class E, class N, class V, class M>
void AFRouter< E, N, V, M >::reportStatistics ( )

Report query time statistics.

Definition at line 756 of file AFRouter.h.

References elapsedMs2string(), myNumQueries, myQueryTimeSum, myQueryVisits, myType, toString(), and WRITE_MESSAGE.

◆ reset()

template<class E, class N, class V, class M>
virtual void AFRouter< E, N, V, M >::reset ( const V *const vehicle)
inlinevirtual

Trigger arc flags rebuild.

Parameters
[in]Thevehicle

Reimplemented from SUMOAbstractRouter< E, V >.

Definition at line 352 of file AFRouter.h.

References elapsedMs2string(), SysUtils::getCurrentMillis(), myBuilder, myFlagInfos, myValidUntil, and myWeightPeriod.

Referenced by compute().

Here is the caller graph for this function:

◆ resetStatistics()

template<class E, class N, class V, class M>
void AFRouter< E, N, V, M >::resetStatistics ( )

Reset query time statistics.

Definition at line 767 of file AFRouter.h.

References myNumQueries, myQueryStartTime, myQueryTimeSum, and myQueryVisits.

◆ setAutoBulkMode()

template<class E, class V>
void SUMOAbstractRouter< E, V >::setAutoBulkMode ( const bool mode)
inlineinherited

Definition at line 361 of file SUMOAbstractRouter.h.

Referenced by LandmarkLookupTable< E, V, M >::LandmarkLookupTable().

Here is the caller graph for this function:

◆ setBulkMode()

template<class E, class N, class V, class M>
virtual void AFRouter< E, N, V, M >::setBulkMode ( const bool mode)
inlinevirtual

Bulk mode is not supported.

Reimplemented from SUMOAbstractRouter< E, V >.

Definition at line 561 of file AFRouter.h.

References UNUSED_PARAMETER.

◆ setHint()

template<class E, class V>
double SUMOAbstractRouter< E, V >::setHint ( const typename std::vector< const E * >::const_iterator routeBegin,
const typename std::vector< const E * >::const_iterator routeEnd,
const V *const v,
SUMOTime msTime )
inlineinherited

Definition at line 307 of file SUMOAbstractRouter.h.

◆ sHARCLevel2PartitionLevel()

template<class E, class N, class V, class M>
int AFRouter< E, N, V, M >::sHARCLevel2PartitionLevel ( int sHARCLevel,
int numberOfPartitionLevels )
inlinestatic

Converts a SHARC level number to a partition level number.

Parameters
[in]sHARCLevelThe SHARC level
[in]numberOfPartitionLevelsThe number of partition levels
Returns
The partition level number

Definition at line 317 of file AFRouter.h.

Referenced by flagContext(), flagContextNaive(), AFBuild< E, N, V, M >::sHARCLevel2PartitionLevel(), and AFBuilder< E, N, V, M >::sHARCLevel2PartitionLevel().

Here is the caller graph for this function:

◆ startQuery()

template<class E, class N, class V, class M>
void AFRouter< E, N, V, M >::startQuery ( )

Start timer for query time sum.

Definition at line 742 of file AFRouter.h.

References SysUtils::getCurrentMillis(), myNumQueries, myQueryStartTime, and SUMOAbstractRouter< E, V >::startQuery().

Referenced by compute().

Here is the caller graph for this function:

◆ updateViaCost()

template<class E, class V>
void SUMOAbstractRouter< E, V >::updateViaCost ( const E *const prev,
const E *const e,
const V *const v,
double & time,
double & effort,
double & length ) const
inlineinherited

Definition at line 253 of file SUMOAbstractRouter.h.

Referenced by RailwayRouter< E, V >::recomputeCosts(), SUMOAbstractRouter< MSEdge, SUMOVehicle >::recomputeCosts(), Node2EdgeRouter< E, N, V, M >::recomputeCostsNoLastEdge(), and SUMOAbstractRouter< MSEdge, SUMOVehicle >::setHint().

Here is the caller graph for this function:

◆ updateViaEdgeCost()

template<class E, class V>
void SUMOAbstractRouter< E, V >::updateViaEdgeCost ( const E * viaEdge,
const V *const v,
double & time,
double & effort,
double & length ) const
inlineinherited

Field Documentation

◆ myAmClean

template<class E, class V>
bool SUMOAbstractRouter< E, V >::myAmClean
protectedinherited

◆ myAutoBulkMode

template<class E, class V>
bool SUMOAbstractRouter< E, V >::myAutoBulkMode
protectedinherited

whether we are currently trying to detect bulk mode automatically

Definition at line 405 of file SUMOAbstractRouter.h.

◆ myBuilder

template<class E, class N, class V, class M>
AFBuilder<E, N, V, M>* AFRouter< E, N, V, M >::myBuilder
protected

The builder.

Definition at line 582 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), clone(), compute(), reset(), and ~AFRouter().

◆ myBulkMode

template<class E, class V>
bool SUMOAbstractRouter< E, V >::myBulkMode
protectedinherited

whether we are currently operating several route queries in a bulk

Definition at line 402 of file SUMOAbstractRouter.h.

◆ myComparator

template<class E, class N, class V, class M>
EdgeInfoComparator AFRouter< E, N, V, M >::myComparator
protected

The comparator for edge information.

Definition at line 572 of file AFRouter.h.

Referenced by compute().

◆ myEdgeInfos

◆ myErrorMsgHandler

◆ myFlagInfos

template<class E, class N, class V, class M>
std::vector<FlagInfo*>* AFRouter< E, N, V, M >::myFlagInfos
protected

Edge infos containing the associated edge and its arc flags.

Definition at line 568 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), clone(), flags(), and reset().

◆ myFound

◆ myFrontierList

◆ myHavePermissions

template<class E, class V>
const bool SUMOAbstractRouter< E, V >::myHavePermissions
protectedinherited

◆ myHaveRestrictions

template<class E, class V>
const bool SUMOAbstractRouter< E, V >::myHaveRestrictions
protectedinherited

◆ myLastFlagContext

template<class E, class N, class V, class M>
std::tuple<int, int, bool> AFRouter< E, N, V, M >::myLastFlagContext
private

The last flag context.

Definition at line 603 of file AFRouter.h.

Referenced by flagContext().

◆ myLastSettledEdgeCell

template<class E, class N, class V, class M>
const Cell* AFRouter< E, N, V, M >::myLastSettledEdgeCell
private

The cell of the last settled edge.

Definition at line 601 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), and flagContext().

◆ myLookupTable

template<class E, class N, class V, class M>
const std::shared_ptr<const LookupTable> AFRouter< E, N, V, M >::myLookupTable
protected

The lookup table for travel time heuristics.

Definition at line 574 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), clone(), and compute().

◆ myMaxSpeed

template<class E, class N, class V, class M>
double AFRouter< E, N, V, M >::myMaxSpeed
protected

The maximum speed in the network.

Definition at line 576 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), and compute().

◆ myNumQueries

template<class E, class N, class V, class M>
long long int AFRouter< E, N, V, M >::myNumQueries
protected

Definition at line 589 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), reportStatistics(), resetStatistics(), and startQuery().

◆ myOperation

template<class E, class V>
Operation SUMOAbstractRouter< E, V >::myOperation
protectedinherited

◆ myPartition

template<class E, class N, class V, class M>
const KDTreePartition<E, N, V>* AFRouter< E, N, V, M >::myPartition
protected

The partition.

Definition at line 570 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), clone(), flagContext(), and flagContextNaive().

◆ myProhibited

template<class E, class V>
Prohibitions SUMOAbstractRouter< E, V >::myProhibited
protectedinherited

The list of explicitly prohibited edges and estimated end time of prohibition.

Definition at line 417 of file SUMOAbstractRouter.h.

Referenced by RailwayRouter< E, V >::_compute(), and RailwayRouter< E, V >::prohibit().

◆ myQueryStartTime

template<class E, class N, class V, class M>
long long int AFRouter< E, N, V, M >::myQueryStartTime
protected

The time spent querying in milliseconds.

Note
The ones in SUMOAbstractRouter are private - introduced to reset stats / recalculate before destruction

Definition at line 592 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), endQuery(), resetStatistics(), and startQuery().

◆ myQueryTimeSum

template<class E, class N, class V, class M>
long long int AFRouter< E, N, V, M >::myQueryTimeSum
protected

Definition at line 593 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), endQuery(), reportStatistics(), and resetStatistics().

◆ myQueryVisits

template<class E, class N, class V, class M>
long long int AFRouter< E, N, V, M >::myQueryVisits
protected

Counters for performance logging.

Note
The ones in SUMOAbstractRouter are private - introduced to reset stats / recalculate before destruction

Definition at line 588 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), endQuery(), reportStatistics(), and resetStatistics().

◆ myTargetEdgeCellLevel0

template<class E, class N, class V, class M>
const Cell* AFRouter< E, N, V, M >::myTargetEdgeCellLevel0
private

The cell of the target edge at SHARC level 0.

Definition at line 605 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), flagContext(), and init().

◆ myTTOperation

template<class E, class V>
Operation SUMOAbstractRouter< E, V >::myTTOperation
protectedinherited

The object's operation to perform for travel times.

Definition at line 399 of file SUMOAbstractRouter.h.

◆ myType

template<class E, class N, class V, class M>
const std::string AFRouter< E, N, V, M >::myType
protected

The type of this router.

Note
The one in SUMOAbstractRouter is private, required for more flexible performance logging (see below)

Definition at line 585 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), and reportStatistics().

◆ myValidUntil

template<class E, class N, class V, class M>
SUMOTime AFRouter< E, N, V, M >::myValidUntil
protected

The validity duration of the current flag infos (exclusive).

Definition at line 580 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), compute(), and reset().

◆ myWeightPeriod

template<class E, class N, class V, class M>
const SUMOTime AFRouter< E, N, V, M >::myWeightPeriod
protected

The validity duration of one weight interval.

Definition at line 578 of file AFRouter.h.

Referenced by AFRouter(), AFRouter(), AFRouter(), clone(), compute(), and reset().


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