63 const std::vector<NBNode*>& junctions,
134 unsigned int brakingTimeSeconds);
void setSinglePhase()
Forces the definition not to compute an additional phase for left-movers.
A SUMO-compliant built logic for a traffic light.
The representation of a single edge during network building.
void collectNodes()
Collects the nodes participating in this traffic light.
The base class for traffic light logic definitions.
std::pair< NBEdge *, NBEdge * > getBestPair(EdgeVector &incoming)
Returns the combination of two edges from the given which has most unblocked streams.
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
const std::string & getID() const
Returns the id.
int operator()(const NBEdge *const e1, const NBEdge *const e2) const
comparing operator
void replaceRemoved(NBEdge *removed, int removedLane, NBEdge *by, int byLane)
Replaces a removed edge/lane.
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.
Storage for edges, including some functionality operating on multiple edges.
int getJunctionPriority(const NBNode *const node) const
Returns the junction priority (normalised for the node currently build)
SUMOReal computeUnblockedWeightedStreamNumber(const NBEdge *const e1, const NBEdge *const e2)
Returns how many streams outgoing from the edges can pass the junction without being blocked...
NBOwnTLDef(const std::string &id, const std::vector< NBNode * > &junctions, SUMOTime offset, TrafficLightType type)
Constructor.
NBNode * getToNode() const
Returns the destination node of the edge.
void setTLControllingInformation(const NBEdgeCont &ec) const
Informs edges about being controlled by a tls.
void collectLinks()
Collects the links participating in this traffic light If a link could not be found.
SUMOReal getDirectionalWeight(LinkDirection dir)
Returns the weight of a stream given its direction.
std::vector< NBEdge * > EdgeVector
NBTrafficLightLogic * myCompute(const NBEdgeCont &ec, unsigned int brakingTimeSeconds)
Computes the traffic light logic finally in dependence to the type.
Represents a single node (junction) during network building.
A traffic light logics which must be computed (only nodes/edges are given)
Sorts edges by their priority within the node they end at.
void setParticipantsInformation()
Builds the list of participating nodes/edges/links.
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.