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

C++ TraCI client API implementation. More...

#include <Simulation.h>

Static Public Member Functions

static void clearPending (const std::string &routeID="")
static void close (const std::string &reason="Libsumo requested termination.")
 close simulation
static libsumo::TraCIPosition convert2D (const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false)
static libsumo::TraCIPosition convert3D (const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false)
static libsumo::TraCIPosition convertGeo (double x, double y, bool fromGeo=false)
static libsumo::TraCIRoadPosition convertRoad (double x, double y, bool isGeo=false, const std::string &vClass="ignoring")
static void executeMove ()
 Advances a "half" step.
static std::vector< libsumo::TraCIStagefindIntermodalRoute (const std::string &fromEdge, const std::string &toEdge, const std::string &modes="", double depart=-1., const int routingMode=0, double speed=-1., double walkFactor=-1., double departPos=0, double arrivalPos=libsumo::INVALID_DOUBLE_VALUE, const double departPosLat=0, const std::string &pType="", const std::string &vType="", const std::string &destStop="")
static libsumo::TraCIStage findRoute (const std::string &fromEdge, const std::string &toEdge, const std::string &vType="", double depart=-1., int routingMode=0, double departPos=0, double arrivalPos=libsumo::INVALID_DOUBLE_VALUE)
static std::vector< std::string > getArrivedIDList ()
static int getArrivedNumber ()
static std::vector< std::string > getArrivedPersonIDList ()
static int getArrivedPersonNumber ()
static std::vector< std::string > getBusStopIDList ()
static int getBusStopWaiting (const std::string &stopID)
static std::vector< std::string > getBusStopWaitingIDList (const std::string &stopID)
 Returns the IDs of the transportables on a given bus stop.
static std::vector< std::string > getCollidingVehiclesIDList ()
static int getCollidingVehiclesNumber ()
static std::vector< libsumo::TraCICollisiongetCollisions ()
static int getCurrentTime ()
static double getDeltaT ()
static std::vector< std::string > getDepartedIDList ()
static int getDepartedNumber ()
static std::vector< std::string > getDepartedPersonIDList ()
static int getDepartedPersonNumber ()
static double getDistance2D (double x1, double y1, double x2, double y2, bool isGeo=false, bool isDriving=false)
static double getDistanceRoad (const std::string &edgeID1, double pos1, const std::string &edgeID2, double pos2, bool isDriving=false)
static std::vector< std::string > getEmergencyStoppingVehiclesIDList ()
static int getEmergencyStoppingVehiclesNumber ()
static std::vector< std::string > getEndingTeleportIDList ()
static int getEndingTeleportNumber ()
static double getEndTime ()
 return configured end time
static const std::string & getLabel ()
static std::vector< std::string > getLoadedIDList ()
static int getLoadedNumber ()
static int getMinExpectedNumber ()
static libsumo::TraCIPositionVector getNetBoundary ()
static std::string getOption (const std::string &option)
 return the SUMO option value
static std::string getParameter (const std::string &objectID, const std::string &key)
static const std::pair< std::string, std::string > getParameterWithKey (const std::string &objectID, const std::string &key)
static std::vector< std::string > getParkingEndingVehiclesIDList ()
static int getParkingEndingVehiclesNumber ()
static std::vector< std::string > getParkingStartingVehiclesIDList ()
static int getParkingStartingVehiclesNumber ()
static std::vector< std::string > getPendingVehicles ()
static double getScale ()
static std::vector< std::string > getStartingTeleportIDList ()
static int getStartingTeleportNumber ()
static std::vector< std::string > getStopEndingVehiclesIDList ()
static int getStopEndingVehiclesNumber ()
static std::vector< std::string > getStopStartingVehiclesIDList ()
static int getStopStartingVehiclesNumber ()
static const libsumo::TraCIResults getSubscriptionResults ()
static double getTime ()
static std::pair< int, std::string > getVersion ()
 return TraCI API and SUMO version
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static bool hasGUI ()
 whether we run with graphical user interface (sumo-gui)
static std::pair< int, std::string > init (int port=8813, int numRetries=libsumo::DEFAULT_NUM_RETRIES, const std::string &host="localhost", const std::string &label="default", FILE *const pipe=nullptr)
static bool isLibsumo ()
static bool isLoaded ()
 return whether a simulation (network) is present
static void load (const std::vector< std::string > &args)
 load a simulation with the given arguments
static double loadState (const std::string &fileName)
 quick-load simulation state from file and return the state time
