SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BulkStarRouter< E, V, PF > Class Template Reference

#include <BulkStarRouter.h>

Inheritance diagram for BulkStarRouter< E, V, PF >:
SUMOAbstractRouter< E, V > PF

Data Structures

struct  EdgeInfo
 
class  EdgeInfoComparator
 

Public Types

typedef SUMOReal(E::* MinTTOperation )(const V *const) const
 
typedef SUMOReal(* Operation )(const E *const, const V *const, SUMOReal)
 Type of the function that is used to retrieve the edge effort. More...
 

Public Member Functions

void buildPathFrom (EdgeInfo *rbegin, std::vector< const E * > &edges)
 Builds the path from marked edges. More...
 
 BulkStarRouter (size_t noE, bool unbuildIsWarning, Operation operation, MinTTOperation minTTOperation)
 Constructor. More...
 
virtual SUMOAbstractRouter< E,
V > * 
clone () const
 
void compute (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into)
 Builds the route between the given edges using the minimum travel time. More...
 
void endQuery (int visits)
 
SUMOReal getEffort (const E *const e, const V *const v, SUMOReal t) const
 
SUMOReal getMinEffort (const E *const e, const V *const v) const
 
void init ()
 
void prepare (const E *destination, const V *fastestVehicle, bool skip)
 Builds a complete shorteset path tree in the (static) reverse graph from destination (Dijkstra until all EdgeInfos are visited) More...
 
SUMOReal recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime) const
 
void startQuery ()
 
virtual ~BulkStarRouter ()
 Destructor. More...
 

Protected Attributes

Operation myOperation
 The object's operation to perform. More...
 

Private Types

enum  Prepared { NO, YES, YES_EXACT }
 

Private Attributes

EdgeInfoComparator myComparator
 
std::vector< EdgeInfomyEdgeInfos
 The container of edge information. More...
 
MsgHandler *const myErrorMsgHandler
 the handler for routing errors More...
 
std::vector< EdgeInfo * > myFound
 list of visited Edges (for resetting) More...
 
std::vector< EdgeInfo * > myFrontier
 A container for reusage of the min edge heap. More...
 
MinTTOperation myMinTTOperation
 
const E * myPreparedDestination
 

Detailed Description

template<class E, class V, class PF>
class BulkStarRouter< E, V, PF >

Definition at line 74 of file BulkStarRouter.h.

Member Typedef Documentation

template<class E , class V , class PF >
typedef SUMOReal(E::* BulkStarRouter< E, V, PF >::MinTTOperation)(const V *const) const

Definition at line 79 of file BulkStarRouter.h.

template<class E , class V , class PF >
typedef SUMOReal(* BulkStarRouter< E, V, PF >::Operation)(const E *const, const V *const, SUMOReal)

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

Definition at line 78 of file BulkStarRouter.h.

Member Enumeration Documentation

template<class E , class V , class PF >
enum BulkStarRouter::Prepared
private
Enumerator
NO 
YES 
YES_EXACT 

Definition at line 355 of file BulkStarRouter.h.

Constructor & Destructor Documentation

template<class E , class V , class PF >
BulkStarRouter< E, V, PF >::BulkStarRouter ( size_t  noE,
bool  unbuildIsWarning,
Operation  operation,
MinTTOperation  minTTOperation 
)
inline

Constructor.

Definition at line 83 of file BulkStarRouter.h.

References BulkStarRouter< E, V, PF >::myEdgeInfos.

template<class E , class V , class PF >
virtual BulkStarRouter< E, V, PF >::~BulkStarRouter ( )
inlinevirtual

Destructor.

Definition at line 94 of file BulkStarRouter.h.

Member Function Documentation

template<class E , class V , class PF >
void BulkStarRouter< E, V, PF >::buildPathFrom ( EdgeInfo rbegin,
std::vector< const E * > &  edges 
)
inline

Builds the path from marked edges.

Definition at line 345 of file BulkStarRouter.h.

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

Referenced by BulkStarRouter< E, V, PF >::compute().

template<class E , class V , class PF >
SUMOReal BulkStarRouter< E, V, PF >::getMinEffort ( const E *const  e,
const V *const  v 
) const
inline
template<class E , class V , class PF >
void BulkStarRouter< E, V, PF >::init ( )
inline
template<class E , class V , class PF >
void BulkStarRouter< E, V, PF >::prepare ( const E *  destination,
const V *  fastestVehicle,
bool  skip 
)
inlinevirtual

Builds a complete shorteset path tree in the (static) reverse graph from destination (Dijkstra until all EdgeInfos are visited)

Parameters
[in]destinationThe common destination for the following routes
[in]fastestVehicleAn optimistic vehicle (fastest, least restriction) for the following routes
[in]skipWhether to shortcut the preparation (query uses euclidean heuristic)

Reimplemented from SUMOAbstractRouter< E, V >.

Definition at line 167 of file BulkStarRouter.h.

References BulkStarRouter< E, V, PF >::EdgeInfo::edge, BulkStarRouter< E, V, PF >::getMinEffort(), BulkStarRouter< E, V, PF >::EdgeInfo::heuristicTime, max, BulkStarRouter< E, V, PF >::EdgeInfo::minRemaining, BulkStarRouter< E, V, PF >::myComparator, BulkStarRouter< E, V, PF >::myEdgeInfos, BulkStarRouter< E, V, PF >::myFound, BulkStarRouter< E, V, PF >::myFrontier, BulkStarRouter< E, V, PF >::myPreparedDestination, BulkStarRouter< E, V, PF >::EdgeInfo::prev, SUMOReal, BulkStarRouter< E, V, PF >::EdgeInfo::traveltime, and BulkStarRouter< E, V, PF >::EdgeInfo::visited.

template<class E , class V , class PF >
SUMOReal BulkStarRouter< E, V, PF >::recomputeCosts ( const std::vector< const E * > &  edges,
const V *const  v,
SUMOTime  msTime 
) const
inlinevirtual

Field Documentation

template<class E , class V , class PF >
EdgeInfoComparator BulkStarRouter< E, V, PF >::myComparator
private
template<class E , class V , class PF >
std::vector<EdgeInfo> BulkStarRouter< E, V, PF >::myEdgeInfos
private
template<class E , class V , class PF >
MsgHandler* const BulkStarRouter< E, V, PF >::myErrorMsgHandler
private

the handler for routing errors

Definition at line 372 of file BulkStarRouter.h.

Referenced by BulkStarRouter< E, V, PF >::clone(), and BulkStarRouter< E, V, PF >::compute().

template<class E , class V , class PF >
std::vector<EdgeInfo*> BulkStarRouter< E, V, PF >::myFound
private

list of visited Edges (for resetting)

Definition at line 367 of file BulkStarRouter.h.

Referenced by BulkStarRouter< E, V, PF >::compute(), BulkStarRouter< E, V, PF >::init(), and BulkStarRouter< E, V, PF >::prepare().

template<class E , class V , class PF >
std::vector<EdgeInfo*> BulkStarRouter< E, V, PF >::myFrontier
private

A container for reusage of the min edge heap.

Definition at line 365 of file BulkStarRouter.h.

Referenced by BulkStarRouter< E, V, PF >::compute(), BulkStarRouter< E, V, PF >::init(), and BulkStarRouter< E, V, PF >::prepare().

template<class E , class V , class PF >
MinTTOperation BulkStarRouter< E, V, PF >::myMinTTOperation
private
template<class E , class V , class PF >
const E* BulkStarRouter< E, V, PF >::myPreparedDestination
private

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