38 #ifdef CHECK_MEMORY_LEAKS
40 #endif // CHECK_MEMORY_LEAKS
47 int maxEdges,
bool ignoreClasses,
bool allowLoops) :
49 myNet(net), myUnbuildIsWarningOnly(unbuildIsWarningOnly),
50 myAcceptAllDestination(acceptAllDestinations), myMaxEdges(maxEdges),
51 myIgnoreClasses(ignoreClasses), myAllowLoops(allowLoops)
61 SUMOTime time, std::vector<const ROEdge*>& into) {
70 into.push_back(current);
81 mh->
inform(
"The route starting at edge '" + from->
getID() +
"' could not be closed.");
86 into.push_back(current);
94 for (std::vector<const ROEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
95 costs += (*i)->getTravelTime(v, time);
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
EdgeType getType() const
Returns the type of the edge.
SUMOReal recomputeCosts(const std::vector< const ROEdge * > &edges, const ROVehicle *const v, SUMOTime time) const
Recomputes the costs of a route.
const bool myUnbuildIsWarningOnly
Whether unbuildable routes shall be reported as warniings, not errors.
const int myMaxEdges
The maximum number of edges a route may have.
void compute(const ROEdge *from, const ROEdge *to, const ROVehicle *const vehicle, SUMOTime time, std::vector< const ROEdge * > &into)
Computes a route.
ROJTREdge * chooseNext(const ROVehicle *const veh, SUMOTime time) const
Returns the next edge to use.
ROJTRRouter(RONet &net, bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops)
Constructor.
const bool myAcceptAllDestination
Whether all edges may be used as route end.
const std::string & getID() const
Returns the id.
A vehicle as used by router.
~ROJTRRouter()
Destructor.
const bool myIgnoreClasses
Whether vehicle class information shall be ignored.
An edge the jtr-router may route through.
A basic edge for routing applications.
The router's network representation.
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
void inform(std::string msg, bool addType=true)
adds a new error to the list
SUMOReal getTravelTime(const ROVehicle *const veh, SUMOReal time) const
Returns the travel time for this edge.
An edge where vehicles disappear (no vehicle may leave this edge)