static std::shared_ptr< VariableWrapper > makeWrapper ()
static void saveState (const std::string &fileName)
static void setOrder (int order)
static void setParameter (const std::string &objectID, const std::string &key, const std::string &value)
static void setScale (double value)
static std::pair< int, std::string > start (const std::vector< std::string > &cmd, int port=-1, int numRetries=libsumo::DEFAULT_NUM_RETRIES, const std::string &label="default", const bool verbose=false, const std::string &traceFile="", bool traceGetters=true, void *_stdout=nullptr)
static void step (const double time=0.)
 Advances by one step (or up to the given time).
static void storeShape (PositionVector &shape)
static LIBSUMO_SUBSCRIPTION_API void subscribe (const std::vector< int > &varIDs=std::vector< int >({-1}), double begin=libsumo::INVALID_DOUBLE_VALUE, double end=libsumo::INVALID_DOUBLE_VALUE, const libsumo::TraCIResults &parameters=libsumo::TraCIResults())
static void switchConnection (const std::string &label)
static void writeMessage (const std::string &msg)

Private Member Functions

 Simulation ()=delete
 invalidated standard constructor

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults

Detailed Description

C++ TraCI client API implementation.

Definition at line 41 of file Simulation.h.

Constructor & Destructor Documentation

◆ Simulation()

LIBSUMO_NAMESPACE::Simulation::Simulation ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ clearPending()

void libtraci::Simulation::clearPending ( const std::string & routeID = "")
static

Definition at line 980 of file libsumo/Simulation.cpp.

References clearPending(), MSInsertionControl::clearPendingVehicles(), MSNet::getInsertionControl(), and MSNet::getInstance().

Referenced by clearPending(), and getParameterWithKey().

Here is the caller graph for this function:

◆ close()

void libtraci::Simulation::close ( const std::string & reason = "Libsumo requested termination.")
static

close simulation

Definition at line 198 of file libsumo/Simulation.cpp.

References libsumo::Helper::clearSubscriptions(), close(), SystemFrame::close(), MSNet::closeSimulation(), MSNet::getInstance(), and MSNet::hasInstance().

Referenced by close(), and load().

Here is the caller graph for this function:

◆ convert2D()

libsumo::TraCIPosition libtraci::Simulation::convert2D ( const std::string & edgeID,
double pos,
int laneIndex = 0,
bool toGeo = false )
static

Definition at line 518 of file libsumo/Simulation.cpp.

References GeoConvHelper::cartesian2geo(), convert2D(), MSLane::geometryPositionAtOffset(), GeoConvHelper::getFinal(), libsumo::Helper::getLaneChecking(), and libsumo::Helper::makeTraCIPosition().

Referenced by convert2D().

Here is the caller graph for this function:

◆ convert3D()

libsumo::TraCIPosition libtraci::Simulation::convert3D ( const std::string & edgeID,
double pos,
int laneIndex = 0,
bool toGeo = false )
static

Definition at line 529 of file libsumo/Simulation.cpp.

References GeoConvHelper::cartesian2geo(), convert3D(), MSLane::geometryPositionAtOffset(), GeoConvHelper::getFinal(), libsumo::Helper::getLaneChecking(), and libsumo::Helper::makeTraCIPosition().

Referenced by convert3D().

Here is the caller graph for this function:

◆ convertGeo()

libsumo::TraCIPosition libtraci::Simulation::convertGeo ( double x,
double y,
bool fromGeo = false )
static

Definition at line 561 of file libsumo/Simulation.cpp.

References GeoConvHelper::cartesian2geo(), convertGeo(), GeoConvHelper::getFinal(), libsumo::Helper::makeTraCIPosition(), and GeoConvHelper::x2cartesian_const().

Referenced by convertGeo().

Here is the caller graph for this function:

◆ convertRoad()

libsumo::TraCIRoadPosition libtraci::Simulation::convertRoad ( double x,
double y,
bool isGeo = false,
const std::string & vClass = "ignoring" )
static

Definition at line 539 of file libsumo/Simulation.cpp.

References libsumo::Helper::convertCartesianToRoadMap(), convertRoad(), GeoConvHelper::getFinal(), SumoVehicleClassStrings, and GeoConvHelper::x2cartesian_const().

Referenced by convertRoad().

Here is the caller graph for this function:

◆ executeMove()

void libtraci::Simulation::executeMove ( )
static

Advances a "half" step.

Definition at line 192 of file libsumo/Simulation.cpp.

References executeMove(), MSNet::getInstance(), and MSNet::simulationStep().

Referenced by executeMove().

Here is the caller graph for this function:

◆ findIntermodalRoute()

