40 #define MIN_GREEN_TIME 5 43 #define DEBUGCOND true 49 const std::vector<NBNode*>& junctions,
SUMOTime offset,
52 myHaveSinglePhase(false) {
100 for (
int e2l = 0; e2l < e2->
getNumLanes(); e2l++) {
102 for (std::vector<NBEdge::Connection>::iterator e1c = approached1.begin(); e1c != approached1.end(); ++e1c) {
106 for (std::vector<NBEdge::Connection>::iterator e2c = approached2.begin(); e2c != approached2.end(); ++e2c) {
110 if (!
forbids(e1, (*e1c).toEdge, e2, (*e2c).toEdge,
true)) {
122 std::pair<NBEdge*, NBEdge*>
124 std::pair<NBEdge*, NBEdge*> bestPair(static_cast<NBEdge*>(
nullptr), static_cast<NBEdge*>(
nullptr));
125 double bestValue = -1;
126 for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) {
127 for (EdgeVector::const_iterator j = i + 1; j != edges.end(); ++j) {
129 if (value > bestValue) {
131 bestPair = std::pair<NBEdge*, NBEdge*>(*i, *j);
132 }
else if (value == bestValue) {
134 const double oa =
GeomHelper::getMinAngleDiff(bestPair.first->getAngleAtNode(bestPair.first->getToNode()), bestPair.second->getAngleAtNode(bestPair.second->getToNode()));
136 if (bestPair.first->getID() < (*i)->getID()) {
137 bestPair = std::pair<NBEdge*, NBEdge*>(*i, *j);
139 }
else if (oa < ca) {
140 bestPair = std::pair<NBEdge*, NBEdge*>(*i, *j);
149 std::pair<NBEdge*, NBEdge*>
151 if (incoming.size() == 1) {
153 std::pair<NBEdge*, NBEdge*> ret(*incoming.begin(),
static_cast<NBEdge*
>(
nullptr));
161 used.push_back(*incoming.begin());
164 for (EdgeVector::iterator i = incoming.begin() + 1; i != incoming.end() && prio ==
getToPrio(*i); ++i) {
168 if (used.size() < 2) {
172 #ifdef DEBUG_STREAM_ORDERING 178 incoming.erase(find(incoming.begin(), incoming.end(), ret.first));
179 incoming.erase(find(incoming.begin(), incoming.end(), ret.second));
200 std::vector<bool> isTurnaround;
201 std::vector<bool> hasTurnLane;
202 std::vector<int> fromLanes;
205 for (
int i1 = 0; i1 < (int)incoming.size(); i1++) {
206 int noLanes = incoming[i1]->getNumLanes();
207 noLanesAll += noLanes;
208 for (
int i2 = 0; i2 < noLanes; i2++) {
209 NBEdge* fromEdge = incoming[i1];
211 noLinksAll += (int) approached.size();
212 bool hasStraight =
false;
213 for (
int i3 = 0; i3 < (int)approached.size(); i3++) {
214 if (!fromEdge->
mayBeTLSControlled(i2, approached[i3].toEdge, approached[i3].toLane)) {
218 assert(i3 < (
int)approached.size());
219 NBEdge* toEdge = approached[i3].toEdge;
220 fromEdges.push_back(fromEdge);
221 fromLanes.push_back((
int)i2);
222 toEdges.push_back(toEdge);
223 if (toEdge !=
nullptr) {
226 isTurnaround.push_back(
true);
232 for (
int i3 = 0; i3 < (int)approached.size(); i3++) {
233 hasTurnLane.push_back(!hasStraight);
238 std::vector<NBNode::Crossing*> crossings;
240 const std::vector<NBNode::Crossing*>& c = (*i)->getCrossings();
243 (*i)->setCrossingTLIndices(
getID(), noLinksAll);
245 copy(c.begin(), c.end(), std::back_inserter(crossings));
246 noLinksAll += (int)c.size();
256 std::vector<int> greenPhases;
257 std::vector<bool> hadGreenMajor(noLinksAll,
false);
258 while (toProc.size() > 0) {
259 std::pair<NBEdge*, NBEdge*> chosen;
260 if (groupOpposites) {
261 if (incoming.size() == 2) {
264 double angle = fabs(
NBHelpers::relAngle(incoming[0]->getAngleAtNode(incoming[0]->getToNode()), incoming[1]->getAngleAtNode(incoming[1]->getToNode())));
267 chosen = std::pair<NBEdge*, NBEdge*>(toProc[0],
static_cast<NBEdge*
>(
nullptr));
268 toProc.erase(toProc.begin());
276 chosen = std::pair<NBEdge*, NBEdge*>(toProc[0],
static_cast<NBEdge*
>(
nullptr));
277 toProc.erase(toProc.begin());
280 std::string state((
int) noLinksAll,
'r');
283 for (
int i1 = 0; i1 < (int) incoming.size(); ++i1) {
284 NBEdge* fromEdge = incoming[i1];
285 const bool inChosen = fromEdge == chosen.first || fromEdge == chosen.second;
287 for (
int i2 = 0; i2 < numLanes; i2++) {
289 for (
int i3 = 0; i3 < (int)approached.size(); ++i3) {
290 if (!fromEdge->
mayBeTLSControlled(i2, approached[i3].toEdge, approached[i3].toLane)) {
306 for (
int i1 = 0; i1 < pos; ++i1) {
307 if (state[i1] ==
'G') {
312 if (state[i2] ==
'G' && !isTurnaround[i2] &&
313 (
forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1],
true) ||
forbids(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2],
true))) {
317 if (!isForbidden && !
hasCrossing(fromEdges[i1], toEdges[i1], crossings)) {
324 bool haveForbiddenLeftMover =
false;
325 std::vector<bool> rightTurnConflicts(pos,
false);
326 state =
correctConflicting(state, fromEdges, toEdges, isTurnaround, fromLanes, hadGreenMajor, haveForbiddenLeftMover, rightTurnConflicts);
327 for (
int i1 = 0; i1 < pos; ++i1) {
328 if (state[i1] ==
'G') {
329 hadGreenMajor[i1] =
true;
334 std::vector<bool> leftGreen(pos,
false);
336 bool foundLeftTurnLane =
false;
337 for (
int i1 = 0; i1 < pos; ++i1) {
338 if (state[i1] ==
'g' && !rightTurnConflicts[i1] && hasTurnLane[i1]) {
339 foundLeftTurnLane =
true;
342 const bool buildLeftGreenPhase = haveForbiddenLeftMover && !
myHaveSinglePhase && leftTurnTime > 0 && foundLeftTurnLane;
345 for (
int i1 = 0; i1 < pos; ++i1) {
346 if (state[i1] ==
'g' && !rightTurnConflicts[i1]) {
347 leftGreen[i1] =
true;
348 if (fromEdges[i1]->getSpeed() > minorLeftSpeedThreshold) {
349 if (buildLeftGreenPhase) {
351 }
else if (!isTurnaround[i1]) {
352 WRITE_WARNING(
"Minor green from edge '" + fromEdges[i1]->
getID() +
"' to edge '" + toEdges[i1]->
getID() +
"' exceeds " 353 +
toString(minorLeftSpeedThreshold) +
"m/s. Maybe a left-turn lane is missing.");
359 const std::string vehicleState = state;
360 greenPhases.push_back((
int)logic->
getPhases().size());
361 state =
addPedestrianPhases(logic, greenTime, minDur, maxDur, state, crossings, fromEdges, toEdges);
363 for (
int i1 = pos; i1 < pos + (int)crossings.size(); ++i1) {
366 if (brakingTime > 0) {
368 for (
int i1 = 0; i1 < pos; ++i1) {
369 if (state[i1] !=
'G' && state[i1] !=
'g') {
372 if ((vehicleState[i1] >=
'a' && vehicleState[i1] <=
'z') && buildLeftGreenPhase && !rightTurnConflicts[i1]) {
378 logic->
addStep(brakingTime, state);
384 if (buildLeftGreenPhase) {
386 for (
int i1 = 0; i1 < pos; ++i1) {
387 if (state[i1] ==
'Y' || state[i1] ==
'y') {
391 if (state[i1] ==
'g' || leftGreen[i1]) {
396 state =
correctConflicting(state, fromEdges, toEdges, isTurnaround, fromLanes, hadGreenMajor, haveForbiddenLeftMover, rightTurnConflicts);
399 logic->
addStep(leftTurnTime, state, minDur, maxDur);
402 if (brakingTime > 0) {
403 for (
int i1 = 0; i1 < pos; ++i1) {
404 if (state[i1] !=
'G' && state[i1] !=
'g') {
410 logic->
addStep(brakingTime, state);
417 if (crossings.size() > 0) {
421 if (logic->
getPhases().size() == 2 && brakingTime > 0
424 logic->
addStep(redTime, std::string(noLinksAll,
'r'));
427 if (crossings.size() > 0 && !onlyConts) {
437 for (std::vector<int>::const_iterator it = greenPhases.begin(); it != greenPhases.end(); ++it) {
439 greenPhaseTime += dur;
440 minGreenDuration =
MIN2(minGreenDuration, dur);
442 const int patchSeconds = (int)(
STEPS2TIME(cycleTime - totalDuration) / greenPhases.size());
443 const int patchSecondsRest = (int)(
STEPS2TIME(cycleTime - totalDuration)) - patchSeconds * (
int)greenPhases.size();
447 || greenPhases.size() == 0) {
453 for (std::vector<int>::const_iterator it = greenPhases.begin(); it != greenPhases.end(); ++it) {
456 if (greenPhases.size() > 0) {
466 if (totalDuration > 0) {
467 if (totalDuration > 3 * (greenTime + 2 * brakingTime + leftTurnTime)) {
482 for (
auto c : crossings) {
486 for (EdgeVector::const_iterator it_e = cross.
edges.begin(); it_e != cross.
edges.end(); ++it_e) {
487 const NBEdge* edge = *it_e;
488 if (edge == from || edge == to) {
501 std::string state,
const std::vector<NBNode::Crossing*>& crossings,
const EdgeVector& fromEdges,
const EdgeVector& toEdges) {
506 const std::string orig = state;
510 logic->
addStep(greenTime, state, minDur, maxDur);
512 const SUMOTime pedTime = greenTime - pedClearingTime;
513 if (pedTime >= minPedTime) {
515 const int pedStates = (int)crossings.size();
516 logic->
addStep(pedTime, state, minDur, maxDur);
517 state = state.substr(0, state.size() - pedStates) + std::string(pedStates,
'r');
518 logic->
addStep(pedClearingTime, state);
522 logic->
addStep(greenTime, state, minDur, maxDur);
531 std::string result = state;
532 const int pos = (int)(state.size() - crossings.size());
533 for (
int ic = 0; ic < (int)crossings.size(); ++ic) {
534 const int i1 = pos + ic;
539 if (fromEdges[i2] != 0 && toEdges[i2] != 0 && fromEdges[i2]->getToNode() == cross.
node) {
540 for (EdgeVector::const_iterator it = cross.
edges.begin(); it != cross.
edges.end(); ++it) {
543 if (state[i2] !=
'r' && state[i2] !=
's' && (edge == fromEdges[i2] ||
559 for (
int i1 = 0; i1 < pos; ++i1) {
560 if (result[i1] ==
'G') {
561 for (
int ic = 0; ic < (int)crossings.size(); ++ic) {
563 if (fromEdges[i1] != 0 && toEdges[i1] != 0 && fromEdges[i1]->getToNode() == crossing.
node) {
564 const int i2 = pos + ic;
617 (*i)->removeTrafficLight(&dummy);
628 for (EdgeVector::iterator it = result.begin(); it != result.end();) {
629 if ((*it)->getConnections().size() == 0 || (*it)->isInternal()) {
630 it = result.erase(it);
644 for (
int i1 = 0; i1 < (int)fromEdges.size(); ++i1) {
645 if (state[i1] ==
'G') {
648 bool followsChosen =
false;
649 for (
int i2 = 0; i2 < (int)fromEdges.size() && !followsChosen; ++i2) {
650 if (state[i2] ==
'G' && fromEdges[i1] == toEdges[i2]) {
651 followsChosen =
true;
666 const std::vector<bool>& isTurnaround,
667 const std::vector<int>& fromLanes,
668 const std::vector<bool>& hadGreenMajor,
669 bool& haveForbiddenLeftMover,
670 std::vector<bool>& rightTurnConflicts) {
672 for (
int i1 = 0; i1 < (int)fromEdges.size(); ++i1) {
673 if (state[i1] ==
'G') {
674 for (
int i2 = 0; i2 < (int)fromEdges.size(); ++i2) {
675 if ((state[i2] ==
'G' || state[i2] ==
'g')) {
677 fromEdges[i1], toEdges[i1], fromLanes[i1], fromEdges[i2], toEdges[i2], fromLanes[i2])) {
678 rightTurnConflicts[i1] =
true;
680 if (
forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1],
true, controlledWithin) || rightTurnConflicts[i1]) {
683 if (!isTurnaround[i1] && !hadGreenMajor[i1]) {
684 haveForbiddenLeftMover =
true;
690 if (state[i1] ==
'r') {
692 fromEdges[i1]->getToNode()->getDirection(fromEdges[i1], toEdges[i1]) ==
LINKDIR_RIGHT) {
695 for (
int i2 = 0; i2 < (int)fromEdges.size(); ++i2) {
696 if (state[i2] ==
'G' && !isTurnaround[i2] &&
697 (
forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1],
true) ||
698 forbids(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2],
true))) {
699 const LinkDirection foeDir = fromEdges[i2]->getToNode()->getDirection(fromEdges[i2], toEdges[i2]);
706 if (state[i1] ==
's') {
708 for (
int i2 = 0; i2 < (int)fromEdges.size(); ++i2) {
709 if (state[i2] ==
'G' && !isTurnaround[i2] &&
710 (
forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1],
true) ||
711 forbids(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2],
true))) {
725 const std::vector<NBNode::Crossing*>& crossings,
const EdgeVector& fromEdges,
const EdgeVector& toEdges) {
726 const int vehLinks = noLinksAll - (int)crossings.size();
727 std::vector<bool> foundGreen(crossings.size(),
false);
728 const std::vector<NBTrafficLightLogic::PhaseDefinition>& phases = logic->
getPhases();
729 for (
int i = 0; i < (int)phases.size(); ++i) {
730 const std::string state = phases[i].state;
731 for (
int j = 0; j < (int)crossings.size(); ++j) {
734 foundGreen[j] =
true;
738 for (
int j = 0; j < (int)foundGreen.size(); ++j) {
739 if (!foundGreen[j]) {
742 if (phases.size() > 0) {
743 bool needYellowPhase =
false;
744 std::string state = phases.back().state;
745 for (
int i1 = 0; i1 < vehLinks; ++i1) {
746 if (state[i1] ==
'G' || state[i1] ==
'g') {
748 needYellowPhase =
true;
752 if (needYellowPhase && brakingTime > 0) {
753 logic->
addStep(brakingTime, state);
767 if (allRedTime > 0) {
769 std::string allRedState = state;
770 for (
int i1 = 0; i1 < (int)state.size(); ++i1) {
771 if (allRedState[i1] ==
'Y' || allRedState[i1] ==
'y') {
772 allRedState[i1] =
'r';
775 logic->
addStep(allRedTime, allRedState);
781 int minCustomIndex = -1;
782 int maxCustomIndex = -1;
785 const std::vector<NBNode::Crossing*>& c = (*i)->getCrossings();
786 for (
auto crossing : c) {
787 minCustomIndex =
MIN2(minCustomIndex, crossing->customTLIndex);
788 minCustomIndex =
MIN2(minCustomIndex, crossing->customTLIndex2);
789 maxCustomIndex =
MAX2(maxCustomIndex, crossing->customTLIndex);
790 maxCustomIndex =
MAX2(maxCustomIndex, crossing->customTLIndex2);
807 if (logic !=
nullptr) {
static double relAngle(double angle1, double angle2)
computes the relative angle between the two angles
bool mayBeTLSControlled(int fromLane, NBEdge *toEdge, int toLane) const
return true if certain connection must be controlled by TLS
static double getMinAngleDiff(double angle1, double angle2)
Returns the minimum distance (clockwise/counter-clockwise) between both angles.
The link is a partial left direction.
The link has green light, may pass.
virtual void setParticipantsInformation()
Builds the list of participating nodes/edges/links.
bool setControllingTLInformation(const NBConnection &c, const std::string &tlID)
Returns if the link could be set as to be controlled.
void setTLControllingInformation() const
Informs edges about being controlled by a tls.
TrafficLightType myType
The algorithm type for the traffic light.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
void collectAllLinks()
helper method for use in NBOwnTLDef and NBLoadedSUMOTLDef
static const std::string DummyID
id for temporary definitions
int getNumLinks()
Returns the number of participating links.
static bool hasCrossing(const NBEdge *from, const NBEdge *to, const std::vector< NBNode::Crossing *> &crossings)
compute whether the given connection is crossed by pedestrians
RightOnRedConflicts myRightOnRedConflicts
A SUMO-compliant built logic for a traffic light.
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
The link has green light, has to brake.
std::string correctConflicting(std::string state, const EdgeVector &fromEdges, const EdgeVector &toEdges, const std::vector< bool > &isTurnaround, const std::vector< int > &fromLanes, const std::vector< bool > &hadGreenMajor, bool &haveForbiddenLeftMover, std::vector< bool > &rightTurnConflicts)
change 'G' to 'g' for conflicting connections
The representation of a single edge during network building.
std::string allowFollowersOfChosen(std::string state, const EdgeVector &fromEdges, const EdgeVector &toEdges)
allow connections that follow on of the chosen edges
TrafficLightType getType() const
get the algorithm type (static etc..)
const std::vector< PhaseDefinition > & getPhases() const
Returns the phases.
std::string time2string(SUMOTime t)
NBTrafficLightLogic * compute(OptionsCont &oc)
Computes the traffic light logic.
The base class for traffic light logic definitions.
NBEdge * getTurnDestination(bool possibleDestination=false) const
static const SUMOTime UNSPECIFIED_DURATION
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
NBEdge * getFrom() const
returns the from-edge (start of the connection)
bool isForbidden(SVCPermissions permissions)
Returns whether an edge with the given permission is a forbidden edge.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
const std::string & getID() const
Returns the id.
static EdgeVector getConnectedOuterEdges(const EdgeVector &incoming)
get edges that have connections
SUMOTime myOffset
The offset in the program.
The link is a (hard) left direction.
#define WRITE_WARNING(msg)
std::pair< NBEdge *, NBEdge * > getBestPair(EdgeVector &incoming)
Returns the combination of two edges from the given which has most unblocked streams.
static OptionsCont & getOptions()
Retrieves the options.
static bool rightTurnConflict(const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorFromLane, bool lefthand=false)
return whether the given laneToLane connection is a right turn which must yield to a bicycle crossing...
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
The link is a straight direction.
std::vector< Connection > getConnectionsFromLane(int lane) const
Returns connections from a given lane.
static void addPedestrianScramble(NBTrafficLightLogic *logic, int noLinksAll, SUMOTime greenTime, SUMOTime yellowTime, const std::vector< NBNode::Crossing *> &crossings, const EdgeVector &fromEdges, const EdgeVector &toEdges)
add an additional pedestrian phase if there are crossings that did not get green yet ...
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
int getNumLanes() const
Returns the number of lanes.
void replaceRemoved(NBEdge *removed, int removedLane, NBEdge *by, int byLane)
Replaces a removed edge/lane.
double computeUnblockedWeightedStreamNumber(const NBEdge *const e1, const NBEdge *const e2)
Returns how many streams outgoing from the edges can pass the junction without being blocked...
std::pair< NBEdge *, NBEdge * > getBestCombination(const EdgeVector &edges)
Returns the combination of two edges from the given which has most unblocked streams.
bool myHaveSinglePhase
Whether left-mover should not have an additional phase.
void checkCustomCrossingIndices(NBTrafficLightLogic *logic) const
fix states in regard to custom crossing indices
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
NBOwnTLDef(const std::string &id, const std::vector< NBNode *> &junctions, SUMOTime offset, TrafficLightType type)
Constructor.
The link is a (hard) right direction.
static const std::string DefaultProgramID
const std::string & getProgramID() const
Returns the ProgramID.
The link is a partial right direction.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
void buildAllRedState(SUMOTime allRedTime, NBTrafficLightLogic *logic, const std::string &state)
int getMaxIndex()
Returns the maximum index controlled by this traffic light.
SUMOTime getDuration() const
Returns the duration of the complete cycle.
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing, bool leftHand=false) const
Returns the representation of the described stream's direction.
const EdgeVector & getIncomingEdges() const
Returns the list of incoming edges (must be build first)
static std::string patchStateForCrossings(const std::string &state, const std::vector< NBNode::Crossing *> &crossings, const EdgeVector &fromEdges, const EdgeVector &toEdges)
compute phase state in regard to pedestrian crossings
void closeBuilding(bool checkVarDurations=true)
closes the building process
bool myRightOnRedConflictsReady
NBTrafficLightLogic * myCompute(int brakingTimeSeconds)
Computes the traffic light logic finally in dependence to the type.
NBTrafficLightLogic * computeLogicAndConts(int brakingTimeSeconds, bool onlyConts=false)
helper function for myCompute
void collectLinks()
Collects the links participating in this traffic light.
static std::string addPedestrianPhases(NBTrafficLightLogic *logic, SUMOTime greenTime, SUMOTime minDur, SUMOTime maxDur, std::string state, const std::vector< NBNode::Crossing *> &crossings, const EdgeVector &fromEdges, const EdgeVector &toEdges)
add 1 or 2 phases depending on the presence of pedestrian crossings
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority, bool sameNodeOnly=false) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
bool myNeedsContRelationReady
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
const NBNode * node
The parent node of this crossing.
NeedsContRelation myNeedsContRelation
void setPhaseDuration(int phaseIndex, SUMOTime duration)
Modifies the duration for an existing phase (used by NETEDIT)
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
double getDirectionalWeight(LinkDirection dir)
Returns the weight of a stream given its direction.
EdgeVector edges
The edges being crossed.
Represents a single node (junction) during network building.
A definition of a pedestrian crossing.
bool mustBrakeForCrossing(const NBEdge *const from, const NBEdge *const to, const Crossing &crossing) const
Returns the information whether the described flow must brake for the given crossing.
void setStateLength(int numLinks, LinkState fill=LINKSTATE_TL_RED)
data structure for caching needsCont information
std::vector< NBNode * > myControlledNodes
The container with participating nodes.
NBNode * getFromNode() const
Returns the origin node of the edge.
A traffic light logics which must be computed (only nodes/edges are given)
void addStep(SUMOTime duration, const std::string &state, int index=-1)
Adds a phase to the logic.
void initNeedsContRelation() const
Sorts edges by their priority within the node they end at.
NBConnectionVector myControlledLinks
The list of controlled links.
NBNode * getToNode() const
Returns the destination node of the edge.
int getToPrio(const NBEdge *const e)
Returns this edge's priority at the node it ends at.
void remapRemoved(NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
Replaces occurences of the removed edge in incoming/outgoing edges of all definitions.