![]() |
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. | |
typedef std::map< const ROEdge *, double > | Prohibitions |
Prohibitions and their estimated end time. | |
Public Member Functions | |
void | buildPathFrom (const typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo *rbegin, std::vector< const ROEdge * > &edges) |
Builds the path from marked edges. | |
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. | |
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. | |
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. | |
void | endQuery (int visits) |
const SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo & | getEdgeInfo (int index) const |
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 |
void | init (const int edgeID, const SUMOTime msTime) |
bool | isProhibited (const ROEdge *const edge, const ROVehicle *const vehicle) const |
bool | isValid (const std::vector< const ROEdge * > &edges, const ROVehicle *const v) const |
virtual void | prohibit (const Prohibitions &toProhibit) |
virtual double | recomputeCosts (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime msTime, double *lengthp=nullptr) const |
double | recomputeCostsPos (const std::vector< const ROEdge * > &edges, const ROVehicle *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const |
virtual void | reset (const ROVehicle *const vehicle) |
reset internal caches, used by CHRouter | |
ROJTRRouter (bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops, bool discountSources) | |
Constructor. | |
void | setAutoBulkMode (const bool mode) |
virtual void | setBulkMode (const bool mode) |
double | setHint (const typename std::vector< const ROEdge * >::const_iterator routeBegin, const typename std::vector< const ROEdge * >::const_iterator routeEnd, const ROVehicle *const v, SUMOTime msTime) |
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. | |
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. | |
Protected Attributes | |
bool | myAmClean |
whether we are already initialized | |
bool | myAutoBulkMode |
whether we are currently trying to detect bulk mode automatically | |
bool | myBulkMode |
whether we are currently operating several route queries in a bulk | |
std::vector< typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo > | myEdgeInfos |
The container of edge information. | |
MsgHandler *const | myErrorMsgHandler |
the handler for routing errors | |
std::vector< typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo * > | myFound |
list of visited Edges (for resetting) | |
std::vector< typename SUMOAbstractRouter< ROEdge, ROVehicle >::EdgeInfo * > | myFrontierList |
A container for reusage of the min edge heap. | |
const bool | myHavePermissions |
whether edge permissions need to be considered | |
const bool | myHaveRestrictions |
whether edge restrictions need to be considered | |
Operation | myOperation |
The object's operation to perform. | |
Prohibitions | myProhibited |
The list of explicitly prohibited edges and estimated end time of prohibition. | |
Operation | myTTOperation |
The object's operation to perform for travel times. | |
Private Attributes | |
const bool | myAcceptAllDestination |
Whether all edges may be used as route end. | |
const bool | myAllowLoops |
Whether a vehicle may reuse a road. | |
const bool | myDiscountSources |
Whether upstream flows shall be discounted from source flows. | |
const bool | myIgnoreClasses |
Whether vehicle class information shall be ignored. | |
const int | myMaxEdges |
The maximum number of edges a route may have. | |
long long int | myNumQueries |
long long int | myQueryStartTime |
the time spent querying in milliseconds | |
long long int | myQueryTimeSum |
long long int | myQueryVisits |
counters for performance logging | |
const std::string | myType |
the type of this router | |
const bool | myUnbuildIsWarningOnly |
Whether unbuildable routes shall be reported as warniings, not errors. | |
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 95 of file SUMOAbstractRouter.h.
|
inherited |
Prohibitions and their estimated end time.
Definition at line 98 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.
ROJTRRouter::~ROJTRRouter | ( | ) |
Destructor.
Definition at line 46 of file ROJTRRouter.cpp.
|
inlineinherited |
Builds the path from marked edges.
Definition at line 380 of file SUMOAbstractRouter.h.
|
inlinevirtual |
Implements SUMOAbstractRouter< ROEdge, ROVehicle >.
Definition at line 62 of file ROJTRRouter.h.
References myAcceptAllDestination, myAllowLoops, myDiscountSources, myIgnoreClasses, myMaxEdges, and myUnbuildIsWarningOnly.
|
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 189 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 204 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 350 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 175 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 336 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 237 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 171 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 142 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 233 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 266 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
Definition at line 363 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
Definition at line 275 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 293 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
reset internal caches, used by CHRouter
Definition at line 167 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 359 of file SUMOAbstractRouter.h.
|
inlinevirtualinherited |
Definition at line 355 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 305 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 345 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 251 of file SUMOAbstractRouter.h.
|
inlineinherited |
Definition at line 241 of file SUMOAbstractRouter.h.
|
private |
Whether all edges may be used as route end.
Definition at line 87 of file ROJTRRouter.h.
|
private |
Whether a vehicle may reuse a road.
Definition at line 96 of file ROJTRRouter.h.
|
protectedinherited |
whether we are already initialized
Definition at line 406 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether we are currently trying to detect bulk mode automatically
Definition at line 403 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether we are currently operating several route queries in a bulk
Definition at line 400 of file SUMOAbstractRouter.h.
|
private |
Whether upstream flows shall be discounted from source flows.
Definition at line 99 of file ROJTRRouter.h.
|
protectedinherited |
The container of edge information.
Definition at line 418 of file SUMOAbstractRouter.h.
|
protectedinherited |
the handler for routing errors
Definition at line 391 of file SUMOAbstractRouter.h.
|
protectedinherited |
list of visited Edges (for resetting)
Definition at line 423 of file SUMOAbstractRouter.h.
|
protectedinherited |
A container for reusage of the min edge heap.
Definition at line 421 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether edge permissions need to be considered
Definition at line 409 of file SUMOAbstractRouter.h.
|
protectedinherited |
whether edge restrictions need to be considered
Definition at line 412 of file SUMOAbstractRouter.h.
|
private |
Whether vehicle class information shall be ignored.
Definition at line 93 of file ROJTRRouter.h.
|
private |
The maximum number of edges a route may have.
Definition at line 90 of file ROJTRRouter.h.
|
privateinherited |
Definition at line 431 of file SUMOAbstractRouter.h.
|
protectedinherited |
The object's operation to perform.
Definition at line 394 of file SUMOAbstractRouter.h.
|
protectedinherited |
The list of explicitly prohibited edges and estimated end time of prohibition.
Definition at line 415 of file SUMOAbstractRouter.h.
|
privateinherited |
the time spent querying in milliseconds
Definition at line 433 of file SUMOAbstractRouter.h.
|
privateinherited |
Definition at line 434 of file SUMOAbstractRouter.h.
|
privateinherited |
counters for performance logging
Definition at line 430 of file SUMOAbstractRouter.h.
|
protectedinherited |
The object's operation to perform for travel times.
Definition at line 397 of file SUMOAbstractRouter.h.
|
privateinherited |
the type of this router
Definition at line 427 of file SUMOAbstractRouter.h.
|
private |
Whether unbuildable routes shall be reported as warniings, not errors.
Definition at line 84 of file ROJTRRouter.h.