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

#include <CHBuilder.h>

Collaboration diagram for CHBuilder< E, V >:
[legend]

Data Structures

class  CHConnection
 Forward/backward connection with associated FORWARD cost. More...
 
class  CHInfo
 
class  CHInfoComparator
 
class  Connection
 Forward/backward connection with associated forward/backward cost. More...
 
struct  Hierarchy
 
struct  Shortcut
 

Public Types

typedef std::pair< const E *, const E * > ConstEdgePair
 
typedef std::map< ConstEdgePair, const E * > ShortcutVia
 

Public Member Functions

HierarchybuildContractionHierarchy (SUMOTime time, const V *const vehicle, const SUMOAbstractRouter< E, V > *effortProvider)
 
 CHBuilder (const std::vector< E * > &edges, bool unbuildIsWarning, const SUMOVehicleClass svc, bool validatePermissions)
 Constructor.
 
virtual ~CHBuilder ()
 Destructor.
 

Private Types

typedef std::pair< const CHConnection *, const CHConnection * > CHConnectionPair
 
typedef std::vector< CHConnectionPairCHConnectionPairs
 
typedef std::vector< CHConnectionCHConnections
 

Private Member Functions

void disconnect (CHConnections &connections, CHInfo *other)
 remove all connections to/from the given edge (assume it exists only once)
 
CHInfogetCHInfo (const E *const edge)
 
CHBuilderoperator= (const CHBuilder &s)
 Invalidated assignment operator.
 
void synchronize (CHInfo &info, double time, const V *const vehicle, const SUMOAbstractRouter< E, V > *effortProvider)
 copy connections from the original net (modified destructively during contraction)
 
bool tryUpdateFront (std::vector< CHInfo * > &queue)
 tries to update the priority of the first edge
 

Private Attributes

std::vector< CHInfomyCHInfos
 static vector for lookup
 
CHInfoComparator myCmp
 Comparator for contraction priority.
 
const std::vector< E * > & myEdges
 all edges with numerical ids
 
MsgHandler *const myErrorMsgHandler
 the handler for routing errors
 
SPTree< CHInfo, CHConnection > * mySPTree
 the shortest path tree to use when searching for shortcuts
 
const SUMOVehicleClass mySVC
 the permissions for which the hierarchy was constructed
 
int myUpdateCount
 counters for performance logging
 

Detailed Description

template<class E, class V>
class CHBuilder< E, V >

Definition at line 62 of file CHBuilder.h.

Member Typedef Documentation

◆ CHConnectionPair

template<class E , class V >
typedef std::pair<const CHConnection*, const CHConnection*> CHBuilder< E, V >::CHConnectionPair
private

Definition at line 219 of file CHBuilder.h.

◆ CHConnectionPairs

template<class E , class V >
typedef std::vector<CHConnectionPair> CHBuilder< E, V >::CHConnectionPairs
private

Definition at line 220 of file CHBuilder.h.

◆ CHConnections

template<class E , class V >
typedef std::vector<CHConnection> CHBuilder< E, V >::CHConnections
private

Definition at line 218 of file CHBuilder.h.

◆ ConstEdgePair

template<class E , class V >
typedef std::pair<const E*, const E*> CHBuilder< E, V >::ConstEdgePair

Definition at line 76 of file CHBuilder.h.

◆ ShortcutVia

template<class E , class V >
typedef std::map<ConstEdgePair, const E*> CHBuilder< E, V >::ShortcutVia

Definition at line 77 of file CHBuilder.h.

Constructor & Destructor Documentation

◆ CHBuilder()

template<class E , class V >
CHBuilder< E, V >::CHBuilder ( const std::vector< E * > &  edges,
bool  unbuildIsWarning,
const SUMOVehicleClass  svc,
bool  validatePermissions 
)
inline

Constructor.

Parameters
[in]validatePermissionsWhether a multi-permission hierarchy shall be built If set to false, the net is pruned in synchronize() and the hierarchy is tailored to the svc

Definition at line 89 of file CHBuilder.h.

References CHBuilder< E, V >::myCHInfos.

◆ ~CHBuilder()

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

Destructor.

Definition at line 103 of file CHBuilder.h.

References CHBuilder< E, V >::mySPTree.

Member Function Documentation

◆ buildContractionHierarchy()

◆ disconnect()

template<class E , class V >
void CHBuilder< E, V >::disconnect ( CHConnections connections,
CHInfo other 
)
inlineprivate

remove all connections to/from the given edge (assume it exists only once)

