50 static double getSpeed(
const std::string& vehID);
56 static double getAngle(
const std::string& vehID);
57 static double getSlope(
const std::string& vehID);
58 static std::string
getRoadID(
const std::string& vehID);
59 static std::string
getLaneID(
const std::string& vehID);
61 static std::string
getTypeID(
const std::string& vehID);
62 static std::string
getRouteID(
const std::string& vehID);
75 static std::vector<std::string>
getPersonIDList(
const std::string& vehID);
76 static std::pair<std::string, double>
getLeader(
const std::string& vehID,
double dist = 0.);
77 static std::pair<std::string, double>
getFollower(
const std::string& vehID,
double dist = 0.);
80 static double getAdaptedTraveltime(
const std::string& vehID,
double time,
const std::string& edgeID);
81 static double getEffort(
const std::string& vehID,
double time,
const std::string& edgeID);
83 static std::vector<std::string>
getRoute(
const std::string& vehID);
84 static int getSignals(
const std::string& vehID);
85 static std::vector<libsumo::TraCIBestLanesData>
getBestLanes(
const std::string& vehID);
86 static std::vector<libsumo::TraCINextTLSData>
getNextTLS(
const std::string& vehID);
87 static std::vector<libsumo::TraCINextStopData>
getNextStops(
const std::string& vehID);
88 static std::vector<libsumo::TraCINextStopData>
getStops(
const std::string& vehID,
int limit = 0);
90 static double getDistance(
const std::string& vehID);
91 static double getDrivingDistance(
const std::string& vehID,
const std::string& edgeID,
double position,
int laneIndex = 0);
97 static std::string
getLine(
const std::string& vehID);
98 static std::vector<std::string>
getVia(
const std::string& vehID);
99 static std::pair<int, int>
getLaneChangeState(
const std::string& vehID,
int direction);
101 static std::vector<std::pair<std::string, double> >
getNeighbors(
const std::string& vehID,
const int mode);
102 static double getFollowSpeed(
const std::string& vehID,
double speed,
double gap,
double leaderSpeed,
double leaderMaxDecel,
const std::string& leaderID =
"");
103 static double getSecureGap(
const std::string& vehID,
double speed,
double leaderSpeed,
double leaderMaxDecel,
const std::string& leaderID =
"");
104 static double getStopSpeed(
const std::string& vehID,
double speed,
double gap);
107 static double getTimeLoss(
const std::string& vehID);
108 static std::vector<std::string>
getTaxiFleet(
int taxiState = 0);
117 static void setStop(
const std::string& vehID,
118 const std::string& edgeID,
128 const std::string& edgeID,
138 const std::string& parkingAreaID);
140 static void resume(
const std::string& vehID);
142 static void add(
const std::string& vehID,
143 const std::string& routeID,
144 const std::string& typeID =
"DEFAULT_VEHTYPE",
145 const std::string& depart =
"now",
146 const std::string& departLane =
"first",
147 const std::string& departPos =
"base",
148 const std::string& departSpeed =
"0",
149 const std::string& arrivalLane =
"current",
150 const std::string& arrivalPos =
"max",
151 const std::string& arrivalSpeed =
"current",
152 const std::string& fromTaz =
"",
153 const std::string& toTaz =
"",
154 const std::string& line =
"",
155 int personCapacity = 4,
156 int personNumber = 0);
158 static void changeTarget(
const std::string& vehID,
const std::string& edgeID);
159 static void changeLane(
const std::string& vehID,
int laneIndex,
double duration);
160 static void changeLaneRelative(
const std::string& vehID,
int indexOffset,
double duration);
161 static void changeSublane(
const std::string& vehID,
double latDist);
163 static void slowDown(
const std::string& vehID,
double speed,
double duration);
164 static void openGap(
const std::string& vehID,
double newTimeHeadway,
double newSpaceHeadway,
double duration,
double changeRate,
double maxDecel = -1,
const std::string& referenceVehID =
"");
166 static void requestToC(
const std::string& vehID,
double leadTime);
167 static void setSpeed(
const std::string& vehID,
double speed);
169 static void setSpeedMode(
const std::string& vehID,
int speedMode);
171 static void setRoutingMode(
const std::string& vehID,
int routingMode);
172 static void setType(
const std::string& vehID,
const std::string& typeID);
173 static void setRouteID(
const std::string& vehID,
const std::string& routeID);
174 static void setRoute(
const std::string& vehID,
const std::string& edgeID);
175 static void setRoute(
const std::string& vehID,
const std::vector<std::string>& edgeIDs);
179 static void setEffort(
const std::string& vehID,
const std::string& edgeID,
181 static void rerouteTraveltime(
const std::string& vehID,
const bool currentTravelTimes =
true);
183 static void setSignals(
const std::string& vehID,
int signals);
185 static void moveToXY(
const std::string& vehID,
const std::string& edgeID,
const int laneIndex,
const double x,
const double y,
double angle =
libsumo::INVALID_DOUBLE_VALUE,
const int keepRoute = 1,
double matchThreshold = 100);
187 static void setLine(
const std::string& vehID,
const std::string& line);
188 static void setVia(
const std::string& vehID,
const std::vector<std::string>& via);
190 static void dispatchTaxi(
const std::string& vehID,
const std::vector<std::string>& reservations);
231 static std::shared_ptr<VariableWrapper>
makeWrapper();
239 static bool isOnInit(
const std::string& vehID);
#define LIBSUMO_ID_PARAMETER_API
#define LIBSUMO_SUBSCRIPTION_API
#define LIBSUMO_VEHICLE_TYPE_GETTER
#define LIBSUMO_VEHICLE_TYPE_SETTER
static void updateBestLanes(const std::string &vehID)
static std::string getRouteID(const std::string &vehID)
static double getEffort(const std::string &vehID, double time, const std::string &edgeID)
static std::vector< std::string > getVia(const std::string &vehID)
static SubscriptionResults mySubscriptionResults
Vehicle()=delete
invalidated standard constructor
static double getHCEmission(const std::string &vehID)
static int getStopState(const std::string &vehID)
static void moveTo(const std::string &vehID, const std::string &laneID, double position, int reason=libsumo::MOVE_AUTOMATIC)
static std::vector< libsumo::TraCIBestLanesData > getBestLanes(const std::string &vehID)
static double getAngle(const std::string &vehID)
static void addSubscriptionFilterVType(const std::vector< std::string > &vTypes)
static double getPMxEmission(const std::string &vehID)
static void addSubscriptionFilterVClass(const std::vector< std::string > &vClasses)
static void changeLaneRelative(const std::string &vehID, int indexOffset, double duration)
static void changeSublane(const std::string &vehID, double latDist)
static void addSubscriptionFilterTurn(double downstreamDist=libsumo::INVALID_DOUBLE_VALUE, double foeDistToJunction=libsumo::INVALID_DOUBLE_VALUE)
static void setStop(const std::string &vehID, const std::string &edgeID, double pos=1., int laneIndex=0, double duration=libsumo::INVALID_DOUBLE_VALUE, int flags=libsumo::STOP_DEFAULT, double startPos=libsumo::INVALID_DOUBLE_VALUE, double until=libsumo::INVALID_DOUBLE_VALUE)
LIBSUMO_VEHICLE_TYPE_SETTER static LIBSUMO_SUBSCRIPTION_API void subscribeLeader(const std::string &vehID, double dist=0., double begin=libsumo::INVALID_DOUBLE_VALUE, double end=libsumo::INVALID_DOUBLE_VALUE)
static std::vector< std::string > getPersonIDList(const std::string &vehID)
static std::pair< int, int > getLaneChangeState(const std::string &vehID, int direction)
static double getLateralSpeed(const std::string &vehID)
static double getDistance(const std::string &vehID)
static void rerouteParkingArea(const std::string &vehID, const std::string &parkingAreaID)
static void addSubscriptionFilterLateralDistance(double lateralDist, double downstreamDist=libsumo::INVALID_DOUBLE_VALUE, double upstreamDist=libsumo::INVALID_DOUBLE_VALUE)
static void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
static double getStopSpeed(const std::string &vehID, double speed, double gap)
static double getSlope(const std::string &vehID)
static int getRoutingMode(const std::string &vehID)
static void add(const std::string &vehID, const std::string &routeID, const std::string &typeID="DEFAULT_VEHTYPE", const std::string &depart="now", const std::string &departLane="first", const std::string &departPos="base", const std::string &departSpeed="0", const std::string &arrivalLane="current", const std::string &arrivalPos="max", const std::string &arrivalSpeed="current", const std::string &fromTaz="", const std::string &toTaz="", const std::string &line="", int personCapacity=4, int personNumber=0)
static double getNoiseEmission(const std::string &vehID)
static bool isOnInit(const std::string &vehID)
static void setEffort(const std::string &vehID, const std::string &edgeID, double effort=libsumo::INVALID_DOUBLE_VALUE, double begSeconds=0, double endSeconds=std::numeric_limits< double >::max())
static void setSpeed(const std::string &vehID, double speed)
static double getWaitingTime(const std::string &vehID)
static std::string getRoadID(const std::string &vehID)
static std::vector< std::pair< std::string, double > > getNeighbors(const std::string &vehID, const int mode)
static int getPersonNumber(const std::string &vehID)
static double getSecureGap(const std::string &vehID, double speed, double leaderSpeed, double leaderMaxDecel, const std::string &leaderID="")
static double getSpeedWithoutTraCI(const std::string &vehID)
static void setLaneChangeMode(const std::string &vehID, int laneChangeMode)
static std::string getTypeID(const std::string &vehID)
static double getDrivingDistance2D(const std::string &vehID, double x, double y)
static void addSubscriptionFilterNoOpposite()
static void setRoutingMode(const std::string &vehID, int routingMode)
static void addSubscriptionFilterLeadFollow(const std::vector< int > &lanes)
static void deactivateGapControl(const std::string &vehID)
static double getAccumulatedWaitingTime(const std::string &vehID)
static void setAdaptedTraveltime(const std::string &vehID, const std::string &edgeID, double time=libsumo::INVALID_DOUBLE_VALUE, double begSeconds=0, double endSeconds=std::numeric_limits< double >::max())
static double getFuelConsumption(const std::string &vehID)
static double getTimeLoss(const std::string &vehID)
static double getStopArrivalDelay(const std::string &vehID)
static bool isVisible(const SUMOVehicle *veh)
static void setSignals(const std::string &vehID, int signals)
static std::vector< libsumo::TraCINextStopData > getStops(const std::string &vehID, int limit=0)
static std::vector< libsumo::TraCINextStopData > getNextStops(const std::string &vehID)
static double getSpeed(const std::string &vehID)
static void openGap(const std::string &vehID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel=-1, const std::string &referenceVehID="")
static void setRoute(const std::string &vehID, const std::string &edgeID)
static double getCOEmission(const std::string &vehID)
static double getDrivingDistance(const std::string &vehID, const std::string &edgeID, double position, int laneIndex=0)
static void dispatchTaxi(const std::string &vehID, const std::vector< std::string > &reservations)
static void rerouteEffort(const std::string &vehID)
static void rerouteTraveltime(const std::string &vehID, const bool currentTravelTimes=true)
static double getCO2Emission(const std::string &vehID)
static std::vector< std::string > getRoute(const std::string &vehID)
static std::shared_ptr< VariableWrapper > makeWrapper()
static libsumo::TraCIPosition getPosition3D(const std::string &vehID)
static void addSubscriptionFilterLCManeuver(int direction=libsumo::INVALID_INT_VALUE, bool noOpposite=false, double downstreamDist=libsumo::INVALID_DOUBLE_VALUE, double upstreamDist=libsumo::INVALID_DOUBLE_VALUE)
static std::vector< libsumo::TraCINextTLSData > getNextTLS(const std::string &vehID)
static double getStopDelay(const std::string &vehID)
static std::vector< std::string > getTaxiFleet(int taxiState=0)
static void replaceStop(const std::string &vehID, int nextStopIndex, const std::string &edgeID, double pos=1., int laneIndex=0, double duration=libsumo::INVALID_DOUBLE_VALUE, int flags=libsumo::STOP_DEFAULT, double startPos=libsumo::INVALID_DOUBLE_VALUE, double until=libsumo::INVALID_DOUBLE_VALUE, int teleport=0)
static ContextSubscriptionResults myContextSubscriptionResults
static std::pair< std::string, double > getLeader(const std::string &vehID, double dist=0.)
static double getAcceleration(const std::string &vehID)
static double getLateralLanePosition(const std::string &vehID)
static void addSubscriptionFilterFieldOfVision(double openingAngle)
static void setLine(const std::string &vehID, const std::string &line)
static int getSignals(const std::string &vehID)
static void setPreviousSpeed(const std::string &vehID, double prevspeed)
static void setSpeedMode(const std::string &vehID, int speedMode)
static void requestToC(const std::string &vehID, double leadTime)
static double getFollowSpeed(const std::string &vehID, double speed, double gap, double leaderSpeed, double leaderMaxDecel, const std::string &leaderID="")
static void slowDown(const std::string &vehID, double speed, double duration)
static void remove(const std::string &vehID, char reason=libsumo::REMOVE_VAPORIZED)
static int getRouteIndex(const std::string &vehID)
static void addSubscriptionFilterDownstreamDistance(double dist)
static void addSubscriptionFilterUpstreamDistance(double dist)
static double getElectricityConsumption(const std::string &vehID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static double getLastActionTime(const std::string &vehID)
static std::string getLine(const std::string &vehID)
static void changeLane(const std::string &vehID, int laneIndex, double duration)
static int getSpeedMode(const std::string &vehID)
static double getAdaptedTraveltime(const std::string &vehID, double time, const std::string &edgeID)
static void setRouteID(const std::string &vehID, const std::string &routeID)
static double getAllowedSpeed(const std::string &vehID)
static void moveToXY(const std::string &vehID, const std::string &edgeID, const int laneIndex, const double x, const double y, double angle=libsumo::INVALID_DOUBLE_VALUE, const int keepRoute=1, double matchThreshold=100)
static std::string getLaneID(const std::string &vehID)
static bool isRouteValid(const std::string &vehID)
static void addSubscriptionFilterLanes(const std::vector< int > &lanes, bool noOpposite=false, double downstreamDist=libsumo::INVALID_DOUBLE_VALUE, double upstreamDist=libsumo::INVALID_DOUBLE_VALUE)
static void addSubscriptionFilterCFManeuver(double downstreamDist=libsumo::INVALID_DOUBLE_VALUE, double upstreamDist=libsumo::INVALID_DOUBLE_VALUE)
static void highlight(const std::string &vehID, const libsumo::TraCIColor &col=libsumo::TraCIColor(255, 0, 0, 255), double size=-1, const int alphaMax=-1, const double duration=-1, const int type=0)
static void setType(const std::string &vehID, const std::string &typeID)
static std::pair< std::string, double > getFollower(const std::string &vehID, double dist=0.)
static double getNOxEmission(const std::string &vehID)
static libsumo::TraCIPosition getPosition(const std::string &vehID, const bool includeZ=false)
static void changeTarget(const std::string &vehID, const std::string &edgeID)
static void setVia(const std::string &vehID, const std::vector< std::string > &via)
static void resume(const std::string &vehID)
static double getLanePosition(const std::string &vehID)
static int getLaneIndex(const std::string &vehID)
static int getLaneChangeMode(const std::string &vehID)
Representation of a vehicle.
TRACI_CONST double INVALID_DOUBLE_VALUE
TRACI_CONST int MOVE_AUTOMATIC
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
TRACI_CONST int STOP_DEFAULT
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
TRACI_CONST int INVALID_INT_VALUE
TRACI_CONST int REMOVE_VAPORIZED