44 const std::string& name,
45 std::vector<MSLane*> incoming,
46 std::vector<MSLane*> internal,
62 std::vector<std::pair<const MSLane*, MSLink*> > sortedLinks;
65 for (
MSLink*
const link : lane->getLinkCont()) {
66 if (link->getLane()->getEdge().isWalkingArea() ||
67 (lane->getEdge().isWalkingArea() && !link->getLane()->getEdge().isCrossing())) {
70 sortedLinks.emplace_back(lane, link);
78 const MSLane* walkingAreaFoe =
nullptr;
79 for (
MSLink*
const link : lane->getLinkCont()) {
80 if (link->getLane()->getEdge().isWalkingArea()) {
83 walkingAreaFoe = link->getLane();
86 }
else if ((lane->getEdge().isWalkingArea() && !link->getLane()->getEdge().isCrossing())) {
95 for (
int c = 0; c < maxNo; ++c) {
96 if (linkResponse.test(c)) {
97 MSLink* foe = sortedLinks[c].second;
109 std::vector<MSLink*> foes;
110 for (
int c = 0; c < maxNo; ++c) {
111 if (linkFoes.test(c)) {
112 MSLink* foe = sortedLinks[c].second;
120 if (vLink->getViaLane() !=
nullptr) {
121 foes.push_back(vLink);
129 for (
int c = 0; c < (int)sortedLinks.size(); ++c) {
130 if (sortedLinks[c].second->getLane() ==
nullptr) {
133 if (linkFoes.test(c)) {
135 if (linkResponse.test(c) || sortedLinks[c].second->isIndirect() ||
136 link->getLane()->getBidiLane() == sortedLinks[c].second->getLaneBefore()) {
138 if (l.size() == 1 && l[0].lane->getEdge().isInternal()) {
150 assert(link->getViaLane()->getLinkCont().size() == 1);
155 if (ili.lane->getEdge().isWalkingArea()) {
169 if (walkingAreaFoe !=
nullptr && lane->
getLinkCont().size() > 1) {
170 for (
const MSLink*
const link : lane->getLinkCont()) {
171 if (!link->getLane()->getEdge().isWalkingArea()) {
@ SVC_PEDESTRIAN
pedestrian
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
virtual bool getIsCont(int linkIndex) const
virtual bool hasFoes() const
virtual const MSLogicJunction::LinkBits & getResponseFor(int linkIndex) const
Returns the response for the given link.
virtual const MSLogicJunction::LinkBits & getFoesFor(int linkIndex) const
Returns the foes for the given link.
Representation of a lane in the micro simulation.
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
const std::vector< MSLink * > & getLinkCont() const
returns the container with all links !!!
MSLane * getLane() const
Returns the connected lane.
void addWalkingAreaFoe(const MSLane *lane)
add walkingarea as foe (when entering the junction)
MSLane * getViaLane() const
Returns the following inner lane.
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.
void addWalkingAreaFoeExit(const MSLane *lane)
add walkingarea as foe (when leaving the junction)
std::vector< MSLane * > myInternalLanes
list of internal lanes
std::bitset< SUMO_MAX_CONNECTIONS > LinkBits
Container for link response and foes.
std::vector< MSLane * > myIncomingLanes
list of incoming lanes
MSJunctionLogic * myLogic
std::map< const MSLink *, std::vector< MSLane * > > myLinkFoeInternalLanes
void postloadInit()
initialises the junction after the whole net has been loaded
std::map< const MSLink *, std::vector< MSLink * > > myLinkFoeLinks
virtual ~MSRightOfWayJunction()
Destructor.
MSRightOfWayJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, const std::string &name, std::vector< MSLane * > incoming, std::vector< MSLane * > internal, MSJunctionLogic *logic)
Constructor.
const std::string & getID() const
Returns the id.
A point in 2D or 3D with translation and scaling methods.