Eclipse SUMO - Simulation of Urban MObility
NLJunctionControlBuilder Class Reference

Builder of microsim-junctions and tls. More...

#include <NLJunctionControlBuilder.h>

Collaboration diagram for NLJunctionControlBuilder:

Public Member Functions

void addLogicItem (int request, const std::string &response, const std::string &foes, bool cont)
 Adds a logic item. More...
 
void addParam (const std::string &key, const std::string &value)
 Adds a parameter. More...
 
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. More...
 
void addPhase (SUMOTime duration, const std::string &state, const std::vector< int > &nextPhases, SUMOTime minDuration, SUMOTime maxDuration, const std::string &name, bool transient_notdecisional, bool commit, MSPhaseDefinition::LaneIdVector *targetLanes=nullptr)
 Adds a phase to the currently built traffic lights logic. More...
 
MSJunctionControlbuild () const
 Builds the MSJunctionControl which holds all of the simulations junctions. More...
 
MSTLLogicControlbuildTLLogics ()
 Returns the built tls-logic control. More...
 
void closeJunction (const std::string &basePath)
 Closes (ends) the processing of the current junction. More...
 
void closeJunctionLogic ()
 Ends the building of a junction logic (row-logic) More...
 
virtual void closeTrafficLightLogic (const std::string &basePath)
 Ends the building of a traffic lights logic. More...
 
const std::string & getActiveKey () const
 Returns the active key. More...
 
const std::string & getActiveSubKey () const
 Returns the active sub key. More...
 
int getNumberOfLoadedPhases () const
 return the number of phases loaded so far (for error reporting) More...
 
MSTLLogicControl::TLSLogicVariantsgetTLLogic (const std::string &id) const
 Returns a previously build tls logic. More...
 
MSTLLogicControlgetTLLogicControlToUse () const
 Returns the used tls control. More...
 
void initJunctionLogic (const std::string &id)
 Initialises a junction logic. More...
 
void initTrafficLightLogic (const std::string &id, const std::string &programID, TrafficLightType type, SUMOTime offset)
 Begins the reading of a traffic lights logic. More...
 
 NLJunctionControlBuilder (MSNet &net, NLDetectorBuilder &db)
 Constructor. More...
 
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. More...
 
void postLoadInitialization ()
 initialize junctions after all connections have been loaded More...
 
MSJunctionretrieve (const std::string id)
 try to retrieve junction by id More...
 
virtual ~NLJunctionControlBuilder ()
 Destructor. More...
 

Protected Types

typedef std::map< std::string, std::string > StringParameterMap
 Definition of a parameter map (key->value) More...
 

Protected Member Functions

MSJunctionLogicgetJunctionLogicSecure ()
 Returns the current junction logic. More...
 
Factory methods, virtual so that other versions of the structures can be built
virtual MSJunctionbuildNoLogicJunction ()
 Builds a junction that does not use a logic. More...
 
virtual MSJunctionbuildLogicJunction ()
 Builds a junction with a logic. More...
 
virtual MSJunctionbuildInternalJunction ()
 Builds an internal junction. More...
 

Protected Attributes

SUMOTime myAbsDuration
 The absolute duration of a tls-control loop. More...
 
std::bitset< SUMO_MAX_CONNECTIONSmyActiveConts
 The description about which lanes have an internal follower. More...
 
MSBitsetLogic::Foes myActiveFoes
 The description about which lanes disallow other passing the junction simultaneously. More...
 
std::string myActiveID
 The id of the currently chosen junction. More...
 
LaneVector myActiveIncomingLanes
 The list of the incoming lanes of the currently chosen junction. More...
 
LaneVector myActiveInternalLanes
 The list of the internal lanes of the currently chosen junction. More...
 
std::string myActiveKey
 The key of the currently chosen junction. More...
 
MSBitsetLogic::Logic myActiveLogic
 The right-of-way-logic of the currently chosen bitset-logic. More...
 
MSSimpleTrafficLightLogic::Phases myActivePhases
 The current phase definitions for a simple traffic light. More...
 
std::string myActiveProgram
 
StringParameterMap myAdditionalParameter
 Parameter map (key->value) More...
 
