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