 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
41 class NBJunctionTypeIO;
79 std::pair<int, int>
getSizes()
const;
89 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo)
const;
99 bool mustBrake(
const NBEdge*
const from,
const NBEdge*
const to,
int fromLane,
int toLane,
bool includePedCrossings)
const;
118 const NBEdge*
const from2,
const NBEdge*
const to2)
const;
130 const NBEdge*
const possProhibitedFrom,
const NBEdge*
const possProhibitedTo,
131 bool regardNonSignalisedLowerPriority)
const;
138 const std::string&
getFoes(
int linkIndex)
const;
139 const std::string&
getResponse(
int linkIndex)
const;
193 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.
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.
int numLinks() const
return to total number of edge-to-edge connections of this request-logic
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.
Storage for edges, including some functionality operating on multiple edges.
Static storage of an output device and its base (abstract) implementation.
const std::string & getResponse(int linkIndex) const
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
std::vector< LinkInfoCont > CombinationsCont
definition of a container for link(edge->edge) X link(edge->edge) combinations (size = |myIncoming|*|...
std::vector< std::string > myResponse
void setBlocking(NBEdge *from1, NBEdge *to1, NBEdge *from2, NBEdge *to2)
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
void buildBitfieldLogic()
builds the bitset-representation of the logic
const EdgeVector & myIncoming
edges incoming to the junction
std::vector< std::string > myFoes
precomputed right-of-way matrices for each lane-to-lane 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
int computeCrossingResponse(const NBNode::Crossing &crossing, int pos)
computes the response of a certain crossing Returns the next link index within the junction
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 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.
The representation of a single edge during network building.
std::vector< bool > myHaveVia
NBRequest(const NBEdgeCont &ec, NBNode *junction, const EdgeVector &all, const EdgeVector &incoming, const EdgeVector &outgoing, const NBConnectionProhibits &loadedProhibits)
std::vector< bool > LinkInfoCont
definition of a container to store boolean informations about a link into
void computeRightOutgoingLinkCrossings(NBEdge *from, NBEdge *to)
computes the relationships between links outgoing right of the given link */
std::string getFoesString(NBEdge *from, NBEdge *to, int fromLane, int toLane, const bool checkLaneFoes) const
void computeLeftOutgoingLinkCrossings(NBEdge *from, NBEdge *to)
computes the relationships between links outgoing left of the given link
int distanceCounterClockwise(NBEdge *from, NBEdge *to)
returns the distance between the incoming (from) and the outgoing (to) edge clockwise in edges
const std::string & getFoes(int linkIndex) const
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
NBNode * myJunction
the node the request is assigned to
A storage for options typed value containers)
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.
std::map< NBConnection, NBConnectionVector > NBConnectionProhibits
Definition of a container for connection block dependencies Includes a list of all connections which ...
std::string getResponseString(const NBEdge *const from, const NBEdge::Connection &c, const bool checkLaneFoes) const
Writes the response of a certain link.
const EdgeVector & myOutgoing
edges outgoing from the junction
void writeLogic(OutputDevice &into) const
CombinationsCont myDone
the link X link is done-checks
const EdgeVector & myAll
all (icoming and outgoing) of the junctions edges
void computeLogic(const bool checkLaneFoes)
writes the XML-representation of the logic as a bitset-logic XML representation
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
A SUMO-compliant built logic for a traffic light.
Represents a single node (junction) during network building.
A definition of a pedestrian crossing.
A structure which describes a connection between edges or lanes.
static void reportWarnings()
reports warnings if any occurred
NBRequest & operator=(const NBRequest &s)=delete
Invalidated assignment operator.
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...
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
The base class for traffic light logic definitions.
friend std::ostream & operator<<(std::ostream &os, const NBRequest &r)
prints the request