std::vector< libsumo::TraCIStage > libtraci::Simulation::findIntermodalRoute ( const std::string & fromEdge,
const std::string & toEdge,
const std::string & modes = "",
double depart = -1.,
const int routingMode = 0,
double speed = -1.,
double walkFactor = -1.,
double departPos = 0,
double arrivalPos = libsumo::INVALID_DOUBLE_VALUE,
const double departPosLat = 0,
const std::string & pType = "",
const std::string & vType = "",
const std::string & destStop = "" )
static

◆ findRoute()

◆ getArrivedIDList()

std::vector< std::string > libtraci::Simulation::getArrivedIDList ( )
static

Definition at line 291 of file libsumo/Simulation.cpp.

References MSNet::ARRIVED, getArrivedIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getArrivedIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getArrivedNumber()

int libtraci::Simulation::getArrivedNumber ( )
static

Definition at line 285 of file libsumo/Simulation.cpp.

References MSNet::ARRIVED, getArrivedNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getArrivedNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getArrivedPersonIDList()

std::vector< std::string > libtraci::Simulation::getArrivedPersonIDList ( )
static

Definition at line 410 of file libsumo/Simulation.cpp.

References getArrivedPersonIDList(), libsumo::Helper::getTransportableStateChanges(), and MSNet::PERSON_ARRIVED.

Referenced by getArrivedPersonIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getArrivedPersonNumber()

int libtraci::Simulation::getArrivedPersonNumber ( )
static

Definition at line 404 of file libsumo/Simulation.cpp.

References getArrivedPersonNumber(), libsumo::Helper::getTransportableStateChanges(), and MSNet::PERSON_ARRIVED.

Referenced by getArrivedPersonNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getBusStopIDList()

std::vector< std::string > libtraci::Simulation::getBusStopIDList ( )
static

Definition at line 415 of file libsumo/Simulation.cpp.

References getBusStopIDList(), MSNet::getInstance(), and SUMO_TAG_BUS_STOP.

Referenced by getBusStopIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getBusStopWaiting()

int libtraci::Simulation::getBusStopWaiting ( const std::string & stopID)
static

Definition at line 424 of file libsumo/Simulation.cpp.

References getBusStopWaiting(), MSNet::getInstance(), MSNet::getStoppingPlace(), MSStoppingPlace::getTransportableNumber(), and SUMO_TAG_BUS_STOP.

Referenced by getBusStopWaiting(), and handleVariable().

Here is the caller graph for this function:

◆ getBusStopWaitingIDList()

std::vector< std::string > libtraci::Simulation::getBusStopWaitingIDList ( const std::string & stopID)
static

Returns the IDs of the transportables on a given bus stop.

Definition at line 433 of file libsumo/Simulation.cpp.

References getBusStopWaitingIDList(), MSNet::getInstance(), MSNet::getStoppingPlace(), MSStoppingPlace::getTransportables(), and SUMO_TAG_BUS_STOP.

Referenced by getBusStopWaitingIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getCollidingVehiclesIDList()

std::vector< std::string > libtraci::Simulation::getCollidingVehiclesIDList ( )
static

Definition at line 351 of file libsumo/Simulation.cpp.

References MSNet::COLLISION, getCollidingVehiclesIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getCollidingVehiclesIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getCollidingVehiclesNumber()

int libtraci::Simulation::getCollidingVehiclesNumber ( )
static

Definition at line 345 of file libsumo/Simulation.cpp.

References MSNet::COLLISION, getCollidingVehiclesNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getCollidingVehiclesNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getCollisions()

◆ getCurrentTime()

int libtraci::Simulation::getCurrentTime ( )
static

Definition at line 244 of file libsumo/Simulation.cpp.

References getCurrentTime(), MSNet::getCurrentTimeStep(), and MSNet::getInstance().

Referenced by getCurrentTime(), and handleVariable().

Here is the caller graph for this function:

◆ getDeltaT()

double libtraci::Simulation::getDeltaT ( )
static

Definition at line 483 of file libsumo/Simulation.cpp.

References getDeltaT(), and TS.

Referenced by getDeltaT(), and handleVariable().

Here is the caller graph for this function:

◆ getDepartedIDList()

std::vector< std::string > libtraci::Simulation::getDepartedIDList ( )
static

Definition at line 279 of file libsumo/Simulation.cpp.

References MSNet::DEPARTED, getDepartedIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getDepartedIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getDepartedNumber()

int libtraci::Simulation::getDepartedNumber ( )
static

Definition at line 273 of file libsumo/Simulation.cpp.

References MSNet::DEPARTED, getDepartedNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getDepartedNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getDepartedPersonIDList()

