44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
55 std::vector<MSLane*> incoming,
57 std::vector<MSLane*>
internal,
77 unsigned int requestPos = 0;
78 std::vector<MSLane*>::iterator i;
80 unsigned int maxNo = 0;
81 std::vector<std::pair<MSLane*, MSLink*> > sortedLinks;
85 for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
86 if ((*j)->getLane()->getEdge().isWalkingArea() ||
87 ((*i)->getEdge().isWalkingArea() && !(*j)->getLane()->getEdge().isCrossing())) {
90 sortedLinks.push_back(std::make_pair(*i, *j));
99 for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
100 if ((*j)->getLane()->getEdge().isWalkingArea() ||
101 ((*i)->getEdge().isWalkingArea() && !(*j)->getLane()->getEdge().isCrossing())) {
111 for (
unsigned int c = 0; c < maxNo; ++c) {
112 if (foeLinks.test(c)) {
113 MSLink* foe = sortedLinks[c].second;
115 #ifdef HAVE_INTERNAL_LANES
117 assert(foe->getViaLane()->getLinkCont().size() == 1);
118 MSLink* foeExitLink = foe->getViaLane()->getLinkCont()[0];
120 if (foeExitLink->getViaLane() != 0) {
127 std::vector<MSLink*> foes;
128 for (
unsigned int c = 0; c < maxNo; ++c) {
129 if (internalFoes.test(c)) {
130 MSLink* foe = sortedLinks[c].second;
132 #ifdef HAVE_INTERNAL_LANES
133 MSLane* l = foe->getViaLane();
139 for (MSLinkCont::const_iterator q = lc.begin(); q != lc.end(); ++q) {
140 if ((*q)->getViaLane() != 0) {
149 #ifdef HAVE_INTERNAL_LANES
152 for (
unsigned int c = 0; c < sortedLinks.size(); ++c) {
153 if (sortedLinks[c].second->getLane() == 0) {
156 if (internalFoes.test(c)) {
158 if (foeLinks.test(c)) {
159 const std::vector<MSLane::IncomingLaneInfo>& l = myInternalLanes[li]->getIncomingLanes();
170 #ifdef HAVE_INTERNAL_LANES
174 assert((*j)->getViaLane()->getLinkCont().size() == 1);
175 MSLink* exitLink = (*j)->getViaLane()->getLinkCont()[0];
180 for (std::vector<MSLink*>::const_iterator k = foes.begin(); k != foes.end(); ++k) {
181 (*j)->addBlockedLink(*k);
182 (*k)->addBlockedLink(*j);