Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
LIBSUMO_NAMESPACE::Lane Class Reference

#include <Lane.h>

Static Public Member Functions

static std::vector< std::string > getAllowed (const std::string &laneID)
static double getAngle (const std::string &laneID, double relativePosition=libsumo::INVALID_DOUBLE_VALUE)
static std::string getBidiLane (const std::string &laneID)
static std::vector< std::string > getChangePermissions (const std::string &laneID, const int direction)
static double getCO2Emission (const std::string &laneID)
static double getCOEmission (const std::string &laneID)
static std::vector< std::string > getDisallowed (const std::string &laneID)
static std::string getEdgeID (const std::string &laneID)
static double getElectricityConsumption (const std::string &laneID)
static std::vector< std::string > getFoes (const std::string &laneID, const std::string &toLaneID)
static double getFriction (const std::string &laneID)
static double getFuelConsumption (const std::string &laneID)
static double getHCEmission (const std::string &laneID)
static std::vector< std::string > getInternalFoes (const std::string &laneID)
static int getLastStepHaltingNumber (const std::string &laneID)
static double getLastStepLength (const std::string &laneID)
static double getLastStepMeanSpeed (const std::string &laneID)
static double getLastStepOccupancy (const std::string &laneID)
static std::vector< std::string > getLastStepVehicleIDs (const std::string &laneID)
static int getLastStepVehicleNumber (const std::string &laneID)
static double getLength (const std::string &laneID)
static int getLinkNumber (const std::string &laneID)
static std::vector< libsumo::TraCIConnectiongetLinks (const std::string &laneID)
static double getMaxSpeed (const std::string &laneID)
static double getNoiseEmission (const std::string &laneID)
static double getNOxEmission (const std::string &laneID)
static const std::vector< std::string > getPendingVehicles (const std::string &laneID)
static double getPMxEmission (const std::string &laneID)
static libsumo::TraCIPositionVector getShape (const std::string &laneID)
static double getTraveltime (const std::string &laneID)
static double getWaitingTime (const std::string &laneID)
static double getWidth (const std::string &laneID)
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static std::shared_ptr< VariableWrapper > makeWrapper ()
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setAllowed (const std::string &laneID, std::string allowedClasses)
static void setAllowed (const std::string &laneID, std::vector< std::string > allowedClasses)
static void setChangePermissions (const std::string &laneID, std::vector< std::string > allowedClasses, const int direction)
static void setDisallowed (const std::string &laneID, std::string disallowedClasses)
static void setDisallowed (const std::string &laneID, std::vector< std::string > disallowedClasses)
static void setFriction (const std::string &laneID, double friction)
static void setLength (const std::string &laneID, double length)
static void setMaxSpeed (const std::string &laneID, double speed)
static void storeShape (const std::string &id, PositionVector &shape)
 Saves the shape of the requested object in the given container.

Private Member Functions

 Lane ()=delete
 invalidated standard constructor

Static Private Member Functions

static MSLanegetLane (const std::string &id)

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults

Detailed Description

Definition at line 45 of file Lane.h.

Constructor & Destructor Documentation

◆ Lane()

LIBSUMO_NAMESPACE::Lane::Lane ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ getAllowed()

std::vector< std::string > Lane::getAllowed ( const std::string & laneID)
static

Definition at line 117 of file libsumo/Lane.cpp.

References getAllowed(), getLane(), getVehicleClassNamesList(), and SVCAll.

Referenced by getAllowed(), and handleVariable().

Here is the caller graph for this function:

◆ getAngle()

double Lane::getAngle ( const std::string & laneID,
double relativePosition = libsumo::INVALID_DOUBLE_VALUE )
static

Definition at line 342 of file libsumo/Lane.cpp.

References Position::angleTo2D(), getAngle(), getLane(), MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), libsumo::INVALID_DOUBLE_VALUE, GeomHelper::naviDegree(), and PositionVector::rotationAtOffset().

Referenced by LIBSUMO_NAMESPACE::Edge::getAngle(), getAngle(), and handleVariable().

Here is the caller graph for this function:

◆ getBidiLane()

std::string Lane::getBidiLane ( const std::string & laneID)
static

Definition at line 358 of file libsumo/Lane.cpp.

References getBidiLane(), Named::getID(), and getLane().

Referenced by getBidiLane(), and handleVariable().

Here is the caller graph for this function:

◆ getChangePermissions()

std::vector< std::string > Lane::getChangePermissions ( const std::string & laneID,
const int direction )
static

Definition at line 133 of file libsumo/Lane.cpp.

References getChangePermissions(), getLane(), getVehicleClassNamesList(), libsumo::LANECHANGE_LEFT, libsumo::LANECHANGE_RIGHT, and toString().

Referenced by getChangePermissions(), and handleVariable().

Here is the caller graph for this function:

