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

#include <AFRouter.h>

Inheritance diagram for AFRouter< E, N, V >:
[legend]
Collaboration diagram for AFRouter< E, N, V >:
[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.
 

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 >::EdgeInfo * edgeInfo (const E *const edge)
 Returns the edge information for the passed edge.
 
const SUMOAbstractRouter< E, V >::EdgeInfo * edgeInfo (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 >::EdgeInfo & getEdgeInfo (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 std::vector< E * > &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 > * 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 >::EdgeInfo > myEdgeInfos
 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.
 
std::vector< E * > myProhibited
 The list of explicitly prohibited edges.
 
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 AFRouter< E, N, V >

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 >
typedef KDTreePartition<E,N,V>::Cell AFRouter< E, N, V >::Cell

Definition at line 94 of file AFRouter.h.

◆ FlagInfo

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

Definition at line 95 of file AFRouter.h.

◆ FlippedLookupTable

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

Definition at line 96 of file AFRouter.h.

◆ LookupTable

template<class E , class N , class V >
typedef AbstractLookupTable<E, V> AFRouter< E, N, V >::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 92 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ AFRouter() [1/3]

template<class E , class N , class V >
AFRouter< E, N, V >::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(), SUMOAbstractRouter< E, V >::myEdgeInfos, and AFRouter< E, N, V >::myMaxSpeed.

◆ AFRouter() [2/3]

template<class E , class N , class V >
AFRouter< E, N, V >::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 SUMOAbstractRouter< E, V >::EdgeInfo::edge, AFRouter< E, N, V >::edgeInfo(), MAX2(), SUMOAbstractRouter< E, V >::myEdgeInfos, and AFRouter< E, N, V >::myMaxSpeed.

◆ AFRouter() [3/3]

template<class E , class N , class V >
AFRouter< E, N, V >::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 SUMOAbstractRouter< E, V >::EdgeInfo::edge, AFRouter< E, N, V >::edgeInfo(), MAX2(), SUMOAbstractRouter< E, V >::myEdgeInfos, and AFRouter< E, N, V >::myMaxSpeed.

◆ ~AFRouter()

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

Destructor.

Definition at line 272 of file AFRouter.h.

References AFRouter< E, N, V >::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 364 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::EdgeInfo::edge, and SUMOAbstractRouter< E, V >::EdgeInfo::prev.

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

Here is the caller graph for this function:

◆ clone()

◆ compute() [1/2]

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

◆ 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 183 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::computeLooped().

◆ 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 198 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::compute(), MsgHandler::informf(), SUMOAbstractRouter< E, V >::myErrorMsgHandler, SUMOAbstractRouter< E, V >::recomputeCosts(), SVC_IGNORING, and TL.

Referenced by SUMOAbstractRouter< E, V >::compute(), and MSBaseVehicle::reroute().

Here is the caller graph for this function:

◆ edgeInfo() [1/2]

template<class E , class N , class V >
SUMOAbstractRouter< E, V >::EdgeInfo * AFRouter< E, N, V >::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< E, N, V >::AFRouter(), and AFRouter< E, N, V >::AFRouter().

Here is the caller graph for this function:

◆ edgeInfo() [2/2]

template<class E , class N , class V >
const SUMOAbstractRouter< E, V >::EdgeInfo * AFRouter< E, N, V >::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 >
void AFRouter< E, N, V >::endQuery ( int  visits)

Stop timer for query time sum.

Definition at line 743 of file AFRouter.h.

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

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

Here is the caller graph for this function:

◆ flag()

template<class E , class N , class V >
static bool AFRouter< E, N, V >::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 AFRouter< E, N, V >::flagContext().

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

Here is the caller graph for this function:

◆ flagContext()

template<class E , class N , class V >
std::tuple< int, int, bool > AFRouter< E, N, V >::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 674 of file AFRouter.h.

References KDTreePartition< E, N, V >::Cell::contains(), KDTreePartition< E, N, V >::Cell::getSupercell(), and KDTreePartition< E, N, V >::Cell::isLeftOrLowerCell().

Referenced by AFRouter< E, N, V >::compute(), and AFRouter< E, N, V >::flag().

Here is the caller graph for this function:

◆ flagContextNaive()

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

◆ flags()

template<class E , class N , class V >
std::vector< bool > & AFRouter< E, N, V >::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 607 of file AFRouter.h.

◆ getEdgeInfo()

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

Definition at line 169 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myEdgeInfos.

◆ 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 165 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myType.

◆ init()

template<class E , class N , class V >
void AFRouter< E, N, V >::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 616 of file AFRouter.h.

References STEPS2TIME.

Referenced by AFRouter< E, N, V >::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

◆ 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 260 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::isProhibited().

Referenced by RORouteDef::addAlternative().

Here is the caller graph for this function:

◆ partitionLevel2SHARCLevel()

template<class E , class N , class V >
static int AFRouter< E, N, V >::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 >::partitionLevel2SHARCLevel().

Here is the caller graph for this function:

◆ prohibit()

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

Reimplemented in CHRouter< E, V >, CHRouterWrapper< E, V >, IntermodalRouter< E, L, N, V >, PedestrianRouter< E, L, N, V >, and RailwayRouter< E, V >.

Definition at line 352 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myEdgeInfos, and SUMOAbstractRouter< E, V >::myProhibited.

Referenced by AFBuild< E, N, V >::AFBuild(), IntermodalRouter< E, L, N, V >::prohibit(), PedestrianRouter< E, L, N, V >::prohibit(), and RailwayRouter< E, V >::prohibit().

Here is the caller graph for this function:

◆ 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 287 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::getEffort(), SUMOAbstractRouter< E, V >::recomputeCosts(), and STEPS2TIME.

Referenced by MSDispatch::computeDetourTime().

Here is the caller graph for this function:

◆ reportStatistics()

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

Report query time statistics.

Definition at line 750 of file AFRouter.h.

References elapsedMs2string(), toString(), and WRITE_MESSAGE.

◆ reset()

template<class E , class N , class V >
virtual void AFRouter< E, N, V >::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(), AFRouter< E, N, V >::myBuilder, AFRouter< E, N, V >::myFlagInfos, AFRouter< E, N, V >::myValidUntil, and AFRouter< E, N, V >::myWeightPeriod.

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

Here is the caller graph for this function:

◆ resetStatistics()

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

Reset query time statistics.

Definition at line 761 of file AFRouter.h.

◆ setAutoBulkMode()

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

Definition at line 348 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myAutoBulkMode.

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

Here is the caller graph for this function:

◆ setBulkMode()

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

Bulk mode is not supported.

Reimplemented from SUMOAbstractRouter< E, V >.

Definition at line 555 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

◆ sHARCLevel2PartitionLevel()

template<class E , class N , class V >
static int AFRouter< E, N, V >::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 AFBuild< E, N, V >::sHARCLevel2PartitionLevel(), and AFBuilder< E, N, V >::sHARCLevel2PartitionLevel().

Here is the caller graph for this function:

◆ startQuery()

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

Start timer for query time sum.

Definition at line 736 of file AFRouter.h.

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

Referenced by AFRouter< E, N, V >::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

◆ 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

Definition at line 235 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::getEffort(), and SUMOAbstractRouter< E, V >::getTravelTime().

Referenced by AFRouter< E, N, V >::compute(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), Node2EdgeRouter< E, N, V >::computeNode2Edge(), Node2EdgeRouter< E, N, V >::computeNode2Edges(), and SUMOAbstractRouter< E, V >::updateViaCost().

Here is the caller graph for this function:

Field Documentation

◆ myAmClean

◆ 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 387 of file SUMOAbstractRouter.h.

Referenced by DijkstraRouter< E, V >::clone(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setAutoBulkMode().

◆ myBuilder

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

◆ 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 384 of file SUMOAbstractRouter.h.

Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setBulkMode().

◆ myComparator

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

The comparator for edge information.

Definition at line 566 of file AFRouter.h.

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

◆ myEdgeInfos

◆ myErrorMsgHandler

◆ myFlagInfos

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

Edge infos containing the associated edge and its arc flags.

Definition at line 562 of file AFRouter.h.

Referenced by AFRouter< E, N, V >::clone(), and AFRouter< E, N, V >::reset().

◆ myFound

◆ myFrontierList

◆ myHavePermissions

◆ myHaveRestrictions

◆ myLastFlagContext

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

The last flag context.

Definition at line 597 of file AFRouter.h.

◆ myLastSettledEdgeCell

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

The cell of the last settled edge.

Definition at line 595 of file AFRouter.h.

◆ myLookupTable

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

The lookup table for travel time heuristics.

Definition at line 568 of file AFRouter.h.

Referenced by AFRouter< E, N, V >::clone(), and AFRouter< E, N, V >::compute().

◆ myMaxSpeed

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

The maximum speed in the network.

Definition at line 570 of file AFRouter.h.

Referenced by AFRouter< E, N, V >::AFRouter(), AFRouter< E, N, V >::AFRouter(), AFRouter< E, N, V >::AFRouter(), and AFRouter< E, N, V >::compute().

◆ myNumQueries

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

Definition at line 583 of file AFRouter.h.

◆ myOperation

◆ myPartition

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

The partition.

Definition at line 564 of file AFRouter.h.

Referenced by AFRouter< E, N, V >::clone().

◆ myProhibited

template<class E , class V >
std::vector<E*> SUMOAbstractRouter< E, V >::myProhibited
protectedinherited

The list of explicitly prohibited edges.

Definition at line 399 of file SUMOAbstractRouter.h.

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

◆ myQueryStartTime

template<class E , class N , class V >
long long int AFRouter< E, N, V >::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 586 of file AFRouter.h.

◆ myQueryTimeSum

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

Definition at line 587 of file AFRouter.h.

◆ myQueryVisits

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

Counters for performance logging.

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

Definition at line 582 of file AFRouter.h.

◆ myTargetEdgeCellLevel0

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

The cell of the target edge at SHARC level 0.

Definition at line 599 of file AFRouter.h.

◆ myTTOperation

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

The object's operation to perform for travel times.

Definition at line 381 of file SUMOAbstractRouter.h.

Referenced by DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< E, V >::getTravelTime().

◆ myType

template<class E , class N , class V >
const std::string AFRouter< E, N, V >::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 579 of file AFRouter.h.

◆ myValidUntil

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

The validity duration of the current flag infos (exclusive)

Definition at line 574 of file AFRouter.h.

Referenced by AFRouter< E, N, V >::compute(), and AFRouter< E, N, V >::reset().

◆ myWeightPeriod

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

The validity duration of one weight interval.

Definition at line 572 of file AFRouter.h.

Referenced by AFRouter< E, N, V >::clone(), AFRouter< E, N, V >::compute(), and AFRouter< E, N, V >::reset().


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