std::vector< std::string > libtraci::Simulation::getDepartedPersonIDList ( )
static

Definition at line 398 of file libsumo/Simulation.cpp.

References getDepartedPersonIDList(), libsumo::Helper::getTransportableStateChanges(), and MSNet::PERSON_DEPARTED.

Referenced by getDepartedPersonIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getDepartedPersonNumber()

int libtraci::Simulation::getDepartedPersonNumber ( )
static

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

References getDepartedPersonNumber(), libsumo::Helper::getTransportableStateChanges(), and MSNet::PERSON_DEPARTED.

Referenced by getDepartedPersonNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getDistance2D()

double libtraci::Simulation::getDistance2D ( double x1,
double y1,
double x2,
double y2,
bool isGeo = false,
bool isDriving = false )
static

Definition at line 573 of file libsumo/Simulation.cpp.

References libsumo::Helper::convertCartesianToRoadMap(), Position::distanceTo(), getDistance2D(), libsumo::Helper::getDrivingDistance(), GeoConvHelper::getFinal(), SVC_IGNORING, and GeoConvHelper::x2cartesian_const().

Referenced by getDistance2D().

Here is the caller graph for this function:

◆ getDistanceRoad()

double libtraci::Simulation::getDistanceRoad ( const std::string & edgeID1,
double pos1,
const std::string & edgeID2,
double pos2,
bool isDriving = false )
static

Definition at line 591 of file libsumo/Simulation.cpp.

References Position::distanceTo(), getDistanceRoad(), libsumo::Helper::getDrivingDistance(), and libsumo::Helper::getLaneChecking().

Referenced by getDistanceRoad().

Here is the caller graph for this function:

◆ getEmergencyStoppingVehiclesIDList()

std::vector< std::string > libtraci::Simulation::getEmergencyStoppingVehiclesIDList ( )
static

Definition at line 363 of file libsumo/Simulation.cpp.

References MSNet::EMERGENCYSTOP, getEmergencyStoppingVehiclesIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getEmergencyStoppingVehiclesIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getEmergencyStoppingVehiclesNumber()

int libtraci::Simulation::getEmergencyStoppingVehiclesNumber ( )
static

Definition at line 357 of file libsumo/Simulation.cpp.

References MSNet::EMERGENCYSTOP, getEmergencyStoppingVehiclesNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getEmergencyStoppingVehiclesNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getEndingTeleportIDList()

std::vector< std::string > libtraci::Simulation::getEndingTeleportIDList ( )
static

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

References MSNet::ENDING_TELEPORT, getEndingTeleportIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getEndingTeleportIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getEndingTeleportNumber()

int libtraci::Simulation::getEndingTeleportNumber ( )
static

Definition at line 381 of file libsumo/Simulation.cpp.

References MSNet::ENDING_TELEPORT, getEndingTeleportNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getEndingTeleportNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getEndTime()

double libtraci::Simulation::getEndTime ( )
static

return configured end time

Definition at line 255 of file libsumo/Simulation.cpp.

References getEndTime(), OptionsCont::getOptions(), STEPS2TIME, and string2time().

Referenced by getEndTime(), and handleVariable().

Here is the caller graph for this function:

◆ getLabel()

const std::string & libtraci::Simulation::getLabel ( )
static

Definition at line 116 of file libsumo/Simulation.cpp.

References getLabel().

Referenced by getLabel().

Here is the caller graph for this function:

◆ getLoadedIDList()

std::vector< std::string > libtraci::Simulation::getLoadedIDList ( )
static

Definition at line 267 of file libsumo/Simulation.cpp.

References MSNet::BUILT, getLoadedIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getLoadedIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getLoadedNumber()

int libtraci::Simulation::getLoadedNumber ( )
static

Definition at line 261 of file libsumo/Simulation.cpp.

References MSNet::BUILT, getLoadedNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getLoadedNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getMinExpectedNumber()

int libtraci::Simulation::getMinExpectedNumber ( )
static

◆ getNetBoundary()

libsumo::TraCIPositionVector libtraci::Simulation::getNetBoundary ( )
static

Definition at line 489 of file libsumo/Simulation.cpp.

References GeoConvHelper::getConvBoundary(), GeoConvHelper::getFinal(), and getNetBoundary().

Referenced by getNetBoundary().

Here is the caller graph for this function:

◆ getOption()

std::string libtraci::Simulation::getOption ( const std::string & option)
static

return the SUMO option value

Definition at line 234 of file libsumo/Simulation.cpp.

References OptionsCont::exists(), getOption(), OptionsCont::getOptions(), and OptionsCont::getValueString().