◆ getCO2Emission()

double Lane::getCO2Emission ( const std::string & laneID)
static

Definition at line 166 of file libsumo/Lane.cpp.

References getCO2Emission(), and getLane().

Referenced by getCO2Emission(), and handleVariable().

Here is the caller graph for this function:

◆ getCOEmission()

double Lane::getCOEmission ( const std::string & laneID)
static

Definition at line 172 of file libsumo/Lane.cpp.

References getCOEmission(), and getLane().

Referenced by getCOEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getDisallowed()

std::vector< std::string > Lane::getDisallowed ( const std::string & laneID)
static

Definition at line 127 of file libsumo/Lane.cpp.

References getDisallowed(), getLane(), getVehicleClassNamesList(), and invertPermissions().

Referenced by getDisallowed(), and handleVariable().

Here is the caller graph for this function:

◆ getEdgeID()

std::string Lane::getEdgeID ( const std::string & laneID)
static

Definition at line 67 of file libsumo/Lane.cpp.

References getEdgeID(), and getLane().

Referenced by getEdgeID(), and handleVariable().

Here is the caller graph for this function:

◆ getElectricityConsumption()

double Lane::getElectricityConsumption ( const std::string & laneID)
static

Definition at line 207 of file libsumo/Lane.cpp.

References getElectricityConsumption(), and getLane().

Referenced by getElectricityConsumption(), and handleVariable().

Here is the caller graph for this function:

◆ getFoes()

std::vector< std::string > Lane::getFoes ( const std::string & laneID,
const std::string & toLaneID )
static

Definition at line 293 of file libsumo/Lane.cpp.

References MSLink::getFoeLinks(), getFoes(), getInternalFoes(), and getLane().

Referenced by getFoes(), and handleVariable().

Here is the caller graph for this function:

◆ getFriction()

double Lane::getFriction ( const std::string & laneID)
static

Definition at line 84 of file libsumo/Lane.cpp.

References getFriction(), and getLane().

Referenced by getFriction(), and handleVariable().

Here is the caller graph for this function:

◆ getFuelConsumption()

double Lane::getFuelConsumption ( const std::string & laneID)
static

Definition at line 195 of file libsumo/Lane.cpp.

References getFuelConsumption(), and getLane().

Referenced by getFuelConsumption(), and handleVariable().

Here is the caller graph for this function:

◆ getHCEmission()

double Lane::getHCEmission ( const std::string & laneID)
static

Definition at line 178 of file libsumo/Lane.cpp.

References getHCEmission(), and getLane().

Referenced by getHCEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getInternalFoes()

std::vector< std::string > Lane::getInternalFoes ( const std::string & laneID)
static

Definition at line 310 of file libsumo/Lane.cpp.

References MSLink::getFoeLanes(), getInternalFoes(), getLane(), MSLane::getLinkCont(), MSLane::isCrossing(), and MSLane::isInternal().

Referenced by getFoes(), and getInternalFoes().

Here is the caller graph for this function:

◆ getLane()

◆ getLastStepHaltingNumber()

int Lane::getLastStepHaltingNumber ( const std::string & laneID)
static

Definition at line 265 of file libsumo/Lane.cpp.

References getLane(), getLastStepHaltingNumber(), MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMO_const_haltingSpeed.

Referenced by getLastStepHaltingNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepLength()

double Lane::getLastStepLength ( const std::string & laneID)
static

Definition at line 225 of file libsumo/Lane.cpp.

References getLane(), getLastStepLength(), MSLane::getVehiclesSecure(), and MSLane::releaseVehicles().

