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