49 const std::vector<SUMOVehicleParameter::Stop>& stops)
51 myProbability(prop), myRoute(route), myColor(color), myStops(stops) {}
97 const bool withExitTimes)
const {
109 const int frontOffset =
myRoute.front()->isTazConnector() ? 1 : 0;
110 const int backOffset =
myRoute.back()->isTazConnector() ? 1 : 0;
111 if (frontOffset + backOffset > 0) {
121 std::string exitTimes;
123 for (ConstROEdgeVector::const_iterator i =
myRoute.begin(); i !=
myRoute.end(); ++i) {
127 time += (*i)->getTravelTime(veh, time);
void setProbability(double prob)
Sets the probability of the route.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Some static methods for string processing.
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
void recheckForLoops(ConstROEdgeVector &edges)
Checks whether the given edge list contains loops and removes them.
void recheckForLoops()
Checks whether this route contains loops and removes such.
std::vector< const ROEdge * > ConstROEdgeVector
begin/end of the description of a route
A vehicle as used by router.
std::vector< SUMOVehicleParameter::Stop > myStops
List of the stops on the parsed route.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const RGBColor * myColor
The color of the route.
RORoute(const std::string &id, double costs, double prob, const ConstROEdgeVector &route, const RGBColor *const color, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
double myProbability
The probability the driver will take this route with.
double myCosts
The costs of the route.
SUMOTime getDepartureTime() const
Returns the time the vehicle starts at, 0 for triggered vehicles.
Base class for objects which have an id.
std::string myID
The name of the object.
void setCosts(double costs)
Sets the costs of the route.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
void addProbability(double prob)
add additional vehicles/probability
OutputDevice & writeXMLDefinition(OutputDevice &dev, const ROVehicle *const veh, const bool withCosts, const bool withExitTimes) const
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
A complete router's route.
ConstROEdgeVector myRoute
The edges the route consists of.