Referenced by getLastStepLength(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepMeanSpeed()

double Lane::getLastStepMeanSpeed ( const std::string & laneID)
static

Definition at line 213 of file libsumo/Lane.cpp.

References getLane(), and getLastStepMeanSpeed().

Referenced by getLastStepMeanSpeed(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepOccupancy()

double Lane::getLastStepOccupancy ( const std::string & laneID)
static

Definition at line 219 of file libsumo/Lane.cpp.

References getLane(), and getLastStepOccupancy().

Referenced by getLastStepOccupancy(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepVehicleIDs()

std::vector< std::string > Lane::getLastStepVehicleIDs ( const std::string & laneID)
static

Definition at line 280 of file libsumo/Lane.cpp.

References getLane(), getLastStepVehicleIDs(), MSLane::getVehiclesSecure(), and MSLane::releaseVehicles().

Referenced by getLastStepVehicleIDs(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepVehicleNumber()

int Lane::getLastStepVehicleNumber ( const std::string & laneID)
static

Definition at line 259 of file libsumo/Lane.cpp.

References getLane(), and getLastStepVehicleNumber().

Referenced by getLastStepVehicleNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getLength()

double Lane::getLength ( const std::string & laneID)
static

Definition at line 73 of file libsumo/Lane.cpp.

References getLane(), and getLength().

Referenced by getLength(), and handleVariable().

Here is the caller graph for this function:

◆ getLinkNumber()

int Lane::getLinkNumber ( const std::string & laneID)
static

Definition at line 89 of file libsumo/Lane.cpp.

References getLane(), and getLinkNumber().

Referenced by getLinkNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getLinks()

std::vector< libsumo::TraCIConnection > Lane::getLinks ( const std::string & laneID)
static

Definition at line 95 of file libsumo/Lane.cpp.

References MSNet::getCurrentTimeStep(), SUMOVTypeParameter::getDefault(), SUMOVTypeParameter::getDefaultDecel(), MSNet::getInstance(), getLane(), MSLane::getLinkCont(), getLinks(), MSLane::getSpeedLimit(), SUMOXMLDefinitions::LinkDirections, SUMOXMLDefinitions::LinkStates, and MIN2().

Referenced by getLinks(), and handleVariable().

Here is the caller graph for this function:

◆ getMaxSpeed()

double Lane::getMaxSpeed ( const std::string & laneID)
static

Definition at line 79 of file libsumo/Lane.cpp.

References getLane(), and getMaxSpeed().

Referenced by getMaxSpeed(), and handleVariable().

Here is the caller graph for this function:

◆ getNoiseEmission()

double Lane::getNoiseEmission ( const std::string & laneID)
static

Definition at line 201 of file libsumo/Lane.cpp.

References getLane(), and getNoiseEmission().

Referenced by getNoiseEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getNOxEmission()

double Lane::getNOxEmission ( const std::string & laneID)
static

Definition at line 190 of file libsumo/Lane.cpp.

References getLane(), and getNOxEmission().

Referenced by getNOxEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getPendingVehicles()

const std::vector< std::string > Lane::getPendingVehicles ( const std::string & laneID)
static

Definition at line 329 of file libsumo/Lane.cpp.

References MSNet::getInstance(), getLane(), and getPendingVehicles().

Referenced by getPendingVehicles(), and handleVariable().

Here is the caller graph for this function:

◆ getPMxEmission()

double Lane::getPMxEmission ( const std::string & laneID)
static

Definition at line 184 of file libsumo/Lane.cpp.

References getLane(), and getPMxEmission().

Referenced by getPMxEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getShape()

libsumo::TraCIPositionVector Lane::getShape ( const std::string & laneID)
static

Definition at line 145 of file libsumo/Lane.cpp.

References getLane(), and getShape().

Referenced by getShape(), and handleVariable().

Here is the caller graph for this function:

◆ getTraveltime()

double Lane::getTraveltime ( const std::string & laneID)
static

Definition at line 247 of file libsumo/Lane.cpp.

References getLane(), MSLane::getLength(), MSLane::getMeanSpeed(), and getTraveltime().

Referenced by getTraveltime(), and handleVariable().

Here is the caller graph for this function:

◆ getWaitingTime()

double Lane::getWaitingTime ( const std::string & laneID)
static

Definition at line 241 of file libsumo/Lane.cpp.

References getLane(), and getWaitingTime().

Referenced by getWaitingTime(), and handleVariable().

Here is the caller graph for this function:

◆ getWidth()

double Lane::getWidth ( const std::string & laneID)
static

Definition at line 160 of file libsumo/Lane.cpp.

References getLane(), and getWidth().

Referenced by getWidth(), and handleVariable().

Here is the caller graph for this function:

◆ handleVariable()

bool Lane::handleVariable ( const std::string & objID,
const int variable,
VariableWrapper * wrapper,
tcpip::Storage * paramData )
static

Definition at line 463 of file libsumo/Lane.cpp.

References getAllowed(), getAngle(), getBidiLane(), getChangePermissions(), getCO2Emission(), getCOEmission(), getDisallowed(), getEdgeID(), getElectricityConsumption(), getFoes(), getFriction(), getFuelConsumption(), getHCEmission(), getLastStepHaltingNumber(), getLastStepLength(), getLastStepMeanSpeed(), getLastStepOccupancy(), getLastStepVehicleIDs(), getLastStepVehicleNumber(), getLength(), getLinkNumber(), getLinks(), getMaxSpeed(), getNoiseEmission(), getNOxEmission(), getPendingVehicles(), getPMxEmission(), getShape(), getTraveltime(), getWaitingTime(), getWidth(), handleVariable(), libsumo::ID_COUNT, libsumo::LANE_ALLOWED, libsumo::LANE_CHANGES, libsumo::LANE_DISALLOWED, libsumo::LANE_EDGE_ID, libsumo::LANE_LINK_NUMBER, libsumo::LANE_LINKS, libsumo::LAST_STEP_LENGTH, libsumo::LAST_STEP_MEAN_SPEED, libsumo::LAST_STEP_OCCUPANCY, libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER, libsumo::LAST_STEP_VEHICLE_ID_LIST, libsumo::LAST_STEP_VEHICLE_NUMBER, libsumo::StorageHelper::readTypedByte(), libsumo::StorageHelper::readTypedDouble(), libsumo::StorageHelper::readTypedString(), libsumo::TRACI_ID_LIST, libsumo::VAR_ANGLE, libsumo::VAR_BIDI, libsumo::VAR_CO2EMISSION, libsumo::VAR_COEMISSION, libsumo::VAR_CURRENT_TRAVELTIME, libsumo::VAR_ELECTRICITYCONSUMPTION, libsumo::VAR_FOES, libsumo::VAR_FRICTION, libsumo::VAR_FUELCONSUMPTION, libsumo::VAR_HCEMISSION, libsumo::VAR_LENGTH, libsumo::VAR_MAXSPEED, libsumo::VAR_NOISEEMISSION, libsumo::VAR_NOXEMISSION, libsumo::VAR_PARAMETER, libsumo::VAR_PARAMETER_WITH_KEY, libsumo::VAR_PENDING_VEHICLES, libsumo::VAR_PMXEMISSION, libsumo::VAR_SHAPE, libsumo::VAR_WAITING_TIME, and libsumo::VAR_WIDTH.

Referenced by handleVariable(), makeWrapper(), and setAllowed().

Here is the caller graph for this function:

◆ makeWrapper()

std::shared_ptr< VariableWrapper > Lane::makeWrapper ( )
static

Definition at line 457 of file libsumo/Lane.cpp.

References handleVariable(), makeWrapper(), myContextSubscriptionResults, and mySubscriptionResults.

Referenced by makeWrapper(), and setAllowed().

Here is the caller graph for this function:

◆ setAllowed() [1/2]

LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void LIBSUMO_NAMESPACE::Lane::setAllowed ( const std::string & laneID,
std::string allowedClasses )
static

References getLane(), handleVariable(), makeWrapper(), setAllowed(), setChangePermissions(), setDisallowed(), setFriction(), setLength(), setMaxSpeed(), and storeShape().

Referenced by setAllowed(), and setAllowed().

Here is the caller graph for this function:

◆ setAllowed() [2/2]

void Lane::setAllowed ( const std::string & laneID,
std::vector< std::string > allowedClasses )
static

◆ setChangePermissions()

void Lane::setChangePermissions ( const std::string & laneID,
std::vector< std::string > allowedClasses,
const int direction )
static

Definition at line 392 of file libsumo/Lane.cpp.

References getLane(), libsumo::LANECHANGE_LEFT, libsumo::LANECHANGE_RIGHT, parseVehicleClasses(), MSLane::setChangeLeft(), setChangePermissions(), MSLane::setChangeRight(), and toString().

Referenced by setAllowed(), and setChangePermissions().

Here is the caller graph for this function:

◆ setDisallowed() [1/2]

void Lane::setDisallowed ( const std::string & laneID,
std::string disallowedClasses )
static

Definition at line 378 of file libsumo/Lane.cpp.

References setDisallowed().

Referenced by setAllowed(), setDisallowed(), and setDisallowed().

Here is the caller graph for this function:

◆ setDisallowed() [2/2]

void Lane::setDisallowed ( const std::string & laneID,
std::vector< std::string > disallowedClasses )
static

◆ setFriction()

void Lane::setFriction ( const std::string & laneID,
double friction )
static

Definition at line 417 of file libsumo/Lane.cpp.

References getLane(), and setFriction().

Referenced by setAllowed(), and setFriction().

Here is the caller graph for this function:

◆ setLength()

void Lane::setLength ( const std::string & laneID,
double length )
static

Definition at line 411 of file libsumo/Lane.cpp.

References getLane(), and setLength().

Referenced by setAllowed(), and setLength().

Here is the caller graph for this function:

◆ setMaxSpeed()

void Lane::setMaxSpeed ( const std::string & laneID,
double speed )
static

Definition at line 405 of file libsumo/Lane.cpp.

References getLane(), and setMaxSpeed().

Referenced by setAllowed(), and setMaxSpeed().

Here is the caller graph for this function:

◆ storeShape()

void Lane::storeShape ( const std::string & id,
PositionVector & shape )
static

Saves the shape of the requested object in the given container.

Parameters
idThe id of the lane to retrieve
shapeThe container to fill

Definition at line 451 of file libsumo/Lane.cpp.

References getLane(), and storeShape().

Referenced by setAllowed(), and storeShape().

Here is the caller graph for this function:

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Lane::myContextSubscriptionResults
staticprivate

Definition at line 115 of file Lane.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Lane::mySubscriptionResults
staticprivate

Definition at line 114 of file Lane.h.

Referenced by makeWrapper().


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