![]() |
SUMO - Simulation of Urban MObility
|
Computes routes using junction turning percentages. More...
#include <ROJTRRouter.h>


Public Types | |
| typedef double(* | Operation) (const ROEdge *const, const ROVehicle *const, double) |
| Type of the function that is used to retrieve the edge effort. More... | |
Public Member Functions | |
| 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)=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. More... | |
| void | endQuery (int visits) |
| double | getEffort (const ROEdge *const e, const ROVehicle *const v, double t) const |
| virtual double | recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime msTime) const=0 |
| ROJTRRouter (bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops) | |
| Constructor. More... | |
| void | setBulkMode (const bool mode) |
| void | startQuery () |
| ~ROJTRRouter () | |
| Destructor. More... | |
Implementatios of SUMOAbstractRouter | |
| bool | compute (const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into) |
| Computes a route. More... | |
| double | recomputeCosts (const ConstROEdgeVector &edges, const ROVehicle *const v, SUMOTime msTime) const |
| Recomputes the costs of a route. More... | |
Protected Attributes | |
| bool | myBulkMode |
| whether we are currently operating several route queries in a bulk More... | |
| 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... | |
Computes routes using junction turning percentages.
Definition at line 52 of file ROJTRRouter.h.
|
inherited |
Type of the function that is used to retrieve the edge effort.
Definition at line 55 of file SUMOAbstractRouter.h.
| ROJTRRouter::ROJTRRouter | ( | bool | unbuildIsWarningOnly, |
| bool | acceptAllDestinations, | ||
| int | maxEdges, | ||
| bool | ignoreClasses, | ||
| bool | allowLoops | ||
| ) |
Constructor.
| [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 41 of file ROJTRRouter.cpp.
Referenced by clone().
| ROJTRRouter::~ROJTRRouter | ( | ) |
Destructor.
Definition at line 50 of file ROJTRRouter.cpp.
|
inlinevirtual |
Implements SUMOAbstractRouter< ROEdge, ROVehicle >.
Definition at line 69 of file ROJTRRouter.h.
References compute(), myAcceptAllDestination, myAllowLoops, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, recomputeCosts(), and ROJTRRouter().
|
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.
| bool ROJTRRouter::compute | ( | const ROEdge * | from, |
| const ROEdge * | to, | ||
| const ROVehicle *const | vehicle, | ||
| SUMOTime | time, | ||
| ConstROEdgeVector & | into | ||
| ) |
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 |
Definition at line 54 of file ROJTRRouter.cpp.
References ROJTREdge::chooseNext(), MsgHandler::getErrorInstance(), Named::getID(), ROEdge::getTravelTime(), MsgHandler::getWarningInstance(), MsgHandler::inform(), ROEdge::isSink(), myAcceptAllDestination, myAllowLoops, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, ROEdge::prohibits(), and STEPS2TIME.
Referenced by clone().
|
inlineinherited |
Definition at line 95 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 86 of file SUMOAbstractRouter.h.
|
pure virtualinherited |
| double ROJTRRouter::recomputeCosts | ( | const ConstROEdgeVector & | edges, |
| const ROVehicle *const | v, | ||
| SUMOTime | msTime | ||
| ) | const |
Recomputes the costs of a route.
| [in] | edges | The route |
| [in] | v | The vehicle that belongs to the route |
| [in] | msTime | The departure time of the vehicle |
Definition at line 91 of file ROJTRRouter.cpp.
References STEPS2TIME.
Referenced by clone().
|
inlineinherited |
Definition at line 100 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 90 of file SUMOAbstractRouter.h.
|
private |
Whether all edges may be used as route end.
Definition at line 104 of file ROJTRRouter.h.
|
private |
Whether a vehicle may reuse a road.
Definition at line 113 of file ROJTRRouter.h.
|
protectedinherited |
whether we are currently operating several route queries in a bulk
Definition at line 109 of file SUMOAbstractRouter.h.
|
private |
Whether vehicle class information shall be ignored.
Definition at line 110 of file ROJTRRouter.h.
|
private |
The maximum number of edges a route may have.
Definition at line 107 of file ROJTRRouter.h.
|
protectedinherited |
The object's operation to perform.
Definition at line 106 of file SUMOAbstractRouter.h.
|
private |
Whether unbuildable routes shall be reported as warniings, not errors.
Definition at line 101 of file ROJTRRouter.h.