bool myCurrentHasError
 Information whether the current logic had an error. More...
 
NLDetectorBuildermyDetectorBuilder
 The detector builder to use. More...
 
MSJunctionControlmyJunctions
 The junctions controls. More...
 
MSTLLogicControlmyLogicControl
 The tls control to use (0 if net's tls control shall be used) More...
 
std::map< std::string, MSJunctionLogic * > myLogics
 Map of loaded junction logics. More...
 
std::vector< MSTrafficLightLogic * > myLogics2PostLoadInit
 The container for information which junctions shall be initialised using which values. More...
 
TrafficLightType myLogicType
 The current logic type. More...
 
MSNetmyNet
 The net to use. More...
 
SUMOTime myOffset
 The switch offset within the tls. More...
 
Position myPosition
 The position of the junction. More...
 
int myRequestItemNumber
 Counter for the inserted items. More...
 
int myRequestSize
 The size of the request. More...
 
PositionVector myShape
 The shape of the current junction. More...
 
SumoXMLNodeType myType
 The type of the currently chosen junction. More...
 

Private Types

typedef std::vector< MSLane * > LaneVector
 Definition of a lane vector. More...
 

Private Member Functions

 NLJunctionControlBuilder (const NLJunctionControlBuilder &s)
 invalidated copy operator More...
 
NLJunctionControlBuilderoperator= (const NLJunctionControlBuilder &s)
 invalidated assignment operator More...
 

Private Attributes

bool myNetIsLoaded
 whether the network has been loaded More...
 

Static Private Attributes

static const int NO_REQUEST_SIZE = -1
 

Detailed Description

Builder of microsim-junctions and tls.

NLJunctionControlBuilder is a factory for MSJunction, MSJunctionLogic, WAUT, and MSTRafficLightLogic-instances.

Todo:

Refactor this class - it's too large

Resort method by one of the topics.

Definition at line 63 of file NLJunctionControlBuilder.h.

Member Typedef Documentation

◆ LaneVector

typedef std::vector<MSLane*> NLJunctionControlBuilder::LaneVector
private

Definition of a lane vector.

Definition at line 66 of file NLJunctionControlBuilder.h.

◆ StringParameterMap

typedef std::map<std::string, std::string> NLJunctionControlBuilder::StringParameterMap
protected

Definition of a parameter map (key->value)

Definition at line 396 of file NLJunctionControlBuilder.h.

Constructor & Destructor Documentation

◆ NLJunctionControlBuilder() [1/2]

NLJunctionControlBuilder::NLJunctionControlBuilder ( MSNet net,
NLDetectorBuilder db 
)

Constructor.

Stores default values for extended tls reading them from the given options. Builds a MSTLLogicControl instance for myLogicControl.

Parameters
[in]netThe network to fill
[in]dbThe detector builder to use

Definition at line 72 of file NLJunctionControlBuilder.cpp.

References myJunctions, and myLogicControl.

◆ ~NLJunctionControlBuilder()

NLJunctionControlBuilder::~NLJunctionControlBuilder ( )
virtual

Destructor.

Deletes previously allocated "myLogicControl" and "myJunctions" if they were not previously returned (this may happen if an error occurred).

Definition at line 83 of file NLJunctionControlBuilder.cpp.

References myJunctions, and myLogicControl.

◆ NLJunctionControlBuilder() [2/2]

NLJunctionControlBuilder::NLJunctionControlBuilder ( const NLJunctionControlBuilder s)
private

invalidated copy operator

Member Function Documentation

◆ addLogicItem()

void NLJunctionControlBuilder::addLogicItem ( int  request,
const std::string &  response,
const std::string &  foes,
bool  cont 
)

Adds a logic item.

Adds a logic item to the current processed logic. Throws an InvalidArgument if the current request size (myRequestSize) is 0 or lower.

Parameters
[in]requestThe request (~link) index
[in]responseThe response (list of higher priorised links)
[in]foesList of foes to the request
[in]contWhether the request is followed by an internal end
Todo:
Recheck "cont"; is the description correct?

Definition at line 349 of file NLJunctionControlBuilder.cpp.

References myActiveConts, myActiveFoes, myActiveKey, myActiveLogic, myCurrentHasError, myRequestItemNumber, myRequestSize, NO_REQUEST_SIZE, SUMO_MAX_CONNECTIONS, and toString().

Referenced by NLHandler::addRequest().

◆ addParam()

void NLJunctionControlBuilder::addParam ( const std::string &  key,
const std::string &  value 
)

Adds a parameter.

Parameters
[in]keyThe key of the parameter
[in]valueThe value of the parameter
Todo:

Where are these parameter used? Describe!

Can a parameter be overwritten?

Definition at line 460 of file NLJunctionControlBuilder.cpp.

References myAdditionalParameter.

Referenced by NLHandler::addParam().

◆ addPhase() [1/2]

void NLJunctionControlBuilder::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.

Parameters
[in]durationThe duration of the phase
[in]stateThe state of the tls
[in]minThe minimum duration of the phase
[in]maxThe maximum duration of the phase
Todo:

min/max is used only by one junction type. Recheck

min/max: maybe only one type of a phase definition should be built

Definition at line 414 of file NLJunctionControlBuilder.cpp.

References myAbsDuration, and myActivePhases.

Referenced by NLHandler::addPhase().

◆ addPhase() [2/2]

void NLJunctionControlBuilder::addPhase ( SUMOTime  duration,
const std::string &  state,
const std::vector< int > &  nextPhases,
SUMOTime  minDuration,
SUMOTime  maxDuration,
const std::string &  name,
bool  transient_notdecisional,
bool  commit,
MSPhaseDefinition::LaneIdVector targetLanes = nullptr 
)

Adds a phase to the currently built traffic lights logic.

Parameters
[in]durationThe duration of the phase
[in]stateThe state of the tls
[in]minDurationThe minimum duration of the phase
[in]maxDurationThe maximum duration of the phase
[in]transient_notdecisionalSpecifies if this is a transient phase (true) or a decisional one (false)
[in]commitSpecifies if this is a commit phase
[in]targetLanesA reference to the vector containing targeted sensor lanes for this phase, given by lane id

Definition at line 405 of file NLJunctionControlBuilder.cpp.

References myAbsDuration, and myActivePhases.

◆ build()

MSJunctionControl * NLJunctionControlBuilder::build ( ) const

Builds the MSJunctionControl which holds all of the simulations junctions.

Returns the previously built junction control ("myJunctions"). "myJunctions" is set to 0, so that it will not be destroyed by the destructor.

Returns
The built junction control

Definition at line 158 of file NLJunctionControlBuilder.cpp.

References myJunctions.

Referenced by NLBuilder::buildNet().

◆ buildInternalJunction()

MSJunction * NLJunctionControlBuilder::buildInternalJunction ( )
protectedvirtual

Builds an internal junction.

Builds a MSInternalJunction

Returns
The built junction

Definition at line 183 of file NLJunctionControlBuilder.cpp.

References myActiveID, myActiveIncomingLanes, myActiveInternalLanes, myPosition, myShape, and myType.

Referenced by closeJunction().

◆ buildLogicJunction()

MSJunction * NLJunctionControlBuilder::buildLogicJunction ( )
protectedvirtual

Builds a junction with a logic.

Builds a MSRightOfWayJunction. Throws an exception if the logic was not built (see getJunctionLogicSecure).

Returns
The built junction
Exceptions
InvalidArgumentIf the logic of the junction was not built before

Definition at line 173 of file NLJunctionControlBuilder.cpp.

References getJunctionLogicSecure(), myActiveID, myActiveIncomingLanes, myActiveInternalLanes, myPosition, myShape, and myType.

Referenced by closeJunction().

◆ buildNoLogicJunction()

MSJunction * NLJunctionControlBuilder::buildNoLogicJunction ( )
protectedvirtual

Builds a junction that does not use a logic.

Builds a MSNoLogicJunction

Returns
The built junction

Definition at line 166 of file NLJunctionControlBuilder.cpp.

References myActiveID, myActiveIncomingLanes, myActiveInternalLanes, myPosition, myShape, and myType.

Referenced by closeJunction().

◆ buildTLLogics()

MSTLLogicControl * NLJunctionControlBuilder::buildTLLogics ( )

Returns the built tls-logic control.

Returns the junction control ("myLogicControl") built using MSTLLogicControl::closeNetworkReading. "myLogicControl" is set to 0, so that it will not be destroyed by the destructor.

Returns
The built tls-logic control
Exceptions
ProcessErrorIf the traffic lights were not correct
See also
MSTLLogicControl::closeNetworkReading

Definition at line 448 of file NLJunctionControlBuilder.cpp.

References MSTLLogicControl::closeNetworkReading(), myLogicControl, and postLoadInitialization().

Referenced by NLBuilder::buildNet().

◆ closeJunction()

void NLJunctionControlBuilder::closeJunction ( const std::string &  basePath)

Closes (ends) the processing of the current junction.

This method throws an InvalidArgument when a junction with the same id as the current was already added or if the junction type stored in "myType" is invalid. It throws a ProcessError if the container to store the junction in was not built before.

Exceptions
InvalidArgumentIf the current id is already used or the junction type was invalid
ProcessErrorIf the container to store the junction in was not built before
Todo:

Throwing ProcessError would get unneeded if the container would be built by default (see prepare)

The type of the junctions shoould probably be checked when supprted (in openJunction)

Definition at line 109 of file NLJunctionControlBuilder.cpp.

References NamedObjectCont< T >::add(), buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), closeTrafficLightLogic(), MSGlobals::gUsingInternalLanes, myActiveID, myActiveKey, myActiveProgram, myAdditionalParameter, myJunctions, myLogicType, myOffset, myType, NODETYPE_ALLWAY_STOP, NODETYPE_DEAD_END, NODETYPE_DEAD_END_DEPRECATED, NODETYPE_DISTRICT, NODETYPE_INTERNAL, NODETYPE_NOJUNCTION, NODETYPE_PRIORITY, NODETYPE_PRIORITY_STOP, NODETYPE_RAIL_CROSSING, NODETYPE_RAIL_SIGNAL, NODETYPE_RIGHT_BEFORE_LEFT, NODETYPE_TRAFFIC_LIGHT, NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, NODETYPE_TRAFFIC_LIGHT_RIGHT_ON_RED, NODETYPE_ZIPPER, TLTYPE_RAIL_CROSSING, TLTYPE_RAIL_SIGNAL, and Parameterised::updateParameter().

