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.
 

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

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

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

◆ ~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 AFRouter< E, N, V, M >::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, M >::compute(), AStarRouter< E, V, M >::compute(), DijkstraRouter< E, V >::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(), AFRouter< E, N, V, M >::endQuery(), AFRouter< E, N, V, M >::flag(), AFRouter< E, N, V, M >::flagContext(), SysUtils::getCurrentMillis(), SUMOAbstractRouter< E, V >::getEffort(), Named::getIDSecure(), SUMOAbstractRouter< E, V >::getTravelTime(), MsgHandler::inform(), MsgHandler::informf(), AFRouter< E, N, V, M >::init(), MAX2(), MIN2(), SUMOAbstractRouter< E, V >::myAmClean, AFRouter< E, N, V, M >::myBuilder, AFRouter< E, N, V, M >::myComparator, SUMOAbstractRouter< E, V >::myEdgeInfos, SUMOAbstractRouter< E, V >::myErrorMsgHandler, SUMOAbstractRouter< E, V >::myFound, SUMOAbstractRouter< E, V >::myFrontierList, AFRouter< E, N, V, M >::myLookupTable, AFRouter< E, N, V, M >::myMaxSpeed, AFRouter< E, N, V, M >::myValidUntil, AFRouter< E, N, V, M >::myWeightPeriod, AFRouter< E, N, V, M >::reset(), AFRouter< E, N, V, M >::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 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 , 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< E, N, V, M >::AFRouter(), and AFRouter< E, N, V, M >::AFRouter().

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(), and SysUtils::getCurrentMillis().

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

Here is the caller graph for this function:

◆ flag()

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

Referenced by AFRouter< E, N, V, M >::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(), KDTreePartition< E, N, V >::Cell::getSupercell(), and KDTreePartition< E, N, V >::Cell::isLeftOrLowerCell().

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

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.

◆ 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 , 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 STEPS2TIME.

Referenced by AFRouter< E, N, V, M >::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 , class M >
static 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 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, M >::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 , class M >
void AFRouter< E, N, V, M >::reportStatistics ( )

Report query time statistics.

Definition at line 756 of file AFRouter.h.

References elapsedMs2string(), 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(), AFRouter< E, N, V, M >::myBuilder, AFRouter< E, N, V, M >::myFlagInfos, AFRouter< E, N, V, M >::myValidUntil, and AFRouter< E, N, V, M >::myWeightPeriod.

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

◆ 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, 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

◆ sHARCLevel2PartitionLevel()

template<class E , class N , class V , class M >
static 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 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(), and SUMOAbstractRouter< E, V >::startQuery().

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

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 , class M >
AFBuilder<E, N, V, M>* AFRouter< E, N, V, M >::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, M >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setBulkMode().

◆ 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 AFRouter< E, N, V, M >::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< E, N, V, M >::clone(), and AFRouter< E, N, V, M >::reset().

◆ myFound

◆ myFrontierList

◆ myHavePermissions

◆ myHaveRestrictions

◆ 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.

◆ 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.

◆ 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< E, N, V, M >::clone(), and AFRouter< E, N, V, M >::compute().

◆ myMaxSpeed

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

◆ 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.

◆ myOperation

◆ 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< E, N, V, M >::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 , 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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 , 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.

◆ 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< E, N, V, M >::compute(), and AFRouter< E, N, V, M >::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< E, N, V, M >::clone(), AFRouter< E, N, V, M >::compute(), and AFRouter< E, N, V, M >::reset().


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