![]() |
SUMO - Simulation of Urban MObility
|
#include <Simulation.h>
Public Types | |
typedef std::map< std::string, SubscribedValues > | SubscribedContextValues |
typedef std::map< std::string, TraCIValues > | SubscribedValues |
typedef std::map< int, TraCIValue > | TraCIValues |
{object->{variable->value}} More... | |
Public Member Functions | |
void | close () |
Connects to the specified SUMO server. More... | |
const SubscribedContextValues & | getContextSubscriptionResults () const |
const SubscribedValues & | getContextSubscriptionResults (const std::string &objID) const |
const SubscribedValues & | getSubscriptionResults () const |
const TraCIValues & | getSubscriptionResults (const std::string &objID) const |
Static Public Member Functions | |
static std::vector< TraCIStage > | findIntermodalRoute (const std::string &from, const std::string &to, const std::string &modes, const SUMOTime depart, const int routingMode, const double speed, const double walkFactor, const double departPos, const double arrivalPos, const double departPosLat, const std::string &pType, const std::string &vehType) |
static TraCIStage | findRoute (const std::string &from, const std::string &to, const std::string &typeID, const SUMOTime depart, const int routingMode) |
static SUMOTime | getCurrentTime () |
static SUMOTime | getDeltaT () |
static int | getMinExpectedNumber () |
static TraCIBoundary | getNetBoundary () |
static std::string | getParameter (const std::string &objectID, const std::string &key) |
static void | load (const std::vector< std::string > &args) |
load a simulation with the given arguments More... | |
static void | simulationStep (const SUMOTime time=0) |
Advances by one step (or up to the given time) More... | |
Private Member Functions | |
Simulation & | operator= (const Simulation &src) |
invalidated assignment operator More... | |
Simulation () | |
invalidated standard constructor More... | |
Simulation (const Simulation &src) | |
invalidated copy constructor More... | |
Private Attributes | |
SubscribedContextValues | mySubscribedContextValues |
SubscribedValues | mySubscribedValues |
Definition at line 44 of file Simulation.h.
typedef std::map<std::string, SubscribedValues> libsumo::Simulation::SubscribedContextValues |
Definition at line 67 of file Simulation.h.
typedef std::map<std::string, TraCIValues> libsumo::Simulation::SubscribedValues |
Definition at line 66 of file Simulation.h.
typedef std::map<int, TraCIValue> libsumo::Simulation::TraCIValues |
{object->{variable->value}}
Definition at line 65 of file Simulation.h.
|
private |
invalidated standard constructor
|
private |
invalidated copy constructor
void Simulation::close | ( | ) |
Connects to the specified SUMO server.
[in] | host | The name of the host to connect to |
[in] | port | The port to connect to |
tcpip::SocketException | if the connection failsends the simulation and closes the connection |
Definition at line 79 of file Simulation.cpp.
|
static |
Definition at line 194 of file Simulation.cpp.
References MSVehicleControl::buildVehicle(), PedestrianRouter< E, L, N, V, INTERNALROUTER >::compute(), DEFAULT_PEDTYPE_ID, MSVehicleControl::deleteVehicle(), MSEdge::dictionary(), MSTransportable::DRIVING, MSGlobals::gCheckRoutes, MSNet::getCurrentTimeStep(), Named::getID(), MSVehicleType::getID(), MSNet::getInstance(), MSVehicleType::getMaxSpeed(), MSNet::getPedestrianRouter(), MSEdge::getPermissions(), MSVehicleType::getVehicleClass(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), StringTokenizer::hasNext(), MSVehicleControl::hasVType(), MSTransportable::MOVING_WITHOUT_VEHICLE, SVC_BICYCLE, SVC_BUS, SVC_IGNORING, SVC_PASSENGER, and UNUSED_PARAMETER.
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 158 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(), MSNet::getRouterTT(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), SUMOAbstractRouter< E, V >::recomputeCosts(), libsumo::TraCIStage::travelTime, and UNUSED_PARAMETER.
Referenced by TraCIServerAPI_Simulation::processGet().
const Simulation::SubscribedContextValues & Simulation::getContextSubscriptionResults | ( | ) | const |
Definition at line 110 of file Simulation.cpp.
References mySubscribedContextValues.
const Simulation::SubscribedValues & Simulation::getContextSubscriptionResults | ( | const std::string & | objID | ) | const |
Definition at line 116 of file Simulation.cpp.
References mySubscribedContextValues.
|
static |
Definition at line 126 of file Simulation.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 132 of file Simulation.cpp.
References DELTA_T.
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 152 of file Simulation.cpp.
References MSVehicleControl::getActiveVehicleCount(), MSNet::getInsertionControl(), MSNet::getInstance(), MSInsertionControl::getPendingFlowCount(), and MSNet::getVehicleControl().
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 138 of file Simulation.cpp.
References GeoConvHelper::getConvBoundary(), GeoConvHelper::getFinal(), Boundary::xmax(), libsumo::TraCIBoundary::xMax, Boundary::xmin(), libsumo::TraCIBoundary::xMin, Boundary::ymax(), libsumo::TraCIBoundary::yMax, Boundary::ymin(), libsumo::TraCIBoundary::yMin, Boundary::zmax(), libsumo::TraCIBoundary::zMax, Boundary::zmin(), and libsumo::TraCIBoundary::zMin.
Referenced by TraCIServerAPI_Simulation::processGet().
|
static |
Definition at line 275 of file Simulation.cpp.
References MSParkingArea::getCapacity(), MSNet::getInstance(), MSParkingArea::getOccupancy(), MSNet::getStoppingPlace(), MSChargingStation::getTotalCharged(), StringUtils::startsWith(), SUMO_ATTR_TOTALENERGYCHARGED, SUMO_TAG_CHARGING_STATION, SUMO_TAG_PARKING_AREA, and toString().
Referenced by TraCIServerAPI_Simulation::processGet().
const Simulation::SubscribedValues & Simulation::getSubscriptionResults | ( | ) | const |
Definition at line 94 of file Simulation.cpp.
References mySubscribedValues.
const Simulation::TraCIValues & Simulation::getSubscriptionResults | ( | const std::string & | objID | ) | const |
Definition at line 100 of file Simulation.cpp.
References mySubscribedValues.
|
static |
load a simulation with the given arguments
Definition at line 59 of file Simulation.cpp.
References XMLSubSys::init(), NLBuilder::init(), and OptionsIO::setArgs().
|
private |
invalidated assignment operator
|
static |
Advances by one step (or up to the given time)
Definition at line 67 of file Simulation.cpp.
References MSNet::getInstance(), and MSNet::simulationStep().
|
private |
Definition at line 97 of file Simulation.h.
Referenced by getContextSubscriptionResults().
|
private |
Definition at line 96 of file Simulation.h.
Referenced by getSubscriptionResults().