64 RORoute(
const std::string&
id,
double costs,
double prob,
66 const std::vector<SUMOVehicleParameter::Stop>& stops);
175 const bool withCosts,
const bool withProb,
176 const bool withExitTimes,
const bool withLength,
177 const std::string&
id =
"")
const;
187 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const {
194 for (std::vector<SUMOVehicleParameter::Stop>::iterator stop =
myStops.begin(); stop !=
myStops.end(); ++stop) {
195 if (stop->until >= 0) {
196 stop->until += offset;
218 std::vector<SUMOVehicleParameter::Stop>
myStops;
std::vector< const ROEdge * > ConstROEdgeVector
std::vector< const ROEdge * > ConstROEdgeVector
Base class for objects which have an id.
Static storage of an output device and its base (abstract) implementation.
A basic edge for routing applications.
A complete router's route.
double getCosts() const
Returns the costs of the route.
const ROEdge * getFirst() const
Returns the first edge in the 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.
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the list of stops this route contains.
double getProbability() const
Returns the probability the driver will take this route with.
double myProbability
The probability the driver will take this route with.
int size() const
Returns the number of edges in this route.
void addStopOffset(const SUMOTime offset)
Adapts the until time of all stops by the given offset.
RORoute(const std::string &id, double costs, double prob, const ConstROEdgeVector &route, const RGBColor *const color, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
RORoute & operator=(const RORoute &src)
Invalidated assignment operator.
void addProbability(double prob)
add additional vehicles/probability
const RGBColor * myColor
The color of the route.
const RGBColor * getColor() const
Returns this route's color.
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.
const ConstROEdgeVector & getEdgeVector() const
Returns the list of edges this route consists of.
const ROEdge * getLast() const
Returns the last edge in the route.
void setCosts(double costs)
Sets the costs of the route.
std::vector< SUMOVehicleParameter::Stop > myStops
List of the stops on the parsed route.
bool isValid(const ROVehicle &veh, bool ignoreErrors) const
check whether the route is valid for the given vehicle
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.