63 std::vector<std::pair<const MSLane*, MSLink*> > sortedLinks;
66 for (
MSLink*
const link : lane->getLinkCont()) {
67 if (link->getLane()->getEdge().isWalkingArea() ||
68 (lane->getEdge().isWalkingArea() && !link->getLane()->getEdge().isCrossing())) {
71 sortedLinks.emplace_back(lane, link);
76 const bool hasFoes =
myLogic->hasFoes();
79 const MSLane* walkingAreaFoe =
nullptr;
80 for (
MSLink*
const link : lane->getLinkCont()) {
81 if (link->getLane()->getEdge().isWalkingArea()) {
84 walkingAreaFoe = link->getLane();
87 }
else if ((lane->getEdge().isWalkingArea() && !link->getLane()->getEdge().isCrossing())) {
90 if (
myLogic->getLogicSize() <= requestPos) {
95 bool cont =
myLogic->getIsCont(requestPos);
96 for (
int c = 0; c < maxNo; ++c) {
97 if (linkResponse.test(c)) {
98 MSLink* foe = sortedLinks[c].second;
110 std::vector<MSLink*> foes;
111 for (
int c = 0; c < maxNo; ++c) {
112 if (linkFoes.test(c)) {
113 MSLink* foe = sortedLinks[c].second;
121 if (vLink->getViaLane() !=
nullptr) {
122 foes.push_back(vLink);
130 for (
int c = 0; c < (int)sortedLinks.size(); ++c) {
131 if (sortedLinks[c].second->getLane() ==
nullptr) {
134 if (linkFoes.test(c)) {
141 if (linkResponse.test(c) || sortedLinks[c].second->isIndirect() ||
142 link->getLane()->getBidiLane() == sortedLinks[c].second->getLaneBefore()) {
143 const std::vector<MSLane::IncomingLaneInfo>& l =
myInternalLanes[li]->getIncomingLanes();
144 if (l.size() == 1 && l[0].lane->getEdge().isInternal()) {
156 assert(link->getViaLane()->getLinkCont().size() == 1);
161 if (ili.lane->getEdge().isWalkingArea()) {
175 if (walkingAreaFoe !=
nullptr && lane->
getLinkCont().size() > 1) {
176 for (
const MSLink*
const link : lane->getLinkCont()) {
177 if (!link->getLane()->getEdge().isWalkingArea()) {
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.
MSLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, const std::string &name, std::vector< MSLane * > incoming, std::vector< MSLane * > internal)
Constructor.
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.