SUMO - Simulation of Urban MObility
|
Computes routes using junction turning percentages. More...
#include <ROJTRRouter.h>
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. | |
RONet & | myNet |
The network to use. | |
bool | myUnbuildIsWarningOnly |
Whether unbuildable routes shall be reported as warniings, not errors. |
Computes routes using junction turning percentages.
Definition at line 52 of file ROJTRRouter.h.
ROJTRRouter::ROJTRRouter | ( | RONet & | net, |
bool | unbuildIsWarningOnly, | ||
bool | acceptAllDestinations, | ||
int | maxEdges, | ||
bool | ignoreClasses, | ||
bool | allowLoops | ||
) |
Constructor.
[in] | net | The net used for routing |
[in] | unbuildIsWarningOnly | Whether not closed routes shall not yield in an error |
[in] | acceptAllDestinations | If false, only sinks will be used as final edges |
[in] | maxEdges | The maximum number of edges a route may have |
[in] | ignoreClasses | Whether routing shall be done without regarding vehicle classes |
[in] | allowLoops | Whether a vehicle may reuse a road |
Definition at line 46 of file ROJTRRouter.cpp.
Destructor.
Definition at line 55 of file ROJTRRouter.cpp.
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
[in] | from | The edge the vehicle starts at |
[in] | to | The destination edge - invalid here |
[in] | vehicle | The vehicle to compute the route for |
[in] | time | The 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 | ) | [inline, inherited] |
Definition at line 89 of file SUMOAbstractRouter.h.
virtual void SUMOAbstractRouter< ROEdge , ROVehicle >::prepare | ( | const ROEdge * | , |
const ROVehicle * | , | ||
bool | |||
) | [inline, virtual, inherited] |
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.
[in] | edges | The route |
[in] | v | The vehicle that belongs to the route |
[in] | time | The departure time of the vehicle |
Implements SUMOAbstractRouter< ROEdge, ROVehicle >.
Definition at line 97 of file ROJTRRouter.cpp.
References SUMOReal.
void SUMOAbstractRouter< ROEdge , ROVehicle >::startQuery | ( | ) | [inline, inherited] |
Definition at line 84 of file SUMOAbstractRouter.h.
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().