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 Types

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

Public Member Functions

virtual SUMOAbstractRouter
< ROEdge, ROVehicle > * 
clone () const
 
void endQuery (int visits)
 
SUMOReal getEffort (const ROEdge *const e, const ROVehicle *const v, SUMOReal t) const
 
virtual void prepare (const ROEdge *, const ROVehicle *, bool)
 
 ROJTRRouter (bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
 Constructor. More...
 
void startQuery ()
 
 ~ROJTRRouter ()
 Destructor. More...
 
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. More...
 
SUMOReal recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime time) const
 Recomputes the costs of a route. More...
 

Protected Attributes

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

Private Attributes

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

Detailed Description

Computes routes using junction turning percentages.

Definition at line 52 of file ROJTRRouter.h.

Member Typedef Documentation

typedef SUMOReal(* SUMOAbstractRouter< ROEdge , ROVehicle >::Operation)(const ROEdge *const, const ROVehicle *const, SUMOReal)
inherited

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

Definition at line 56 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

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

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

Definition at line 46 of file ROJTRRouter.cpp.

Referenced by clone().

ROJTRRouter::~ROJTRRouter ( )

Destructor.

Definition at line 55 of file ROJTRRouter.cpp.

Member Function Documentation

virtual SUMOAbstractRouter<ROEdge, ROVehicle>* ROJTRRouter::clone ( ) const
inlinevirtual
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(), Named::getID(), ROEdge::getTravelTime(), ROEdge::getType(), MsgHandler::getWarningInstance(), MsgHandler::inform(), myAcceptAllDestination, myAllowLoops, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, ROEdge::prohibits(), STEPS2TIME, and SUMOReal.

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

Definition at line 100 of file SUMOAbstractRouter.h.

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

Definition at line 91 of file SUMOAbstractRouter.h.

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

Definition at line 87 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 94 of file ROJTRRouter.cpp.

References SUMOReal.

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

Definition at line 95 of file SUMOAbstractRouter.h.

Field Documentation

const bool ROJTRRouter::myAcceptAllDestination
private

Whether all edges may be used as route end.

Definition at line 104 of file ROJTRRouter.h.

Referenced by clone(), and compute().

const bool ROJTRRouter::myAllowLoops
private

Whether a vehicle may reuse a road.

Definition at line 113 of file ROJTRRouter.h.

Referenced by clone(), and compute().

const bool ROJTRRouter::myIgnoreClasses
private

Whether vehicle class information shall be ignored.

Definition at line 110 of file ROJTRRouter.h.

Referenced by clone(), and compute().

const int ROJTRRouter::myMaxEdges
private

The maximum number of edges a route may have.

Definition at line 107 of file ROJTRRouter.h.

Referenced by clone(), and compute().

Operation SUMOAbstractRouter< ROEdge , ROVehicle >::myOperation
protectedinherited

The object's operation to perform.

Definition at line 107 of file SUMOAbstractRouter.h.

const bool ROJTRRouter::myUnbuildIsWarningOnly
private

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

Definition at line 101 of file ROJTRRouter.h.

Referenced by clone(), and compute().


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