 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
72 bool haveSavedOneAtLeast =
false;
73 for (std::vector<RODFRouteDesc>::const_iterator j =
myRoutes.begin(); j !=
myRoutes.end(); ++j) {
75 if (find(saved.begin(), saved.end(), desc.
routename) != saved.end()) {
78 saved.push_back((*j).routename);
82 for (ROEdgeVector::const_iterator k = desc.
edges2Pass.begin(); k != desc.
edges2Pass.end(); k++) {
90 haveSavedOneAtLeast =
true;
92 return haveSavedOneAtLeast;
104 for (std::vector<RODFRouteDesc>::iterator i =
myRoutes.begin(); i !=
myRoutes.end();) {
107 for (std::vector<ROEdgeVector >::const_iterator j = illegals.begin(); !remove && j != illegals.end(); ++j) {
109 for (ROEdgeVector::const_iterator k = (*j).begin(); !remove && k != (*j).end(); ++k) {
130 desc.
routename = c.first->getID() +
"_to_" + c.second->getID();
std::map< std::pair< ROEdge *, ROEdge * >, int > myConnectionOccurences
Counts how many routes connecting the key-edges were already stored.
std::vector< RODFRouteDesc > myRoutes
Stored route descriptions.
Static storage of an output device and its base (abstract) implementation.
void addRouteDesc(RODFRouteDesc &desc)
Adds a route to the container.
bool removeRouteDesc(RODFRouteDesc &desc)
Removes the given route description from the container.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
RODFRouteCont()
Constructor.
A class for finding a same route (one that passes the same edges)
A route within the DFROUTER.
A class for sorting route descriptions by their length.
~RODFRouteCont()
Destructor.
bool save(std::vector< std::string > &saved, const std::string &prependix, OutputDevice &out)
Saves routes.
void setID(RODFRouteDesc &desc) const
Computes and sets the id of a route.
std::string routename
The name of the route.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
ROEdgeVector edges2Pass
The edges the route is made of.
begin/end of the description of a route
void removeIllegal(const std::vector< ROEdgeVector > &illegals)
Removes "illegal" routes.
void sortByDistance()
Sorts routes by their distance (length)