![]() |
Eclipse SUMO - Simulation of Urban MObility
|
C++ TraCI client API implementation. More...
#include <Helper.h>
Data Structures | |
class | LaneUtility |
class | SubscriptionWrapper |
class | VehicleStateListener |
Static Public Member Functions | |
static Subscription * | addSubscriptionFilter (SubscriptionFilterType filter) |
static void | addSubscriptionParam (const std::string ¶m) |
static void | addSubscriptionParam (double param) |
static void | applySubscriptionFilterFieldOfVision (const Subscription &s, std::set< std::string > &objIDs) |
static void | applySubscriptionFilterLateralDistanceSinglePass (const Subscription &s, std::set< std::string > &objIDs, std::set< const SUMOTrafficObject * > &vehs, const std::vector< const MSLane * > &lanes, double posOnLane, double posLat, bool isDownstream) |
static void | applySubscriptionFilters (const Subscription &s, std::set< std::string > &objIDs) |
Filter the given ID-Set (which was obtained from an R-Tree search) according to the filters set by the subscription or firstly build the object ID list if the filters rather demand searching along the road network than considering a geometric range. More... | |
static void | cleanup () |
static void | clearSubscriptions () |
static void | clearVehicleStates () |
static void | collectObjectIDsInRange (int domain, const PositionVector &shape, double range, std::set< std::string > &into) |
static void | collectObjectsInRange (int domain, const PositionVector &shape, double range, std::set< const Named * > &into) |
static std::pair< MSLane *, double > | convertCartesianToRoadMap (const Position &pos, const SUMOVehicleClass vClass) |
static void | findObjectShape (int domain, const std::string &id, PositionVector &shape) |
static double | getDrivingDistance (std::pair< const MSLane *, double > &roadPos1, std::pair< const MSLane *, double > &roadPos2) |
static MSEdge * | getEdge (const std::string &edgeID) |
static const MSLane * | getLaneChecking (const std::string &edgeID, int laneIndex, double pos) |
static MSPerson * | getPerson (const std::string &id) |
static SUMOTrafficObject * | getTrafficObject (int domain, const std::string &id) |
static MSBaseVehicle * | getVehicle (const std::string &id) |
static const std::vector< std::string > & | getVehicleStateChanges (const MSNet::VehicleState state) |
static const MSVehicleType & | getVehicleType (const std::string &vehicleID) |
static void | handleSubscriptions (const SUMOTime t) |
static Position | makePosition (const TraCIPosition &position) |
static PositionVector | makePositionVector (const TraCIPositionVector &vector) |
static RGBColor | makeRGBColor (const TraCIColor &color) |
static TraCIColor | makeTraCIColor (const RGBColor &color) |
static TraCIPosition | makeTraCIPosition (const Position &position, const bool includeZ=false) |
static TraCIPositionVector | makeTraCIPositionVector (const PositionVector &positionVector) |
helper functions More... | |
static bool | needNewSubscription (libsumo::Subscription &s, std::vector< Subscription > &subscriptions, libsumo::Subscription *&modifiedSubscription) |
static void | postProcessRemoteControl () |
static void | registerVehicleStateListener () |
static void | setRemoteControlled (MSPerson *p, Position xyPos, MSLane *l, double pos, double posLat, double angle, int edgeOffset, ConstMSEdgeVector route, SUMOTime t) |
static void | setRemoteControlled (MSVehicle *v, Position xyPos, MSLane *l, double pos, double posLat, double angle, int edgeOffset, ConstMSEdgeVector route, SUMOTime t) |
static void | subscribe (const int commandId, const std::string &id, const std::vector< int > &variables, const double beginTime, const double endTime, const libsumo::TraCIResults ¶ms, const int contextDomain=0, const double range=0.) |
functions for moveToXY | |
static bool | moveToXYMap (const Position &pos, double maxRouteDistance, bool mayLeaveNetwork, const std::string &origID, const double angle, double speed, const ConstMSEdgeVector ¤tRoute, const int routePosition, const MSLane *currentLane, double currentLanePos, bool onRoad, SUMOVehicleClass vClass, bool setLateralPos, double &bestDistance, MSLane **lane, double &lanePos, int &routeOffset, ConstMSEdgeVector &edges) |
static bool | moveToXYMap_matchingRoutePosition (const Position &pos, const std::string &origID, const ConstMSEdgeVector ¤tRoute, int routeIndex, SUMOVehicleClass vClass, bool setLateralPos, double &bestDistance, MSLane **lane, double &lanePos, int &routeOffset) |
static bool | findCloserLane (const MSEdge *edge, const Position &pos, SUMOVehicleClass vClass, double &bestDistance, MSLane **lane) |
Private Member Functions | |
Helper ()=delete | |
invalidated standard constructor More... | |
Static Private Member Functions | |
static void | debugPrint (const SUMOTrafficObject *veh) |
static void | fuseLaneCoverage (std::shared_ptr< LaneCoverageInfo > aggregatedLaneCoverage, const std::shared_ptr< LaneCoverageInfo > newLaneCoverage) |
Adds lane coverage information from newLaneCoverage into aggregatedLaneCoverage. More... | |
static void | handleSingleSubscription (const Subscription &s) |
Static Private Attributes | |
static LANE_RTREE_QUAL * | myLaneTree |
A storage of lanes. More... | |
static Subscription * | myLastContextSubscription = nullptr |
The last context subscription. More... | |
static std::map< std::string, MSPerson * > | myRemoteControlledPersons |
static std::map< std::string, MSVehicle * > | myRemoteControlledVehicles |
static std::vector< Subscription > | mySubscriptions |
The list of known, still valid subscriptions. More... | |
static VehicleStateListener | myVehicleStateListener |
Changes in the states of simulated vehicles. More... | |
static std::map< int, std::shared_ptr< VariableWrapper > > | myWrapper |
Map of commandIds -> their executors; applicable if the executor applies to the method footprint. More... | |
|
privatedelete |
invalidated standard constructor
|
static |
Definition at line 245 of file Helper.cpp.
References libsumo::Subscription::activeFilters, myLastContextSubscription, and WRITE_WARNING.
Referenced by LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterDownstreamDistance(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterFieldOfVision(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterLanes(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterLateralDistance(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterLeadFollow(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterNoOpposite(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterTurn(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterUpstreamDistance(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterVClass(), and LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterVType().
|
static |
Definition at line 179 of file Helper.cpp.
References mySubscriptions.
|
static |
Definition at line 170 of file Helper.cpp.
References mySubscriptions.
Referenced by LIBSUMO_NAMESPACE::Vehicle::subscribeLeader().
|
static |
Definition at line 981 of file Helper.cpp.
References GeomHelper::angleDiff(), Position::angleTo2D(), libsumo::Subscription::contextDomain, DEG2RAD, Position::distanceTo2D(), libsumo::Subscription::filterFieldOfVisionOpeningAngle, SUMOVehicle::getAngle(), SUMOTrafficObject::getPosition(), getTrafficObject(), getVehicle(), libsumo::Subscription::id, libsumo::Subscription::isVehicleToPersonContextSubscription(), RAD2DEG, toString(), and WRITE_WARNINGF.
Referenced by applySubscriptionFilters().
|
static |
Definition at line 1020 of file Helper.cpp.
References PositionVector::append(), libsumo::Subscription::contextDomain, PositionVector::distance2D(), libsumo::Subscription::filterDownstreamDist, libsumo::Subscription::filterLateralDist, libsumo::Subscription::filterUpstreamDist, Named::getID(), SUMOTrafficObject::getPosition(), getTrafficObject(), GeomHelper::INVALID_OFFSET, PositionVector::length(), PositionVector::move2side(), PositionVector::splitAt(), toString(), and WRITE_WARNING.
Referenced by applySubscriptionFilters().
|
static |
Filter the given ID-Set (which was obtained from an R-Tree search) according to the filters set by the subscription or firstly build the object ID list if the filters rather demand searching along the road network than considering a geometric range.
[in] | s | Subscription which holds the filter specification to be applied |
[in/out] | objIDs Set of object IDs that is to be filtered. Result is stored in place. |
Definition at line 641 of file Helper.cpp.
References libsumo::Subscription::activeFilters, applySubscriptionFilterFieldOfVision(), applySubscriptionFilterLateralDistanceSinglePass(), collectObjectIDsInRange(), libsumo::Subscription::commandId, libsumo::Subscription::contextDomain, debugPrint(), libsumo::Subscription::filterDownstreamDist, libsumo::Subscription::filterLanes, libsumo::Subscription::filterLateralDist, libsumo::Subscription::filterUpstreamDist, libsumo::Subscription::filterVClasses, libsumo::Subscription::filterVTypes, findObjectShape(), fuseLaneCoverage(), MSLink::getApproaching(), MSVehicle::getBestLanesContinuation(), MSLane::getEdge(), MSLane::getFollower(), MSVehicleType::getID(), Named::getID(), MSLane::getIndex(), MSVehicle::getLane(), SUMOTrafficObject::getLane(), MSEdge::getLanes(), MSVehicle::getLateralPositionOnLane(), MSLane::getLeader(), MSBaseVehicle::getLength(), MSEdge::getLength(), MSLane::getLength(), MSVehicleType::getLength(), MSEdge::getOppositeEdge(), MSLane::getParallelLane(), MSVehicle::getPastLanesUntil(), MSVehicle::getPositionOnLane(), MSLane::getSurroundingVehicles(), MSVehicle::getUpcomingLanesUntil(), MSLane::getUpcomingLinks(), getVehicle(), MSVehicleType::getVehicleClass(), MSLane::getVehiclesInRange(), MSBaseVehicle::getVehicleType(), libsumo::Subscription::id, MSVehicle::isOnRoad(), MAX2(), MAX3(), libsumo::Subscription::range, SIMTIME, libsumo::SUBS_FILTER_DOWNSTREAM_DIST, libsumo::SUBS_FILTER_FIELD_OF_VISION, libsumo::SUBS_FILTER_LANES, libsumo::SUBS_FILTER_LATERAL_DIST, libsumo::SUBS_FILTER_LEAD_FOLLOW, libsumo::SUBS_FILTER_MANEUVER, libsumo::SUBS_FILTER_NO_RTREE, libsumo::SUBS_FILTER_NOOPPOSITE, libsumo::SUBS_FILTER_TURN, libsumo::SUBS_FILTER_UPSTREAM_DIST, libsumo::SUBS_FILTER_VCLASS, libsumo::SUBS_FILTER_VTYPE, toString(), and WRITE_WARNING.
Referenced by handleSingleSubscription(), and TraCIServer::processSingleSubscription().
|
static |
Definition at line 526 of file Helper.cpp.
References libsumo::POI::cleanup(), libsumo::Polygon::cleanup(), and myLaneTree.
Referenced by MSNet::clearAll().
|
static |
Definition at line 238 of file Helper.cpp.
References myLastContextSubscription, and mySubscriptions.
Referenced by LIBSUMO_NAMESPACE::Simulation::close().
|
static |
Definition at line 552 of file Helper.cpp.
References libsumo::Helper::VehicleStateListener::myVehicleStateChanges, and myVehicleStateListener.
Referenced by LIBSUMO_NAMESPACE::Simulation::loadState(), and LIBSUMO_NAMESPACE::Simulation::step().
|
static |
Definition at line 593 of file Helper.cpp.
References collectObjectsInRange().
Referenced by applySubscriptionFilters(), handleSingleSubscription(), and TraCIServer::processSingleSubscription().
|
static |
Definition at line 603 of file Helper.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::CMD_GET_LANE_VARIABLE, libsumo::CMD_GET_PERSON_VARIABLE, libsumo::CMD_GET_POI_VARIABLE, libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::CMD_GET_VEHICLE_VARIABLE, MSLane::fill(), PositionVector::getBoxBoundary(), libsumo::POI::getTree(), libsumo::Polygon::getTree(), Boundary::grow(), LANE_RTREE_QUAL, myLaneTree, NamedRTree::Search(), MSLane::visit(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by collectObjectIDsInRange(), convertCartesianToRoadMap(), moveToXYMap(), moveToXYMap_matchingRoutePosition(), and MSFCDExport::write().
|
static |
Definition at line 431 of file Helper.cpp.
References MSLane::allowsVehicleClass(), libsumo::CMD_GET_LANE_VARIABLE, collectObjectsInRange(), PositionVector::distance2D(), Boundary::distanceTo2D(), GeoConvHelper::getConvBoundary(), GeoConvHelper::getFinal(), Boundary::getHeight(), MSLane::getShape(), Boundary::getWidth(), MSLane::interpolateGeometryPosToLanePos(), and MAX2().
Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), TraCIServerAPI_Simulation::commandPositionConversion(), LIBSUMO_NAMESPACE::Simulation::convertRoad(), LIBSUMO_NAMESPACE::Simulation::getDistance2D(), and LIBSUMO_NAMESPACE::Vehicle::getDrivingDistance2D().
|
staticprivate |
Definition at line 125 of file Helper.cpp.
References SUMOTrafficObject::getEdge(), Named::getID(), and SUMOTrafficObject::isVehicle().
Referenced by applySubscriptionFilters().
|
static |
Definition at line 1382 of file Helper.cpp.
References MSLane::allowsVehicleClass(), PositionVector::distance2D(), Named::getID(), MSEdge::getLanes(), MSLane::getShape(), and PositionVector::length().
Referenced by moveToXYMap_matchingRoutePosition().
|
static |
Definition at line 560 of file Helper.cpp.
References libsumo::CMD_SUBSCRIBE_EDGE_CONTEXT, libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT, libsumo::CMD_SUBSCRIBE_JUNCTION_CONTEXT, libsumo::CMD_SUBSCRIBE_LANE_CONTEXT, libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT, libsumo::CMD_SUBSCRIBE_POI_CONTEXT, libsumo::CMD_SUBSCRIBE_POLYGON_CONTEXT, libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT, libsumo::POI::storeShape(), and libsumo::Polygon::storeShape().
Referenced by applySubscriptionFilters(), handleSingleSubscription(), and TraCIServer::processSingleSubscription().
|
staticprivate |
Adds lane coverage information from newLaneCoverage into aggregatedLaneCoverage.
[in/out] | aggregatedLaneCoverage - aggregated lane coverage info, to which the new will be added | |
[in] | newLaneCoverage | - new lane coverage to be added |
Definition at line 330 of file Helper.cpp.
References MAX2(), and MIN2().
Referenced by applySubscriptionFilters().
|
static |
Definition at line 463 of file Helper.cpp.
References SUMOAbstractRouter< E, V >::compute(), MSRoute::getDistanceBetween(), MSNet::getInstance(), MSNet::getRouterTT(), libsumo::INVALID_DOUBLE_VALUE, and SIMSTEP.
Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), LIBSUMO_NAMESPACE::Simulation::getDistance2D(), and LIBSUMO_NAMESPACE::Simulation::getDistanceRoad().
|
static |
Definition at line 404 of file Helper.cpp.
References MSEdge::dictionary().
Referenced by LIBSUMO_NAMESPACE::Vehicle::getAdaptedTraveltime(), LIBSUMO_NAMESPACE::Vehicle::getDrivingDistance(), and LIBSUMO_NAMESPACE::Vehicle::getEffort().
|
static |
Definition at line 414 of file Helper.cpp.
References MSEdge::dictionary(), MSEdge::getLanes(), and MSLane::getLength().
Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), TraCIServerAPI_Simulation::commandPositionConversion(), LIBSUMO_NAMESPACE::Simulation::convert2D(), LIBSUMO_NAMESPACE::Simulation::convert3D(), and LIBSUMO_NAMESPACE::Simulation::getDistanceRoad().
|
static |
Definition at line 499 of file Helper.cpp.
References MSTransportableControl::get(), MSNet::getInstance(), and MSNet::getPersonControl().
Referenced by LIBSUMO_NAMESPACE::Person::getPerson(), and getTrafficObject().
|
static |
Definition at line 509 of file Helper.cpp.
References libsumo::CMD_GET_PERSON_VARIABLE, libsumo::CMD_GET_VEHICLE_VARIABLE, getPerson(), getVehicle(), and toString().
Referenced by applySubscriptionFilterFieldOfVision(), and applySubscriptionFilterLateralDistanceSinglePass().
|
static |
Definition at line 485 of file Helper.cpp.
References MSNet::getInstance(), MSVehicleControl::getVehicle(), and MSNet::getVehicleControl().
Referenced by applySubscriptionFilterFieldOfVision(), applySubscriptionFilters(), LIBSUMO_NAMESPACE::Vehicle::changeLane(), LIBSUMO_NAMESPACE::Vehicle::changeLaneRelative(), LIBSUMO_NAMESPACE::Vehicle::changeSublane(), LIBSUMO_NAMESPACE::Vehicle::changeTarget(), LIBSUMO_NAMESPACE::Vehicle::deactivateGapControl(), LIBSUMO_NAMESPACE::Vehicle::dispatchTaxi(), LIBSUMO_NAMESPACE::Vehicle::getAcceleration(), LIBSUMO_NAMESPACE::Vehicle::getAccumulatedWaitingTime(), LIBSUMO_NAMESPACE::Vehicle::getAdaptedTraveltime(), LIBSUMO_NAMESPACE::Vehicle::getAllowedSpeed(), LIBSUMO_NAMESPACE::Vehicle::getAngle(), LIBSUMO_NAMESPACE::Vehicle::getBestLanes(), LIBSUMO_NAMESPACE::Vehicle::getCO2Emission(), LIBSUMO_NAMESPACE::Vehicle::getCOEmission(), LIBSUMO_NAMESPACE::Vehicle::getDistance(), LIBSUMO_NAMESPACE::Vehicle::getDrivingDistance(), LIBSUMO_NAMESPACE::Vehicle::getDrivingDistance2D(), LIBSUMO_NAMESPACE::Vehicle::getEffort(), LIBSUMO_NAMESPACE::Vehicle::getElectricityConsumption(), LIBSUMO_NAMESPACE::Vehicle::getFollower(), LIBSUMO_NAMESPACE::Vehicle::getFollowSpeed(), LIBSUMO_NAMESPACE::Vehicle::getFuelConsumption(), LIBSUMO_NAMESPACE::Vehicle::getHCEmission(), LIBSUMO_NAMESPACE::Vehicle::getLaneChangeMode(), LIBSUMO_NAMESPACE::Vehicle::getLaneChangeState(), LIBSUMO_NAMESPACE::Vehicle::getLaneID(), LIBSUMO_NAMESPACE::Vehicle::getLaneIndex(), LIBSUMO_NAMESPACE::Vehicle::getLanePosition(), LIBSUMO_NAMESPACE::Vehicle::getLastActionTime(), LIBSUMO_NAMESPACE::Vehicle::getLateralLanePosition(), LIBSUMO_NAMESPACE::Vehicle::getLateralSpeed(), LIBSUMO_NAMESPACE::Vehicle::getLeader(), LIBSUMO_NAMESPACE::Vehicle::getLine(), LIBSUMO_NAMESPACE::Vehicle::getNeighbors(), LIBSUMO_NAMESPACE::Vehicle::getNextTLS(), LIBSUMO_NAMESPACE::Vehicle::getNoiseEmission(), LIBSUMO_NAMESPACE::Vehicle::getNOxEmission(), LIBSUMO_NAMESPACE::Vehicle::getPersonIDList(), LIBSUMO_NAMESPACE::Vehicle::getPersonNumber(), LIBSUMO_NAMESPACE::Vehicle::getPMxEmission(), LIBSUMO_NAMESPACE::Vehicle::getPosition(), LIBSUMO_NAMESPACE::Vehicle::getRoadID(), LIBSUMO_NAMESPACE::Vehicle::getRoute(), LIBSUMO_NAMESPACE::Vehicle::getRouteID(), LIBSUMO_NAMESPACE::Vehicle::getRouteIndex(), LIBSUMO_NAMESPACE::Vehicle::getRoutingMode(), LIBSUMO_NAMESPACE::Vehicle::getSecureGap(), LIBSUMO_NAMESPACE::Vehicle::getSignals(), LIBSUMO_NAMESPACE::Vehicle::getSlope(), LIBSUMO_NAMESPACE::Vehicle::getSpeed(), LIBSUMO_NAMESPACE::Vehicle::getSpeedMode(), LIBSUMO_NAMESPACE::Vehicle::getSpeedWithoutTraCI(), LIBSUMO_NAMESPACE::Vehicle::getStopArrivalDelay(), LIBSUMO_NAMESPACE::Vehicle::getStopDelay(), LIBSUMO_NAMESPACE::Vehicle::getStops(), LIBSUMO_NAMESPACE::Vehicle::getStopSpeed(), LIBSUMO_NAMESPACE::Vehicle::getStopState(), getTrafficObject(), getVehicleType(), LIBSUMO_NAMESPACE::Vehicle::getVia(), LIBSUMO_NAMESPACE::Vehicle::getWaitingTime(), LIBSUMO_NAMESPACE::Vehicle::highlight(), LIBSUMO_NAMESPACE::Vehicle::isRouteValid(), LIBSUMO_NAMESPACE::Vehicle::moveTo(), LIBSUMO_NAMESPACE::Vehicle::moveToXY(), LIBSUMO_NAMESPACE::Vehicle::openGap(), postProcessRemoteControl(), LIBSUMO_NAMESPACE::Vehicle::remove(), LIBSUMO_NAMESPACE::Vehicle::replaceStop(), LIBSUMO_NAMESPACE::Vehicle::rerouteEffort(), LIBSUMO_NAMESPACE::Vehicle::rerouteParkingArea(), LIBSUMO_NAMESPACE::Vehicle::rerouteTraveltime(), LIBSUMO_NAMESPACE::Vehicle::resume(), LIBSUMO_NAMESPACE::Vehicle::setAdaptedTraveltime(), LIBSUMO_NAMESPACE::Vehicle::setEffort(), LIBSUMO_NAMESPACE::Vehicle::setLaneChangeMode(), LIBSUMO_NAMESPACE::Vehicle::setLine(), LIBSUMO_NAMESPACE::Vehicle::setPreviousSpeed(), LIBSUMO_NAMESPACE::Vehicle::setRoute(), LIBSUMO_NAMESPACE::Vehicle::setRouteID(), LIBSUMO_NAMESPACE::Vehicle::setRoutingMode(), LIBSUMO_NAMESPACE::Vehicle::setSignals(), LIBSUMO_NAMESPACE::Vehicle::setSpeed(), LIBSUMO_NAMESPACE::Vehicle::setSpeedMode(), LIBSUMO_NAMESPACE::Vehicle::setStop(), LIBSUMO_NAMESPACE::Vehicle::setType(), LIBSUMO_NAMESPACE::Vehicle::setVia(), LIBSUMO_NAMESPACE::Vehicle::slowDown(), LIBSUMO_NAMESPACE::Vehicle::storeShape(), and LIBSUMO_NAMESPACE::Vehicle::updateBestLanes().
|
static |
Definition at line 546 of file Helper.cpp.
References libsumo::Helper::VehicleStateListener::myVehicleStateChanges, and myVehicleStateListener.
Referenced by LIBSUMO_NAMESPACE::Simulation::getArrivedIDList(), LIBSUMO_NAMESPACE::Simulation::getArrivedNumber(), LIBSUMO_NAMESPACE::Simulation::getCollidingVehiclesIDList(), LIBSUMO_NAMESPACE::Simulation::getCollidingVehiclesNumber(), LIBSUMO_NAMESPACE::Simulation::getDepartedIDList(), LIBSUMO_NAMESPACE::Simulation::getDepartedNumber(), LIBSUMO_NAMESPACE::Simulation::getEmergencyStoppingVehiclesIDList(), LIBSUMO_NAMESPACE::Simulation::getEmergencyStoppingVehiclesNumber(), LIBSUMO_NAMESPACE::Simulation::getEndingTeleportIDList(), LIBSUMO_NAMESPACE::Simulation::getEndingTeleportNumber(), LIBSUMO_NAMESPACE::Simulation::getLoadedIDList(), LIBSUMO_NAMESPACE::Simulation::getLoadedNumber(), LIBSUMO_NAMESPACE::Simulation::getParkingEndingVehiclesIDList(), LIBSUMO_NAMESPACE::Simulation::getParkingEndingVehiclesNumber(), LIBSUMO_NAMESPACE::Simulation::getParkingStartingVehiclesIDList(), LIBSUMO_NAMESPACE::Simulation::getParkingStartingVehiclesNumber(), LIBSUMO_NAMESPACE::Simulation::getStartingTeleportIDList(), LIBSUMO_NAMESPACE::Simulation::getStartingTeleportNumber(), LIBSUMO_NAMESPACE::Simulation::getStopEndingVehiclesIDList(), LIBSUMO_NAMESPACE::Simulation::getStopEndingVehiclesNumber(), LIBSUMO_NAMESPACE::Simulation::getStopStartingVehiclesIDList(), LIBSUMO_NAMESPACE::Simulation::getStopStartingVehiclesNumber(), and handleSubscriptions().
|
static |
Definition at line 520 of file Helper.cpp.
References getVehicle(), and MSBaseVehicle::getVehicleType().
Referenced by LIBSUMO_NAMESPACE::Vehicle::getTypeID().
|
staticprivate |
Definition at line 256 of file Helper.cpp.
References libsumo::Subscription::activeFilters, applySubscriptionFilters(), libsumo::CMD_GET_EDGE_VARIABLE, libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE, libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::CMD_GET_LANE_VARIABLE, libsumo::CMD_GET_LANEAREA_VARIABLE, libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE, libsumo::CMD_GET_PERSON_VARIABLE, libsumo::CMD_GET_POI_VARIABLE, libsumo::CMD_GET_POLYGON_VARIABLE, libsumo::CMD_GET_ROUTE_VARIABLE, libsumo::CMD_GET_SIM_VARIABLE, libsumo::CMD_GET_TL_VARIABLE, libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_GET_VEHICLETYPE_VARIABLE, collectObjectIDsInRange(), libsumo::Subscription::commandId, libsumo::Subscription::contextDomain, findObjectShape(), libsumo::Subscription::id, libsumo::LAST_STEP_VEHICLE_NUMBER, libsumo::POI::makeWrapper(), libsumo::Polygon::makeWrapper(), myWrapper, libsumo::Subscription::parameters, libsumo::Subscription::range, libsumo::VariableWrapper::setContext(), libsumo::VariableWrapper::setParams(), libsumo::SUBS_FILTER_NO_RTREE, libsumo::TRACI_ID_LIST, libsumo::VAR_LANEPOSITION, libsumo::VAR_ROAD_ID, and libsumo::Subscription::variables.
Referenced by handleSubscriptions(), and subscribe().
|
static |
Definition at line 188 of file Helper.cpp.
References libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT, libsumo::CMD_SUBSCRIBE_PERSON_VARIABLE, libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT, libsumo::CMD_SUBSCRIBE_VEHICLE_VARIABLE, libsumo::Subscription::commandId, libsumo::Subscription::endTime, MSTransportableControl::get(), MSNet::getInstance(), MSNet::getPersonControl(), getVehicleStateChanges(), handleSingleSubscription(), libsumo::Subscription::id, mySubscriptions, myWrapper, and MSNet::VEHICLE_STATE_ARRIVED.
Referenced by LIBSUMO_NAMESPACE::Simulation::step().
|
static |
Definition at line 398 of file Helper.cpp.
References libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
|
static |
Definition at line 358 of file Helper.cpp.
Referenced by libsumo::Polygon::add(), and libsumo::Polygon::setShape().
|
static |
Definition at line 382 of file Helper.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::TraCIColor::g, and libsumo::TraCIColor::r.
Referenced by libsumo::POI::add(), libsumo::Polygon::add(), libsumo::POI::setColor(), and libsumo::Polygon::setColor().
|
static |
Definition at line 371 of file Helper.cpp.
References libsumo::TraCIColor::a, RGBColor::alpha(), libsumo::TraCIColor::b, RGBColor::blue(), libsumo::TraCIColor::g, RGBColor::green(), libsumo::TraCIColor::r, and RGBColor::red().
Referenced by libsumo::POI::getColor(), and libsumo::Polygon::getColor().
|
static |
Definition at line 388 of file Helper.cpp.
References libsumo::INVALID_DOUBLE_VALUE, libsumo::TraCIPosition::x, Position::x(), libsumo::TraCIPosition::y, Position::y(), libsumo::TraCIPosition::z, and Position::z().
Referenced by LIBSUMO_NAMESPACE::Simulation::convert2D(), LIBSUMO_NAMESPACE::Simulation::convert3D(), LIBSUMO_NAMESPACE::Simulation::convertGeo(), LIBSUMO_NAMESPACE::Junction::getPosition(), LIBSUMO_NAMESPACE::Person::getPosition(), libsumo::POI::getPosition(), LIBSUMO_NAMESPACE::Vehicle::getPosition(), LIBSUMO_NAMESPACE::Person::getPosition3D(), and makeTraCIPositionVector().
|
static |
helper functions
Definition at line 348 of file Helper.cpp.
References makeTraCIPosition().
Referenced by LIBSUMO_NAMESPACE::Junction::getShape(), libsumo::Polygon::getShape(), libsumo::POI::highlight(), LIBSUMO_NAMESPACE::Vehicle::highlight(), and TraCIServerAPI_Polygon::processSet().
|
static |
Definition at line 1123 of file Helper.cpp.
References libsumo::Helper::LaneUtility::angleDiff, libsumo::CMD_GET_EDGE_VARIABLE, collectObjectsInRange(), libsumo::Helper::LaneUtility::dist, PositionVector::distance2D(), PositionVector::extrapolate2D(), FAR_AWAY, MSLane::getEdge(), MSEdge::getFromJunction(), Named::getID(), Named::getIDSecure(), MSEdge::getLanes(), MSEdge::getLength(), MSLane::getLogicalPredecessorLane(), GeomHelper::getMinAngleDiff(), MSEdge::getPermissions(), MSEdge::getPredecessors(), MSLane::getShape(), MSEdge::getSuccessors(), MSEdge::getToJunction(), gPrecision, libsumo::Helper::LaneUtility::ID, MSLane::interpolateGeometryPosToLanePos(), libsumo::INVALID_DOUBLE_VALUE, GeomHelper::INVALID_OFFSET, MSEdge::isCrossing(), MSEdge::isInternal(), MSEdge::isNormal(), MSEdge::isWalkingArea(), MAX2(), MIN2(), GeomHelper::naviDegree(), PositionVector::nearest_offset_to_point25D(), PositionVector::nearest_offset_to_point2D(), libsumo::Helper::LaneUtility::nextEdge, libsumo::Helper::LaneUtility::onRoute, libsumo::Helper::LaneUtility::prevEdge, libsumo::Helper::LaneUtility::sameEdge, SIMTIME, SPEED2DIST, SUMO_const_laneWidth, SUMO_PARAM_ORIGID, and toString().
Referenced by LIBSUMO_NAMESPACE::Person::moveToXY(), and LIBSUMO_NAMESPACE::Vehicle::moveToXY().
|
static |
Definition at line 1413 of file Helper.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, collectObjectsInRange(), findCloserLane(), MSLane::getEdge(), MSEdge::getInternalFollowingEdge(), MSEdge::getToJunction(), MSEdge::isCrossing(), MSEdge::isWalkingArea(), MAX2(), MIN2(), SIMTIME, SUMO_PARAM_ORIGID, SVC_PEDESTRIAN, and toString().
Referenced by LIBSUMO_NAMESPACE::Person::moveToXY(), and LIBSUMO_NAMESPACE::Vehicle::moveToXY().
|
static |
Definition at line 213 of file Helper.cpp.
References libsumo::Subscription::beginTime, libsumo::Subscription::commandId, libsumo::Subscription::contextDomain, libsumo::Subscription::endTime, libsumo::Subscription::id, libsumo::Subscription::parameters, libsumo::Subscription::range, and libsumo::Subscription::variables.
Referenced by TraCIServer::initialiseSubscription(), and subscribe().
|
static |
Definition at line 1102 of file Helper.cpp.
References MSNet::getInstance(), getVehicle(), myRemoteControlledPersons, myRemoteControlledVehicles, and WRITE_WARNING.
Referenced by MSNet::simulationStep().
|
static |
Definition at line 538 of file Helper.cpp.
References MSNet::addVehicleStateListener(), MSNet::getInstance(), MSNet::hasInstance(), and myVehicleStateListener.
Referenced by NLBuilder::init().
|
static |
Definition at line 1094 of file Helper.cpp.
References Named::getID(), MSPerson::getInfluencer(), myRemoteControlledPersons, and MSPerson::Influencer::setRemoteControlled().
|
static |
Definition at line 1087 of file Helper.cpp.
References Named::getID(), MSVehicle::getInfluencer(), myRemoteControlledVehicles, and MSVehicle::Influencer::setRemoteControlled().
Referenced by LIBSUMO_NAMESPACE::Person::moveToXY(), and LIBSUMO_NAMESPACE::Vehicle::moveToXY().
|
static |
Definition at line 137 of file Helper.cpp.
References handleSingleSubscription(), libsumo::INVALID_DOUBLE_VALUE, libsumo::Subscription::isVehicleToPersonContextSubscription(), libsumo::Subscription::isVehicleToVehicleContextSubscription(), myLastContextSubscription, mySubscriptions, needNewSubscription(), STEPS2TIME, SUMOTime_MAX, TIME2STEPS, and libsumo::Subscription::variables.
Referenced by LIBSUMO_NAMESPACE::Simulation::subscribe().
|
staticprivate |
A storage of lanes.
Definition at line 275 of file Helper.h.
Referenced by cleanup(), and collectObjectsInRange().
|
staticprivate |
The last context subscription.
Definition at line 266 of file Helper.h.
Referenced by addSubscriptionFilter(), clearSubscriptions(), and subscribe().
|
staticprivate |
Definition at line 278 of file Helper.h.
Referenced by postProcessRemoteControl(), and setRemoteControlled().
|
staticprivate |
Definition at line 277 of file Helper.h.
Referenced by postProcessRemoteControl(), and setRemoteControlled().
|
staticprivate |
The list of known, still valid subscriptions.
Definition at line 263 of file Helper.h.
Referenced by addSubscriptionParam(), clearSubscriptions(), handleSubscriptions(), and subscribe().
|
staticprivate |
Changes in the states of simulated vehicles.
Definition at line 272 of file Helper.h.
Referenced by clearVehicleStates(), getVehicleStateChanges(), and registerVehicleStateListener().
|
staticprivate |
Map of commandIds -> their executors; applicable if the executor applies to the method footprint.
Definition at line 269 of file Helper.h.
Referenced by handleSingleSubscription(), and handleSubscriptions().