Referenced by NLHandler::myEndElement().

◆ closeJunctionLogic()

void NLJunctionControlBuilder::closeJunctionLogic ( )

Ends the building of a junction logic (row-logic)

Rechecks values for the request and builds a MSJunctionLogic using these values. Throws and InvalidArgument if the values are invalid (error message is included). Tries to add the built logic to the internal container "myLogics". If another logic with the same id exists, an InvalidArgument is thrown.

Exceptions
InvalidArgumentIf the logic's values are false or another logic with the same id was built before

Definition at line 424 of file NLJunctionControlBuilder.cpp.

References myActiveConts, myActiveFoes, myActiveKey, myActiveLogic, myCurrentHasError, myLogics, myRequestItemNumber, myRequestSize, and NO_REQUEST_SIZE.

Referenced by NLHandler::myEndElement().

◆ closeTrafficLightLogic()

void NLJunctionControlBuilder::closeTrafficLightLogic ( const std::string &  basePath)
virtual

◆ getActiveKey()

const std::string & NLJunctionControlBuilder::getActiveKey ( ) const

Returns the active key.

Returns
The active key

Definition at line 476 of file NLJunctionControlBuilder.cpp.

References myActiveKey.

Referenced by NLHandler::addPhase().

◆ getActiveSubKey()

