SUMO - Simulation of Urban MObility
NBEdge::Connection Struct Reference

A structure which describes a connection between edges or lanes. More...

#include <NBEdge.h>

Inheritance diagram for NBEdge::Connection:
Inheritance graph
Collaboration diagram for NBEdge::Connection:
Collaboration graph

Public Member Functions

void clearParameter ()
 Clears the parameter map. More...
 
 Connection (int fromLane_, NBEdge *toEdge_, int toLane_)
 Constructor. More...
 
 Connection (int fromLane_, NBEdge *toEdge_, int toLane_, bool mayDefinitelyPass_, bool keepClear_=true, double contPos_=UNSPECIFIED_CONTPOS, double visibility_=UNSPECIFIED_VISIBILITY_DISTANCE, double speed_=UNSPECIFIED_SPEED, bool haveVia_=false, bool uncontrolled_=false, const PositionVector &customShape_=PositionVector::EMPTY)
 constructor with more parameters More...
 
std::string getDescription (const NBEdge *parent) const
 get string describing this connection More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
std::string getInternalLaneID () const
 get ID of internal lane More...
 
const std::map< std::string, std::string > & getMap () const
 Returns the inner key/value map. More...
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
void setParameter (const std::string &key, const std::string &value)
 Sets a parameter. More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameter (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
void writeParams (OutputDevice &out) const
 
 ~Connection ()
 destructor More...
 

Data Fields

double contPos
 custom position for internal junction on this connection More...
 
PositionVector customShape
 custom shape for connection More...
 
std::string foeIncomingLanes
 FOE Incomings lanes. More...
 
std::vector< int > foeInternalLinks
 FOE Internal links. More...
 
int fromLane
 The lane the connections starts at. More...
 
bool haveVia
 check if Connection have a Via More...
 
std::string id
 id of Connection More...
 
int internalLaneIndex
 The lane index of this internal lane within the internal edge. More...
 
bool keepClear
 whether the junction must be kept clear when using this connection More...
 
bool mayDefinitelyPass
 Information about being definitely free to drive (on-ramps) More...
 
PositionVector shape
 shape of Connection More...
 
double speed
 custom speed for connection More...
 
std::string tlID
 The id of the traffic light that controls this connection. More...
 
int tlLinkNo
 The index of this connection within the controlling traffic light. More...
 
NBEdgetoEdge
 The edge the connections yields in. More...
 
int toLane
 The lane the connections yields in. More...
 
bool uncontrolled
 check if Connection is uncontrolled More...
 
std::string viaID
 if Connection have a via, ID of it More...
 
PositionVector viaShape
 shape of via More...
 
double visibility
 custom foe visiblity for connection More...
 
double vmax
 maximun velocity More...
 

Detailed Description

A structure which describes a connection between edges or lanes.

Definition at line 161 of file NBEdge.h.

Constructor & Destructor Documentation

◆ Connection() [1/2]

NBEdge::Connection::Connection ( int  fromLane_,
NBEdge toEdge_,
int  toLane_ 
)

Constructor.

Parameters
[in]fromLane_The lane the connections starts at
[in]toEdge_The edge the connections yields in
[in]toLane_The lane the connections yields in

Definition at line 91 of file NBEdge.cpp.

◆ Connection() [2/2]

NBEdge::Connection::Connection ( int  fromLane_,
NBEdge toEdge_,
int  toLane_,
bool  mayDefinitelyPass_,
bool  keepClear_ = true,
double  contPos_ = UNSPECIFIED_CONTPOS,
double  visibility_ = UNSPECIFIED_VISIBILITY_DISTANCE,
double  speed_ = UNSPECIFIED_SPEED,
bool  haveVia_ = false,
bool  uncontrolled_ = false,
const PositionVector customShape_ = PositionVector::EMPTY 
)

constructor with more parameters

Definition at line 107 of file NBEdge.cpp.

◆ ~Connection()

NBEdge::Connection::~Connection ( )
inline

destructor

Definition at line 180 of file NBEdge.h.

Member Function Documentation

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 97 of file Parameterised.cpp.

References Parameterised::myMap.

◆ getDescription()

std::string NBEdge::Connection::getDescription ( const NBEdge parent) const

get string describing this connection

Definition at line 86 of file NBEdge.cpp.

References fromLane, Named::getIDSecure(), toEdge, toLane, and toString().

Referenced by NBEdgeCont::checkGrade(), and NBNode::computeInternalLaneShape().

◆ getDouble()

double Parameterised::getDouble ( const std::string &  key,
const double  defaultValue 
) const
inherited

Returns the value for a given key converted to a double.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 87 of file Parameterised.cpp.

References TplConvert::_2double(), and Parameterised::myMap.

Referenced by MSDevice_Battery::buildVehicleDevices().

◆ getInternalLaneID()

std::string NBEdge::Connection::getInternalLaneID ( ) const

get ID of internal lane

Definition at line 80 of file NBEdge.cpp.

References internalLaneIndex, and toString().

Referenced by NWWriter_SUMO::getOppositeInternalID(), and NWWriter_SUMO::writeConnection().

◆ getMap()

◆ getParameter()

const std::string Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue = "" 
) const
inherited

