Eclipse SUMO - Simulation of Urban MObility
libsumo::Lane Class Reference

#include <Lane.h>

Static Public Member Functions

static std::vector< std::string > getAllowed (std::string laneID)
 
static double getCO2Emission (std::string laneID)
 
static double getCOEmission (std::string laneID)
 
static std::vector< std::string > getDisallowed (std::string laneID)
 
static std::string getEdgeID (std::string laneID)
 
static double getElectricityConsumption (std::string laneID)
 
static std::vector< std::string > getFoes (const std::string &laneID, const std::string &toLaneID)
 
static double getFuelConsumption (std::string laneID)
 
static double getHCEmission (std::string laneID)
 
static std::vector< std::string > getInternalFoes (const std::string &laneID)
 
static int getLastStepHaltingNumber (std::string laneID)
 
static double getLastStepLength (std::string laneID)
 
static double getLastStepMeanSpeed (std::string laneID)
 
static double getLastStepOccupancy (std::string laneID)
 
static std::vector< std::string > getLastStepVehicleIDs (std::string laneID)
 
static int getLastStepVehicleNumber (std::string laneID)
 
static double getLength (std::string laneID)
 
static int getLinkNumber (std::string laneID)
 
static std::vector< TraCIConnectiongetLinks (std::string laneID)
 
static double getMaxSpeed (std::string laneID)
 
static double getNoiseEmission (std::string laneID)
 
static double getNOxEmission (std::string laneID)
 
static double getPMxEmission (std::string laneID)
 
static TraCIPositionVector getShape (std::string laneID)
 
static double getTraveltime (std::string laneID)
 
static double getWaitingTime (std::string laneID)
 
static double getWidth (std::string laneID)
 
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper)
 
static std::shared_ptr< VariableWrappermakeWrapper ()
 
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setAllowed (std::string laneID, std::string allowedClass)
 
static void setAllowed (std::string laneID, std::vector< std::string > allowedClasses)
 
static void setDisallowed (std::string laneID, std::vector< std::string > disallowedClasses)
 
static void setLength (std::string laneID, double length)
 
