42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
51 const std::vector<const ROEdge*>& route,
53 const std::vector<SUMOVehicleParameter::Stop>& stops)
55 myProbability(prop), myRoute(route), myColor(color), myStops(stops) {}
59 :
Named(src.myID), myCosts(src.myCosts),
60 myProbability(src.myProbability), myRoute(src.myRoute), myColor(0) {
98 const bool withExitTimes)
const {
110 std::vector<const ROEdge*> temp(
myRoute.begin() + 1,
myRoute.end() - 1);
116 std::string exitTimes;
118 for (std::vector<const ROEdge*>::const_iterator i =
myRoute.begin(); i !=
myRoute.end(); ++i) {
122 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
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
RORoute(const std::string &id, SUMOReal costs, SUMOReal prob, const std::vector< const ROEdge * > &route, const RGBColor *const color, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
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)
Base class for objects which have an id.
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.