44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
62 unsigned int references,
const RGBColor*
const c,
63 const std::vector<SUMOVehicleParameter::Stop>& stops)
64 :
Named(id), myEdges(edges),
65 myReferenceCounter(references),
66 myColor(c), myStops(stops) {}
88 return (
unsigned)
myEdges.size();
137 RouteDict::iterator it =
myDict.find(
id);
139 RouteDistDict::iterator it2 =
myDistDict.find(
id);
140 if (it2 ==
myDistDict.end() || it2->second->getOverallProb() == 0) {
143 return it2->second->get();
151 RouteDistDict::iterator it2 =
myDistDict.find(
id);
165 for (RouteDict::iterator i =
myDict.begin(); i !=
myDict.end(); ++i) {
175 for (RouteDict::const_iterator i =
myDict.begin(); i !=
myDict.end(); ++i) {
176 into.push_back((*i).first);
179 into.push_back((*i).first);
187 MSEdgeVector::const_iterator i =
myEdges.begin();
191 for (; i !=
myEdges.end(); ++i) {
197 if (upTo || i !=
myEdges.end() - 1) {
207 std::vector<MSEdge*>::const_iterator i = edgelist.begin();
208 for (; i != edgelist.end(); ++i) {
226 for (RouteDict::iterator it =
myDict.begin(); it !=
myDict.end(); ++it) {
244 for (MSEdgeVector::const_iterator i =
myEdges.begin(); i !=
myEdges.end(); ++i) {
245 ret += (*i)->getLength();
253 bool isFirstIteration =
true;
255 MSEdgeVector::const_iterator it = std::find(
myEdges.begin(),
myEdges.end(), fromEdge);
261 if (fromEdge == toEdge && fromPos <= toPos) {
263 return (toPos - fromPos);
265 for (; it !=
end(); ++it) {
266 if ((*it) == toEdge && !isFirstIteration) {
270 const std::vector<MSLane*>& lanes = (*it)->getLanes();
271 distance += lanes[0]->getLength();
272 #ifdef HAVE_INTERNAL_LANES
274 for (std::vector<MSLane*>::const_iterator laneIt = lanes.begin(); laneIt != lanes.end(); ++laneIt) {
275 const MSLinkCont& links = (*laneIt)->getLinkCont();
276 for (MSLinkCont::const_iterator linkIt = links.begin(); linkIt != links.end(); ++linkIt) {
277 if ((*linkIt) == 0 || (*linkIt)->getLane() == 0) {
280 std::string succLaneId = (*(it + 1))->getLanes()[0]->getID();
281 if ((*linkIt)->getLane()->getID().compare(succLaneId) == 0) {
282 distance += (*linkIt)->getLength();
288 isFirstIteration =
false;
303 const std::vector<SUMOVehicleParameter::Stop>&