const std::string & NLJunctionControlBuilder::getActiveSubKey ( ) const

Returns the active sub key.

Returns
The active sub key

Definition at line 482 of file NLJunctionControlBuilder.cpp.

References myActiveProgram.

Referenced by NLHandler::addPhase().

◆ getJunctionLogicSecure()

MSJunctionLogic * NLJunctionControlBuilder::getJunctionLogicSecure ( )
protected

Returns the current junction logic.

"Current" means the one with "myActiveID". If it is not built yet (not within "myLogics") an InvalidArgument is thrown.

Returns
The current tls logic
Exceptions
InvalidArgumentIf the logic was not built before
Todo:
Where is this used?

Definition at line 191 of file NLJunctionControlBuilder.cpp.

References myActiveID, and myLogics.

Referenced by buildLogicJunction().

◆ getNumberOfLoadedPhases()

int NLJunctionControlBuilder::getNumberOfLoadedPhases ( ) const
inline

return the number of phases loaded so far (for error reporting)

Definition at line 276 of file NLJunctionControlBuilder.h.

References myActivePhases.

Referenced by NLHandler::addPhase().

◆ getTLLogic()

MSTLLogicControl::TLSLogicVariants & NLJunctionControlBuilder::getTLLogic ( const std::string &  id) const

Returns a previously build tls logic.

