Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ROJTRRouter Class Referenceabstract

Computes routes using junction turning percentages. More...

#include <ROJTRRouter.h>

Inheritance diagram for ROJTRRouter:
[legend]
Collaboration diagram for ROJTRRouter:
[legend]

Public Types

typedef double(* Operation) (const ROEdge *const, const ROVehicle *const, double)
 Type of the function that is used to retrieve the edge effort.
 

Public Member Functions

void buildPathFrom (const typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo *rbegin, std::vector< const ROEdge * > &edges)
 Builds the path from marked edges.
 
virtual SUMOAbstractRouter< ROEdge, ROVehicle > * clone ()
 
virtual bool compute (const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime msTime, std::vector< const ROEdge * > &into, bool silent=false)=0
 Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme.
 
bool compute (const ROEdge *from, double fromPos, const ROEdge *to, double toPos, const ROVehicle *const vehicle, SUMOTime msTime, std::vector< const ROEdge * > &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 ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime msTime, std::vector< const ROEdge * > &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.
 
void endQuery (int visits)
 
const SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo & getEdgeInfo (int index) const
 
double getEffort (const ROEdge *const e, const ROVehicle *const v, double t) const
 
double getTravelTime (const ROEdge *const e, const ROVehicle *const v, const double t, const double effort) const
 
const std::string & getType () const
 
void init (const int edgeID, const SUMOTime msTime)
 
bool isProhibited (const ROEdge *const edge, const ROVehicle *const vehicle) const
 
bool isValid (const std::vector< const ROEdge * > &edges, const ROVehicle *const v) const
 
virtual void prohibit (const std::vector< ROEdge * > &toProhibit)
 
virtual double recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime msTime, double *lengthp=nullptr) const
 
