44#define DEBUGCOND (myJunction->getID() == "C")
65 myOutgoing(outgoing) {
70 myDone.reserve(variations);
71 for (
int i = 0; i < variations; i++) {
76 for (NBConnectionProhibits::const_iterator j = loadedProhibits.begin(); j != loadedProhibits.end(); j++) {
78 bool ok1 = prohibited.
check(ec);
93 for (NBConnectionVector::const_iterator k = prohibiting.begin(); k != prohibiting.end(); k++) {
95 bool ok2 = sprohibiting.
check(ec);
108 myDone[idx2][idx1] =
true;
109 myDone[idx1][idx2] =
true;
113 std::string pfID = prohibited.
getFrom() !=
nullptr ? prohibited.
getFrom()->
getID() :
"UNKNOWN";
114 std::string ptID = prohibited.
getTo() !=
nullptr ? prohibited.
getTo()->
getID() :
"UNKNOWN";
115 std::string bfID = sprohibiting.
getFrom() !=
nullptr ? sprohibiting.
getFrom()->
getID() :
"UNKNOWN";
116 std::string btID = sprohibiting.
getTo() !=
nullptr ? sprohibiting.
getTo()->
getID() :
"UNKNOWN";
117 WRITE_WARNING(
"could not prohibit " + pfID +
"->" + ptID +
" by " + bfID +
"->" + btID);
124 for (
int s1 = 0; s1 < variations; s1++) {
125 for (
int s2 = s1 + 1; s2 < variations; s2++) {
146 EdgeVector::const_iterator i, j;
162 EdgeVector::const_iterator pfrom = std::find(
myAll.begin(),
myAll.end(), from);
163 while (*pfrom != to) {
166 EdgeVector::const_iterator pto = std::find(
myAll.begin(),
myAll.end(), to);
167 while (*pto != from) {
180 EdgeVector::const_iterator pfrom = std::find(
myAll.begin(),
myAll.end(), from);
181 while (*pfrom != to) {
184 EdgeVector::const_iterator pto = std::find(
myAll.begin(),
myAll.end(), to);
185 while (*pto != from) {
200 if (to1 ==
nullptr || to2 ==
nullptr) {
206 if (idx1 < 0 || idx2 < 0) {
215 myDone[idx1][idx2] =
true;
216 myDone[idx2][idx1] =
true;
252#ifdef DEBUG_SETBLOCKING
255 <<
" 1:" << from1->
getID() <<
"->" << to1->
getID()
256 <<
" 2:" << from2->
getID() <<
"->" << to2->
getID() <<
"\n";
263#ifdef DEBUG_SETBLOCKING
265 std::cout <<
" p1=" << from1p <<
" p2=" << from2p <<
"\n";
270 if (from1p > from2p) {
274 if (from2p > from1p) {
284#ifdef DEBUG_SETBLOCKING
285 if (
DEBUGCOND) std::cout <<
"setBlocking"
286 <<
" 1:" << from1->
getID() <<
"->" << to1->
getID()
287 <<
" 2:" << from2->
getID() <<
"->" << to2->
getID()
324#ifdef DEBUG_SETBLOCKING
325 if (
DEBUGCOND) std::cout <<
"setBlocking1"
326 <<
" 1:" << from1->
getID() <<
"->" << to1->
getID()
327 <<
" 2:" << from2->
getID() <<
"->" << to2->
getID();
334 EdgeVector::const_iterator c1 = std::find(
myAll.begin(),
myAll.end(), from1);
337 while (*c1 != from1 && *c1 != from2) {
347#ifdef DEBUG_SETBLOCKING
349 std::cout <<
" case1: 2 yields\n";
354#ifdef DEBUG_SETBLOCKING
356 std::cout <<
" case1: 1 yields\n";
365 EdgeVector::const_iterator c2 = std::find(
myAll.begin(),
myAll.end(), from2);
368 while (*c2 != from2 && *c2 != from1) {
378#ifdef DEBUG_SETBLOCKING
380 std::cout <<
" case2: 1 yields\n";
385#ifdef DEBUG_SETBLOCKING
387 std::cout <<
" case2: 2 yields\n";
395#ifdef DEBUG_SETBLOCKING
397 std::cout <<
" noDecision\n";
405 EdgeVector::const_iterator p = std::find(
myAll.begin(),
myAll.end(), from);
409 if (p ==
myAll.begin()) {
419 assert(linkIndex >= 0);
420 assert(linkIndex < (
int)
myFoes.size());
427 assert(linkIndex >= 0);
439 for (
int i = 0; i <
numLinks; i++) {
442 if (padding && i < 10) {
461 EdgeVector::const_iterator i;
464 int noLanes = (*i)->getNumLanes();
465 for (
int k = 0; k < noLanes; k++) {
471 for (
auto c : crossings) {
480 int noLanesEdge1 = (*i11)->getNumLanes();
481 for (
int j1 = 0; j1 < noLanesEdge1; j1++) {
482 std::vector<NBEdge::Connection> el1 = (*i11)->getConnectionsFromLane(j1);
483 for (std::vector<NBEdge::Connection>::iterator i12 = el1.begin(); i12 != el1.end(); ++i12) {
484 int idx1 =
getIndex((*i11), (*i12).toEdge);
490 int noLanesEdge2 = (*i21)->getNumLanes();
491 for (
int j2 = 0; j2 < noLanesEdge2; j2++) {
492 std::vector<NBEdge::Connection> el2 = (*i21)->getConnectionsFromLane(j2);
493 for (std::vector<NBEdge::Connection>::iterator i22 = el2.begin(); i22 != el2.end(); i22++) {
494 int idx2 =
getIndex((*i21), (*i22).toEdge);
500 if ((*i11) == (*i21)) {
503#ifdef DEBUG_SETBLOCKING
504 if (
DEBUGCOND) std::cout <<
"resetSignalised both"
505 <<
" 1:" << (*i11)->getID() <<
"->" << (*i12).toEdge->getID()
506 <<
" 2:" << (*i21)->getID() <<
"->" << (*i22).toEdge->getID()
513 if (((*i12).tlID ==
"" && (*i22).tlID ==
"")
515 ((*i12).tlID !=
"" && (*i22).tlID !=
"")) {
521 if (!
foes(*i11, (*i12).toEdge, *i21, (*i22).toEdge)) {
526 if ((*i12).tlID !=
"") {
529#ifdef DEBUG_SETBLOCKING
530 if (
DEBUGCOND) std::cout <<
"resetSignalised:2 yields"
531 <<
" 1:" << (*i11)->getID() <<
"->" << (*i12).toEdge->getID()
532 <<
" 2:" << (*i21)->getID() <<
"->" << (*i22).toEdge->getID() <<
"\n";
537#ifdef DEBUG_SETBLOCKING
538 if (
DEBUGCOND) std::cout <<
"resetSignalised:1 yields"
539 <<
" 1:" << (*i11)->getID() <<
"->" << (*i12).toEdge->getID()
540 <<
" 2:" << (*i21)->getID() <<
"->" << (*i22).toEdge->getID() <<
"\n";
557 const int numLanesEdge = e->getNumLanes();
558 for (
int j = 0; j < numLanesEdge; j++) {
559 int numConnections = (int)e->getConnectionsFromLane(j).size();
561 if (numConnections > 0) {
566 return std::make_pair(numLanes,
numLinks);
572 const NBEdge*
const from2,
const NBEdge*
const to2)
const {
574 if (to1 ==
nullptr || to2 ==
nullptr) {
580 if (idx1 < 0 || idx2 < 0) {
591 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo,
592 bool regardNonSignalisedLowerPriority)
const {
594 if (possProhibitorTo ==
nullptr || possProhibitedTo ==
nullptr) {
598 int possProhibitorIdx =
getIndex(possProhibitorFrom, possProhibitorTo);
599 int possProhibitedIdx =
getIndex(possProhibitedFrom, possProhibitedTo);
600 if (possProhibitorIdx < 0 || possProhibitedIdx < 0) {
606 if (!regardNonSignalisedLowerPriority) {
607 return myForbids[possProhibitorIdx][possProhibitedIdx];
610 if (!
myForbids[possProhibitorIdx][possProhibitedIdx]) {
623 assert(c.toEdge != 0);
644 const int size = (int) connected.size();
645 for (
int k = size; k-- > 0;) {
646 const NBEdge* to = connected[k].toEdge;
649 if (e == from || e == to) {
654 foes += foe ?
'1' :
'0';
671 const int toLane = c.
toLane;
680 for (std::vector<NBNode::Crossing*>::const_reverse_iterator i = crossings.rbegin(); i != crossings.rend(); i++) {
686 int noLanes = (*i)->getNumLanes();
687 for (
int j = noLanes; j-- > 0;) {
688 std::vector<NBEdge::Connection> connected = (*i)->getConnectionsFromLane(j);
689 int size = (int) connected.size();
690 for (
int k = size; k-- > 0;) {
698 }
else if ((*i) == from && fromLane == j) {
703 std::cout <<
" c=" << c.
getDescription(from) <<
" prohibitC=" << connected[k].getDescription(*i)
714 assert(connected[k].toEdge != 0);
715 const int idx2 =
getIndex(*i, connected[k].toEdge);
716 assert(k < (
int) connected.size());
722 std::cout <<
" c=" << c.
getDescription(from) <<
" prohibitC=" << connected[k].getDescription(*i)
723 <<
" idx=" << idx <<
" idx2=" << idx2
725 <<
" clf=" << checkLaneFoes
728 <<
" lc=" <<
laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane)
734 <<
" bc=" <<
bidiConflict(from, c, *i, connected[k],
false)
742 ||
laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane));
752 &&
laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane)
777 for (std::vector<NBNode::Crossing*>::const_reverse_iterator i = crossings.rbegin(); i != crossings.rend(); i++) {
779 for (EdgeVector::const_iterator it_e = (**i).edges.begin(); it_e != (**i).edges.end(); ++it_e) {
780 if ((*it_e) == from || (*it_e) == c.
toEdge) {
785 result +=
foes ?
'1' :
'0';
789 for (
int j = (*i)->getNumLanes() - 1; j >= 0; --j) {
790 const std::vector<NBEdge::Connection>& connected = (*i)->getConnectionsFromLane(j);
791 int size = (int) connected.size();
792 for (
int k = size; k-- > 0;) {
796 if ((
foes(from, c.
toEdge, (*i), connected[k].toEdge) && hasLaneConflict)
831 if (from == prohibitorFrom
899 if (shape.size() == 0 || otherShape.size() == 0) {
904 if (minDV < shape.
length() - POSITION_EPS && minDV > POSITION_EPS) {
914 if (from == prohibitorFrom) {
931 if (from == prohibitorFrom) {
944 if (!
foes && fromBidi && prohibitorFromBidi) {
948 if (prohibitorFromBidi &&
955 return fromBidi || prohibitorFromBidi;
985 std::set<int> fromTargetLanes;
987 if (c.toEdge == con.
toEdge) {
988 fromTargetLanes.insert(c.toLane);
992 if (c.toEdge == con.
toEdge && fromTargetLanes.count(c.toLane) != 0) {
1004 const NBEdge* prohibitorFrom,
const NBEdge* prohibitorTo,
int prohibitorToLane)
const {
1005 if (to != prohibitorTo) {
1020 return rightOfProhibitor ? toLane >= prohibitorToLane : toLane <= prohibitorToLane;
1038 for (
int i = 0; i < variations; i++) {
1040 for (
int j = 0; j < variations; j++) {
1058 if (linkIndex >= 0 && (
int)
myResponse.size() > linkIndex) {
1060 if (!includePedCrossings) {
1063 if (response.find_first_of(
"1") == std::string::npos) {
1080 for (
int idx1 = 0; idx1 <
numLinks(); idx1++) {
1087 if (includePedCrossings) {
1089 for (std::vector<NBNode::Crossing*>::const_reverse_iterator i = crossings.rbegin(); i != crossings.rend(); i++) {
1107 for (EdgeVector::const_reverse_iterator i =
myIncoming.rbegin(); i !=
myIncoming.rend(); i++) {
1108 int noLanes = (*i)->getNumLanes();
1109 for (
int j = noLanes; j-- > 0;) {
1110 std::vector<NBEdge::Connection> connected = (*i)->getConnectionsFromLane(j);
1111 const int size = (int) connected.size();
1112 for (
int k = size; k-- > 0;) {
1113 if ((*i) == from && fromLane != j
1122 for (
int idx1 = 0; idx1 <
numLinks(); idx1++) {
1137 if (crossing.
priority || mustYield) {
1140 if ((e == from && crossing.
priority) || e == to) {
1151 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo)
const {
1153 int idx1 =
getIndex(possProhibitorFrom, possProhibitorTo);
1154 int idx2 =
getIndex(possProhibitedFrom, possProhibitedTo);
1171 std::map<const NBEdge*, int> incomingCount;
1173 std::map<const NBEdge*, std::set<int> > approachedLanes;
1175 std::map<const NBEdge*, std::vector<const NBEdge*> > incomingEdges;
1178 incomingCount[con.toEdge]++;
1179 approachedLanes[con.toEdge].insert(con.toLane);
1180 incomingEdges[con.toEdge].push_back(e);
1183 for (std::map<const NBEdge*, int>::iterator it = incomingCount.begin(); it != incomingCount.end(); ++it) {
1184 const NBEdge*
const to = it->first;
1186 if ((
int)approachedLanes[to].size() >= it->second) {
1187 const std::vector<const NBEdge*>& incoming = incomingEdges[to];
1189 for (
const NBEdge*
const e1 : incoming) {
1190 for (
const NBEdge*
const e2 : incoming) {
1192#ifdef DEBUG_SETBLOCKING
1193 if (
DEBUGCOND) std::cout <<
"resetCooperating"
1194 <<
" 1:" << e1->
getID() <<
"->" << to->
getID()
1195 <<
" 2:" << e2->getID() <<
"->" << to->
getID()
1207 for (
int i = 0; i < (int)
myFoes.size(); i++) {
1217 return myFoes[linkIndex].find_first_of(
"1") != std::string::npos;
#define WRITE_WARNING(msg)
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
std::vector< NBConnection > NBConnectionVector
Definition of a connection vector.
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
std::ostream & operator<<(std::ostream &os, const NBRequest &r)
bool isRailway(SVCPermissions permissions)
Returns whether an edge with the given permissions is a (exclusive) railway edge.
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_PEDESTRIAN
pedestrian
@ SUMO_TAG_REQUEST
description of a logic request within the junction
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)....
@ PARTLEFT
The link is a partial left direction.
@ RIGHT
The link is a (hard) right direction.
@ LEFT
The link is a (hard) left direction.
@ STRAIGHT
The link is a straight direction.
@ PARTRIGHT
The link is a partial right direction.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
NBEdge * getFrom() const
returns the from-edge (start of the connection)
NBEdge * getTo() const
returns the to-edge (end of the connection)
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
static void nextCCW(const EdgeVector &edges, EdgeVector::const_iterator &from)
static void nextCW(const EdgeVector &edges, EdgeVector::const_iterator &from)
Storage for edges, including some functionality operating on multiple edges.
The representation of a single edge during network building.
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
const std::vector< Connection > & getConnections() const
Returns the connections.
double getLaneWidth() const
Returns the default width of lanes of this edge.
NBNode * getToNode() const
Returns the destination node of the edge.
const Connection & getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection (unmodifiable) This method goes through "myConnections" and returns ...
const std::string & getID() const
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
bool hasSignalisedConnectionTo(const NBEdge *const e) const
Check if edge has signalised connections.
int getNumLanes() const
Returns the number of lanes.
std::vector< Connection > getConnectionsFromLane(int lane, const NBEdge *to=nullptr, int toLane=-1) const
Returns connections from a given lane.
static double firstIntersection(const PositionVector &v1, const PositionVector &v2, double width1, double width2, const std::string &error="", bool secondIntersection=false)
compute the first intersection point between the given lane geometries considering their rspective wi...
bool isConnectedTo(const NBEdge *e, const bool ignoreTurnaround=false) const
Returns the information whethe a connection to the given edge has been added (or computed)
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
const NBEdge * getBidiEdge() const
NBNode * getFromNode() const
Returns the origin node of the edge.
NBEdge * getTurnDestination(bool possibleDestination=false) const
double getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node.
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
static double relAngle(double angle1, double angle2)
computes the relative angle between the two angles
A definition of a pedestrian crossing.
bool priority
whether the pedestrians have priority
EdgeVector edges
The edges being crossed.
Represents a single node (junction) during network building.
LinkDirection getDirection(const NBEdge *const incoming, const NBEdge *const outgoing, bool leftHand=false) const
Returns the representation of the described stream's direction.
int getConnectionIndex(const NBEdge *from, const NBEdge::Connection &con) const
return the index of the given connection
SumoXMLNodeType getType() const
Returns the type of this node.
bool tlsStrandedConflict(const NBEdge *from, const NBEdge::Connection &c, const NBEdge *foeFrom, const NBEdge::Connection &foe) const
whether the connection must yield if the foe remains on the intersection after its phase ends
bool extraConflict(int index, int foeIndex) const
whether the given index must yield to the foeIndex while turing right on a red light
static bool rightTurnConflict(const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorFromLane)
return whether the given laneToLane connection is a right turn which must yield to a bicycle crossing...
std::vector< Crossing * > getCrossings() const
return this junctions pedestrian crossings
bool isBentPriority() const
return whether a priority road turns at this node
bool turnFoes(const NBEdge *from, const NBEdge *to, int fromLane, const NBEdge *from2, const NBEdge *to2, int fromLane2, bool lefthand=false) const
return whether the given laneToLane connection originate from the same edge and are in conflict due t...
bool isConstantWidthTransition() const
detects whether a given junction splits or merges lanes while keeping constant road width
bool isTLControlled() const
Returns whether this node is controlled by any tls.
std::vector< std::string > myResponse
const EdgeVector & myOutgoing
edges outgoing from the junction
CombinationsCont myForbids
the link X link blockings
int computeLaneResponse(NBEdge *from, int lane, int pos, const bool checkLaneFoes)
computes the response of a certain lane Returns the next link index within the junction
CombinationsCont myDone
the link X link is done-checks
const EdgeVector & myAll
all (icoming and outgoing) of the junctions edges
bool checkLaneFoesByCooperation(const NBEdge *from, const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon) const
whether the given connections must be checked for lane conflicts due to disjunct target lanes
std::vector< std::string > myFoes
precomputed right-of-way matrices for each lane-to-lane link
int distanceCounterClockwise(NBEdge *from, NBEdge *to)
returns the distance between the incoming (from) and the outgoing (to) edge clockwise in edges
bool bidiConflict(const NBEdge *from, const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon, bool foes) const
whether straight connections are in conflict via bidirectional lane use
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
bool hasConflictAtLink(int linkIndex) const
whether there are conflicting streams of traffic for the given link index
const EdgeVector & myIncoming
edges incoming to the junction
NBNode * myJunction
the node the request is assigned to
int numLinks() const
return to total number of edge-to-edge connections of this request-logic
const std::string & getFoes(int linkIndex) const
bool hasConflict() const
whether there are conflicting streams of traffic at this node
void buildBitfieldLogic()
builds the bitset-representation of the logic
bool oppositeLeftTurnConflict(const NBEdge *from, const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon, bool foes) const
whether opposite left turns intersect
bool laneConflict(const NBEdge *from, const NBEdge *to, int toLane, const NBEdge *prohibitorFrom, const NBEdge *prohibitorTo, int prohibitorToLane) const
return whether the given laneToLane connections prohibit each other under the assumption that the edg...
bool indirectLeftTurnConflict(const NBEdge *from, const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon, bool foes) const
whether straight and indirect left turn are in conflict
int getIndex(const NBEdge *const from, const NBEdge *const to) const
Returns the index to the internal combination container for the given edge combination.
static bool mustBrakeForCrossing(const NBNode *node, const NBEdge *const from, const NBEdge *const to, const NBNode::Crossing &crossing)
Returns the information whether the described flow must brake for the given crossing.
void computeRightOutgoingLinkCrossings(NBEdge *from, NBEdge *to)
computes the relationships between links outgoing right of the given link */
bool mergeConflict(const NBEdge *from, const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon, bool foes) const
whether multple connections from the same edge target the same lane
void writeLogic(OutputDevice &into) const
NBRequest(const NBEdgeCont &ec, NBNode *junction, const EdgeVector &all, const EdgeVector &incoming, const EdgeVector &outgoing, const NBConnectionProhibits &loadedProhibits)
void computeLogic(const bool checkLaneFoes)
writes the XML-representation of the logic as a bitset-logic XML representation
std::string getResponseString(const NBEdge *const from, const NBEdge::Connection &c, const bool checkLaneFoes) const
Writes the response of a certain link.
std::pair< int, int > getSizes() const
returns the number of the junction's lanes and the number of the junction's links in respect.
bool mustBrake(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
const std::string & getResponse(int linkIndex) const
int computeCrossingResponse(const NBNode::Crossing &crossing, int pos)
computes the response of a certain crossing Returns the next link index within the junction
void setBlocking(NBEdge *from1, NBEdge *to1, NBEdge *from2, NBEdge *to2)
void computeLeftOutgoingLinkCrossings(NBEdge *from, NBEdge *to)
computes the relationships between links outgoing left of the given link
bool checkLaneFoesByClass(const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon) const
whether the given connections must be checked for lane conflicts due to the vClasses involved
void resetCooperating()
reset foes it the number of lanes matches (or exceeds) the number of incoming connections for an edge
bool foes(const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const
Returns the information whether the given flows cross.
bool rightTurnConflict(const NBEdge *from, const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon) const
whether the given connections crosses the foe connection from the same lane and must yield
static void reportWarnings()
reports warnings if any occurred
std::vector< bool > LinkInfoCont
definition of a container to store boolean informations about a link into
std::string getFoesString(NBEdge *from, const NBEdge::Connection &c, const bool checkLaneFoes) const
std::vector< bool > myHaveVia
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & writePadding(const std::string &val)
writes padding (ignored for binary output)
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
void append(const PositionVector &v, double sameThreshold=2.0)
double length() const
Returns the length.
bool almostSame(const PositionVector &v2, double maxDiv=POSITION_EPS) const
check if the two vectors have the same length and pairwise similar positions
PositionVector reverse() const
reverse position vector
A structure which describes a connection between edges or lanes.
bool indirectLeft
Whether this connection is an indirect left turn.
int fromLane
The lane the connections starts at.
int toLane
The lane the connections yields in.
NBEdge * toEdge
The edge the connections yields in.
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
PositionVector viaShape
shape of via
std::string getDescription(const NBEdge *parent) const
get string describing this connection
PositionVector shape
shape of Connection
int tlLinkIndex
The index of this connection within the controlling traffic light.