Parameters
[in]idThe ID of the tls logic to return
Returns
The named logic
Exceptions
InvalidArgumentIf the named tls logic was not built before

Definition at line 201 of file NLJunctionControlBuilder.cpp.

References MSTLLogicControl::get(), and getTLLogicControlToUse().

Referenced by NLHandler::addConnection(), and NLHandler::addE2Detector().

◆ getTLLogicControlToUse()

MSTLLogicControl & NLJunctionControlBuilder::getTLLogicControlToUse ( ) const

Returns the used tls control.

This may be either the internal one ("myLogicControl"), or, if the network has been already loaded and we are loading additional tls programs, the net's logic control.

Returns
The tls control to use

Definition at line 467 of file NLJunctionControlBuilder.cpp.

References MSNet::getTLSControl(), myLogicControl, and myNet.

Referenced by NLHandler::addWAUTJunction(), NLHandler::addWAUTSwitch(), closeTrafficLightLogic(), NLHandler::closeWAUT(), getTLLogic(), NLHandler::initTrafficLightLogic(), and NLHandler::openWAUT().

◆ initJunctionLogic()

void NLJunctionControlBuilder::initJunctionLogic ( const std::string &  id)

Initialises a junction logic.

Parameters
[in]idThe id of the row-logic

Definition at line 336 of file NLJunctionControlBuilder.cpp.

References myActiveConts, myActiveFoes, myActiveKey, myActiveLogic, myActiveProgram, myCurrentHasError, myRequestItemNumber, myRequestSize, and NO_REQUEST_SIZE.

Referenced by NLHandler::initJunctionLogic().

◆ initTrafficLightLogic()

void NLJunctionControlBuilder::initTrafficLightLogic ( const std::string &  id,
const std::string &  programID,
TrafficLightType  type,
SUMOTime  offset 
)

Begins the reading of a traffic lights logic.

Parameters
[in]idThe id of the tls
[in]programIDThe id of the currently loaded program
[in]typeThe type of the tls
[in]offsetThe offset to start with
Todo:

Why is the type not verified?

Recheck, describe usage of detectorOffset (where does the information come from?)

Definition at line 391 of file NLJunctionControlBuilder.cpp.

References myAbsDuration, myActiveKey, myActivePhases, myActiveProgram, myAdditionalParameter, myLogicType, myOffset, myRequestSize, and NO_REQUEST_SIZE.

Referenced by NLHandler::initTrafficLightLogic().

◆ openJunction()

void NLJunctionControlBuilder::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.

Parameters
[in]idThe ID of the junction
[in]keyunused?!
[in]typeThe type of the junction
[in]xx-position of the junction
[in]yy-position of the junction
[in]shapeThe shape of the junction
[in]incomingLanesList of lanes which end at this intersection
[in]internalLanesList of internal lanes across this intersection
Exceptions
InvalidArgumentIf the junction type is not known
Todo:
Check why "key" is given

Definition at line 90 of file NLJunctionControlBuilder.cpp.

References myActiveID, myActiveIncomingLanes, myActiveInternalLanes, myActiveKey, myAdditionalParameter, myPosition, myShape, myType, and Position::set().

Referenced by NLHandler::openJunction().

◆ operator=()

