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

#include <Edge.h>

Static Public Member Functions

static void adaptTraveltime (const std::string &edgeID, double time, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max())
static double getAdaptedTraveltime (const std::string &edgeID, double time)
static double getAngle (const std::string &edgeID, double relativePosition=libsumo::INVALID_DOUBLE_VALUE)
static std::string getBidiEdge (const std::string &edgeID)
static double getCO2Emission (const std::string &edgeID)
static double getCOEmission (const std::string &edgeID)
static double getEffort (const std::string &edgeID, double time)
static double getElectricityConsumption (const std::string &edgeID)
static std::string getFromJunction (const std::string &edgeID)
static double getFuelConsumption (const std::string &edgeID)
static double getHCEmission (const std::string &edgeID)
static int getLaneNumber (const std::string &edgeID)
static int getLastStepHaltingNumber (const std::string &edgeID)
static double getLastStepLength (const std::string &edgeID)
static double getLastStepMeanSpeed (const std::string &edgeID)
static double getLastStepOccupancy (const std::string &edgeID)
static const std::vector< std::string > getLastStepPersonIDs (const std::string &edgeID)
static const std::vector< std::string > getLastStepVehicleIDs (const std::string &edgeID)
static int getLastStepVehicleNumber (const std::string &edgeID)
static double getMeanFriction (const std::string &edgeID)
static double getNoiseEmission (const std::string &edgeID)
static double getNOxEmission (const std::string &edgeID)
static const std::vector< std::string > getPendingVehicles (const std::string &edgeID)
static double getPMxEmission (const std::string &edgeID)
static std::string getStreetName (const std::string &edgeID)
static std::string getToJunction (const std::string &edgeID)
static double getTraveltime (const std::string &edgeID)
static double getWaitingTime (const std::string &edgeID)
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 &edgeID, std::string allowedClasses)
static void setAllowed (const std::string &edgeID, std::vector< std::string > allowedClasses)
static void setDisallowed (const std::string &edgeID, std::string disallowedClasses)
static void setDisallowed (const std::string &edgeID, std::vector< std::string > disallowedClasses)
static void setEffort (const std::string &edgeID, double effort, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max())
static void setFriction (const std::string &edgeID, double friction)
static void setMaxSpeed (const std::string &edgeID, double speed)
static void storeShape (const std::string &edgeID, PositionVector &shape)
 Saves the shape of the requested object in the given container.

Private Member Functions

 Edge ()=delete
 invalidated standard constructor

Static Private Member Functions

static MSEdgegetEdge (const std::string &edgeID)
static void setAllowedSVCPermissions (const std::string &edgeID, long long int permissions)

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults

Detailed Description

Definition at line 46 of file Edge.h.

Constructor & Destructor Documentation

◆ Edge()

LIBSUMO_NAMESPACE::Edge::Edge ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ adaptTraveltime()

void Edge::adaptTraveltime ( const std::string & edgeID,
double time,
double beginSeconds = 0.,
double endSeconds = std::numeric_limits<double>::max() )
static

Definition at line 354 of file libsumo/Edge.cpp.

References adaptTraveltime(), MSEdgeWeightsStorage::addTravelTime(), getEdge(), MSNet::getInstance(), and MSNet::getWeightsStorage().

Referenced by adaptTraveltime().

Here is the caller graph for this function:

◆ getAdaptedTraveltime()

double Edge::getAdaptedTraveltime ( const std::string & edgeID,
double time )
static

Definition at line 65 of file libsumo/Edge.cpp.

References getAdaptedTraveltime(), getEdge(), MSNet::getInstance(), and invalid_return< std::string >::value.

Referenced by getAdaptedTraveltime(), and handleVariable().

Here is the caller graph for this function:

◆ getAngle()

double Edge::getAngle ( const std::string & edgeID,
double relativePosition = libsumo::INVALID_DOUBLE_VALUE )
static

Definition at line 289 of file libsumo/Edge.cpp.

References getAngle(), LIBSUMO_NAMESPACE::Lane::getAngle(), getEdge(), and libsumo::INVALID_DOUBLE_VALUE.

Referenced by getAngle(), and handleVariable().

Here is the caller graph for this function:

◆ getBidiEdge()

