42 class NBJunctionTypeIO;
80 std::pair<int, int>
getSizes()
const;
90 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo)
const;
100 bool mustBrake(
const NBEdge*
const from,
const NBEdge*
const to,
int fromLane,
int toLane,
bool includePedCrossings)
const;
119 const NBEdge*
const from2,
const NBEdge*
const to2)
const;
131 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo,
132 bool regardNonSignalisedLowerPriority)
const;
160 int pos,
const bool checkLaneFoes,
bool padding)
const;
190 int fromLane,
int toLane,
const bool checkLaneFoes)
const;
std::pair< int, int > getSizes() const
returns the number of the junction's lanes and the number of the junction's links in respect...
void computeLeftOutgoingLinkCrossings(NBEdge *from, NBEdge *to)
computes the relationships between links outgoing left of the given link
A structure which describes a connection between edges or lanes.
std::vector< bool > LinkInfoCont
definition of a container to store boolean informations about a link into
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
NBRequest(const NBEdgeCont &ec, NBNode *junction, const EdgeVector &all, const EdgeVector &incoming, const EdgeVector &outgoing, const NBConnectionProhibits &loadedProhibits)
A SUMO-compliant built logic for a traffic light.
The representation of a single edge during network building.
NBNode * myJunction
the node the request is assigned to
The base class for traffic light logic definitions.
std::string getResponseString(const NBEdge *const from, const NBEdge::Connection &c, const bool checkLaneFoes) const
Writes the response of a certain link.
std::vector< LinkInfoCont > CombinationsCont
definition of a container for link(edge->edge) X link(edge->edge) combinations (size = |myIncoming|*|...
void buildBitfieldLogic()
builds the bitset-representation of the logic
const EdgeVector & myOutgoing
edges outgoing from the junction
void setBlocking(NBEdge *from1, NBEdge *to1, NBEdge *from2, NBEdge *to2)
bool checkLaneFoesByClass(const NBEdge::Connection &con, const NBEdge *prohibitorFrom, const NBEdge::Connection &prohibitorCon) const
whether the given connections must be check for lane conflicts due to the vClasses involved ...
int writeLaneResponse(OutputDevice &od, NBEdge *from, int lane, int pos, const bool checkLaneFoes, bool padding) const
writes the response of a certain lane Returns the next link index within the junction ...
const EdgeVector & myIncoming
edges incoming to the junction
int numLinks() const
return to total number of edge-to-edge connections of this request-logic
CombinationsCont myDone
the link X link is done-checks
int getIndex(const NBEdge *const from, const NBEdge *const to) const
Returns the index to the internal combination container for the given edge combination.
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.
static void reportWarnings()
reports warnings if any occurred
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.
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.
void computeRightOutgoingLinkCrossings(NBEdge *from, NBEdge *to)
computes the relationships between links outgoing right of the given link */
Storage for edges, including some functionality operating on multiple edges.
int writeCrossingResponse(OutputDevice &od, const NBNode::Crossing &crossing, int pos) const
writes the response of a certain crossing Returns the next link index within the junction ...
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.
const EdgeVector & myAll
all (icoming and outgoing) of the junctions edges
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...
NBRequest & operator=(const NBRequest &s)=delete
Invalidated assignment operator.
std::map< NBEdge *, LaneVector > OccupiedLanes
a container for approached lanes of a certain edge
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
void writeLogic(std::string key, OutputDevice &into, const bool checkLaneFoes) const
writes the XML-representation of the logic as a bitset-logic XML representation
A storage for options typed value containers)
friend std::ostream & operator<<(std::ostream &os, const NBRequest &r)
prints the request
std::string getFoesString(NBEdge *from, NBEdge *to, int fromLane, int toLane, const bool checkLaneFoes) const
Represents a single node (junction) during network building.
A definition of a pedestrian crossing.
Static storage of an output device and its base (abstract) implementation.
int distanceCounterClockwise(NBEdge *from, NBEdge *to)
returns the distance between the incoming (from) and the outgoing (to) edge clockwise in edges ...
void resetCooperating()
reset foes it the number of lanes matches (or exceeds) the number of incoming connections for an edge...
CombinationsCont myForbids
the link X link blockings