Returns the value for a given key.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 77 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdge::addRestrictedLane(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Edge::getParameter(), libsumo::Polygon::getParameter(), libsumo::Route::getParameter(), libsumo::POI::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Person::getParameter(), libsumo::Lane::getParameter(), libsumo::Vehicle::getParameter(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NIImporter_OpenStreetMap::insertEdge(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), libsumo::Helper::moveToXYMap(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), MSSOTLPolicyDesirability::readParameter(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), MSDevice_SSM::useGeoCoords(), and NWWriter_DlrNavteq::writeLinksUnsplitted().

◆ knowsParameter()

◆ setParameter()

◆ unsetParameter()

void Parameterised::unsetParameter ( const std::string &  key)
inherited

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 57 of file Parameterised.cpp.

References Parameterised::myMap.

◆ updateParameter()

void Parameterised::updateParameter ( const std::map< std::string, std::string > &  mapArg)
inherited

Adds or updates all given parameters from the map.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 63 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_SUMO::_loadNetwork(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NLJunctionControlBuilder::closeJunction(), NBTrafficLightDefinition::compute(), and NIImporter_OpenStreetMap::insertEdge().

◆ writeParams()

Field Documentation

◆ contPos

double NBEdge::Connection::contPos

custom position for internal junction on this connection

Definition at line 204 of file NBEdge.h.

Referenced by GNEEdge::addConnection(), NBEdge::buildInnerEdges(), GNEConnection::getAttribute(), GNEConnection::setAttribute(), and NWWriter_SUMO::writeConnection().

◆ customShape

◆ foeIncomingLanes

std::string NBEdge::Connection::foeIncomingLanes

FOE Incomings lanes.

Definition at line 237 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges().

◆ foeInternalLinks

std::vector<int> NBEdge::Connection::foeInternalLinks

FOE Internal links.

Definition at line 234 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges().

◆ fromLane

◆ haveVia

bool NBEdge::Connection::haveVia

◆ id

std::string NBEdge::Connection::id

id of Connection

Definition at line 216 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges(), and NWWriter_SUMO::writeInternalConnections().

◆ internalLaneIndex

int NBEdge::Connection::internalLaneIndex

The lane index of this internal lane within the internal edge.

Definition at line 240 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges(), getInternalLaneID(), and NWWriter_SUMO::writeInternalConnections().

◆ keepClear

bool NBEdge::Connection::keepClear

whether the junction must be kept clear when using this connection

Definition at line 201 of file NBEdge.h.

Referenced by GNEEdge::addConnection(), GNEConnection::getAttribute(), GNEConnection::setAttribute(), and NWWriter_SUMO::writeConnection().

◆ mayDefinitelyPass

bool NBEdge::Connection::mayDefinitelyPass

◆ shape

◆ speed

double NBEdge::Connection::speed

custom speed for connection

Definition at line 210 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges(), GNEConnection::getAttribute(), GNEConnection::setAttribute(), and NWWriter_SUMO::writeConnection().

◆ tlID

std::string NBEdge::Connection::tlID

◆ tlLinkNo

int NBEdge::Connection::tlLinkNo

The index of this connection within the controlling traffic light.

Definition at line 195 of file NBEdge.h.

Referenced by NIXMLTrafficLightsHandler::addTlConnection(), GNEConnection::getAttribute(), NBEdge::setControllingTLInformation(), and NWWriter_SUMO::writeConnection().

◆ toEdge

◆ toLane

◆ uncontrolled

bool NBEdge::Connection::uncontrolled

check if Connection is uncontrolled

Definition at line 243 of file NBEdge.h.

Referenced by GNEConnection::getAttribute(), and GNEConnection::setAttribute().

◆ viaID

std::string NBEdge::Connection::viaID

if Connection have a via, ID of it

Definition at line 228 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges(), and NWWriter_SUMO::writeInternalConnections().

◆ viaShape

PositionVector NBEdge::Connection::viaShape

shape of via

Definition at line 231 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges(), NBEdgeCont::checkGrade(), and GNEConnection::updateGeometry().

◆ visibility

double NBEdge::Connection::visibility

custom foe visiblity for connection

Definition at line 207 of file NBEdge.h.

Referenced by GNEEdge::addConnection(), GNEConnection::getAttribute(), GNEConnection::setAttribute(), and NWWriter_SUMO::writeConnection().

◆ vmax

double NBEdge::Connection::vmax

maximun velocity

Definition at line 222 of file NBEdge.h.

Referenced by NBEdge::buildInnerEdges(), and NWWriter_OpenDrive::writeInternalEdge().


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