Eclipse SUMO - Simulation of Urban MObility
NBNode::Crossing Struct Reference

A definition of a pedestrian crossing. More...

#include <NBNode.h>

Inheritance diagram for NBNode::Crossing:
Collaboration diagram for NBNode::Crossing:

Public Member Functions

void clearParameter ()
 Clears the parameter map. More...
 
 Crossing (const NBNode *_node, const EdgeVector &_edges, double _width, bool _priority, int _customTLIndex, int _customTLIndex2, const PositionVector &_customShape)
 constructor More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
const std::map< std::string, std::string > & getParametersMap () const
 Returns the inner key/value map. More...
 
std::string getParametersStr () const
 Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN". 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 setParameters (const Parameterised &params)
 set the inner key/value map in map<string, string> format More...
 
void setParametersMap (const std::map< std::string, std::string > &paramsMap)
 set the inner key/value map in map<string, string> format More...
 
void setParametersStr (const std::string &paramsString)
 set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN" More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameters (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
void writeParams (OutputDevice &device) const
 write Params in the given outputdevice More...
 

Static Public Member Functions

static bool areParametersValid (const std::string &value, bool report=false)
 check if given string can be parsed to a parameters map "key1=value1|key2=value2|...|keyN=valueN" More...
 

Data Fields

PositionVector customShape
 optional customShape for this crossing More...
 
int customTLIndex
 the custom traffic light index of this crossing (if controlled) More...
 
int customTLIndex2
 
double customWidth
 This crossing's width. More...
 
EdgeVector edges
 The edges being crossed. More...
 
std::string id
 the (edge)-id of this crossing More...
 
std::string nextWalkingArea
 the lane-id of the next walkingArea More...
 
const NBNodenode
 The parent node of this crossing. More...
 
std::string prevWalkingArea
 the lane-id of the previous walkingArea More...
 
bool priority
 whether the pedestrians have priority More...
 
PositionVector shape
 The crossing's shape. More...
 
std::string tlID
 The id of the traffic light that controls this connection. More...
 
int tlLinkIndex
 the traffic light index of this crossing (if controlled) More...
 
int tlLinkIndex2
 
bool valid
 whether this crossing is valid (and can be written to the net.xml). This is needed for netedit because validity can only be checked during junction computation More...
 
double width
 This crossing's width. More...
 

Static Private Member Functions

static bool isParameterValid (const std::string &value, bool report)
 check if given string can be parsed to a parameter of type "key=value" More...
 

Private Attributes

std::map< std::string, std::string > myMap
 The key->value map. More...
 

Detailed Description

A definition of a pedestrian crossing.

Definition at line 131 of file NBNode.h.

Constructor & Destructor Documentation

◆ Crossing()

NBNode::Crossing::Crossing ( const NBNode _node,
const EdgeVector _edges,
double  _width,
bool  _priority,
int  _customTLIndex,
int  _customTLIndex2,
const PositionVector _customShape 
)

constructor

Definition at line 234 of file NBNode.cpp.

Member Function Documentation

◆ areParametersValid()

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 100 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::beginEdgeParsing(), and GNERouteHandler::closeRoute().

◆ getDouble()

