41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
49 #ifdef HAVE_INTERNAL_LANES
50 MSInternalJunction::MSInternalJunction(
const std::string&
id,
54 std::vector<MSLane*> incoming,
55 std::vector<MSLane*>
internal)
60 MSInternalJunction::~MSInternalJunction() {}
64 MSInternalJunction::postloadInit() {
65 if (myIncomingLanes.size() == 0) {
66 throw ProcessError(
"Internal junction " + getID() +
" has no incoming lanes");
70 assert(myIncomingLanes[0]->getLinkCont().size() == 1);
71 MSLink* thisLink = myIncomingLanes[0]->getLinkCont()[0];
73 unsigned int requestPos = 0;
74 for (std::vector<MSLane*>::iterator i = myInternalLanes.begin(); i != myInternalLanes.end(); ++i) {
76 for (MSLinkCont::const_iterator q = lc.begin(); q != lc.end(); ++q) {
77 if ((*q)->getViaLane() != 0) {
78 myInternalLaneFoes.push_back((*q)->getViaLane());
80 myInternalLaneFoes.push_back(*i);
85 for (std::vector<MSLane*>::const_iterator i = myIncomingLanes.begin() + 1; i != myIncomingLanes.end(); ++i) {
88 for (MSLinkCont::const_iterator j = lc.begin(); j != lc.end(); ++j) {
89 MSLane* via = (*j)->getViaLane();
90 if (std::find(myInternalLanes.begin(), myInternalLanes.end(), via) == myInternalLanes.end()) {
93 myInternalLinkFoes.push_back(*j);
97 thisLink->
setRequestInformation((
int)requestPos,
true,
false, myInternalLinkFoes, myInternalLaneFoes, thisLink->getViaLane()->getLogicalPredecessorLane());
98 assert(thisLink->getViaLane()->getLinkCont().size() == 1);
99 MSLink* exitLink = thisLink->getViaLane()->getLinkCont()[0];
101 myInternalLaneFoes, thisLink->getViaLane());
102 for (std::vector<MSLink*>::const_iterator k = myInternalLinkFoes.begin(); k != myInternalLinkFoes.end(); ++k) {
104 (*k)->addBlockedLink(thisLink);
void addBlockedLink(MSLink *link)
void setRequestInformation(int index, bool hasFoes, bool isCont, const std::vector< MSLink * > &foeLinks, const std::vector< MSLane * > &foeLanes, MSLane *internalLaneBefore=0)
Sets the request information.
A point in 2D or 3D with translation and scaling methods.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
Representation of a lane in the micro simulation.