104 bool removeProgram(
const std::string
id,
const std::string programID,
bool del =
true);
112 bool exist(
const std::string& newID,
bool requireComputed =
true)
const;
121 std::vector<NBTrafficLightLogic*>
getComputed()
const;
161 NBEdge* by,
int byLane,
bool incoming);
176 const std::map<std::string, NBTrafficLightDefinition*>&
getPrograms(
const std::string&
id)
const;
218 typedef std::map<std::string, NBTrafficLightDefinition*>
Program2Def;
219 typedef std::map<std::string, Program2Def>
Id2Defs;
220 typedef std::vector<NBTrafficLightLogic*>
Logics;
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Storage for edges, including some functionality operating on multiple edges.
The representation of a single edge during network building.
Container for nodes during the netbuilding process.
The base class for traffic light logic definitions.
A container for traffic light definitions and built programs.
bool exist(const std::string &newID, bool requireComputed=true) const
check if exists a definition with the given ID
void replaceRemoved(NBEdge *removed, int removedLane, NBEdge *by, int byLane, bool incoming)
Replaces occurrences of the removed edge/lane in all definitions by the given edge.
void applyOptions(OptionsCont &oc)
Initialises the storage by applying given options.
void setOpenDriveSignalParameters()
set OpenDRIVE signal reference parameters after all link indices are known
std::vector< NBTrafficLightLogic * > getComputed() const
Returns a list of all computed logics.
void rename(NBTrafficLightDefinition *tlDef, const std::string &newID)
rename traffic light
std::map< std::string, NBTrafficLightDefinition * > Program2Def
std::set< std::string > myHalfOffsetTLS
List of tls which shall have an offset of T/2.
static const Program2Def EmptyDefinitions
empty definition
std::vector< NBTrafficLightLogic * > Logics
std::vector< NBTrafficLightDefinition * > Definitions
Returns a list of all definitions (convenience for easier iteration)
bool removeProgram(const std::string id, const std::string programID, bool del=true)
Removes a program of a logic definition from the dictionary.
bool computeSingleLogic(OptionsCont &oc, NBTrafficLightDefinition *def)
Computes a specific traffic light logic (using by netedit)
int getNumExtracted() const
return the number of extracted traffic light definitions
std::map< std::string, Program2Logic > Id2Logics
void clear()
Destroys all stored definitions and logics.
const std::map< std::string, NBTrafficLightDefinition * > & getPrograms(const std::string &id) const
Returns all programs for the given tl-id.
std::map< std::string, Program2Def > Id2Defs
void remapRemoved(NBEdge *removed, const EdgeVector &incoming, const EdgeVector &outgoing)
Replaces occurrences of the removed edge in incoming/outgoing edges of all definitions.
Definitions getDefinitions() const
std::set< std::string > myQuarterOffsetTLS
List of tls which shall have an offset of T/2.
Id2Logics myComputed
The container for previously computed tl-logics.
NBTrafficLightLogic * getLogic(const std::string &id, const std::string &programID) const
Returns the computed logic for the given name.
void applyOpenDriveControllers(OptionsCont &oc)
post processing of signal programs to group tl indices according to OpenDrive controllers (signal gro...
Id2Defs myDefinitions
The container for tl-ids to their definitions.
std::pair< int, int > computeLogics(OptionsCont &oc)
Computes the traffic light logics using the stored definitions and stores the results.
bool removeFully(const std::string id)
Removes a logic definition (and all programs) from the dictionary.
NBTrafficLightLogicCont()
Constructor.
std::map< std::string, NBTrafficLightLogic * > Program2Logic
Definition of internal the container types.
std::string getNextProgramID(const std::string &id) const
Returns a new (unused) programID for the given traffic light.
~NBTrafficLightLogicCont()
Destructor.
bool insert(NBTrafficLightDefinition *logic, bool forceInsert=false)
Adds a logic definition to the dictionary.
NBTrafficLightDefinition * getDefinition(const std::string &id, const std::string &programID) const
Returns the named definition.
void extract(NBTrafficLightDefinition *definition)
Extracts a traffic light definition from myDefinitions but keeps it in myExtracted for eventual * del...
void setTLControllingInformation(const NBEdgeCont &ec, const NBNodeCont &nc)
Informs the edges about being controlled by a tls.
std::set< NBTrafficLightDefinition * > myExtracted
The container for extracted definitions.
A SUMO-compliant built logic for a traffic light.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.