Eclipse SUMO - Simulation of Urban MObility
Vehicle.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // C++ Vehicle API
16 /****************************************************************************/
17 #ifndef Vehicle_h
18 #define Vehicle_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <limits>
27 #include <vector>
28 #include <libsumo/TraCIDefs.h>
29 #include <libsumo/VehicleType.h>
30 #include <libsumo/TraCIConstants.h>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 namespace libsumo {
37 class VariableWrapper;
38 }
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
49 namespace libsumo {
50 class Vehicle {
51 public:
54  static std::vector<std::string> getIDList();
55  static int getIDCount();
56  static double getSpeed(const std::string& vehicleID);
57  static double getLateralSpeed(const std::string& vehicleID);
58  static double getAcceleration(const std::string& vehicleID);
59  static double getSpeedWithoutTraCI(const std::string& vehicleID);
60  static TraCIPosition getPosition(const std::string& vehicleID, const bool includeZ = false);
61  static TraCIPosition getPosition3D(const std::string& vehicleID);
62  static double getAngle(const std::string& vehicleID);
63  static double getSlope(const std::string& vehicleID);
64  static std::string getRoadID(const std::string& vehicleID);
65  static std::string getLaneID(const std::string& vehicleID);
66  static int getLaneIndex(const std::string& vehicleID);
67  static std::string getTypeID(const std::string& vehicleID);
68  static std::string getRouteID(const std::string& vehicleID);
69  static int getRouteIndex(const std::string& vehicleID);
70  static double getLanePosition(const std::string& vehicleID);
71  static double getLateralLanePosition(const std::string& vehicleID);
72  static double getCO2Emission(const std::string& vehicleID);
73  static double getCOEmission(const std::string& vehicleID);
74  static double getHCEmission(const std::string& vehicleID);
75  static double getPMxEmission(const std::string& vehicleID);
76  static double getNOxEmission(const std::string& vehicleID);
77  static double getFuelConsumption(const std::string& vehicleID);
78  static double getNoiseEmission(const std::string& vehicleID);
79  static double getElectricityConsumption(const std::string& vehicleID);
80  static int getPersonNumber(const std::string& vehicleID);
81  static std::vector<std::string> getPersonIDList(const std::string& vehicleID);
82  static std::pair<std::string, double> getLeader(const std::string& vehicleID, double dist = 0.);
83  static double getWaitingTime(const std::string& vehicleID);
84  static double getAccumulatedWaitingTime(const std::string& vehicleID);
85  static double getAdaptedTraveltime(const std::string& vehicleID, double time, const std::string& edgeID);
86  static double getEffort(const std::string& vehicleID, double time, const std::string& edgeID);
87  static bool isRouteValid(const std::string& vehicleID);
88  static std::vector<std::string> getRoute(const std::string& vehicleID);
89  static int getSignals(const std::string& vehicleID);
90  static std::vector<TraCIBestLanesData> getBestLanes(const std::string& vehicleID);
91  static std::vector<TraCINextTLSData> getNextTLS(const std::string& vehicleID);
92  static std::vector<TraCINextStopData> getNextStops(const std::string& vehicleID);
93  static int getStopState(const std::string& vehicleID);
94  static double getDistance(const std::string& vehicleID);
95  static double getDrivingDistance(const std::string& vehicleID, const std::string& edgeID, double position, int laneIndex = 0);
96  static double getDrivingDistance2D(const std::string& vehicleID, double x, double y);
97  static double getAllowedSpeed(const std::string& vehicleID);
98  static int getSpeedMode(const std::string& vehicleID);
99  static int getLaneChangeMode(const std::string& vehicleID);
100  static int getRoutingMode(const std::string& vehicleID);
101  static std::string getLine(const std::string& vehicleID);
102  static std::vector<std::string> getVia(const std::string& vehicleID);
103  static std::pair<int, int> getLaneChangeState(const std::string& vehicleID, int direction);
104  static double getLastActionTime(const std::string& vehicleID);
105  static std::string getParameter(const std::string& vehicleID, const std::string& key);
106  static std::vector<std::pair<std::string, double> > getNeighbors(const std::string& vehicleID, const int mode);
108 
110 
113 
114  static void setStop(const std::string& vehicleID,
115  const std::string& edgeID,
116  double pos = 1.,
117  int laneIndex = 0,
118  double duration = INVALID_DOUBLE_VALUE,
119  int flags = STOP_DEFAULT,
120  double startPos = INVALID_DOUBLE_VALUE,
121  double until = INVALID_DOUBLE_VALUE);
122 
123  static void rerouteParkingArea(const std::string& vehicleID,
124  const std::string& parkingAreaID);
125 
126  static void resume(const std::string& vehicleID);
127 
128  static void add(const std::string& vehicleID,
129  const std::string& routeID,
130  const std::string& typeID = "DEFAULT_VEHTYPE",
131  const std::string& depart = "now",
132  const std::string& departLane = "first",
133  const std::string& departPos = "base",
134  const std::string& departSpeed = "0",
135  const std::string& arrivalLane = "current",
136  const std::string& arrivalPos = "max",
137  const std::string& arrivalSpeed = "current",
138  const std::string& fromTaz = "",
139  const std::string& toTaz = "",
140  const std::string& line = "",
141  int personCapacity = 4,
142  int personNumber = 0);
143 
144  static void changeTarget(const std::string& vehicleID, const std::string& edgeID);
145  static void changeLane(const std::string& vehicleID, int laneIndex, double duration);
146  static void changeLaneRelative(const std::string& vehicleID, int indexOffset, double duration);
147  static void changeSublane(const std::string& vehicleID, double latDist);
148 
149  static void slowDown(const std::string& vehicleID, double speed, double duration);
150  static void openGap(const std::string& vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel = INVALID_DOUBLE_VALUE, const std::string& referenceVehID = "");
151  static void deactivateGapControl(const std::string& vehicleID);
152  static void requestToC(const std::string& vehID, double leadTime);
153  static void setSpeed(const std::string& vehicleID, double speed);
154  static void setSpeedMode(const std::string& vehicleID, int speedMode);
155  static void setLaneChangeMode(const std::string& vehicleID, int laneChangeMode);
156  static void setRoutingMode(const std::string& vehicleID, int routingMode);
157  static void setType(const std::string& vehicleID, const std::string& typeID);
158  static void setRouteID(const std::string& vehicleID, const std::string& routeID);
159  static void setRoute(const std::string& vehicleID, const std::vector<std::string>& edgeIDs);
160  static void updateBestLanes(const std::string& vehicleID);
161  static void setAdaptedTraveltime(const std::string& vehicleID, const std::string& edgeID,
162  double time = INVALID_DOUBLE_VALUE, double begSeconds = 0, double endSeconds = std::numeric_limits<double>::max());
163  static void setEffort(const std::string& vehicleID, const std::string& edgeID,
164  double effort = INVALID_DOUBLE_VALUE, double begSeconds = 0, double endSeconds = std::numeric_limits<double>::max());
165  static void rerouteTraveltime(const std::string& vehicleID, const bool currentTravelTimes = true);
166  static void rerouteEffort(const std::string& vehicleID);
167  static void setSignals(const std::string& vehicleID, int signals);
168  static void moveTo(const std::string& vehicleID, const std::string& laneID, double position);
169  static void moveToXY(const std::string& vehicleID, const std::string& edgeID, const int laneIndex, const double x, const double y, double angle = INVALID_DOUBLE_VALUE, const int keepRoute = 1);
170  static void remove(const std::string& vehicleID, char reason = REMOVE_VAPORIZED);
171  static void setLine(const std::string& vehicleID, const std::string& line);
172  static void setVia(const std::string& vehicleID, const std::vector<std::string>& via);
173  static void setParameter(const std::string& vehicleID, const std::string& key, const std::string& value);
174  static void highlight(const std::string& vehicleID, const TraCIColor& col, double size, const int alphaMax, const double duration, const int type);
176 
178 
180 
181  static void subscribeLeader(const std::string& vehicleID, double dist = 0., double beginTime = libsumo::INVALID_DOUBLE_VALUE, double endTime = libsumo::INVALID_DOUBLE_VALUE);
182 
187  static void storeShape(const std::string& id, PositionVector& shape);
188 
189  static std::shared_ptr<VariableWrapper> makeWrapper();
190 
191  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper);
192 
193 
194 private:
195  static bool isVisible(const SUMOVehicle* veh);
196 
197  static bool isOnInit(const std::string& vehicleID);
198 
199 private:
202 
204  Vehicle() = delete;
205 };
206 
207 
208 }
209 
210 
211 #endif
212 
213 /****************************************************************************/
libsumo::Vehicle::getLaneID
static std::string getLaneID(const std::string &vehicleID)
Definition: Vehicle.cpp:165
libsumo::Vehicle::highlight
static void highlight(const std::string &vehicleID, const TraCIColor &col, double size, const int alphaMax, const double duration, const int type)
Definition: Vehicle.cpp:1664
libsumo::Vehicle::setSpeed
static void setSpeed(const std::string &vehicleID, double speed)
Definition: Vehicle.cpp:1220
libsumo::Vehicle::myContextSubscriptionResults
static ContextSubscriptionResults myContextSubscriptionResults
Definition: Vehicle.h:201
libsumo::Vehicle::setStop
static void setStop(const std::string &vehicleID, const std::string &edgeID, double pos=1., int laneIndex=0, double duration=INVALID_DOUBLE_VALUE, int flags=STOP_DEFAULT, double startPos=INVALID_DOUBLE_VALUE, double until=INVALID_DOUBLE_VALUE)
Definition: Vehicle.cpp:814
libsumo::Vehicle::setLaneChangeMode
static void setLaneChangeMode(const std::string &vehicleID, int laneChangeMode)
Definition: Vehicle.cpp:1236
libsumo::Vehicle::getHCEmission
static double getHCEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:227
libsumo::Vehicle::mySubscriptionResults
static SubscriptionResults mySubscriptionResults
Definition: Vehicle.h:200
libsumo::Vehicle::getRouteID
static std::string getRouteID(const std::string &vehicleID)
Definition: Vehicle.cpp:185
libsumo::Vehicle::getPosition
static TraCIPosition getPosition(const std::string &vehicleID, const bool includeZ=false)
Definition: Vehicle.cpp:128
LIBSUMO_SUBSCRIPTION_API
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:41
libsumo::Vehicle::openGap
static void openGap(const std::string &vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel=INVALID_DOUBLE_VALUE, const std::string &referenceVehID="")
Definition: Vehicle.cpp:1189
libsumo::Vehicle::getEffort
static double getEffort(const std::string &vehicleID, double time, const std::string &edgeID)
Definition: Vehicle.cpp:313
libsumo::INVALID_DOUBLE_VALUE
TRACI_CONST double INVALID_DOUBLE_VALUE
Definition: TraCIConstants.h:362
libsumo::Vehicle::getFuelConsumption
static double getFuelConsumption(const std::string &vehicleID)
Definition: Vehicle.cpp:245
libsumo::Vehicle::getCO2Emission
static double getCO2Emission(const std::string &vehicleID)
Definition: Vehicle.cpp:215
libsumo::Vehicle::getLaneChangeState
static std::pair< int, int > getLaneChangeState(const std::string &vehicleID, int direction)
Definition: Vehicle.cpp:582
libsumo::Vehicle::getStopState
static int getStopState(const std::string &vehicleID)
Definition: Vehicle.cpp:472
libsumo::Vehicle::getSpeedMode
static int getSpeedMode(const std::string &vehicleID)
Definition: Vehicle.cpp:552
libsumo::Vehicle::isRouteValid
static bool isRouteValid(const std::string &vehicleID)
Definition: Vehicle.cpp:322
libsumo::Vehicle::getSlope
static double getSlope(const std::string &vehicleID)
Definition: Vehicle.cpp:151
libsumo::Vehicle::handleVariable
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition: Vehicle.cpp:1742
libsumo::TraCIPosition
A 3D-position.
Definition: TraCIDefs.h:109
libsumo::VariableWrapper
Definition: Subscription.h:132
libsumo::Vehicle::getLaneIndex
static int getLaneIndex(const std::string &vehicleID)
Definition: Vehicle.cpp:172
libsumo::Vehicle::getAccumulatedWaitingTime
static double getAccumulatedWaitingTime(const std::string &vehicleID)
Definition: Vehicle.cpp:298
libsumo::Vehicle::resume
static void resume(const std::string &vehicleID)
Definition: Vehicle.cpp:891
libsumo::Vehicle
Definition: Vehicle.h:50
libsumo::Vehicle::setRouteID
static void setRouteID(const std::string &vehicleID, const std::string &routeID)
Definition: Vehicle.cpp:1255
libsumo::Vehicle::makeWrapper
static std::shared_ptr< VariableWrapper > makeWrapper()
Definition: Vehicle.cpp:1736
libsumo::Vehicle::getSignals
static int getSignals(const std::string &vehicleID)
Definition: Vehicle.cpp:341
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:60
libsumo::ContextSubscriptionResults
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:204
libsumo::Vehicle::moveTo
static void moveTo(const std::string &vehicleID, const std::string &laneID, double position)
Definition: Vehicle.cpp:1381
VehicleType.h
libsumo::TraCIColor
A color.
Definition: TraCIDefs.h:135
libsumo::Vehicle::deactivateGapControl
static void deactivateGapControl(const std::string &vehicleID)
Definition: Vehicle.cpp:1207
PositionVector
A list of positions.
Definition: PositionVector.h:45
libsumo::Vehicle::getBestLanes
static std::vector< TraCIBestLanesData > getBestLanes(const std::string &vehicleID)
Definition: Vehicle.cpp:347
libsumo
Definition: Edge.cpp:29
libsumo::Vehicle::getLateralLanePosition
static double getLateralLanePosition(const std::string &vehicleID)
Definition: Vehicle.cpp:209
libsumo::Vehicle::getLastActionTime
static double getLastActionTime(const std::string &vehicleID)
Definition: Vehicle.cpp:742
libsumo::Vehicle::getDrivingDistance
static double getDrivingDistance(const std::string &vehicleID, const std::string &edgeID, double position, int laneIndex=0)
Definition: Vehicle.cpp:502
libsumo::Vehicle::changeSublane
static void changeSublane(const std::string &vehicleID, double latDist)
Definition: Vehicle.cpp:954
libsumo::Vehicle::setSignals
static void setSignals(const std::string &vehicleID, int signals)
Definition: Vehicle.cpp:1368
libsumo::Vehicle::getVia
static std::vector< std::string > getVia(const std::string &vehicleID)
Definition: Vehicle.cpp:576
libsumo::Vehicle::getPosition3D
static TraCIPosition getPosition3D(const std::string &vehicleID)
Definition: Vehicle.cpp:138
libsumo::Vehicle::getIDCount
static int getIDCount()
Definition: Vehicle.cpp:95
LIBSUMO_VEHICLE_TYPE_GETTER
#define LIBSUMO_VEHICLE_TYPE_GETTER
Definition: VehicleType.h:29
libsumo::Vehicle::rerouteParkingArea
static void rerouteParkingArea(const std::string &vehicleID, const std::string &parkingAreaID)
Definition: Vehicle.cpp:881
libsumo::Vehicle::setParameter
static void setParameter(const std::string &vehicleID, const std::string &key, const std::string &value)
Definition: Vehicle.cpp:1611
TraCIConstants.h
libsumo::Vehicle::getLateralSpeed
static double getLateralSpeed(const std::string &vehicleID)
Definition: Vehicle.cpp:107
libsumo::Vehicle::requestToC
static void requestToC(const std::string &vehID, double leadTime)
Definition: Vehicle.cpp:1215
libsumo::Vehicle::setRoute
static void setRoute(const std::string &vehicleID, const std::vector< std::string > &edgeIDs)
Definition: Vehicle.cpp:1275
libsumo::Vehicle::getCOEmission
static double getCOEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:221
libsumo::Vehicle::getIDList
static std::vector< std::string > getIDList()
Definition: Vehicle.cpp:83
libsumo::STOP_DEFAULT
TRACI_CONST int STOP_DEFAULT
Definition: TraCIConstants.h:411
libsumo::REMOVE_VAPORIZED
TRACI_CONST int REMOVE_VAPORIZED
Definition: TraCIConstants.h:388
libsumo::Vehicle::isOnInit
static bool isOnInit(const std::string &vehicleID)
Definition: Vehicle.cpp:76
libsumo::Vehicle::getRoutingMode
static int getRoutingMode(const std::string &vehicleID)
Definition: Vehicle.cpp:564
LIBSUMO_VEHICLE_TYPE_SETTER
#define LIBSUMO_VEHICLE_TYPE_SETTER
Definition: VehicleType.h:53
libsumo::Vehicle::getParameter
static std::string getParameter(const std::string &vehicleID, const std::string &key)
Definition: Vehicle.cpp:593
libsumo::Vehicle::updateBestLanes
static void updateBestLanes(const std::string &vehicleID)
Definition: Vehicle.cpp:1292
libsumo::Vehicle::getPersonIDList
static std::vector< std::string > getPersonIDList(const std::string &vehicleID)
Definition: Vehicle.cpp:273
libsumo::Vehicle::getAcceleration
static double getAcceleration(const std::string &vehicleID)
Definition: Vehicle.cpp:114
libsumo::Vehicle::getSpeed
static double getSpeed(const std::string &vehicleID)
Definition: Vehicle.cpp:101
libsumo::Vehicle::remove
static void remove(const std::string &vehicleID, char reason=REMOVE_VAPORIZED)
Definition: Vehicle.cpp:1435
libsumo::Vehicle::getTypeID
static std::string getTypeID(const std::string &vehicleID)
Definition: Vehicle.cpp:179
libsumo::Vehicle::changeLane
static void changeLane(const std::string &vehicleID, int laneIndex, double duration)
Definition: Vehicle.cpp:936
libsumo::Vehicle::slowDown
static void slowDown(const std::string &vehicleID, double speed, double duration)
Definition: Vehicle.cpp:1180
libsumo::Vehicle::getLine
static std::string getLine(const std::string &vehicleID)
Definition: Vehicle.cpp:570
libsumo::Vehicle::changeTarget
static void changeTarget(const std::string &vehicleID, const std::string &edgeID)
Definition: Vehicle.cpp:910
libsumo::Vehicle::getAllowedSpeed
static double getAllowedSpeed(const std::string &vehicleID)
Definition: Vehicle.cpp:535
libsumo::Vehicle::getNextStops
static std::vector< TraCINextStopData > getNextStops(const std::string &vehicleID)
Definition: Vehicle.cpp:432
libsumo::Vehicle::setLine
static void setLine(const std::string &vehicleID, const std::string &line)
Definition: Vehicle.cpp:1489
libsumo::Vehicle::getRouteIndex
static int getRouteIndex(const std::string &vehicleID)
Definition: Vehicle.cpp:191
libsumo::Vehicle::rerouteTraveltime
static void rerouteTraveltime(const std::string &vehicleID, const bool currentTravelTimes=true)
Definition: Vehicle.cpp:1351
libsumo::Vehicle::rerouteEffort
static void rerouteEffort(const std::string &vehicleID)
Definition: Vehicle.cpp:1360
libsumo::Vehicle::isVisible
static bool isVisible(const SUMOVehicle *veh)
Definition: Vehicle.cpp:70
libsumo::Vehicle::setSpeedMode
static void setSpeedMode(const std::string &vehicleID, int speedMode)
Definition: Vehicle.cpp:1231
libsumo::Vehicle::storeShape
static void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
Definition: Vehicle.cpp:1730
libsumo::Vehicle::getDrivingDistance2D
static double getDrivingDistance2D(const std::string &vehicleID, double x, double y)
Definition: Vehicle.cpp:518
libsumo::Vehicle::subscribeLeader
LIBSUMO_VEHICLE_TYPE_SETTER static LIBSUMO_SUBSCRIPTION_API void subscribeLeader(const std::string &vehicleID, double dist=0., double beginTime=libsumo::INVALID_DOUBLE_VALUE, double endTime=libsumo::INVALID_DOUBLE_VALUE)
Definition: Vehicle.cpp:1723
libsumo::Vehicle::getNoiseEmission
static double getNoiseEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:251
libsumo::Vehicle::setEffort
static void setEffort(const std::string &vehicleID, const std::string &edgeID, double effort=INVALID_DOUBLE_VALUE, double begSeconds=0, double endSeconds=std::numeric_limits< double >::max())
Definition: Vehicle.cpp:1325
libsumo::Vehicle::getAdaptedTraveltime
static double getAdaptedTraveltime(const std::string &vehicleID, double time, const std::string &edgeID)
Definition: Vehicle.cpp:304
libsumo::Vehicle::getSpeedWithoutTraCI
static double getSpeedWithoutTraCI(const std::string &vehicleID)
Definition: Vehicle.cpp:121
libsumo::Vehicle::setType
static void setType(const std::string &vehicleID, const std::string &typeID)
Definition: Vehicle.cpp:1246
libsumo::Vehicle::getAngle
static double getAngle(const std::string &vehicleID)
Definition: Vehicle.cpp:144
libsumo::Vehicle::getNOxEmission
static double getNOxEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:239
libsumo::Vehicle::getWaitingTime
static double getWaitingTime(const std::string &vehicleID)
Definition: Vehicle.cpp:292
libsumo::Vehicle::getPersonNumber
static int getPersonNumber(const std::string &vehicleID)
Definition: Vehicle.cpp:263
config.h
libsumo::Vehicle::getPMxEmission
static double getPMxEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:233
libsumo::Vehicle::getLaneChangeMode
static int getLaneChangeMode(const std::string &vehicleID)
Definition: Vehicle.cpp:558
libsumo::Vehicle::setAdaptedTraveltime
static void setAdaptedTraveltime(const std::string &vehicleID, const std::string &edgeID, double time=INVALID_DOUBLE_VALUE, double begSeconds=0, double endSeconds=std::numeric_limits< double >::max())
Definition: Vehicle.cpp:1299
libsumo::Vehicle::getLanePosition
static double getLanePosition(const std::string &vehicleID)
Definition: Vehicle.cpp:203
libsumo::Vehicle::getNeighbors
static std::vector< std::pair< std::string, double > > getNeighbors(const std::string &vehicleID, const int mode)
Definition: Vehicle.cpp:632
libsumo::Vehicle::Vehicle
Vehicle()=delete
invalidated standard constructor
libsumo::Vehicle::setRoutingMode
static void setRoutingMode(const std::string &vehicleID, int routingMode)
Definition: Vehicle.cpp:1241
TraCIDefs.h
libsumo::Vehicle::getLeader
static std::pair< std::string, double > getLeader(const std::string &vehicleID, double dist=0.)
Definition: Vehicle.cpp:278
libsumo::Vehicle::getRoute
static std::vector< std::string > getRoute(const std::string &vehicleID)
Definition: Vehicle.cpp:329
libsumo::Vehicle::setVia
static void setVia(const std::string &vehicleID, const std::vector< std::string > &via)
Definition: Vehicle.cpp:1495
libsumo::SubscriptionResults
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:203
libsumo::Vehicle::getNextTLS
static std::vector< TraCINextTLSData > getNextTLS(const std::string &vehicleID)
Definition: Vehicle.cpp:373
libsumo::Vehicle::getRoadID
static std::string getRoadID(const std::string &vehicleID)
Definition: Vehicle.cpp:158
libsumo::Vehicle::changeLaneRelative
static void changeLaneRelative(const std::string &vehicleID, int indexOffset, double duration)
Definition: Vehicle.cpp:944
libsumo::Vehicle::add
static void add(const std::string &vehicleID, 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)
Definition: Vehicle.cpp:960
libsumo::Vehicle::getDistance
static double getDistance(const std::string &vehicleID)
Definition: Vehicle.cpp:491
libsumo::Vehicle::moveToXY
static void moveToXY(const std::string &vehicleID, const std::string &edgeID, const int laneIndex, const double x, const double y, double angle=INVALID_DOUBLE_VALUE, const int keepRoute=1)
Definition: Vehicle.cpp:1068
libsumo::Vehicle::getElectricityConsumption
static double getElectricityConsumption(const std::string &vehicleID)
Definition: Vehicle.cpp:257