Referenced by getOption(), and handleVariable().

Here is the caller graph for this function:

◆ getParameter()

std::string libsumo::Simulation::getParameter ( const std::string & objectID,
const std::string & key )
static

Definition at line 808 of file libsumo/Simulation.cpp.

References MSParkingArea::getCapacity(), MSVehicleControl::getCollisionCount(), MSVehicleControl::getDepartedVehicleNo(), MSVehicleControl::getEmergencyBrakingCount(), MSVehicleControl::getEmergencyStops(), GeoConvHelper::getFinal(), MSDevice_Tripinfo::getGlobalParameter(), Named::getID(), MSNet::getInstance(), MSTransportableControl::getJammedNumber(), MSStoppingPlace::getLane(), MSTransportableControl::getLoadedNumber(), MSVehicleControl::getLoadedVehicleNo(), MSStoppingPlace::getMyName(), MSParkingArea::getOccupancyIncludingBlocked(), getParameter(), Parameterised::getParameter(), MSNet::getPersonControl(), MSTransportableControl::getRunningNumber(), MSVehicleControl::getRunningVehicleNo(), MSNet::getStoppingPlace(), MSTransportableControl::getTeleportCount(), MSVehicleControl::getTeleportCount(), MSTransportableControl::getTeleportsAbortWait(), MSVehicleControl::getTeleportsJam(), MSTransportableControl::getTeleportsWrongDest(), MSVehicleControl::getTeleportsWrongLane(), MSVehicleControl::getTeleportsYield(), MSChargingStation::getTotalCharged(), MSOverheadWire::getTotalCharged(), MSNet::getVehicleControl(), Parameterised::hasParameter(), MSNet::hasPersons(), StringUtils::startsWith(), SUMO_ATTR_NAME, SUMO_ATTR_NET_OFFSET, SUMO_ATTR_TOTALENERGYCHARGED, SUMO_TAG_BUS_STOP, SUMO_TAG_CHARGING_STATION, SUMO_TAG_OVERHEAD_WIRE_SEGMENT, SUMO_TAG_PARKING_AREA, toString(), and WRITE_WARNING.

Referenced by getParameter(), and handleVariable().

Here is the caller graph for this function:

◆ getParameterWithKey()

const std::pair< std::string, std::string > LIBSUMO_NAMESPACE::Simulation::getParameterWithKey ( const std::string & objectID,
const std::string & key )
static

References clearPending(), invalid_return< std::string >::value, LIBSUMO_SUBSCRIPTION_API, loadState(), saveState(), setParameter(), setScale(), subscribe(), and writeMessage().

Referenced by handleVariable().

Here is the caller graph for this function:

◆ getParkingEndingVehiclesIDList()

std::vector< std::string > libtraci::Simulation::getParkingEndingVehiclesIDList ( )
static

Definition at line 315 of file libsumo/Simulation.cpp.

References MSNet::ENDING_PARKING, getParkingEndingVehiclesIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getParkingEndingVehiclesIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getParkingEndingVehiclesNumber()

int libtraci::Simulation::getParkingEndingVehiclesNumber ( )
static

Definition at line 309 of file libsumo/Simulation.cpp.

References MSNet::ENDING_PARKING, getParkingEndingVehiclesNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getParkingEndingVehiclesNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getParkingStartingVehiclesIDList()

std::vector< std::string > libtraci::Simulation::getParkingStartingVehiclesIDList ( )
static

Definition at line 303 of file libsumo/Simulation.cpp.

References getParkingStartingVehiclesIDList(), libsumo::Helper::getVehicleStateChanges(), and MSNet::STARTING_PARKING.

Referenced by getParkingStartingVehiclesIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getParkingStartingVehiclesNumber()

int libtraci::Simulation::getParkingStartingVehiclesNumber ( )
static

Definition at line 297 of file libsumo/Simulation.cpp.

References getParkingStartingVehiclesNumber(), libsumo::Helper::getVehicleStateChanges(), and MSNet::STARTING_PARKING.

Referenced by getParkingStartingVehiclesNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getPendingVehicles()

std::vector< std::string > libtraci::Simulation::getPendingVehicles ( )
static

Definition at line 447 of file libsumo/Simulation.cpp.

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

Referenced by getPendingVehicles(), and handleVariable().

Here is the caller graph for this function:

◆ getScale()

double libtraci::Simulation::getScale ( )
static

Definition at line 478 of file libsumo/Simulation.cpp.

References MSNet::getInstance(), getScale(), MSVehicleControl::getScale(), and MSNet::getVehicleControl().

Referenced by getScale(), and handleVariable().

