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++) {
87 throw ProcessError(
"Found invalid logic position of a link (network error)");
89 sortedLinks.push_back(std::make_pair(*i, *j));
98 for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
100 throw ProcessError(
"Found invalid logic position of a link (network error)");
106 for (
unsigned int c = 0; c < maxNo; ++c) {
107 if (foeLinks.test(c)) {
108 MSLink* foe = sortedLinks[c].second;
110 #ifdef HAVE_INTERNAL_LANES
112 assert(foe->getViaLane()->getLinkCont().size() == 1);
113 MSLink* foeExitLink = foe->getViaLane()->getLinkCont()[0];
115 if (foeExitLink->getViaLane() != 0) {
122 std::vector<MSLink*> foes;
123 for (
unsigned int c = 0; c < maxNo; ++c) {
124 if (internalFoes.test(c)) {
125 MSLink* foe = sortedLinks[c].second;
127 #ifdef HAVE_INTERNAL_LANES
128 MSLane* l = foe->getViaLane();
134 for (MSLinkCont::const_iterator q = lc.begin(); q != lc.end(); ++q) {
135 if ((*q)->getViaLane() != 0) {
144 #ifdef HAVE_INTERNAL_LANES
147 for (
unsigned int c = 0; c < sortedLinks.size(); ++c) {
148 if (sortedLinks[c].second->getLane() == 0) {
151 if (internalFoes.test(c)) {
153 if (foeLinks.test(c)) {
154 const std::vector<MSLane::IncomingLaneInfo>& l = myInternalLanes[li]->getIncomingLanes();
165 #ifdef HAVE_INTERNAL_LANES
169 assert((*j)->getViaLane()->getLinkCont().size() == 1);
170 MSLink* exitLink = (*j)->getViaLane()->getLinkCont()[0];
175 for (std::vector<MSLink*>::const_iterator k = foes.begin(); k != foes.end(); ++k) {
176 (*j)->addBlockedLink(*k);
177 (*k)->addBlockedLink(*j);
182 #ifdef HAVE_INTERNAL_LANES
185 for (i = myInternalLanes.begin(); i != myInternalLanes.end(); ++i) {