![]() |
Eclipse 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, bool silent=false)=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... | |
bool | compute (const ROEdge *from, double fromPos, const ROEdge *to, double toPos, const ROVehicle *const vehicle, SUMOTime msTime, std::vector< const ROEdge * > &into, bool silent=false) |
Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme. More... | |
bool | computeLooped (const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime msTime, std::vector< const ROEdge * > &into, bool silent=false) |
Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route. More... | |
void | endQuery (int visits) |
double | getEffort (const ROEdge *const e, const ROVehicle *const v, double t) const |
double | getTravelTime (const ROEdge *const e, const ROVehicle *const v, const double t, const double effort) const |
const std::string & | getType () const |
bool | isProhibited (const ROEdge *const edge, const ROVehicle *const vehicle) const |
virtual void | prohibit (const std::vector< ROEdge * > &) |
double | recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const |
double | recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime msTime, double *lengthp=nullptr) const |
virtual void | reset (const ROVehicle *const vehicle) |
reset internal caches, used by CHRouter More... | |
ROJTRRouter (bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops, bool discountSources) | |
Constructor. More... | |
void | setAutoBulkMode (const bool mode) |
void | setBulkMode (const bool mode) |
void | startQuery () |
void | updateViaCost (const ROEdge *const prev, const ROEdge *const e, const ROVehicle *const v, double &time, double &effort, double &length) const |
void | updateViaEdgeCost (const ROEdge *viaEdge, const ROVehicle *const v, double &time, double &effort, double &length) const |
~ROJTRRouter () | |
Destructor. More... | |
Implementatios of SUMOAbstractRouter | |
bool | compute (const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, ConstROEdgeVector &into, bool silent=false) |
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 | myAutoBulkMode |
whether we are currently trying to detect bulk mode automatically More... | |
bool | myBulkMode |
whether we are currently operating several route queries in a bulk More... | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors More... | |
const bool | myHavePermissions |
whether edge permissions need to be considered More... | |
const bool | myHaveRestrictions |
whether edge restrictions need to be considered More... | |
Operation | myOperation |
The object's operation to perform. More... | |
std::vector< ROEdge * > | myProhibited |
Operation | myTTOperation |
The object's operation to perform for travel times. 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 | myDiscountSources |
Whether upstream flows shall be discounted from source flows. 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... | |
long long int | myNumQueries |
long long int | myQueryStartTime |
the time spent querying in milliseconds More... | |
long long int | myQueryTimeSum |
long long int | myQueryVisits |
counters for performance logging More... | |
const std::string | myType |
the type of this router More... | |
const bool | myUnbuildIsWarningOnly |
Whether unbuildable routes shall be reported as warniings, not errors. More... | |
Computes routes using junction turning percentages.
Definition at line 43 of file ROJTRRouter.h.
|
inherited |
Type of the function that is used to retrieve the edge effort.
Definition at line 94 of file SUMOAbstractRouter.h.
ROJTRRouter::ROJTRRouter | ( | bool | unbuildIsWarningOnly, |
bool | acceptAllDestinations, | ||
int | maxEdges, | ||
bool | ignoreClasses, | ||
bool | allowLoops, | ||
bool | discountSources | ||
) |
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 |
[in] | discountSources | Whether upstream flow shall be discounted from source flows |
Definition at line 33 of file ROJTRRouter.cpp.
Referenced by clone().
ROJTRRouter::~ROJTRRouter | ( | ) |
Destructor.
Definition at line 46 of file ROJTRRouter.cpp.
|
inlinevirtual |
Implements SUMOAbstractRouter< ROEdge, ROVehicle >.
Definition at line 62 of file ROJTRRouter.h.
References myAcceptAllDestination, myAllowLoops, myDiscountSources, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, 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, | ||
bool | silent = false |
||
) |
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 |
Definition at line 50 of file ROJTRRouter.cpp.
References ROJTREdge::chooseNext(), MsgHandler::getErrorInstance(), Named::getID(), ROJTREdge::getSourceFlow(), ROEdge::getTravelTime(), MsgHandler::getWarningInstance(), MsgHandler::inform(), ROEdge::isSink(), myAcceptAllDestination, myAllowLoops, myDiscountSources, myIgnoreClasses, myMaxEdges, myUnbuildIsWarningOnly, ROEdge::prohibits(), and STEPS2TIME.
|
inlineinherited |
Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme.
Definition at line 157 of file SUMOAbstractRouter.h.
|
inlineinherited |
Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route.
Definition at line 172 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 279 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 270 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 207 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 143 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 201 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
Definition at line 205 of file SUMOAbstractRouter.h.
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 |
|
inlineinherited |
Definition at line 258 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 237 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
reset internal caches, used by CHRouter
Definition at line 139 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 288 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 284 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 274 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 221 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 211 of file SUMOAbstractRouter.h.
|
private |
Whether all edges may be used as route end.
Definition at line 96 of file ROJTRRouter.h.
|
private |
Whether a vehicle may reuse a road.
Definition at line 105 of file ROJTRRouter.h.
|
protectedinherited |
whether we are currently trying to detect bulk mode automatically
Definition at line 306 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether we are currently operating several route queries in a bulk
Definition at line 303 of file SUMOAbstractRouter.h.
|
private |
Whether upstream flows shall be discounted from source flows.
Definition at line 108 of file ROJTRRouter.h.
|
protectedinherited |
the handler for routing errors
Definition at line 294 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether edge permissions need to be considered
Definition at line 309 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether edge restrictions need to be considered
Definition at line 312 of file SUMOAbstractRouter.h.
|
private |
Whether vehicle class information shall be ignored.
Definition at line 102 of file ROJTRRouter.h.
|
private |
The maximum number of edges a route may have.
Definition at line 99 of file ROJTRRouter.h.
|
privateinherited |
Definition at line 322 of file SUMOAbstractRouter.h.
|
protectedinherited |
The object's operation to perform.
Definition at line 297 of file SUMOAbstractRouter.h.
|
protectedinherited |
Definition at line 314 of file SUMOAbstractRouter.h.
|
privateinherited |
the time spent querying in milliseconds
Definition at line 324 of file SUMOAbstractRouter.h.
|
privateinherited |
Definition at line 325 of file SUMOAbstractRouter.h.
|
privateinherited |
counters for performance logging
Definition at line 321 of file SUMOAbstractRouter.h.
|
protectedinherited |
The object's operation to perform for travel times.
Definition at line 300 of file SUMOAbstractRouter.h.
|
privateinherited |
the type of this router
Definition at line 318 of file SUMOAbstractRouter.h.
|
private |
Whether unbuildable routes shall be reported as warniings, not errors.
Definition at line 93 of file ROJTRRouter.h.