SUMO - Simulation of Urban MObility

ROJTRRouter Class Reference

Computes routes using junction turning percentages. More...

#include <ROJTRRouter.h>

Inheritance diagram for ROJTRRouter:
SUMOAbstractRouter< ROEdge, ROVehicle >

Public Member Functions

 ROJTRRouter (RONet &net, bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
 Constructor.
 ~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.
RONet & myNet
 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 54 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 58 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().

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 96 of file ROJTRRouter.cpp.

References SUMOReal.


Field Documentation

Whether all edges may be used as route end.

Definition at line 109 of file ROJTRRouter.h.

Referenced by compute().

Whether a vehicle may reuse a road.

Definition at line 115 of file ROJTRRouter.h.

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().

The network to use.

Definition at line 100 of file ROJTRRouter.h.

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:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines