42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
51 const std::vector<const ROEdge*>& route,
54 myProbability(prop), myRoute(route), myColor(color) {}
58 :
Named(src.myID), myCosts(src.myCosts),
59 myProbability(src.myProbability), myRoute(src.myRoute), myColor(0) {
102 const bool withCosts,
103 const bool withExitTimes)
const {
115 std::vector<const ROEdge*> temp(
myRoute.begin() + 1,
myRoute.end() - 1);
121 std::string exitTimes;
123 for (std::vector<const ROEdge*>::const_iterator i =
myRoute.begin(); i !=
myRoute.end(); ++i) {
127 time += (*i)->getTravelTime(veh, time);
SUMOTime getDepartureTime() const
Returns the time the vehicle starts at.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & writeXMLDefinition(OutputDevice &dev, const ROVehicle *const veh, const bool withCosts, const bool withExitTimes) const
void add(ROEdge *edge)
Adds an edge to the end of the route.
Some static methods for string processing.
void setProbability(SUMOReal prob)
Sets the probability of the route.
void recheckForLoops()
Checks whether this route contains loops and removes such.
void setPrecision(unsigned int precision=OUTPUT_ACCURACY)
Sets the precison or resets it to default.
void addProbability(SUMOReal prob)
add additional vehicles/probability
A vehicle as used by router.
SUMOReal myCosts
The costs of the route.
const RGBColor * myColor
The color of the route.
std::vector< const ROEdge * > myRoute
The edges the route consists of.
void setCosts(SUMOReal costs)
Sets the costs of the route.
SUMOReal myProbability
The probability the driver will take this route with.
An edge representing a whole district.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
A basic edge for routing applications.
Base class for objects which have an id.
RORoute(const std::string &id, SUMOReal costs, SUMOReal prob, const std::vector< const ROEdge * > &route, const RGBColor *const color)
Constructor.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
A complete router's route.
void recheckForLoops(std::vector< const ROEdge * > &edges)
Checks whether the given edge list contains loops and removes them.