double recomputeCostsPos (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const
 
virtual void reset (const ROVehicle *const vehicle)
 reset internal caches, used by CHRouter
 
 ROJTRRouter (bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops, bool discountSources)
 Constructor.
 
void setAutoBulkMode (const bool mode)
 
virtual void setBulkMode (const bool mode)
 
double setHint (const typename std::vector< const ROEdge * >::const_iterator routeBegin, const typename std::vector< const ROEdge * >::const_iterator routeEnd, const ROVehicle *const v, SUMOTime msTime)
 
void startQuery ()
 
void updateViaCost (const ROEdge *const prev, const ROEdge *const e, const ROVehicle *const v, double &time, double &effort, double &length) const
 
void updateViaEdgeCost (const ROEdge *viaEdge, const ROVehicle *const v, double &time, double &effort, double &length) const
 
 ~ROJTRRouter ()
 Destructor.
 
Implementatios of SUMOAbstractRouter
bool compute (const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into, bool silent=false)
 Computes a route.
 

Protected Attributes

bool myAmClean
 whether we are already initialized
 
bool myAutoBulkMode
 whether we are currently trying to detect bulk mode automatically
 
bool myBulkMode
 whether we are currently operating several route queries in a bulk
 
std::vector< typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo > myEdgeInfos
 The container of edge information.
 
MsgHandler *const myErrorMsgHandler
 the handler for routing errors
 
std::vector< typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo * > myFound
 list of visited Edges (for resetting)
 
std::vector< typename SUMOAbstractRouter< ROEdge, ROVehicle >::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
 
Operation myOperation
 The object's operation to perform.
 
std::vector< ROEdge * > myProhibited
 The list of explicitly prohibited edges.
 
Operation myTTOperation
 The object's operation to perform for travel times.
 

Private Attributes

const bool myAcceptAllDestination
 Whether all edges may be used as route end.
 
const bool myAllowLoops
 Whether a vehicle may reuse a road.
 
const bool myDiscountSources
 Whether upstream flows shall be discounted from source flows.
 
const bool myIgnoreClasses
 Whether vehicle class information shall be ignored.
 
const int myMaxEdges
 The maximum number of edges a route may have.
 
long long int myNumQueries
 
long long int myQueryStartTime
 the time spent querying in milliseconds
 
long long int myQueryTimeSum
 
long long int myQueryVisits
 counters for performance logging
 
const std::string myType
 the type of this router
 
const bool myUnbuildIsWarningOnly
 Whether unbuildable routes shall be reported as warniings, not errors.
 

Detailed Description

Computes routes using junction turning percentages.

Definition at line 43 of file ROJTRRouter.h.

Member Typedef Documentation

◆ Operation

typedef double(* SUMOAbstractRouter< ROEdge , ROVehicle >::Operation) (const ROEdge *const, const ROVehicle *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

◆ ROJTRRouter()

ROJTRRouter::ROJTRRouter ( bool  unbuildIsWarningOnly,
bool  acceptAllDestinations,
int  maxEdges,
bool  ignoreClasses,
bool  allowLoops,
bool  discountSources 
)

Constructor.

Parameters
[in]unbuildIsWarningOnlyWhether not closed routes shall not yield in an error
[in]acceptAllDestinationsIf false, only sinks will be used as final edges
[in]maxEdgesThe maximum number of edges a route may have
[in]ignoreClassesWhether routing shall be done without regarding vehicle classes
[in]allowLoopsWhether a vehicle may reuse a road
[in]discountSourcesWhether upstream flow shall be discounted from source flows

Definition at line 33 of file ROJTRRouter.cpp.

◆ ~ROJTRRouter()

ROJTRRouter::~ROJTRRouter ( )

Destructor.

Definition at line 46 of file ROJTRRouter.cpp.

Member Function Documentation

◆ buildPathFrom()

void SUMOAbstractRouter< ROEdge , ROVehicle >::buildPathFrom ( const typename SUMOAbstractRouter< ROEdge , ROVehicle >::EdgeInfo *  rbegin,
std::vector< const ROEdge * > &  edges 
)
inlineinherited

Builds the path from marked edges.

Definition at line 364 of file SUMOAbstractRouter.h.

◆ clone()

virtual SUMOAbstractRouter< ROEdge, ROVehicle > * ROJTRRouter::clone ( )
inlinevirtual

◆ compute() [1/3]

virtual bool SUMOAbstractRouter< ROEdge , ROVehicle >::compute ( const ROEdge from,
const ROEdge to,
const ROVehicle *const  vehicle,
SUMOTime  msTime,
std::vector< const ROEdge * > &  into,
bool  silent = false 
)
pure virtualinherited

Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme.

◆ compute() [2/3]

bool ROJTRRouter::compute ( const ROEdge from,
const ROEdge to,
const ROVehicle *const  vehicle,
SUMOTime  time,
ConstROEdgeVector into,
bool  silent = false 
)

Computes a route.

The description how routes are computed is given in the user documentation

Parameters
[in]fromThe edge the vehicle starts at
[in]toThe destination edge - invalid here
[in]vehicleThe vehicle to compute the route for
[in]timeThe departure time of the vehicle
[filled]into The list of edges to store the route into

Definition at line 50 of file ROJTRRouter.cpp.

References ROJTREdge::chooseNext(), MsgHandler::getErrorInstance(), Named::getID(), ROJTREdge::getSourceFlow(), ROEdge::getTravelTime(), MsgHandler::getWarningInstance(), MsgHandler::inform(), ROEdge::isSink(), myAcceptAllDestination, myAllowLoops, myDiscountSources, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, ROEdge::prohibits(), and STEPS2TIME.

◆ compute() [3/3]

bool SUMOAbstractRouter< ROEdge , ROVehicle >::compute ( const ROEdge from,
double  fromPos,
const ROEdge to,
double  toPos,
const ROVehicle *const  vehicle,
SUMOTime  msTime,
std::vector< const ROEdge * > &  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.

◆ computeLooped()

bool SUMOAbstractRouter< ROEdge , ROVehicle >::computeLooped ( const ROEdge from,
const ROEdge to,
const ROVehicle *const  vehicle,
SUMOTime  msTime,
std::vector< const ROEdge * > &  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.

◆ endQuery()

void SUMOAbstractRouter< ROEdge , ROVehicle >::endQuery ( int  visits)
inlineinherited

Definition at line 339 of file SUMOAbstractRouter.h.

◆ getEdgeInfo()

const SUMOAbstractRouter< ROEdge , ROVehicle >::EdgeInfo & SUMOAbstractRouter< ROEdge , ROVehicle >::getEdgeInfo ( int  index) const
inlineinherited

Definition at line 169 of file SUMOAbstractRouter.h.

◆ getEffort()

double SUMOAbstractRouter< ROEdge , ROVehicle >::getEffort ( const ROEdge *const  e,
const ROVehicle *const  v,
double  t 
) const
inlineinherited

Definition at line 330 of file SUMOAbstractRouter.h.

◆ getTravelTime()

double SUMOAbstractRouter< ROEdge , ROVehicle >::getTravelTime ( const ROEdge *const  e,
const ROVehicle *const  v,
const double  t,
const double  effort 
) const
inlineinherited

Definition at line 231 of file SUMOAbstractRouter.h.

◆ getType()

const std::string & SUMOAbstractRouter< ROEdge , ROVehicle >::getType ( ) const
inlineinherited

Definition at line 165 of file SUMOAbstractRouter.h.

◆ init()

void SUMOAbstractRouter< ROEdge , ROVehicle >::init ( const int  edgeID,
const SUMOTime  msTime 
)
inlineinherited

Definition at line 136 of file SUMOAbstractRouter.h.

◆ isProhibited()

bool SUMOAbstractRouter< ROEdge , ROVehicle >::isProhibited ( const ROEdge *const  edge,
const ROVehicle *const  vehicle 
) const
inlineinherited

Definition at line 227 of file SUMOAbstractRouter.h.

◆ isValid()

bool SUMOAbstractRouter< ROEdge , ROVehicle >::isValid ( const std::vector< const ROEdge * > &  edges,
const ROVehicle *const  v 
) const
inlineinherited

Definition at line 260 of file SUMOAbstractRouter.h.

◆ prohibit()

virtual void SUMOAbstractRouter< ROEdge , ROVehicle >::prohibit ( const std::vector< ROEdge * > &  toProhibit)
inlinevirtualinherited

Definition at line 352 of file SUMOAbstractRouter.h.

◆ recomputeCosts()

virtual double SUMOAbstractRouter< ROEdge , ROVehicle >::recomputeCosts ( const std::vector< const ROEdge * > &  edges,
const ROVehicle *const  v,
SUMOTime  msTime,
double *  lengthp = nullptr 
) const
inlinevirtualinherited

Definition at line 269 of file SUMOAbstractRouter.h.

◆ recomputeCostsPos()

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

Definition at line 287 of file SUMOAbstractRouter.h.

◆ reset()

virtual void SUMOAbstractRouter< ROEdge , ROVehicle >::reset ( const ROVehicle *const  vehicle)
inlinevirtualinherited

reset internal caches, used by CHRouter

Definition at line 161 of file SUMOAbstractRouter.h.

◆ setAutoBulkMode()

void SUMOAbstractRouter< ROEdge , ROVehicle >::setAutoBulkMode ( const bool  mode)
inlineinherited

Definition at line 348 of file SUMOAbstractRouter.h.

◆ setBulkMode()

virtual void SUMOAbstractRouter< ROEdge , ROVehicle >::setBulkMode ( const bool  mode)
inlinevirtualinherited

Definition at line 344 of file SUMOAbstractRouter.h.

◆ setHint()

double SUMOAbstractRouter< ROEdge , ROVehicle >::setHint ( const typename std::vector< const ROEdge * >::const_iterator  routeBegin,
const typename std::vector< const ROEdge * >::const_iterator  routeEnd,
const ROVehicle *const  v,
SUMOTime  msTime 
)
inlineinherited

Definition at line 299 of file SUMOAbstractRouter.h.

◆ startQuery()

void SUMOAbstractRouter< ROEdge , ROVehicle >::startQuery ( )
inlineinherited

Definition at line 334 of file SUMOAbstractRouter.h.

◆ updateViaCost()

void SUMOAbstractRouter< ROEdge , ROVehicle >::updateViaCost ( const ROEdge *const  prev,
const ROEdge *const  e,
const ROVehicle *const  v,
double &  time,
double &  effort,
double &  length 
) const
inlineinherited

Definition at line 245 of file SUMOAbstractRouter.h.

◆ updateViaEdgeCost()

void SUMOAbstractRouter< ROEdge , ROVehicle >::updateViaEdgeCost ( const ROEdge viaEdge,
const ROVehicle *const  v,
double &  time,
double &  effort,
double &  length 
) const
inlineinherited

Definition at line 235 of file SUMOAbstractRouter.h.

Field Documentation

◆ myAcceptAllDestination

const bool ROJTRRouter::myAcceptAllDestination
private

Whether all edges may be used as route end.

Definition at line 87 of file ROJTRRouter.h.

Referenced by clone(), and compute().

◆ myAllowLoops

const bool ROJTRRouter::myAllowLoops
private

Whether a vehicle may reuse a road.

Definition at line 96 of file ROJTRRouter.h.

Referenced by clone(), and compute().

◆ myAmClean

bool SUMOAbstractRouter< ROEdge , ROVehicle >::myAmClean
protectedinherited

whether we are already initialized

Definition at line 390 of file SUMOAbstractRouter.h.

◆ myAutoBulkMode

bool SUMOAbstractRouter< ROEdge , ROVehicle >::myAutoBulkMode
protectedinherited

whether we are currently trying to detect bulk mode automatically

Definition at line 387 of file SUMOAbstractRouter.h.

◆ myBulkMode

bool SUMOAbstractRouter< ROEdge , ROVehicle >::myBulkMode
protectedinherited

whether we are currently operating several route queries in a bulk

Definition at line 384 of file SUMOAbstractRouter.h.

◆ myDiscountSources

const bool ROJTRRouter::myDiscountSources
private

Whether upstream flows shall be discounted from source flows.

Definition at line 99 of file ROJTRRouter.h.

Referenced by clone(), and compute().

◆ myEdgeInfos

std::vector<typename SUMOAbstractRouter<ROEdge , ROVehicle >::EdgeInfo> SUMOAbstractRouter< ROEdge , ROVehicle >::myEdgeInfos
protectedinherited

The container of edge information.

Definition at line 402 of file SUMOAbstractRouter.h.

◆ myErrorMsgHandler

MsgHandler* const SUMOAbstractRouter< ROEdge , ROVehicle >::myErrorMsgHandler
protectedinherited

the handler for routing errors

Definition at line 375 of file SUMOAbstractRouter.h.

◆ myFound

std::vector<typename SUMOAbstractRouter<ROEdge , ROVehicle >::EdgeInfo*> SUMOAbstractRouter< ROEdge , ROVehicle >::myFound
protectedinherited

list of visited Edges (for resetting)

Definition at line 407 of file SUMOAbstractRouter.h.

◆ myFrontierList

std::vector<typename SUMOAbstractRouter<ROEdge , ROVehicle >::EdgeInfo*> SUMOAbstractRouter< ROEdge , ROVehicle >::myFrontierList
protectedinherited

A container for reusage of the min edge heap.

Definition at line 405 of file SUMOAbstractRouter.h.

◆ myHavePermissions

const bool SUMOAbstractRouter< ROEdge , ROVehicle >::myHavePermissions
protectedinherited

whether edge permissions need to be considered

Definition at line 393 of file SUMOAbstractRouter.h.

◆ myHaveRestrictions

const bool SUMOAbstractRouter< ROEdge , ROVehicle >::myHaveRestrictions
protectedinherited

whether edge restrictions need to be considered

Definition at line 396 of file SUMOAbstractRouter.h.

◆ myIgnoreClasses

const bool ROJTRRouter::myIgnoreClasses
private

Whether vehicle class information shall be ignored.

Definition at line 93 of file ROJTRRouter.h.

Referenced by clone(), and compute().

◆ myMaxEdges

const int ROJTRRouter::myMaxEdges
private

The maximum number of edges a route may have.

Definition at line 90 of file ROJTRRouter.h.

Referenced by clone(), and compute().

◆ myNumQueries

long long int SUMOAbstractRouter< ROEdge , ROVehicle >::myNumQueries
privateinherited

Definition at line 415 of file SUMOAbstractRouter.h.

◆ myOperation

Operation SUMOAbstractRouter< ROEdge , ROVehicle >::myOperation
protectedinherited

The object's operation to perform.

Definition at line 378 of file SUMOAbstractRouter.h.

◆ myProhibited

std::vector<ROEdge *> SUMOAbstractRouter< ROEdge , ROVehicle >::myProhibited
protectedinherited

The list of explicitly prohibited edges.

Definition at line 399 of file SUMOAbstractRouter.h.

◆ myQueryStartTime

long long int SUMOAbstractRouter< ROEdge , ROVehicle >::myQueryStartTime
privateinherited

the time spent querying in milliseconds

Definition at line 417 of file SUMOAbstractRouter.h.

◆ myQueryTimeSum

long long int SUMOAbstractRouter< ROEdge , ROVehicle >::myQueryTimeSum
privateinherited

Definition at line 418 of file SUMOAbstractRouter.h.

◆ myQueryVisits

long long int SUMOAbstractRouter< ROEdge , ROVehicle >::myQueryVisits
privateinherited

counters for performance logging

Definition at line 414 of file SUMOAbstractRouter.h.

◆ myTTOperation

Operation SUMOAbstractRouter< ROEdge , ROVehicle >::myTTOperation
protectedinherited

The object's operation to perform for travel times.

Definition at line 381 of file SUMOAbstractRouter.h.

◆ myType

const std::string SUMOAbstractRouter< ROEdge , ROVehicle >::myType
privateinherited

the type of this router

Definition at line 411 of file SUMOAbstractRouter.h.

◆ myUnbuildIsWarningOnly

const bool ROJTRRouter::myUnbuildIsWarningOnly
private

Whether unbuildable routes shall be reported as warniings, not errors.

Definition at line 84 of file ROJTRRouter.h.

Referenced by clone(), and compute().


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