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