◆ 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 72 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NBEdge::addRestrictedLane(), FareModul::addStop(), NBEdge::append(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), ROEdge::cacheParamRestrictions(), SUMOVTypeParameter::cacheParamRestrictions(), GNEEdge::drawEdgeName(), GUIEdge::drawGL(), GNEConnection::drawGL(), GUIBaseVehicle::drawOnPos(), libsumo::Simulation::findIntermodalRoute(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSSwarmTrafficLightLogic::getChangePlanProbability(), GUILane::getColorValue(), GUIVehicle::getColorValue(), GNELane::getColorValue(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), MSSwarmTrafficLightLogic::getForgettingCox(), MSSwarmTrafficLightLogic::getGammaNo(), MSSwarmTrafficLightLogic::getGammaSp(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSwarmTrafficLightLogic::getLearningCox(), MSSwarmTrafficLightLogic::getMaxCongestionDuration(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), GUIBaseVehicle::getOptionalName(), GUIJunctionWrapper::getOptionalName(), MSDevice_ToC::getOutputFilename(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Edge::getParameter(), libsumo::Lane::getParameter(), libsumo::Simulation::getParameter(), libsumo::POI::getParameter(), libsumo::Polygon::getParameter(), libsumo::Person::getParameter(), libsumo::Route::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Vehicle::getParameter(), MSSwarmTrafficLightLogic::getPheroMaxVal(), MSSwarmTrafficLightLogic::getPoliciesParam(), MSSwarmTrafficLightLogic::getReinforcementMode(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSDevice::getStringParam(), MSSwarmTrafficLightLogic::getThetaInit(), MSSwarmTrafficLightLogic::getThetaMax(), MSSwarmTrafficLightLogic::getThetaMin(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), MSSOTLPhasePolicy::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), PushButtonLogic::init(), SigmoidLogic::init(), MSVehicleType::initRailVisualizationParameters(), GNEVehicleType::initRailVisualizationParameters(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), GNEVehicleType::overwriteVType(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSDevice_SSM::useGeoCoords(), NWWriter_DlrNavteq::writeLinksUnsplitted(), and NWWriter_OpenDrive::writeRoadObjects().

◆ getParametersMap()

◆ getParametersStr()

◆ isParameterValid()

bool Parameterised::isParameterValid ( const std::string &  value,
bool  report 
)
staticprivateinherited

check if given string can be parsed to a parameter of type "key=value"

Definition at line 189 of file Parameterised.cpp.

References StringTokenizer::getVector(), SUMOXMLDefinitions::isValidParameterKey(), and SUMOXMLDefinitions::isValidParameterValue().

Referenced by Parameterised::areParametersValid().

◆ knowsParameter()

◆ setParameter()

◆ setParameters()

void Parameterised::setParameters ( const Parameterised params)
inherited

set the inner key/value map in map<string, string> format

Definition at line 127 of file Parameterised.cpp.

References Parameterised::getParametersMap(), and Parameterised::myMap.

◆ setParametersMap()

void Parameterised::setParametersMap ( const std::map< std::string, std::string > &  paramsMap)
inherited

set the inner key/value map in map<string, string> format

Definition at line 133 of file Parameterised.cpp.

References Parameterised::myMap.

◆ setParametersStr()

void Parameterised::setParametersStr ( const std::string &  paramsString)
inherited

◆ unsetParameter()

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

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 52 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_OpenStreetMap::insertEdge(), and GNEVehicleType::setAttribute().

◆ updateParameters()

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

◆ writeParams()

Field Documentation

◆ customShape

PositionVector NBNode::Crossing::customShape

optional customShape for this crossing

Definition at line 153 of file NBNode.h.

Referenced by GNENet::deleteCrossing(), GNECrossing::getCrossingShape(), and GNEViewNet::onCmdEditCrossingShape().

◆ customTLIndex

int NBNode::Crossing::customTLIndex

the custom traffic light index of this crossing (if controlled)

Definition at line 158 of file NBNode.h.

Referenced by NIXMLConnectionsHandler::addCrossing(), and GNENet::deleteCrossing().

◆ customTLIndex2

int NBNode::Crossing::customTLIndex2

Definition at line 159 of file NBNode.h.

Referenced by NIXMLConnectionsHandler::addCrossing(), and GNENet::deleteCrossing().

◆ customWidth

double NBNode::Crossing::customWidth

This crossing's width.

Definition at line 141 of file NBNode.h.

◆ edges

◆ id

std::string NBNode::Crossing::id

the (edge)-id of this crossing

Definition at line 145 of file NBNode.h.

Referenced by NBNode::buildWalkingAreas().

◆ myMap

◆ nextWalkingArea

std::string NBNode::Crossing::nextWalkingArea

the lane-id of the next walkingArea

Definition at line 149 of file NBNode.h.

Referenced by NBNode::buildWalkingAreas().

◆ node

const NBNode* NBNode::Crossing::node

The parent node of this crossing.

Definition at line 135 of file NBNode.h.

Referenced by NBOwnTLDef::hasCrossing(), and NBOwnTLDef::patchStateForCrossings().

◆ prevWalkingArea

std::string NBNode::Crossing::prevWalkingArea

the lane-id of the previous walkingArea

Definition at line 147 of file NBNode.h.

Referenced by NBNode::buildWalkingAreas().

◆ priority

bool NBNode::Crossing::priority

whether the pedestrians have priority

Definition at line 151 of file NBNode.h.

Referenced by NIXMLConnectionsHandler::addCrossing(), GNENet::deleteCrossing(), NBRequest::mustBrakeForCrossing(), and NWWriter_SUMO::writeNetwork().

◆ shape

PositionVector NBNode::Crossing::shape

The crossing's shape.

Definition at line 139 of file NBNode.h.

Referenced by NBEdge::buildInnerEdges(), NBNode::buildWalkingAreas(), and GNEViewNet::onCmdEditCrossingShape().

◆ tlID

std::string NBNode::Crossing::tlID

The id of the traffic light that controls this connection.

Definition at line 161 of file NBNode.h.

Referenced by GNECrossing::isAttributeEnabled(), and NWWriter_SUMO::writeNetwork().

◆ tlLinkIndex

int NBNode::Crossing::tlLinkIndex

the traffic light index of this crossing (if controlled)

Definition at line 155 of file NBNode.h.

Referenced by NWWriter_SUMO::writeNetwork().

◆ tlLinkIndex2

int NBNode::Crossing::tlLinkIndex2

Definition at line 156 of file NBNode.h.

◆ valid

bool NBNode::Crossing::valid

whether this crossing is valid (and can be written to the net.xml). This is needed for netedit because validity can only be checked during junction computation

Definition at line 163 of file NBNode.h.

Referenced by NBNode::buildWalkingAreas().

◆ width

double NBNode::Crossing::width

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