41 const std::vector<SUMOVehicleParameter::Stop>& stops)
43 myProbability(prop), myRoute(route), myColor(color), myStops(stops) {}
47 myProbability(0.0), myRoute(route), myColor(nullptr), myStops() {}
50 :
Named(src.myID), myCosts(src.myCosts),
51 myProbability(src.myProbability), myRoute(src.myRoute), myColor(nullptr) {
89 const bool withExitTimes)
const {
102 if (!roe->isInternal() && !roe->isTazConnector()) {
103 tempRoute.push_back(roe);
108 std::vector<double> exitTimes;
111 time += roe->getTravelTime(veh, time);
112 if (!roe->isInternal() && !roe->isTazConnector()) {
113 exitTimes.push_back(time);
std::vector< const ROEdge * > ConstROEdgeVector
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_COLOR
A color information.
Base class for objects which have an id.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
A basic edge for routing applications.
A complete router's route.
ConstROEdgeVector myRoute
The edges the route consists of.
double myCosts
The costs of the route.
void setProbability(double prob)
Sets the probability of the route.
double myProbability
The probability the driver will take this route with.
RORoute(const std::string &id, double costs, double prob, const ConstROEdgeVector &route, const RGBColor *const color, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
void addProbability(double prob)
add additional vehicles/probability
const RGBColor * myColor
The color of the route.
void recheckForLoops(const ConstROEdgeVector &mandatory)
Checks whether this route contains loops and removes such.
void setCosts(double costs)
Sets the costs of the route.
OutputDevice & writeXMLDefinition(OutputDevice &dev, const ROVehicle *const veh, const bool withCosts, const bool withExitTimes) const
A vehicle as used by router.
SUMOTime getDepartureTime() const
Returns the time the vehicle starts at, 0 for triggered vehicles.
Some static methods for string processing.
void recheckForLoops(ConstROEdgeVector &edges, const ConstROEdgeVector &mandatory)
Checks whether the given edge list contains loops and removes them.