SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROJTRRouter Class Reference

Computes routes using junction turning percentages. More...

#include <ROJTRRouter.h>

Inheritance diagram for ROJTRRouter:
SUMOAbstractRouter< ROEdge, ROVehicle >

Public Member Functions

void endQuery (int visits)
virtual void prepare (const ROEdge *, const ROVehicle *, bool)
 ROJTRRouter (RONet &net, bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
 Constructor.
void startQuery ()
 ~ROJTRRouter ()
 Destructor.
Implementatios of SUMOAbstractRouter
void compute (const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, std::vector< const ROEdge * > &into)
 Computes a route.
SUMOReal recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime time) const
 Recomputes the costs of a route.

Private Attributes

bool myAcceptAllDestination
 Whether all edges may be used as route end.
bool myAllowLoops
 Whether a vehicle may reuse a road.
bool myIgnoreClasses
 Whether vehicle class information shall be ignored.
int myMaxEdges
 The maximum number of edges a route may have.
RONetmyNet
 The network to use.
bool myUnbuildIsWarningOnly
 Whether unbuildable routes shall be reported as warniings, not errors.

Detailed Description

Computes routes using junction turning percentages.

Definition at line 52 of file ROJTRRouter.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
[in]netThe net used for routing
[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

Definition at line 46 of file ROJTRRouter.cpp.

ROJTRRouter::~ROJTRRouter ( )

Destructor.

Definition at line 55 of file ROJTRRouter.cpp.

Member Function Documentation

void ROJTRRouter::compute ( const ROEdge from,
const ROEdge to,
const ROVehicle *const  vehicle,
SUMOTime  time,
std::vector< const ROEdge * > &  into 
)
virtual

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

Implements SUMOAbstractRouter< ROEdge, ROVehicle >.

Definition at line 59 of file ROJTRRouter.cpp.

References ROJTREdge::chooseNext(), ROEdge::ET_SINK, MsgHandler::getErrorInstance(), ROEdge::getID(), ROEdge::getTravelTime(), ROEdge::getType(), MsgHandler::getWarningInstance(), MsgHandler::inform(), myAcceptAllDestination, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, and ROEdge::prohibits().

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

Definition at line 89 of file SUMOAbstractRouter.h.

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

Definition at line 80 of file SUMOAbstractRouter.h.

SUMOReal ROJTRRouter::recomputeCosts ( const std::vector< const ROEdge * > &  edges,
const ROVehicle *const  v,
SUMOTime  time 
) const
virtual

Recomputes the costs of a route.

Parameters
[in]edgesThe route
[in]vThe vehicle that belongs to the route
[in]timeThe departure time of the vehicle
Returns
The route costs

Implements SUMOAbstractRouter< ROEdge, ROVehicle >.

Definition at line 97 of file ROJTRRouter.cpp.

References SUMOReal.

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

Definition at line 84 of file SUMOAbstractRouter.h.

Field Documentation

bool ROJTRRouter::myAcceptAllDestination
private

Whether all edges may be used as route end.

Definition at line 109 of file ROJTRRouter.h.

Referenced by compute().

bool ROJTRRouter::myAllowLoops
private

Whether a vehicle may reuse a road.

Definition at line 115 of file ROJTRRouter.h.

bool ROJTRRouter::myIgnoreClasses
private

Whether vehicle class information shall be ignored.

Definition at line 112 of file ROJTRRouter.h.

Referenced by compute().

int ROJTRRouter::myMaxEdges
private

The maximum number of edges a route may have.

Definition at line 103 of file ROJTRRouter.h.

Referenced by compute().

RONet& ROJTRRouter::myNet
private

The network to use.

Definition at line 100 of file ROJTRRouter.h.

bool ROJTRRouter::myUnbuildIsWarningOnly
private

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

Definition at line 106 of file ROJTRRouter.h.

Referenced by compute().


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