Here is the caller graph for this function:

◆ getStartingTeleportIDList()

std::vector< std::string > libtraci::Simulation::getStartingTeleportIDList ( )
static

Definition at line 375 of file libsumo/Simulation.cpp.

References getStartingTeleportIDList(), libsumo::Helper::getVehicleStateChanges(), and MSNet::STARTING_TELEPORT.

Referenced by getStartingTeleportIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getStartingTeleportNumber()

int libtraci::Simulation::getStartingTeleportNumber ( )
static

Definition at line 369 of file libsumo/Simulation.cpp.

References getStartingTeleportNumber(), libsumo::Helper::getVehicleStateChanges(), and MSNet::STARTING_TELEPORT.

Referenced by getStartingTeleportNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getStopEndingVehiclesIDList()

std::vector< std::string > libtraci::Simulation::getStopEndingVehiclesIDList ( )
static

Definition at line 339 of file libsumo/Simulation.cpp.

References MSNet::ENDING_STOP, getStopEndingVehiclesIDList(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getStopEndingVehiclesIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getStopEndingVehiclesNumber()

int libtraci::Simulation::getStopEndingVehiclesNumber ( )
static

Definition at line 333 of file libsumo/Simulation.cpp.

References MSNet::ENDING_STOP, getStopEndingVehiclesNumber(), and libsumo::Helper::getVehicleStateChanges().

Referenced by getStopEndingVehiclesNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getStopStartingVehiclesIDList()

std::vector< std::string > libtraci::Simulation::getStopStartingVehiclesIDList ( )
static

Definition at line 327 of file libsumo/Simulation.cpp.

References getStopStartingVehiclesIDList(), libsumo::Helper::getVehicleStateChanges(), and MSNet::STARTING_STOP.

Referenced by getStopStartingVehiclesIDList(), and handleVariable().

Here is the caller graph for this function:

◆ getStopStartingVehiclesNumber()

int libtraci::Simulation::getStopStartingVehiclesNumber ( )
static

Definition at line 321 of file libsumo/Simulation.cpp.

References getStopStartingVehiclesNumber(), libsumo::Helper::getVehicleStateChanges(), and MSNet::STARTING_STOP.

Referenced by getStopStartingVehiclesNumber(), and handleVariable().

Here is the caller graph for this function:

◆ getSubscriptionResults()

const libsumo::TraCIResults libtraci::Simulation::getSubscriptionResults ( )
static

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

References getSubscriptionResults(), and mySubscriptionResults.

Referenced by getSubscriptionResults().

Here is the caller graph for this function:

◆ getTime()

double libtraci::Simulation::getTime ( )
static

Definition at line 250 of file libsumo/Simulation.cpp.

References getTime(), and SIMTIME.

Referenced by getTime(), and handleVariable().

Here is the caller graph for this function:

◆ getVersion()

std::pair< int, std::string > libtraci::Simulation::getVersion ( )
static

return TraCI API and SUMO version

Definition at line 228 of file libsumo/Simulation.cpp.

References getVersion(), and libsumo::TRACI_VERSION.

Referenced by getVersion(), and start().

Here is the caller graph for this function:

◆ handleVariable()

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

Definition at line 1025 of file libsumo/Simulation.cpp.

References getArrivedIDList(), getArrivedNumber(), getArrivedPersonIDList(), getArrivedPersonNumber(), getBusStopIDList(), getBusStopWaiting(), getBusStopWaitingIDList(), getCollidingVehiclesIDList(), getCollidingVehiclesNumber(), getCurrentTime(), getDeltaT(), getDepartedIDList(), getDepartedNumber(), getDepartedPersonIDList(), getDepartedPersonNumber(), getEmergencyStoppingVehiclesIDList(), getEmergencyStoppingVehiclesNumber(), getEndingTeleportIDList(), getEndingTeleportNumber(), getEndTime(), getLoadedIDList(), getLoadedNumber(), getMinExpectedNumber(), getOption(), getParameter(), getParameterWithKey(), getParkingEndingVehiclesIDList(), getParkingEndingVehiclesNumber(), getParkingStartingVehiclesIDList(), getParkingStartingVehiclesNumber(), getPendingVehicles(), getScale(), getStartingTeleportIDList(), getStartingTeleportNumber(), getStopEndingVehiclesIDList(), getStopEndingVehiclesNumber(), getStopStartingVehiclesIDList(), getStopStartingVehiclesNumber(), getTime(), handleVariable(), libsumo::StorageHelper::readTypedString(), libsumo::VAR_ARRIVED_PERSONS_IDS, libsumo::VAR_ARRIVED_PERSONS_NUMBER, libsumo::VAR_ARRIVED_VEHICLES_IDS, libsumo::VAR_ARRIVED_VEHICLES_NUMBER, libsumo::VAR_BUS_STOP_ID_LIST, libsumo::VAR_BUS_STOP_WAITING, libsumo::VAR_BUS_STOP_WAITING_IDS, libsumo::VAR_COLLIDING_VEHICLES_IDS, libsumo::VAR_COLLIDING_VEHICLES_NUMBER, libsumo::VAR_DELTA_T, libsumo::VAR_DEPARTED_PERSONS_IDS, libsumo::VAR_DEPARTED_PERSONS_NUMBER, libsumo::VAR_DEPARTED_VEHICLES_IDS, libsumo::VAR_DEPARTED_VEHICLES_NUMBER, libsumo::VAR_EMERGENCYSTOPPING_VEHICLES_IDS, libsumo::VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER, libsumo::VAR_END, libsumo::VAR_LOADED_VEHICLES_IDS, libsumo::VAR_LOADED_VEHICLES_NUMBER, libsumo::VAR_MIN_EXPECTED_VEHICLES, libsumo::VAR_OPTION, libsumo::VAR_PARAMETER, libsumo::VAR_PARAMETER_WITH_KEY, libsumo::VAR_PARKING_ENDING_VEHICLES_IDS, libsumo::VAR_PARKING_ENDING_VEHICLES_NUMBER, libsumo::VAR_PARKING_STARTING_VEHICLES_IDS, libsumo::VAR_PARKING_STARTING_VEHICLES_NUMBER, libsumo::VAR_PENDING_VEHICLES, libsumo::VAR_SCALE, libsumo::VAR_STOP_ENDING_VEHICLES_IDS, libsumo::VAR_STOP_ENDING_VEHICLES_NUMBER, libsumo::VAR_STOP_STARTING_VEHICLES_IDS, libsumo::VAR_STOP_STARTING_VEHICLES_NUMBER, libsumo::VAR_TELEPORT_ENDING_VEHICLES_IDS, libsumo::VAR_TELEPORT_ENDING_VEHICLES_NUMBER, libsumo::VAR_TELEPORT_STARTING_VEHICLES_IDS, libsumo::VAR_TELEPORT_STARTING_VEHICLES_NUMBER, libsumo::VAR_TIME, and libsumo::VAR_TIME_STEP.

Referenced by handleVariable(), and makeWrapper().

Here is the caller graph for this function:

◆ hasGUI()

bool libtraci::Simulation::hasGUI ( )
static

whether we run with graphical user interface (sumo-gui)

Definition at line 152 of file libsumo/Simulation.cpp.

References hasGUI().

Referenced by hasGUI().

Here is the caller graph for this function:

◆ init()

std::pair< int, std::string > libtraci::Simulation::init ( int port = 8813,
int numRetries = libsumo::DEFAULT_NUM_RETRIES,
const std::string & host = "localhost",
const std::string & label = "default",
FILE *const pipe = nullptr )
static

Definition at line 85 of file libsumo/Simulation.cpp.

References init().

Referenced by init().

Here is the caller graph for this function:

◆ isLibsumo()

bool libtraci::Simulation::isLibsumo ( )
static

Definition at line 104 of file libsumo/Simulation.cpp.

References isLibsumo().

Referenced by isLibsumo().

Here is the caller graph for this function:

◆ isLoaded()

bool libtraci::Simulation::isLoaded ( )
static

return whether a simulation (network) is present

Definition at line 162 of file libsumo/Simulation.cpp.

References MSNet::hasInstance(), and isLoaded().

Referenced by isLoaded().

Here is the caller graph for this function:

◆ load()

void libtraci::Simulation::load ( const std::vector< std::string > & args)
static

load a simulation with the given arguments

Definition at line 128 of file libsumo/Simulation.cpp.

References close(), MSNet::getInstance(), OptionsCont::getOptions(), gSimulation, NLBuilder::init(), XMLSubSys::init(), load(), OptionsCont::setApplicationName(), OptionsIO::setArgs(), MSNet::setCurrentTimeStep(), string2time(), time2string(), TL, and WRITE_MESSAGEF.

Referenced by load(), and start().

Here is the caller graph for this function:

◆ loadState()

double libtraci::Simulation::loadState ( const std::string & fileName)
static

quick-load simulation state from file and return the state time

Definition at line 991 of file libsumo/Simulation.cpp.

References libsumo::Helper::clearStateChanges(), libsumo::Helper::clearSubscriptions(), MSNet::getInstance(), loadState(), MSNet::loadState(), PROGRESS_BEGIN_TIME_MESSAGE, PROGRESS_TIME_MESSAGE, and STEPS2TIME.

Referenced by getParameterWithKey(), and loadState().

Here is the caller graph for this function:

◆ makeWrapper()

std::shared_ptr< VariableWrapper > libsumo::Simulation::makeWrapper ( )
static

Definition at line 1019 of file libsumo/Simulation.cpp.

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

Referenced by makeWrapper().

Here is the caller graph for this function:

◆ saveState()

void libtraci::Simulation::saveState ( const std::string & fileName)
static

Definition at line 986 of file libsumo/Simulation.cpp.

References MSNet::getInstance(), saveState(), and MSStateHandler::saveState().

Referenced by getParameterWithKey(), and saveState().

Here is the caller graph for this function:

◆ setOrder()

void libtraci::Simulation::setOrder ( int order)
static

Definition at line 122 of file libsumo/Simulation.cpp.

References setOrder().

Referenced by setOrder().

Here is the caller graph for this function:

◆ setParameter()

void libsumo::Simulation::setParameter ( const std::string & objectID,
const std::string & key,
const std::string & value )
static

Definition at line 966 of file libsumo/Simulation.cpp.

References MSNet::getInstance(), invalid_return< std::string >::value, setParameter(), and Parameterised::setParameter().

Referenced by getParameterWithKey(), and setParameter().

Here is the caller graph for this function:

◆ setScale()

void libtraci::Simulation::setScale ( double value)
static

Definition at line 975 of file libsumo/Simulation.cpp.

References MSNet::getInstance(), MSNet::getVehicleControl(), invalid_return< std::string >::value, setScale(), and MSVehicleControl::setScale().

Referenced by getParameterWithKey(), and setScale().

Here is the caller graph for this function:

◆ start()

std::pair< int, std::string > libtraci::Simulation::start ( const std::vector< std::string > & cmd,
int port = -1,
int numRetries = libsumo::DEFAULT_NUM_RETRIES,
const std::string & label = "default",
const bool verbose = false,
const std::string & traceFile = "",
bool traceGetters = true,
void * _stdout = nullptr )
static

Definition at line 91 of file libsumo/Simulation.cpp.

References getVersion(), load(), and start().

Referenced by start().

Here is the caller graph for this function:

◆ step()

void libtraci::Simulation::step ( const double time = 0.)
static

Advances by one step (or up to the given time).

Definition at line 168 of file libsumo/Simulation.cpp.

References libsumo::Helper::clearStateChanges(), MSNet::getInstance(), libsumo::Helper::handleSubscriptions(), SIMSTEP, MSNet::simulationStep(), step(), and TIME2STEPS.

Referenced by step().

Here is the caller graph for this function:

◆ storeShape()

void libsumo::Simulation::storeShape ( PositionVector & shape)
static

Definition at line 1013 of file libsumo/Simulation.cpp.

References GeoConvHelper::getConvBoundary(), GeoConvHelper::getFinal(), Boundary::getShape(), and storeShape().

Referenced by storeShape().

Here is the caller graph for this function:

◆ subscribe()

void libtraci::Simulation::subscribe ( const std::vector< int > & varIDs = std::vector<int>({-1}),
double begin = libsumo::INVALID_DOUBLE_VALUE,
double end = libsumo::INVALID_DOUBLE_VALUE,
const libsumo::TraCIResults & parameters = libsumo::TraCIResults() )
static

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

References libsumo::CMD_SUBSCRIBE_SIM_VARIABLE, libsumo::Helper::subscribe(), and subscribe().

Referenced by getParameterWithKey(), and subscribe().

Here is the caller graph for this function:

◆ switchConnection()

void libtraci::Simulation::switchConnection ( const std::string & label)
static

Definition at line 110 of file libsumo/Simulation.cpp.

References switchConnection().

Referenced by switchConnection().

Here is the caller graph for this function:

◆ writeMessage()

void libtraci::Simulation::writeMessage ( const std::string & msg)
static

Definition at line 1007 of file libsumo/Simulation.cpp.

References WRITE_MESSAGE, and writeMessage().

Referenced by getParameterWithKey(), and writeMessage().

Here is the caller graph for this function:

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults libsumo::Simulation::myContextSubscriptionResults
staticprivate

Definition at line 189 of file Simulation.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults libsumo::Simulation::mySubscriptionResults
staticprivate

Definition at line 188 of file Simulation.h.

Referenced by getSubscriptionResults(), and makeWrapper().


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