52 std::vector<MSLane*> incoming,
53 std::vector<MSLane*>
internal,
67 std::vector<MSLane*>::iterator i;
70 std::vector<std::pair<MSLane*, MSLink*> > sortedLinks;
74 for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
75 if ((*j)->getLane()->getEdge().isWalkingArea() ||
76 ((*i)->getEdge().isWalkingArea() && !(*j)->getLane()->getEdge().isCrossing())) {
79 sortedLinks.push_back(std::make_pair(*i, *j));
88 for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
89 if ((*j)->getLane()->getEdge().isWalkingArea() ||
90 ((*i)->getEdge().isWalkingArea() && !(*j)->getLane()->getEdge().isCrossing())) {
100 for (
int c = 0; c < maxNo; ++c) {
101 if (linkResponse.test(c)) {
102 MSLink* foe = sortedLinks[c].second;
108 if (foeExitLink->getViaLane() != 0) {
114 std::vector<MSLink*> foes;
115 for (
int c = 0; c < maxNo; ++c) {
116 if (linkFoes.test(c)) {
117 MSLink* foe = sortedLinks[c].second;
125 for (MSLinkCont::const_iterator q = lc.begin(); q != lc.end(); ++q) {
126 if ((*q)->getViaLane() != 0) {
136 for (
int c = 0; c < (int)sortedLinks.size(); ++c) {
137 if (sortedLinks[c].second->getLane() == 0) {
140 if (linkFoes.test(c)) {
142 if (linkResponse.test(c)) {
143 const std::vector<MSLane::IncomingLaneInfo>& l =
myInternalLanes[li]->getIncomingLanes();
156 assert((*j)->getViaLane()->getLinkCont().size() == 1);
158 exitLink->setRequestInformation((
int)requestPos,
false,
false, std::vector<MSLink*>(),
161 for (std::vector<MSLink*>::const_iterator k = foes.begin(); k != foes.end(); ++k) {
162 (*j)->addBlockedLink(*k);
163 (*k)->addBlockedLink(*j);
MSJunctionLogic * myLogic
const std::string & getID() const
Returns the id.
void postloadInit()
initialises the junction after the whole net has been loaded
std::vector< MSLane * > myIncomingLanes
list of incoming lanes
virtual ~MSRightOfWayJunction()
Destructor.
virtual bool hasFoes() const
MSLane * getViaLane() const
Returns the following inner lane.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::map< const MSLink *, std::vector< MSLink * > > myLinkFoeLinks
A point in 2D or 3D with translation and scaling methods.
virtual const MSLogicJunction::LinkBits & getFoesFor(int linkIndex) const
Returns the foes for the given link.
MSRightOfWayJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane *> incoming, std::vector< MSLane *> internal, MSJunctionLogic *logic)
Constructor.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
std::map< const MSLink *, std::vector< MSLane * > > myLinkFoeInternalLanes
std::vector< MSLane * > myInternalLanes
list of internal lanes
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
virtual const MSLogicJunction::LinkBits & getResponseFor(int linkIndex) const
Returns the response for the given link.
virtual bool getIsCont(int linkIndex) const
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
The edge is an internal edge.
std::bitset< SUMO_MAX_CONNECTIONS > LinkBits
Container for link response and foes.
Representation of a lane in the micro simulation.