NLJunctionControlBuilder& NLJunctionControlBuilder::operator= ( const NLJunctionControlBuilder s)
private

invalidated assignment operator

◆ postLoadInitialization()

void NLJunctionControlBuilder::postLoadInitialization ( )

initialize junctions after all connections have been loaded

Definition at line 488 of file NLJunctionControlBuilder.cpp.

References myDetectorBuilder, myLogics2PostLoadInit, and myNetIsLoaded.

Referenced by buildTLLogics().

◆ retrieve()

MSJunction * NLJunctionControlBuilder::retrieve ( const std::string  id)

try to retrieve junction by id

Definition at line 497 of file NLJunctionControlBuilder.cpp.

References NamedObjectCont< T >::get(), and myJunctions.

Referenced by NLHandler::myEndElement().

Field Documentation

◆ myAbsDuration

SUMOTime NLJunctionControlBuilder::myAbsDuration
protected

The absolute duration of a tls-control loop.

Definition at line 381 of file NLJunctionControlBuilder.h.

Referenced by addPhase(), closeTrafficLightLogic(), and initTrafficLightLogic().

◆ myActiveConts

std::bitset<SUMO_MAX_CONNECTIONS> NLJunctionControlBuilder::myActiveConts
protected

The description about which lanes have an internal follower.

Definition at line 348 of file NLJunctionControlBuilder.h.

Referenced by addLogicItem(), closeJunctionLogic(), and initJunctionLogic().

◆ myActiveFoes

MSBitsetLogic::Foes NLJunctionControlBuilder::myActiveFoes
protected

The description about which lanes disallow other passing the junction simultaneously.

Definition at line 345 of file NLJunctionControlBuilder.h.

Referenced by addLogicItem(), closeJunctionLogic(), and initJunctionLogic().

◆ myActiveID

std::string NLJunctionControlBuilder::myActiveID
protected

The id of the currently chosen junction.

Definition at line 369 of file NLJunctionControlBuilder.h.

Referenced by buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), closeJunction(), getJunctionLogicSecure(), and openJunction().

◆ myActiveIncomingLanes

LaneVector NLJunctionControlBuilder::myActiveIncomingLanes
protected

The list of the incoming lanes of the currently chosen junction.

Definition at line 363 of file NLJunctionControlBuilder.h.

Referenced by buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), and openJunction().

◆ myActiveInternalLanes

LaneVector NLJunctionControlBuilder::myActiveInternalLanes
protected

The list of the internal lanes of the currently chosen junction.

Definition at line 366 of file NLJunctionControlBuilder.h.

Referenced by buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), and openJunction().

◆ myActiveKey

std::string NLJunctionControlBuilder::myActiveKey
protected

◆ myActiveLogic

MSBitsetLogic::Logic NLJunctionControlBuilder::myActiveLogic
protected

The right-of-way-logic of the currently chosen bitset-logic.

Definition at line 342 of file NLJunctionControlBuilder.h.

Referenced by addLogicItem(), closeJunctionLogic(), and initJunctionLogic().

◆ myActivePhases

MSSimpleTrafficLightLogic::Phases NLJunctionControlBuilder::myActivePhases
protected

The current phase definitions for a simple traffic light.

Definition at line 351 of file NLJunctionControlBuilder.h.

Referenced by addPhase(), closeTrafficLightLogic(), getNumberOfLoadedPhases(), and initTrafficLightLogic().

◆ myActiveProgram

std::string NLJunctionControlBuilder::myActiveProgram
protected

◆ myAdditionalParameter

StringParameterMap NLJunctionControlBuilder::myAdditionalParameter
protected

Parameter map (key->value)

Definition at line 399 of file NLJunctionControlBuilder.h.

Referenced by addParam(), closeJunction(), closeTrafficLightLogic(), initTrafficLightLogic(), and openJunction().

◆ myCurrentHasError

bool NLJunctionControlBuilder::myCurrentHasError
protected

Information whether the current logic had an error.

Definition at line 406 of file NLJunctionControlBuilder.h.

Referenced by addLogicItem(), closeJunctionLogic(), and initJunctionLogic().

◆ myDetectorBuilder

