![]() |
SUMO - Simulation of Urban MObility
|
#include <Simulation.h>

Static Public Member Functions | |
| static void | clearPending (const std::string &routeID="") |
| static void | close () |
| close simulation More... | |
| static TraCIPosition | convert2D (const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) |
| static TraCIPosition | convert3D (const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) |
| static TraCIPosition | convertGeo (double x, double y, bool fromGeo=false) |
| static TraCIRoadPosition | convertRoad (double x, double y, bool isGeo=false) |
| static std::vector< TraCIStage > | 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=INVALID_DOUBLE_VALUE, const double departPosLat=0, const std::string &pType="", const std::string &vType="", const std::string &destStop="") |
| static TraCIStage | findRoute (const std::string &fromEdge, const std::string &toEdge, const std::string &vType="", const double depart=-1., const int routingMode=0) |
| static std::vector< std::string > | getArrivedIDList () |
| static int | getArrivedNumber () |
| static int | getBusStopWaiting (const std::string &id) |
| static std::vector< std::string > | getCollidingVehiclesIDList () |
| static int | getCollidingVehiclesNumber () |
| static int | getCurrentTime () |
| static double | getDeltaT () |
| static std::vector< std::string > | getDepartedIDList () |
| static int | getDepartedNumber () |
| 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 std::vector< std::string > | getLoadedIDList () |
| static int | getLoadedNumber () |
| static int | getMinExpectedNumber () |
| static TraCIPositionVector | getNetBoundary () |
| static std::string | getParameter (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 > | getStartingTeleportIDList () |
| static int | getStartingTeleportNumber () |
| static std::vector< std::string > | getStopEndingVehiclesIDList () |
| static int | getStopEndingVehiclesNumber () |
| static std::vector< std::string > | getStopStartingVehiclesIDList () |
| static int | getStopStartingVehiclesNumber () |
| static const TraCIResults | getSubscriptionResults () |
| static double | getTime () |
| static bool | handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper) |
| static bool | isLoaded () |
| return whether a simulation (network) is present More... | |
| static void | load (const std::vector< std::string > &args) |
| load a simulation with the given arguments More... | |
| static std::shared_ptr< VariableWrapper > | makeWrapper () |
| static void | saveState (const std::string &fileName) |
| static void | step (const double time=0.) |
| Advances by one step (or up to the given time) More... | |
| static LIBSUMO_SUBSCRIPTION_API void | subscribe (const std::vector< int > &vars=std::vector< int >(), double beginTime=INVALID_DOUBLE_VALUE, double endTime=INVALID_DOUBLE_VALUE) |
Private Member Functions | |
| Simulation ()=delete | |
| invalidated standard constructor More... | |
Static Private Attributes | |
| static ContextSubscriptionResults | myContextSubscriptionResults |
| static SubscriptionResults | mySubscriptionResults |
Definition at line 47 of file Simulation.h.
|
privatedelete |
invalidated standard constructor
|
static |
Definition at line 635 of file Simulation.cpp.
References MSInsertionControl::clearPendingVehicles(), MSNet::getInsertionControl(), and MSNet::getInstance().
Referenced by TraCIServerAPI_Simulation::processSet().
|
static |
close simulation
Definition at line 94 of file Simulation.cpp.
References SystemFrame::close(), XMLSubSys::close(), MSNet::closeSimulation(), MSNet::getInstance(), MSNet::hasInstance(), and LIBSUMO_SUBSCRIPTION_IMPLEMENTATION.
Referenced by load().
|
static |
Definition at line 304 of file Simulation.cpp.
References GeoConvHelper::cartesian2geo(), GeoConvHelper::getFinal(), libsumo::Helper::getLaneChecking(), MSLane::getShape(), libsumo::Helper::makeTraCIPosition(), PositionVector::positionAtOffset(), and Position::setz().
|
static |
Definition at line 315 of file Simulation.cpp.
References GeoConvHelper::cartesian2geo(), GeoConvHelper::getFinal(), libsumo::Helper::getLaneChecking(), MSLane::getShape(), libsumo::Helper::makeTraCIPosition(), and PositionVector::positionAtOffset().
|
static |
Definition at line 343 of file Simulation.cpp.
References GeoConvHelper::cartesian2geo(), GeoConvHelper::getFinal(), libsumo::Helper::makeTraCIPosition(), and GeoConvHelper::x2cartesian_const().
|
static |
Definition at line 325 of file Simulation.cpp.
References libsumo::Helper::convertCartesianToRoadMap(), libsumo::TraCIRoadPosition::edgeID, GeoConvHelper::getFinal(), libsumo::TraCIRoadPosition::laneIndex, libsumo::TraCIRoadPosition::pos, and GeoConvHelper::x2cartesian_const().
|
static |
Definition at line 459 of file Simulation.cpp.
References TplConvert::_str2double(), MSVehicleControl::buildVehicle(), IntermodalRouter< E, L, N, V >::compute(), DEFAULT_BIKETYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, MSVehicleControl::deleteVehicle(), MSEdge::dictionary(), MSTransportable::DRIVING, MSGlobals::gCheckRoutes, MSNet::getCurrentTimeStep(), OptionsCont::getFloat(), Named::getID(), MSVehicleType::getID(), MSNet::getInstance(), MSNet::getIntermodalRouter(), MSEdge::getLength(), MSVehicleType::getMaxSpeed(), OptionsCont::getOptions(), Distribution_Parameterized::getParameter(), Parameterised::getParameter(), MSVehicleType::getParameter(), MSEdge::getPermissions(), MSVehicleType::getSpeedFactor(), MSVehicleType::getVehicleClass(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), StringTokenizer::hasNext(), MSVehicleControl::hasVType(), INVALID_DOUBLE_VALUE, MSTransportable::MOVING_WITHOUT_VEHICLE, SUMOVehicle::setChosenSpeedFactor(), SVC_BICYCLE, SVC_BUS, SVC_IGNORING, SVC_PASSENGER, TIME2STEPS, toString(), UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 417 of file Simulation.cpp.
References MSVehicleControl::buildVehicle(), SUMOAbstractRouter< E, V >::compute(), libsumo::TraCIStage::cost, MSVehicleControl::deleteVehicle(), MSEdge::dictionary(), MSTransportable::DRIVING, libsumo::TraCIStage::edges, MSNet::getCurrentTimeStep(), MSNet::getInstance(), Distribution_Parameterized::getParameter(), MSDevice_Routing::getRouterTT(), MSNet::getRouterTT(), MSVehicleType::getSpeedFactor(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), SUMOAbstractRouter< E, V >::recomputeCosts(), ROUTING_MODE_AGGREGATED, SUMOVehicle::setChosenSpeedFactor(), TIME2STEPS, and libsumo::TraCIStage::travelTime.
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 162 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ARRIVED.
Referenced by handleVariable().
|
static |
Definition at line 156 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ARRIVED.
Referenced by handleVariable().
|
static |
Definition at line 264 of file Simulation.cpp.
References MSNet::getInstance(), MSNet::getStoppingPlace(), MSStoppingPlace::getTransportableNumber(), and SUMO_TAG_BUS_STOP.
Referenced by handleVariable(), and TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 222 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_COLLISION.
Referenced by handleVariable().
|
static |
Definition at line 216 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_COLLISION.
Referenced by handleVariable().
|
static |
Definition at line 120 of file Simulation.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by handleVariable(), and TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 274 of file Simulation.cpp.
References TS.
Referenced by handleVariable(), and TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 150 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_DEPARTED.
Referenced by handleVariable().
|
static |
Definition at line 144 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_DEPARTED.
Referenced by handleVariable().
|
static |
Definition at line 355 of file Simulation.cpp.
References SUMOAbstractRouter< E, V >::compute(), libsumo::Helper::convertCartesianToRoadMap(), Position::distanceTo(), MSNet::getCurrentTimeStep(), MSRoute::getDistanceBetween(), GeoConvHelper::getFinal(), MSNet::getInstance(), MSNet::getRouterTT(), and GeoConvHelper::x2cartesian_const().
|
static |
Definition at line 388 of file Simulation.cpp.
References SUMOAbstractRouter< E, V >::compute(), Position::distanceTo(), MSNet::getCurrentTimeStep(), MSRoute::getDistanceBetween(), MSNet::getInstance(), libsumo::Helper::getLaneChecking(), and MSNet::getRouterTT().
|
static |
Definition at line 234 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_EMERGENCYSTOP.
Referenced by handleVariable().
|
static |
Definition at line 228 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_EMERGENCYSTOP.
Referenced by handleVariable().
|
static |
Definition at line 258 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ENDING_TELEPORT.
Referenced by handleVariable().
|
static |
Definition at line 252 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ENDING_TELEPORT.
Referenced by handleVariable().
|
static |
Definition at line 138 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_BUILT.
Referenced by handleVariable().
|
static |
Definition at line 132 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_BUILT.
Referenced by handleVariable().
|
static |
Definition at line 294 of file Simulation.cpp.
References MSTransportableControl::getActiveCount(), MSVehicleControl::getActiveVehicleCount(), MSNet::getContainerControl(), MSNet::getInsertionControl(), MSNet::getInstance(), MSInsertionControl::getPendingFlowCount(), MSNet::getPersonControl(), MSNet::getVehicleControl(), MSNet::hasContainers(), and MSNet::hasPersons().
Referenced by handleVariable(), and TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 280 of file Simulation.cpp.
References GeoConvHelper::getConvBoundary(), GeoConvHelper::getFinal(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), Boundary::ymin(), Boundary::zmax(), and Boundary::zmin().
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 588 of file Simulation.cpp.
References MSParkingArea::getCapacity(), MSNet::getInstance(), MSStoppingPlace::getMyName(), MSParkingArea::getOccupancy(), MSNet::getStoppingPlace(), MSChargingStation::getTotalCharged(), StringUtils::startsWith(), SUMO_ATTR_NAME, SUMO_ATTR_TOTALENERGYCHARGED, SUMO_TAG_BUS_STOP, SUMO_TAG_CHARGING_STATION, SUMO_TAG_PARKING_AREA, and toString().
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 186 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ENDING_PARKING.
Referenced by handleVariable().
|
static |
Definition at line 180 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ENDING_PARKING.
Referenced by handleVariable().
|
static |
Definition at line 174 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_STARTING_PARKING.
Referenced by handleVariable().
|
static |
Definition at line 168 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_STARTING_PARKING.
Referenced by handleVariable().
|
static |
Definition at line 246 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_STARTING_TELEPORT.
Referenced by handleVariable().
|
static |
Definition at line 240 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_STARTING_TELEPORT.
Referenced by handleVariable().
|
static |
Definition at line 210 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ENDING_STOP.
Referenced by handleVariable().
|
static |
Definition at line 204 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_ENDING_STOP.
Referenced by handleVariable().
|
static |
Definition at line 198 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_STARTING_STOP.
Referenced by handleVariable().
|
static |
Definition at line 192 of file Simulation.cpp.
References libsumo::Helper::getVehicleStateChanges(), and MSNet::VEHICLE_STATE_STARTING_STOP.
Referenced by handleVariable().
|
static |
Definition at line 114 of file Simulation.cpp.
References mySubscriptionResults.
|
static |
|
static |
Definition at line 653 of file Simulation.cpp.
References getArrivedIDList(), getArrivedNumber(), getBusStopWaiting(), getCollidingVehiclesIDList(), getCollidingVehiclesNumber(), getCurrentTime(), getDeltaT(), getDepartedIDList(), getDepartedNumber(), getEmergencyStoppingVehiclesIDList(), getEmergencyStoppingVehiclesNumber(), getEndingTeleportIDList(), getEndingTeleportNumber(), getLoadedIDList(), getLoadedNumber(), getMinExpectedNumber(), getParkingEndingVehiclesIDList(), getParkingEndingVehiclesNumber(), getParkingStartingVehiclesIDList(), getParkingStartingVehiclesNumber(), getStartingTeleportIDList(), getStartingTeleportNumber(), getStopEndingVehiclesIDList(), getStopEndingVehiclesNumber(), getStopStartingVehiclesIDList(), getStopStartingVehiclesNumber(), getTime(), VAR_ARRIVED_VEHICLES_IDS, VAR_ARRIVED_VEHICLES_NUMBER, VAR_BUS_STOP_WAITING, VAR_COLLIDING_VEHICLES_IDS, VAR_COLLIDING_VEHICLES_NUMBER, VAR_DELTA_T, VAR_DEPARTED_VEHICLES_IDS, VAR_DEPARTED_VEHICLES_NUMBER, VAR_EMERGENCYSTOPPING_VEHICLES_IDS, VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER, VAR_LOADED_VEHICLES_IDS, VAR_LOADED_VEHICLES_NUMBER, VAR_MIN_EXPECTED_VEHICLES, VAR_PARKING_ENDING_VEHICLES_IDS, VAR_PARKING_ENDING_VEHICLES_NUMBER, VAR_PARKING_STARTING_VEHICLES_IDS, VAR_PARKING_STARTING_VEHICLES_NUMBER, VAR_STOP_ENDING_VEHICLES_IDS, VAR_STOP_ENDING_VEHICLES_NUMBER, VAR_STOP_STARTING_VEHICLES_IDS, VAR_STOP_STARTING_VEHICLES_NUMBER, VAR_TELEPORT_ENDING_VEHICLES_IDS, VAR_TELEPORT_ENDING_VEHICLES_NUMBER, VAR_TELEPORT_STARTING_VEHICLES_IDS, VAR_TELEPORT_STARTING_VEHICLES_NUMBER, VAR_TIME, VAR_TIME_STEP, libsumo::VariableWrapper::wrapDouble(), libsumo::VariableWrapper::wrapInt(), and libsumo::VariableWrapper::wrapStringList().
Referenced by makeWrapper().
|
static |
return whether a simulation (network) is present
Definition at line 73 of file Simulation.cpp.
References MSNet::hasInstance().
|
static |
load a simulation with the given arguments
Definition at line 63 of file Simulation.cpp.
References close(), XMLSubSys::init(), NLBuilder::init(), libsumo::Helper::registerVehicleStateListener(), and OptionsIO::setArgs().
Referenced by main().
|
static |
Definition at line 647 of file Simulation.cpp.
References handleVariable(), myContextSubscriptionResults, and mySubscriptionResults.
|
static |
Definition at line 641 of file Simulation.cpp.
References MSNet::getInstance(), and MSStateHandler::saveState().
Referenced by TraCIServerAPI_Simulation::processSet().
|
static |
Advances by one step (or up to the given time)
Definition at line 79 of file Simulation.cpp.
References libsumo::Helper::clearVehicleStates(), MSNet::getInstance(), libsumo::Helper::handleSubscriptions(), MSNet::simulationStep(), and TIME2STEPS.
|
static |
Definition at line 108 of file Simulation.cpp.
References CMD_SUBSCRIBE_SIM_VARIABLE, and libsumo::Helper::subscribe().
|
staticprivate |
Definition at line 131 of file Simulation.h.
Referenced by makeWrapper().
|
staticprivate |
Definition at line 130 of file Simulation.h.
Referenced by getSubscriptionResults(), and makeWrapper().