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

#include <Edge.h>

Collaboration diagram for libsumo::Edge:

Static Public Member Functions

static void adaptTraveltime (const std::string &id, double value, double begTime=0., double endTime=std::numeric_limits< double >::max())
 
static double getAdaptedTraveltime (const std::string &id, double time)
 
static double getCO2Emission (const std::string &id)
 
static double getCOEmission (const std::string &id)
 
static double getEffort (const std::string &id, double time)
 
static double getElectricityConsumption (const std::string &id)
 
static double getFuelConsumption (const std::string &id)
 
static double getHCEmission (const std::string &id)
 
static int getIDCount ()
 
static std::vector< std::string > getIDList ()
 
static int getLaneNumber (const std::string &id)
 
static int getLastStepHaltingNumber (const std::string &id)
 
static double getLastStepLength (const std::string &id)
 
static double getLastStepMeanSpeed (const std::string &id)
 
static double getLastStepOccupancy (const std::string &id)
 
static const std::vector< std::string > getLastStepPersonIDs (const std::string &id)
 
static const std::vector< std::string > getLastStepVehicleIDs (const std::string &id)
 
static int getLastStepVehicleNumber (const std::string &id)
 
static double getNoiseEmission (const std::string &id)
 
static double getNOxEmission (const std::string &id)
 
static std::string getParameter (const std::string &id, const std::string &paramName)
 
static double getPMxEmission (const std::string &id)
 
static std::string getStreetName (const std::string &id)
 
static double getTraveltime (const std::string &id)
 
static double getWaitingTime (const std::string &id)
 
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper)
 
static std::shared_ptr< VariableWrappermakeWrapper ()
 
static void setAllowedSVCPermissions (const std::string &id, int permissions)
 
static void setAllowedVehicleClasses (const std::string &id, std::vector< std::string > vector)
 
static void setDisallowedVehicleClasses (const std::string &id, std::vector< std::string > classes)
 
static void setEffort (const std::string &id, double value, double begTime=0., double endTime=std::numeric_limits< double >::max())
 
static void setMaxSpeed (const std::string &id, double value)
 
static void setParameter (const std::string &id, const std::string &name, const std::string &value)
 
static LIBSUMO_SUBSCRIPTION_API void storeShape (const std::string &id, PositionVector &shape)
 Saves the shape of the requested object in the given container. More...
 

Private Member Functions

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

Static Private Member Functions

static MSEdgegetEdge (const std::string &id)
 

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
 
static SubscriptionResults mySubscriptionResults
 

Detailed Description

Definition at line 52 of file Edge.h.

Constructor & Destructor Documentation

◆ Edge()

libsumo::Edge::Edge ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ adaptTraveltime()

void Edge::adaptTraveltime ( const std::string &  id,
double  value,
double  begTime = 0.,
double  endTime = std::numeric_limits<double>::max() 
)
static

◆ getAdaptedTraveltime()

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

Definition at line 56 of file Edge.cpp.

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

Referenced by TraCIServerAPI_Edge::processGet().

◆ getCO2Emission()

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

Definition at line 130 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getCOEmission()

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

Definition at line 140 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getEdge()

◆ getEffort()

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

Definition at line 67 of file Edge.cpp.

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

Referenced by TraCIServerAPI_Edge::processGet().

◆ getElectricityConsumption()

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

Definition at line 203 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getFuelConsumption()

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

Definition at line 180 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getHCEmission()

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

Definition at line 150 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getIDCount()

int Edge::getIDCount ( )
static

Definition at line 50 of file Edge.cpp.

References getIDList().

Referenced by handleVariable().

◆ getIDList()

std::vector< std::string > Edge::getIDList ( )
static

Definition at line 42 of file Edge.cpp.

References MSEdge::insertIDs().

Referenced by getIDCount(), and handleVariable().

◆ getLaneNumber()

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

Definition at line 275 of file Edge.cpp.

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

Referenced by handleVariable().

◆ getLastStepHaltingNumber()

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

Definition at line 240 of file Edge.cpp.

References getEdge(), and SUMO_const_haltingSpeed.

Referenced by handleVariable().

◆ getLastStepLength()

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

Definition at line 256 of file Edge.cpp.

References getEdge(), and noVehicles().

Referenced by handleVariable().

◆ getLastStepMeanSpeed()

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

Definition at line 223 of file Edge.cpp.

References getEdge(), and MSEdge::getMeanSpeed().

Referenced by handleVariable().

◆ getLastStepOccupancy()

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

Definition at line 229 of file Edge.cpp.

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

Referenced by handleVariable().

◆ getLastStepPersonIDs()

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

Definition at line 104 of file Edge.cpp.

References getEdge(), MSNet::getInstance(), and MSEdge::getSortedPersons().

Referenced by handleVariable().

◆ getLastStepVehicleIDs()

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

Definition at line 116 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getLastStepVehicleNumber()

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

Definition at line 213 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getNoiseEmission()

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

Definition at line 190 of file Edge.cpp.

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

Referenced by handleVariable().

◆ getNOxEmission()

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

Definition at line 170 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getParameter()

std::string Edge::getParameter ( const std::string &  id,
const std::string &  paramName 
)
static

Definition at line 287 of file Edge.cpp.

References getEdge(), and Parameterised::getParameter().

Referenced by TraCIServerAPI_Edge::processGet().

◆ getPMxEmission()

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

Definition at line 160 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ getStreetName()

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

Definition at line 281 of file Edge.cpp.

References getEdge(), and MSEdge::getStreetName().

Referenced by handleVariable().

◆ getTraveltime()

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

Definition at line 78 of file Edge.cpp.

References MSEdge::getCurrentTravelTime(), and getEdge().

Referenced by handleVariable().

◆ getWaitingTime()

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

Definition at line 94 of file Edge.cpp.

References getEdge().

Referenced by handleVariable().

◆ handleVariable()

◆ makeWrapper()

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

Definition at line 360 of file Edge.cpp.

References handleVariable(), myContextSubscriptionResults, and mySubscriptionResults.

◆ setAllowedSVCPermissions()

void Edge::setAllowedSVCPermissions ( const std::string &  id,
int  permissions 
)
static

◆ setAllowedVehicleClasses()

void Edge::setAllowedVehicleClasses ( const std::string &  id,
std::vector< std::string >  vector 
)
static

Definition at line 293 of file Edge.cpp.

References parseVehicleClasses(), and setAllowedSVCPermissions().

Referenced by TraCIServerAPI_Edge::processSet().

◆ setDisallowedVehicleClasses()

void Edge::setDisallowedVehicleClasses ( const std::string &  id,
std::vector< std::string >  classes 
)
static

◆ setEffort()

void Edge::setEffort ( const std::string &  id,
double  value,
double  begTime = 0.,
double  endTime = std::numeric_limits<double>::max() 
)
static

◆ setMaxSpeed()

void Edge::setMaxSpeed ( const std::string &  id,
double  value 
)
static

Definition at line 332 of file Edge.cpp.

References getEdge().

Referenced by TraCIServerAPI_Edge::processSet().

◆ setParameter()

void Edge::setParameter ( const std::string &  id,
const std::string &  name,
const std::string &  value 
)
static

◆ storeShape()

void Edge::storeShape ( const std::string &  id,
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 349 of file Edge.cpp.

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

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Edge::myContextSubscriptionResults
staticprivate

Definition at line 103 of file Edge.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Edge::mySubscriptionResults
staticprivate

Definition at line 102 of file Edge.h.

Referenced by makeWrapper().


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