static void setMaxSpeed (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. More...
 

Private Member Functions

 Lane ()=delete
 invalidated standard constructor More...
 

Static Private Member Functions

static const MSLanegetLane (const std::string &id)
 

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
 
static SubscriptionResults mySubscriptionResults
 

Detailed Description

Definition at line 48 of file Lane.h.

Constructor & Destructor Documentation

◆ Lane()

libsumo::Lane::Lane ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ getAllowed()

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

Definition at line 107 of file Lane.cpp.

References getLane(), MSLane::getPermissions(), getVehicleClassNamesList(), and SVCAll.

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getCO2Emission()

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

Definition at line 144 of file Lane.cpp.

References MSLane::getCO2Emissions(), and getLane().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getCOEmission()

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

Definition at line 150 of file Lane.cpp.

References MSLane::getCOEmissions(), and getLane().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getDisallowed()

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

Definition at line 117 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getEdgeID()

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

Definition at line 61 of file Lane.cpp.

References MSLane::getEdge(), Named::getID(), and getLane().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getElectricityConsumption()

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

Definition at line 185 of file Lane.cpp.

References MSLane::getElectricityConsumption(), and getLane().

Referenced by 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 270 of file Lane.cpp.

References MSLink::getFoeLinks(), getLane(), and MSLane::getLinkTo().

Referenced by TraCIServerAPI_Lane::processGet().

Here is the caller graph for this function:

◆ getFuelConsumption()

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

Definition at line 173 of file Lane.cpp.

References MSLane::getFuelConsumption(), and getLane().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getHCEmission()

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

Definition at line 156 of file Lane.cpp.

References MSLane::getHCEmissions(), and getLane().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getInternalFoes()

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

Definition at line 284 of file Lane.cpp.

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

Referenced by TraCIServerAPI_Lane::processGet().

Here is the caller graph for this function:

◆ getLane()

◆ getLastStepHaltingNumber()

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

Definition at line 242 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLastStepLength()

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

Definition at line 203 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLastStepMeanSpeed()

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

Definition at line 191 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLastStepOccupancy()

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

Definition at line 197 of file Lane.cpp.

References getLane(), and MSLane::getNettoOccupancy().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLastStepVehicleIDs()

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

Definition at line 257 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLastStepVehicleNumber()

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

Definition at line 237 of file Lane.cpp.

References getLane(), and MSLane::getVehicleNumber().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLength()

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

Definition at line 67 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLinkNumber()

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

Definition at line 79 of file Lane.cpp.

References getLane(), and MSLane::getLinkCont().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getLinks()

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

Definition at line 85 of file Lane.cpp.

References MSNet::getCurrentTimeStep(), SUMOVTypeParameter::getDefault(), SUMOVTypeParameter::getDefaultDecel(), MSNet::getInstance(), getLane(), MSLane::getLinkCont(), MSLane::getSpeedLimit(), StringBijection< T >::getString(), SUMOXMLDefinitions::LinkDirections, SUMOXMLDefinitions::LinkStates, and MIN2().

Referenced by TraCIServerAPI_Lane::processGet().

Here is the caller graph for this function:

◆ getMaxSpeed()

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

Definition at line 73 of file Lane.cpp.

References getLane(), and MSLane::getSpeedLimit().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getNoiseEmission()

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

Definition at line 179 of file Lane.cpp.

References MSLane::getHarmonoise_NoiseEmissions(), and getLane().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getNOxEmission()

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

Definition at line 168 of file Lane.cpp.

References getLane(), and MSLane::getNOxEmissions().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getPMxEmission()

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

Definition at line 162 of file Lane.cpp.

References getLane(), and MSLane::getPMxEmissions().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getShape()

TraCIPositionVector Lane::getShape ( std::string  laneID)
static

Definition at line 123 of file Lane.cpp.

References getLane(), MSLane::getShape(), libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.

Referenced by TraCIServerAPI_Lane::processGet().

Here is the caller graph for this function:

◆ getTraveltime()

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

Definition at line 225 of file Lane.cpp.

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

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getWaitingTime()

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

Definition at line 219 of file Lane.cpp.

References getLane(), and MSLane::getWaitingSeconds().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getWidth()

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

Definition at line 138 of file Lane.cpp.

References getLane(), and MSLane::getWidth().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ handleVariable()

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

Definition at line 386 of file Lane.cpp.

References getAllowed(), getCO2Emission(), getCOEmission(), getDisallowed(), getEdgeID(), getElectricityConsumption(), getFuelConsumption(), getHCEmission(), getLastStepHaltingNumber(), getLastStepLength(), getLastStepMeanSpeed(), getLastStepOccupancy(), getLastStepVehicleIDs(), getLastStepVehicleNumber(), getLength(), getLinkNumber(), getMaxSpeed(), getNoiseEmission(), getNOxEmission(), getPMxEmission(), getTraveltime(), getWaitingTime(), getWidth(), libsumo::ID_COUNT, libsumo::LANE_ALLOWED, libsumo::LANE_DISALLOWED, libsumo::LANE_EDGE_ID, libsumo::LANE_LINK_NUMBER, 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::TRACI_ID_LIST, libsumo::VAR_CO2EMISSION, libsumo::VAR_COEMISSION, libsumo::VAR_CURRENT_TRAVELTIME, libsumo::VAR_ELECTRICITYCONSUMPTION, libsumo::VAR_FUELCONSUMPTION, libsumo::VAR_HCEMISSION, libsumo::VAR_LENGTH, libsumo::VAR_MAXSPEED, libsumo::VAR_NOISEEMISSION, libsumo::VAR_NOXEMISSION, libsumo::VAR_PMXEMISSION, libsumo::VAR_WAITING_TIME, libsumo::VAR_WIDTH, libsumo::VariableWrapper::wrapDouble(), libsumo::VariableWrapper::wrapInt(), libsumo::VariableWrapper::wrapString(), and libsumo::VariableWrapper::wrapStringList().

Referenced by makeWrapper(), and TraCIServerAPI_Lane::processGet().

Here is the caller graph for this function:

◆ makeWrapper()

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

Definition at line 380 of file Lane.cpp.

References handleVariable(), myContextSubscriptionResults, and mySubscriptionResults.

◆ setAllowed() [1/2]

void Lane::setAllowed ( std::string  laneID,
std::string  allowedClass 
)
static

Definition at line 303 of file Lane.cpp.

Referenced by TraCIServerAPI_Lane::processSet().

Here is the caller graph for this function:

◆ setAllowed() [2/2]

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

◆ setDisallowed()

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

Definition at line 320 of file Lane.cpp.

References MSLane::CHANGE_PERMISSIONS_PERMANENT, MSLane::getEdge(), getLane(), MSEdge::getPredecessors(), invertPermissions(), parseVehicleClasses(), MSEdge::rebuildAllowedLanes(), and MSLane::setPermissions().

Referenced by TraCIServerAPI_Lane::processSet().

Here is the caller graph for this function:

◆ setLength()

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

Definition at line 338 of file Lane.cpp.

References getLane(), Parameterised::getParameter(), LANE, LIBSUMO_GET_PARAMETER_WITH_KEY_IMPLEMENTATION, LIBSUMO_SUBSCRIPTION_IMPLEMENTATION, MSLane::setLength(), and Parameterised::setParameter().

Referenced by TraCIServerAPI_Lane::processSet().

Here is the caller graph for this function:

◆ setMaxSpeed()

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

Definition at line 331 of file Lane.cpp.

References getLane(), and MSLane::setMaxSpeed().

Referenced by TraCIServerAPI_Lane::processSet().

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 374 of file Lane.cpp.

References getLane(), and MSLane::getShape().

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Lane::myContextSubscriptionResults
staticprivate

Definition at line 104 of file Lane.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Lane::mySubscriptionResults
staticprivate

Definition at line 103 of file Lane.h.

Referenced by makeWrapper().


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