Definition at line 456 of file CHBuilder.h.

Referenced by CHBuilder< E, V >::buildContractionHierarchy().

Here is the caller graph for this function:

◆ getCHInfo()

template<class E , class V >
CHInfo * CHBuilder< E, V >::getCHInfo ( const E *const  edge)
inlineprivate

Definition at line 416 of file CHBuilder.h.

References CHBuilder< E, V >::myCHInfos.

Referenced by CHBuilder< E, V >::buildContractionHierarchy(), and CHBuilder< E, V >::synchronize().

Here is the caller graph for this function:

◆ operator=()

template<class E , class V >
CHBuilder & CHBuilder< E, V >::operator= ( const CHBuilder< E, V > &  s)
private

Invalidated assignment operator.

◆ synchronize()

template<class E , class V >
void CHBuilder< E, V >::synchronize ( CHInfo info,
double  time,
const V *const  vehicle,
const SUMOAbstractRouter< E, V > *  effortProvider 
)
inlineprivate

copy connections from the original net (modified destructively during contraction)

Definition at line 422 of file CHBuilder.h.

References CHBuilder< E, V >::CHInfo::approaching, CHBuilder< E, V >::CHInfo::edge, CHBuilder< E, V >::CHInfo::followers, CHBuilder< E, V >::getCHInfo(), SUMOAbstractRouter< E, V >::getEffort(), CHBuilder< E, V >::mySPTree, and CHBuilder< E, V >::mySVC.

Referenced by CHBuilder< E, V >::buildContractionHierarchy().

Here is the caller graph for this function:

◆ tryUpdateFront()

template<class E , class V >
bool CHBuilder< E, V >::tryUpdateFront ( std::vector< CHInfo * > &  queue)
inlineprivate

tries to update the priority of the first edge

Returns
wether updating changed the first edge

Definition at line 469 of file CHBuilder.h.

References CHBuilder< E, V >::CHInfo::edge, CHBuilder< E, V >::myCmp, CHBuilder< E, V >::mySPTree, CHBuilder< E, V >::myUpdateCount, and CHBuilder< E, V >::CHInfo::updatePriority().

Referenced by CHBuilder< E, V >::buildContractionHierarchy().

Here is the caller graph for this function:

Field Documentation

◆ myCHInfos

template<class E , class V >
std::vector<CHInfo> CHBuilder< E, V >::myCHInfos
private

static vector for lookup

Definition at line 503 of file CHBuilder.h.

Referenced by CHBuilder< E, V >::buildContractionHierarchy(), CHBuilder< E, V >::CHBuilder(), and CHBuilder< E, V >::getCHInfo().

◆ myCmp

template<class E , class V >
CHInfoComparator CHBuilder< E, V >::myCmp
private

Comparator for contraction priority.

Definition at line 506 of file CHBuilder.h.

Referenced by CHBuilder< E, V >::buildContractionHierarchy(), and CHBuilder< E, V >::tryUpdateFront().

◆ myEdges

template<class E , class V >
const std::vector<E*>& CHBuilder< E, V >::myEdges
private

all edges with numerical ids

Definition at line 497 of file CHBuilder.h.

◆ myErrorMsgHandler

template<class E , class V >
MsgHandler* const CHBuilder< E, V >::myErrorMsgHandler
private

the handler for routing errors

Definition at line 500 of file CHBuilder.h.

◆ mySPTree

template<class E , class V >
SPTree<CHInfo, CHConnection>* CHBuilder< E, V >::mySPTree
private

the shortest path tree to use when searching for shortcuts

Definition at line 509 of file CHBuilder.h.

Referenced by CHBuilder< E, V >::buildContractionHierarchy(), CHBuilder< E, V >::synchronize(), CHBuilder< E, V >::tryUpdateFront(), and CHBuilder< E, V >::~CHBuilder().

◆ mySVC

template<class E , class V >
const SUMOVehicleClass CHBuilder< E, V >::mySVC
private

the permissions for which the hierarchy was constructed

Definition at line 512 of file CHBuilder.h.

Referenced by CHBuilder< E, V >::buildContractionHierarchy(), and CHBuilder< E, V >::synchronize().

◆ myUpdateCount

template<class E , class V >
int CHBuilder< E, V >::myUpdateCount
private

counters for performance logging

Definition at line 515 of file CHBuilder.h.

Referenced by CHBuilder< E, V >::buildContractionHierarchy(), and CHBuilder< E, V >::tryUpdateFront().


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