NLDetectorBuilder& NLJunctionControlBuilder::myDetectorBuilder
protected

The detector builder to use.

Definition at line 333 of file NLJunctionControlBuilder.h.

Referenced by closeTrafficLightLogic(), and postLoadInitialization().

◆ myJunctions

MSJunctionControl* NLJunctionControlBuilder::myJunctions
mutableprotected

The junctions controls.

Definition at line 360 of file NLJunctionControlBuilder.h.

Referenced by build(), closeJunction(), NLJunctionControlBuilder(), retrieve(), and ~NLJunctionControlBuilder().

◆ myLogicControl

MSTLLogicControl* NLJunctionControlBuilder::myLogicControl
mutableprotected

The tls control to use (0 if net's tls control shall be used)

Definition at line 392 of file NLJunctionControlBuilder.h.

Referenced by buildTLLogics(), getTLLogicControlToUse(), NLJunctionControlBuilder(), and ~NLJunctionControlBuilder().

◆ myLogics

std::map<std::string, MSJunctionLogic*> NLJunctionControlBuilder::myLogics
protected

Map of loaded junction logics.

Definition at line 403 of file NLJunctionControlBuilder.h.

Referenced by closeJunctionLogic(), and getJunctionLogicSecure().

◆ myLogics2PostLoadInit

std::vector<MSTrafficLightLogic*> NLJunctionControlBuilder::myLogics2PostLoadInit
protected

The container for information which junctions shall be initialised using which values.

Definition at line 388 of file NLJunctionControlBuilder.h.

Referenced by closeTrafficLightLogic(), and postLoadInitialization().

◆ myLogicType

TrafficLightType NLJunctionControlBuilder::myLogicType
protected

The current logic type.

Definition at line 339 of file NLJunctionControlBuilder.h.

Referenced by closeJunction(), closeTrafficLightLogic(), and initTrafficLightLogic().

◆ myNet

MSNet& NLJunctionControlBuilder::myNet
protected

The net to use.

Definition at line 330 of file NLJunctionControlBuilder.h.

Referenced by closeTrafficLightLogic(), and getTLLogicControlToUse().

◆ myNetIsLoaded

bool NLJunctionControlBuilder::myNetIsLoaded
private

whether the network has been loaded

Definition at line 419 of file NLJunctionControlBuilder.h.

Referenced by closeTrafficLightLogic(), and postLoadInitialization().

◆ myOffset

SUMOTime NLJunctionControlBuilder::myOffset
protected

The switch offset within the tls.

Definition at line 336 of file NLJunctionControlBuilder.h.

Referenced by closeJunction(), closeTrafficLightLogic(), and initTrafficLightLogic().

◆ myPosition

Position NLJunctionControlBuilder::myPosition
protected

The position of the junction.

Definition at line 378 of file NLJunctionControlBuilder.h.

Referenced by buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), and openJunction().

◆ myRequestItemNumber

int NLJunctionControlBuilder::myRequestItemNumber
protected

Counter for the inserted items.

Definition at line 357 of file NLJunctionControlBuilder.h.

Referenced by addLogicItem(), closeJunctionLogic(), and initJunctionLogic().

◆ myRequestSize

int NLJunctionControlBuilder::myRequestSize
protected

The size of the request.

Definition at line 354 of file NLJunctionControlBuilder.h.

Referenced by addLogicItem(), closeJunctionLogic(), initJunctionLogic(), and initTrafficLightLogic().

◆ myShape

PositionVector NLJunctionControlBuilder::myShape
protected

The shape of the current junction.

Definition at line 384 of file NLJunctionControlBuilder.h.

Referenced by buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), and openJunction().

◆ myType

SumoXMLNodeType NLJunctionControlBuilder::myType
protected

The type of the currently chosen junction.

Definition at line 375 of file NLJunctionControlBuilder.h.

Referenced by buildInternalJunction(), buildLogicJunction(), buildNoLogicJunction(), closeJunction(), and openJunction().

◆ NO_REQUEST_SIZE

const int NLJunctionControlBuilder::NO_REQUEST_SIZE = -1
staticprivate

The documentation for this class was generated from the following files: