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) {
90 if (!roe->isInternal() && !roe->isTazConnector()) {
91 tempRoute.push_back(roe);
100 const bool withCosts,
102 const bool withExitTimes,
103 const bool withLength,
104 const std::string&
id)
const {
122 std::vector<double> exitTimes;
125 time += roe->getTravelTime(veh, time);
126 if (!roe->isInternal() && !roe->isTazConnector()) {
127 exitTimes.push_back(time);
135 length += roe->getLength();
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 precision 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.
ConstROEdgeVector getNormalEdges() const
return edges that shall be written in the route definition
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 withProb, const bool withExitTimes, const bool withLength, const std::string &id="") 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.