 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef NLJunctionControlBuilder_h
19 #define NLJunctionControlBuilder_h
99 void openJunction(
const std::string&
id,
const std::string& key,
103 const std::vector<MSLane*>& incomingLanes,
104 const std::vector<MSLane*>& internalLanes);
149 void addLogicItem(
int request,
const std::string& response,
150 const std::string& foes,
bool cont);
175 void addPhase(
SUMOTime duration,
const std::string& state,
const std::vector<int>& nextPhases,
244 void addParam(
const std::string& key,
const std::string& value);
virtual ~NLJunctionControlBuilder()
Destructor.
void initTrafficLightLogic(const std::string &id, const std::string &programID, TrafficLightType type, SUMOTime offset)
Begins the reading of a traffic lights logic.
NLDetectorBuilder & myDetectorBuilder
The detector builder to use.
std::bitset< SUMO_MAX_CONNECTIONS > myActiveConts
The description about which lanes have an internal follower.
void postLoadInitialization()
initialize junctions after all connections have been loaded
The base class for an intersection.
LaneVector myActiveInternalLanes
The list of the internal lanes of the currently chosen junction.
MSBitsetLogic::Logic myActiveLogic
The right-of-way-logic of the currently chosen bitset-logic.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
std::string myActiveKey
The key of the currently chosen junction.
The simulated network and simulation perfomer.
std::string myActiveProgram
void closeJunctionLogic()
Ends the building of a junction logic (row-logic)
static const int NO_REQUEST_SIZE
virtual MSJunction * buildInternalJunction()
Builds an internal junction.
std::vector< std::bitset< N > > Foes
Container holding the information which internal lanes prohibt which links Build the same way as Logi...
SUMOTime myAbsDuration
The absolute duration of a tls-control loop.
MSNet & myNet
The net to use.
std::vector< std::string > LaneIdVector
const std::string & getActiveSubKey() const
Returns the active sub key.
PositionVector myShape
The shape of the current junction.
void closeJunction(const std::string &basePath)
Closes (ends) the processing of the current junction.
Position myPosition
The position of the junction.
Builder of microsim-junctions and tls.
SUMOTime myOffset
The switch offset within the tls.
Container for junctions; performs operations on all stored junctions.
int getNumberOfLoadedPhases() const
return the number of phases loaded so far (for error reporting)
MSTLLogicControl::TLSLogicVariants & getTLLogic(const std::string &id) const
Returns a previously build tls logic.
MSJunctionControl * myJunctions
The junctions controls.
std::string myActiveID
The id of the currently chosen junction.
MSSimpleTrafficLightLogic::Phases myActivePhases
The current phase definitions for a simple traffic light.
std::vector< std::bitset< N > > Logic
Container that holds the right of way bitsets. Each link has it's own bitset. The bits in the bitsets...
virtual MSJunction * buildLogicJunction()
Builds a junction with a logic.
TrafficLightType myLogicType
The current logic type.
virtual void closeTrafficLightLogic(const std::string &basePath)
Ends the building of a traffic lights logic.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
void openJunction(const std::string &id, const std::string &key, const SumoXMLNodeType type, const Position pos, const PositionVector &shape, const std::vector< MSLane * > &incomingLanes, const std::vector< MSLane * > &internalLanes)
Begins the processing of the named junction.
std::map< std::string, MSJunctionLogic * > myLogics
Map of loaded junction logics.
NLJunctionControlBuilder & operator=(const NLJunctionControlBuilder &s)
invalidated assignment operator
A point in 2D or 3D with translation and scaling methods.
int myRequestSize
The size of the request.
MSJunction * retrieve(const std::string id)
try to retrieve junction by id
bool myNetIsLoaded
whether the network has been loaded
A storage for options typed value containers)
void addParam(const std::string &key, const std::string &value)
Adds a parameter.
int myRequestItemNumber
Counter for the inserted items.
NLJunctionControlBuilder(MSNet &net, NLDetectorBuilder &db)
Constructor.
MSTLLogicControl & getTLLogicControlToUse() const
Returns the used tls control.
bool myCurrentHasError
Information whether the current logic had an error.
MSBitsetLogic::Foes myActiveFoes
The description about which lanes disallow other passing the junction simultaneously.
virtual MSJunction * buildNoLogicJunction()
Builds a junction that does not use a logic.
SumoXMLNodeType myType
The type of the currently chosen junction.
StringParameterMap myAdditionalParameter
Parameter map (key->value)
LaneVector myActiveIncomingLanes
The list of the incoming lanes of the currently chosen junction.
void addPhase(SUMOTime duration, const std::string &state, const std::vector< int > &nextPhases, SUMOTime min, SUMOTime max, const std::string &name)
Adds a phase to the currently built traffic lights logic.
MSTLLogicControl * myLogicControl
The tls control to use (0 if net's tls control shall be used)
void initJunctionLogic(const std::string &id)
Initialises a junction logic.
Storage for all programs of a single tls.
std::vector< MSTrafficLightLogic * > myLogics2PostLoadInit
The container for information which junctions shall be initialised using which values.
A class that stores and controls tls and switching of their programs.
MSJunctionLogic * getJunctionLogicSecure()
Returns the current junction logic.
MSJunctionControl * build() const
Builds the MSJunctionControl which holds all of the simulations junctions.
MSTLLogicControl * buildTLLogics()
Returns the built tls-logic control.
std::vector< MSLane * > LaneVector
Definition of a lane vector.
Builds detectors for microsim.
const std::string & getActiveKey() const
Returns the active key.
void addLogicItem(int request, const std::string &response, const std::string &foes, bool cont)
Adds a logic item.
std::map< std::string, std::string > StringParameterMap
Definition of a parameter map (key->value)