Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
Vehicle.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2012-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
19// C++ Vehicle API
20/****************************************************************************/
21#pragma once
22#include <limits>
23#include <vector>
24#include <libsumo/TraCIDefs.h>
25#include <libsumo/VehicleType.h>
27
28
29// ===========================================================================
30// class declarations
31// ===========================================================================
32#ifndef LIBTRACI
33class PositionVector;
34class SUMOVehicle;
35#endif
36
37
38// ===========================================================================
39// class definitions
40// ===========================================================================
45namespace LIBSUMO_NAMESPACE {
46class Vehicle {
47public:
50 static double getSpeed(const std::string& vehID);
51 static double getLateralSpeed(const std::string& vehID);
52 static double getAcceleration(const std::string& vehID);
53 static double getSpeedWithoutTraCI(const std::string& vehID);
54 static libsumo::TraCIPosition getPosition(const std::string& vehID, const bool includeZ = false);
55 static libsumo::TraCIPosition getPosition3D(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);
60 static int getLaneIndex(const std::string& vehID);
61 static std::string getSegmentID(const std::string& vehID);
62 static int getSegmentIndex(const std::string& vehID);
63 static std::string getTypeID(const std::string& vehID);
64 static std::string getRouteID(const std::string& vehID);
65 static double getDeparture(const std::string& vehID);
66 static double getDepartDelay(const std::string& vehID);
67 static int getRouteIndex(const std::string& vehID);
68 static double getLanePosition(const std::string& vehID);
69 static double getLateralLanePosition(const std::string& vehID);
70 static double getCO2Emission(const std::string& vehID);
71 static double getCOEmission(const std::string& vehID);
72 static double getHCEmission(const std::string& vehID);
73 static double getPMxEmission(const std::string& vehID);
74 static double getNOxEmission(const std::string& vehID);
75 static double getFuelConsumption(const std::string& vehID);
76 static double getNoiseEmission(const std::string& vehID);
77 static double getElectricityConsumption(const std::string& vehID);
78 static int getPersonNumber(const std::string& vehID);
79 static std::vector<std::string> getPersonIDList(const std::string& vehID);
80 static std::pair<std::string, double> getLeader(const std::string& vehID, double dist = 100.);
81 static std::pair<std::string, double> getFollower(const std::string& vehID, double dist = 0.);
82 static std::vector<libsumo::TraCIJunctionFoe> getJunctionFoes(const std::string& vehID, double dist = 0.);
83 static double getWaitingTime(const std::string& vehID);
84 static double getAccumulatedWaitingTime(const std::string& vehID);
85 static double getAdaptedTraveltime(const std::string& vehID, double time, const std::string& edgeID);
86 static double getEffort(const std::string& vehID, double time, const std::string& edgeID);
87 static bool isRouteValid(const std::string& vehID);
88 static std::vector<std::string> getRoute(const std::string& vehID);
89 static int getSignals(const std::string& vehID);
90 static std::vector<libsumo::TraCIBestLanesData> getBestLanes(const std::string& vehID);
91 static std::vector<libsumo::TraCINextTLSData> getNextTLS(const std::string& vehID);
92 static std::vector<libsumo::TraCINextStopData> getNextStops(const std::string& vehID);
93 static std::vector<libsumo::TraCIConnection> getNextLinks(const std::string& vehID);
94 static std::vector<libsumo::TraCINextStopData> getStops(const std::string& vehID, int limit = 0);
95 static int getStopState(const std::string& vehID);
96 static std::string getStopParameter(const std::string& vehID, int nextStopIndex, const std::string& param, bool customParam = false);
97
98 static double getDistance(const std::string& vehID);
99 static double getDrivingDistance(const std::string& vehID, const std::string& edgeID, double pos, int laneIndex = 0);
100 static double getDrivingDistance2D(const std::string& vehID, double x, double y);
101 static double getAllowedSpeed(const std::string& vehID);
102 static int getSpeedMode(const std::string& vehID);
103 static int getLaneChangeMode(const std::string& vehID);
104 static int getRoutingMode(const std::string& vehID);
105 static std::string getLine(const std::string& vehID);
106 static std::vector<std::string> getVia(const std::string& vehID);
107 static std::pair<int, int> getLaneChangeState(const std::string& vehID, int direction);
108 static double getLastActionTime(const std::string& vehID);
109 static std::vector<std::pair<std::string, double> > getNeighbors(const std::string& vehID, const int mode);
110 static double getFollowSpeed(const std::string& vehID, double speed, double gap, double leaderSpeed, double leaderMaxDecel, const std::string& leaderID = "");
111 static double getSecureGap(const std::string& vehID, double speed, double leaderSpeed, double leaderMaxDecel, const std::string& leaderID = "");
112 static double getStopSpeed(const std::string& vehID, double speed, double gap);
113 static double getStopDelay(const std::string& vehID);
114 static double getStopArrivalDelay(const std::string& vehID);
115 static double getTimeLoss(const std::string& vehID);
116 static std::vector<std::string> getTaxiFleet(int taxiState = 0);
117
118 static std::vector<std::string> getLoadedIDList();
119 static std::vector<std::string> getTeleportingIDList();
121
124
127
128 static void setStop(const std::string& vehID,
129 const std::string& edgeID,
130 double pos = 1.,
131 int laneIndex = 0,
132 double duration = libsumo::INVALID_DOUBLE_VALUE,
133 int flags = libsumo::STOP_DEFAULT,
134 double startPos = libsumo::INVALID_DOUBLE_VALUE,
135 double until = libsumo::INVALID_DOUBLE_VALUE);
136
137 static void replaceStop(const std::string& vehID,
138 int nextStopIndex,
139 const std::string& edgeID,
140 double pos = 1.,
141 int laneIndex = 0,
142 double duration = libsumo::INVALID_DOUBLE_VALUE,
143 int flags = libsumo::STOP_DEFAULT,
144 double startPos = libsumo::INVALID_DOUBLE_VALUE,
145 double until = libsumo::INVALID_DOUBLE_VALUE,
146 int teleport = 0);
147
148 static void insertStop(const std::string& vehID,
149 int nextStopIndex,
150 const std::string& edgeID,
151 double pos = 1.,
152 int laneIndex = 0,
153 double duration = libsumo::INVALID_DOUBLE_VALUE,
154 int flags = libsumo::STOP_DEFAULT,
155 double startPos = libsumo::INVALID_DOUBLE_VALUE,
156 double until = libsumo::INVALID_DOUBLE_VALUE,
157 int teleport = 0);
158
159 static void setStopParameter(const std::string& vehID, int nextStopIndex,
160 const std::string& param, const std::string& value,
161 bool customParam = false);
162
163 static void rerouteParkingArea(const std::string& vehID,
164 const std::string& parkingAreaID);
165
166 static void resume(const std::string& vehID);
167
168 static void add(const std::string& vehID,
169 const std::string& routeID,
170 const std::string& typeID = "DEFAULT_VEHTYPE",
171 const std::string& depart = "now",
172 const std::string& departLane = "first",
173 const std::string& departPos = "base",
174 const std::string& departSpeed = "0",
175 const std::string& arrivalLane = "current",
176 const std::string& arrivalPos = "max",
177 const std::string& arrivalSpeed = "current",
178 const std::string& fromTaz = "",
179 const std::string& toTaz = "",
180 const std::string& line = "",
181 int personCapacity = 4,
182 int personNumber = 0);
183
184 static void changeTarget(const std::string& vehID, const std::string& edgeID);
185 static void changeLane(const std::string& vehID, int laneIndex, double duration);
186 static void changeLaneRelative(const std::string& vehID, int indexOffset, double duration);
187 static void changeSublane(const std::string& vehID, double latDist);
188
189 static void slowDown(const std::string& vehID, double speed, double duration);
190 static void openGap(const std::string& vehID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel = -1, const std::string& referenceVehID = "");
191 static void deactivateGapControl(const std::string& vehID);
192 static void requestToC(const std::string& vehID, double leadTime);
193 static void setSpeed(const std::string& vehID, double speed);
194 static void setAcceleration(const std::string& vehID, double acceleration, double duration);
195 static void setPreviousSpeed(const std::string& vehID, double prevSpeed, double prevAcceleration = libsumo::INVALID_DOUBLE_VALUE);
196 static void setSpeedMode(const std::string& vehID, int speedMode);
197 static void setLaneChangeMode(const std::string& vehID, int laneChangeMode);
198 static void setRoutingMode(const std::string& vehID, int routingMode);
199 static void setType(const std::string& vehID, const std::string& typeID);
200 static void setRouteID(const std::string& vehID, const std::string& routeID);
201 static void setRoute(const std::string& vehID, const std::string& edgeID);
202 static void setRoute(const std::string& vehID, const std::vector<std::string>& edgeIDs);
203 static void setLateralLanePosition(const std::string& vehID, double posLat);
204 static void updateBestLanes(const std::string& vehID);
205 static void setAdaptedTraveltime(const std::string& vehID, const std::string& edgeID,
206 double time = libsumo::INVALID_DOUBLE_VALUE, double begSeconds = 0, double endSeconds = std::numeric_limits<double>::max());
207 static void setEffort(const std::string& vehID, const std::string& edgeID,
208 double effort = libsumo::INVALID_DOUBLE_VALUE, double begSeconds = 0, double endSeconds = std::numeric_limits<double>::max());
209 static void rerouteTraveltime(const std::string& vehID, const bool currentTravelTimes = true);
210 static void rerouteEffort(const std::string& vehID);
211 static void setSignals(const std::string& vehID, int signals);
212 static void moveTo(const std::string& vehID, const std::string& laneID, double pos, int reason = libsumo::MOVE_AUTOMATIC);
213 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);
214 static void remove(const std::string& vehID, char reason = libsumo::REMOVE_VAPORIZED);
215 static void setLine(const std::string& vehID, const std::string& line);
216 static void setVia(const std::string& vehID, const std::vector<std::string>& edgeList);
217 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);
218 static void dispatchTaxi(const std::string& vehID, const std::vector<std::string>& reservations);
220
222
224
225 static void subscribeLeader(const std::string& vehID, double dist = 0., double begin = libsumo::INVALID_DOUBLE_VALUE, double end = libsumo::INVALID_DOUBLE_VALUE);
226
227 static void addSubscriptionFilterLanes(const std::vector<int>& lanes, bool noOpposite = false, double downstreamDist = libsumo::INVALID_DOUBLE_VALUE, double upstreamDist = libsumo::INVALID_DOUBLE_VALUE);
228
230
231 static void addSubscriptionFilterDownstreamDistance(double dist);
232
233 static void addSubscriptionFilterUpstreamDistance(double dist);
234
235 static void addSubscriptionFilterCFManeuver(double downstreamDist = libsumo::INVALID_DOUBLE_VALUE, double upstreamDist = libsumo::INVALID_DOUBLE_VALUE);
236
237 static void addSubscriptionFilterLCManeuver(int direction = libsumo::INVALID_INT_VALUE, bool noOpposite = false, double downstreamDist = libsumo::INVALID_DOUBLE_VALUE, double upstreamDist = libsumo::INVALID_DOUBLE_VALUE);
238
239 static void addSubscriptionFilterLeadFollow(const std::vector<int>& lanes);
240
241 static void addSubscriptionFilterTurn(double downstreamDist = libsumo::INVALID_DOUBLE_VALUE, double foeDistToJunction = libsumo::INVALID_DOUBLE_VALUE);
242
243 static void addSubscriptionFilterVClass(const std::vector<std::string>& vClasses);
244
245 static void addSubscriptionFilterVType(const std::vector<std::string>& vTypes);
246
247 static void addSubscriptionFilterFieldOfVision(double openingAngle);
248
249 static void addSubscriptionFilterLateralDistance(double lateralDist, double downstreamDist = libsumo::INVALID_DOUBLE_VALUE, double upstreamDist = libsumo::INVALID_DOUBLE_VALUE);
250
251#ifndef LIBTRACI
252#ifndef SWIG
257 static void storeShape(const std::string& id, PositionVector& shape);
258
259 static std::shared_ptr<VariableWrapper> makeWrapper();
260
261 static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
262
263
264private:
265 static bool isVisible(const SUMOVehicle* veh);
266
267 static bool isOnInit(const std::string& vehID);
268
269private:
270 static SubscriptionResults mySubscriptionResults;
271 static ContextSubscriptionResults myContextSubscriptionResults;
272#endif
273#endif
274
276 Vehicle() = delete;
277};
278
279
280}
#define LIBSUMO_ID_PARAMETER_API
Definition TraCIDefs.h:116
#define LIBSUMO_SUBSCRIPTION_API
Definition TraCIDefs.h:62
#define LIBSUMO_VEHICLE_TYPE_GETTER
Definition VehicleType.h:27
#define LIBSUMO_VEHICLE_TYPE_SETTER
Definition VehicleType.h:56
static void updateBestLanes(const std::string &vehID)
static double getDrivingDistance(const std::string &vehID, const std::string &edgeID, double pos, int laneIndex=0)
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
Definition Vehicle.h:270
Vehicle()=delete
invalidated standard constructor
static double getHCEmission(const std::string &vehID)
static void setStopParameter(const std::string &vehID, int nextStopIndex, const std::string &param, const std::string &value, bool customParam=false)
static int getStopState(const std::string &vehID)
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)
static std::vector< libsumo::TraCIConnection > getNextLinks(const std::string &vehID)
static double getDepartDelay(const std::string &vehID)
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 std::pair< std::string, double > getLeader(const std::string &vehID, double dist=100.)
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 void setVia(const std::string &vehID, const std::vector< std::string > &edgeList)
static double getSecureGap(const std::string &vehID, double speed, double leaderSpeed, double leaderMaxDecel, const std::string &leaderID="")
static double getDeparture(const std::string &vehID)
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 setAcceleration(const std::string &vehID, double acceleration, double duration)
static void addSubscriptionFilterLeadFollow(const std::vector< int > &lanes)
static void deactivateGapControl(const std::string &vehID)
static double getAccumulatedWaitingTime(const std::string &vehID)
static std::string getStopParameter(const std::string &vehID, int nextStopIndex, const std::string &param, bool customParam=false)
static void moveTo(const std::string &vehID, const std::string &laneID, double pos, int reason=libsumo::MOVE_AUTOMATIC)
static std::vector< std::string > getTeleportingIDList()
static void insertStop(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 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 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 void setPreviousSpeed(const std::string &vehID, double prevSpeed, double prevAcceleration=libsumo::INVALID_DOUBLE_VALUE)
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
Definition Vehicle.h:271
static double getAcceleration(const std::string &vehID)
static std::string getSegmentID(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 std::vector< std::string > getLoadedIDList()
static int getSignals(const std::string &vehID)
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 void setLateralLanePosition(const std::string &vehID, double posLat)
static bool isRouteValid(const std::string &vehID)
static std::vector< libsumo::TraCIJunctionFoe > getJunctionFoes(const std::string &vehID, double dist=0.)
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 int getSegmentIndex(const std::string &vehID)
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 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)
A list of positions.
Representation of a vehicle.
Definition SUMOVehicle.h:62
TRACI_CONST double INVALID_DOUBLE_VALUE
TRACI_CONST int MOVE_AUTOMATIC
TRACI_CONST int STOP_DEFAULT
TRACI_CONST int INVALID_INT_VALUE
TRACI_CONST int REMOVE_VAPORIZED
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.
Definition TraCIDefs.h:178