std::string Edge::getBidiEdge ( const std::string & edgeID)
static

Definition at line 305 of file libsumo/Edge.cpp.

References getBidiEdge(), getEdge(), and Named::getID().

Referenced by getBidiEdge(), and handleVariable().

Here is the caller graph for this function:

◆ getCO2Emission()

double Edge::getCO2Emission ( const std::string & edgeID)
static

Definition at line 131 of file libsumo/Edge.cpp.

References getCO2Emission(), and getEdge().

Referenced by getCO2Emission(), and handleVariable().

Here is the caller graph for this function:

◆ getCOEmission()

double Edge::getCOEmission ( const std::string & edgeID)
static

Definition at line 141 of file libsumo/Edge.cpp.

References getCOEmission(), and getEdge().

Referenced by getCOEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getEdge()

◆ getEffort()

double Edge::getEffort ( const std::string & edgeID,
double time )
static

Definition at line 76 of file libsumo/Edge.cpp.

References getEdge(), getEffort(), MSNet::getInstance(), and invalid_return< std::string >::value.

Referenced by getEffort(), and handleVariable().

Here is the caller graph for this function:

◆ getElectricityConsumption()

double Edge::getElectricityConsumption ( const std::string & edgeID)
static

Definition at line 204 of file libsumo/Edge.cpp.

References getEdge(), and getElectricityConsumption().

Referenced by getElectricityConsumption(), and handleVariable().

Here is the caller graph for this function:

◆ getFromJunction()

std::string Edge::getFromJunction ( const std::string & edgeID)
static

Definition at line 295 of file libsumo/Edge.cpp.

References getEdge(), and getFromJunction().

Referenced by getFromJunction(), and handleVariable().

Here is the caller graph for this function:

◆ getFuelConsumption()

double Edge::getFuelConsumption ( const std::string & edgeID)
static

Definition at line 181 of file libsumo/Edge.cpp.

References getEdge(), and getFuelConsumption().

Referenced by getFuelConsumption(), and handleVariable().

Here is the caller graph for this function:

◆ getHCEmission()

double Edge::getHCEmission ( const std::string & edgeID)
static

Definition at line 151 of file libsumo/Edge.cpp.

References getEdge(), and getHCEmission().

Referenced by getHCEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getLaneNumber()

int Edge::getLaneNumber ( const std::string & edgeID)
static

Definition at line 264 of file libsumo/Edge.cpp.

References getEdge(), and getLaneNumber().

Referenced by getLaneNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepHaltingNumber()

int Edge::getLastStepHaltingNumber ( const std::string & edgeID)
static

Definition at line 237 of file libsumo/Edge.cpp.

References getEdge(), getLastStepHaltingNumber(), and SUMO_const_haltingSpeed.

Referenced by getLastStepHaltingNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepLength()

double Edge::getLastStepLength ( const std::string & edgeID)
static

Definition at line 249 of file libsumo/Edge.cpp.

References getEdge(), getLastStepLength(), and MSBaseVehicle::getLength().

Referenced by getLastStepLength(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepMeanSpeed()

double Edge::getLastStepMeanSpeed ( const std::string & edgeID)
static

Definition at line 220 of file libsumo/Edge.cpp.

References getEdge(), and getLastStepMeanSpeed().

Referenced by getLastStepMeanSpeed(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepOccupancy()

double Edge::getLastStepOccupancy ( const std::string & edgeID)
static

Definition at line 231 of file libsumo/Edge.cpp.

References getEdge(), and getLastStepOccupancy().

Referenced by getLastStepOccupancy(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepPersonIDs()

const std::vector< std::string > Edge::getLastStepPersonIDs ( const std::string & edgeID)
static

Definition at line 109 of file libsumo/Edge.cpp.

References getEdge(), MSNet::getInstance(), and getLastStepPersonIDs().

Referenced by getLastStepPersonIDs(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepVehicleIDs()

const std::vector< std::string > Edge::getLastStepVehicleIDs ( const std::string & edgeID)
static

Definition at line 121 of file libsumo/Edge.cpp.

References getEdge(), and getLastStepVehicleIDs().

Referenced by getLastStepVehicleIDs(), and handleVariable().

Here is the caller graph for this function:

◆ getLastStepVehicleNumber()

int Edge::getLastStepVehicleNumber ( const std::string & edgeID)
static

Definition at line 214 of file libsumo/Edge.cpp.

References getEdge(), and getLastStepVehicleNumber().

Referenced by getLastStepVehicleNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getMeanFriction()

double Edge::getMeanFriction ( const std::string & edgeID)
static

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

References getEdge(), and getMeanFriction().

Referenced by getMeanFriction(), and handleVariable().

Here is the caller graph for this function:

◆ getNoiseEmission()

double Edge::getNoiseEmission ( const std::string & edgeID)
static

Definition at line 191 of file libsumo/Edge.cpp.

References getEdge(), getNoiseEmission(), and HelpersHarmonoise::sum().

Referenced by getNoiseEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getNOxEmission()

double Edge::getNOxEmission ( const std::string & edgeID)
static

Definition at line 171 of file libsumo/Edge.cpp.

References getEdge(), and getNOxEmission().

Referenced by getNOxEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getPendingVehicles()

const std::vector< std::string > Edge::getPendingVehicles ( const std::string & edgeID)
static

Definition at line 276 of file libsumo/Edge.cpp.

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

Referenced by getPendingVehicles(), and handleVariable().

Here is the caller graph for this function:

◆ getPMxEmission()

double Edge::getPMxEmission ( const std::string & edgeID)
static

Definition at line 161 of file libsumo/Edge.cpp.

References getEdge(), and getPMxEmission().

Referenced by getPMxEmission(), and handleVariable().

Here is the caller graph for this function:

◆ getStreetName()

std::string Edge::getStreetName ( const std::string & edgeID)
static

Definition at line 270 of file libsumo/Edge.cpp.

References getEdge(), and getStreetName().

Referenced by getStreetName(), and handleVariable().

Here is the caller graph for this function:

◆ getToJunction()

std::string Edge::getToJunction ( const std::string & edgeID)
static

Definition at line 300 of file libsumo/Edge.cpp.

References getEdge(), and getToJunction().

Referenced by getToJunction(), and handleVariable().

Here is the caller graph for this function:

◆ getTraveltime()

double Edge::getTraveltime ( const std::string & edgeID)
static

Definition at line 87 of file libsumo/Edge.cpp.

References getEdge(), and getTraveltime().

Referenced by getTraveltime(), and handleVariable().

Here is the caller graph for this function:

◆ getWaitingTime()

double Edge::getWaitingTime ( const std::string & edgeID)
static

Definition at line 103 of file libsumo/Edge.cpp.

References getEdge(), and getWaitingTime().

Referenced by getWaitingTime(), and handleVariable().

Here is the caller graph for this function:

◆ handleVariable()

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

Definition at line 402 of file libsumo/Edge.cpp.

References libsumo::FROM_JUNCTION, getAdaptedTraveltime(), getAngle(), getBidiEdge(), getCO2Emission(), getCOEmission(), getEffort(), getElectricityConsumption(), getFromJunction(), getFuelConsumption(), getHCEmission(), getLaneNumber(), getLastStepHaltingNumber(), getLastStepLength(), getLastStepMeanSpeed(), getLastStepOccupancy(), getLastStepPersonIDs(), getLastStepVehicleIDs(), getLastStepVehicleNumber(), getMeanFriction(), getNoiseEmission(), getNOxEmission(), getPendingVehicles(), getPMxEmission(), getStreetName(), getToJunction(), getTraveltime(), getWaitingTime(), handleVariable(), libsumo::ID_COUNT, libsumo::LAST_STEP_LENGTH, libsumo::LAST_STEP_MEAN_SPEED, libsumo::LAST_STEP_OCCUPANCY, libsumo::LAST_STEP_PERSON_ID_LIST, libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER, libsumo::LAST_STEP_VEHICLE_ID_LIST, libsumo::LAST_STEP_VEHICLE_NUMBER, libsumo::StorageHelper::readTypedDouble(), libsumo::StorageHelper::readTypedString(), libsumo::TO_JUNCTION, libsumo::TRACI_ID_LIST, libsumo::VAR_ANGLE, libsumo::VAR_BIDI, libsumo::VAR_CO2EMISSION, libsumo::VAR_COEMISSION, libsumo::VAR_CURRENT_TRAVELTIME, libsumo::VAR_EDGE_EFFORT, libsumo::VAR_EDGE_TRAVELTIME, libsumo::VAR_ELECTRICITYCONSUMPTION, libsumo::VAR_FRICTION, libsumo::VAR_FUELCONSUMPTION, libsumo::VAR_HCEMISSION, libsumo::VAR_LANE_INDEX, libsumo::VAR_NAME, libsumo::VAR_NOISEEMISSION, libsumo::VAR_NOXEMISSION, libsumo::VAR_PARAMETER, libsumo::VAR_PARAMETER_WITH_KEY, libsumo::VAR_PENDING_VEHICLES, libsumo::VAR_PMXEMISSION, and libsumo::VAR_WAITING_TIME.

Referenced by handleVariable(), and makeWrapper().

Here is the caller graph for this function:

◆ makeWrapper()

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

Definition at line 396 of file libsumo/Edge.cpp.

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

Referenced by makeWrapper().

Here is the caller graph for this function:

◆ setAllowed() [1/2]

void Edge::setAllowed ( const std::string & edgeID,
std::string allowedClasses )
static

Definition at line 320 of file libsumo/Edge.cpp.

References parseVehicleClasses(), setAllowed(), and setAllowedSVCPermissions().

Referenced by setAllowed(), and setAllowed().

Here is the caller graph for this function:

◆ setAllowed() [2/2]

void Edge::setAllowed ( const std::string & edgeID,
std::vector< std::string > allowedClasses )
static

Definition at line 326 of file libsumo/Edge.cpp.

References parseVehicleClasses(), setAllowed(), and setAllowedSVCPermissions().

◆ setAllowedSVCPermissions()

void Edge::setAllowedSVCPermissions ( const std::string & edgeID,
long long int permissions )
staticprivate

Definition at line 344 of file libsumo/Edge.cpp.

References MSLane::CHANGE_PERMISSIONS_PERMANENT, getEdge(), MSEdge::getLanes(), MSEdge::rebuildAllowedLanes(), and setAllowedSVCPermissions().

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

Here is the caller graph for this function:

◆ setDisallowed() [1/2]

void Edge::setDisallowed ( const std::string & edgeID,
std::string disallowedClasses )
static

Definition at line 332 of file libsumo/Edge.cpp.

References invertPermissions(), parseVehicleClasses(), setAllowedSVCPermissions(), and setDisallowed().

Referenced by setDisallowed(), and setDisallowed().

Here is the caller graph for this function:

◆ setDisallowed() [2/2]

void Edge::setDisallowed ( const std::string & edgeID,
std::vector< std::string > disallowedClasses )
static

◆ setEffort()

void Edge::setEffort ( const std::string & edgeID,
double effort,
double beginSeconds = 0.,
double endSeconds = std::numeric_limits<double>::max() )
static

Definition at line 360 of file libsumo/Edge.cpp.

References MSEdgeWeightsStorage::addEffort(), getEdge(), MSNet::getInstance(), MSNet::getWeightsStorage(), and setEffort().

Referenced by setEffort().

Here is the caller graph for this function:

◆ setFriction()

void Edge::setFriction ( const std::string & edgeID,
double friction )
static

Definition at line 371 of file libsumo/Edge.cpp.

References getEdge(), and setFriction().

Referenced by setFriction().

Here is the caller graph for this function:

◆ setMaxSpeed()

void Edge::setMaxSpeed ( const std::string & edgeID,
double speed )
static

Definition at line 366 of file libsumo/Edge.cpp.

References getEdge(), and setMaxSpeed().

Referenced by setMaxSpeed().

Here is the caller graph for this function:

◆ storeShape()

void Edge::storeShape ( const std::string & edgeID,
PositionVector & shape )
static

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

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

Definition at line 387 of file libsumo/Edge.cpp.

References getEdge(), MSEdge::getLanes(), and storeShape().

Referenced by storeShape().

Here is the caller graph for this function:

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Edge::myContextSubscriptionResults
staticprivate

Definition at line 107 of file Edge.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Edge::mySubscriptionResults
staticprivate

Definition at line 106 of file Edge.h.

Referenced by makeWrapper().


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