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 /****************************************************************************/
16 // C++ Vehicle API
17 /****************************************************************************/
18 #ifndef Vehicle_h
19 #define Vehicle_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <limits>
28 #include <vector>
29 #include <libsumo/TraCIDefs.h>
30 #include <libsumo/VehicleType.h>
31 #include <libsumo/TraCIConstants.h>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 namespace libsumo {
38 class VariableWrapper;
39 }
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
50 namespace libsumo {
51 class Vehicle {
52 public:
55  static std::vector<std::string> getIDList();
56  static int getIDCount();
57  static double getSpeed(const std::string& vehicleID);
58  static double getLateralSpeed(const std::string& vehicleID);
59  static double getAcceleration(const std::string& vehicleID);
60  static double getSpeedWithoutTraCI(const std::string& vehicleID);
61  static TraCIPosition getPosition(const std::string& vehicleID, const bool includeZ = false);
62  static TraCIPosition getPosition3D(const std::string& vehicleID);
63  static double getAngle(const std::string& vehicleID);
64  static double getSlope(const std::string& vehicleID);
65  static std::string getRoadID(const std::string& vehicleID);
66  static std::string getLaneID(const std::string& vehicleID);
67  static int getLaneIndex(const std::string& vehicleID);
68  static std::string getTypeID(const std::string& vehicleID);
69  static std::string getRouteID(const std::string& vehicleID);
70  static int getRouteIndex(const std::string& vehicleID);
71  static double getLanePosition(const std::string& vehicleID);
72  static double getLateralLanePosition(const std::string& vehicleID);
73  static double getCO2Emission(const std::string& vehicleID);
74  static double getCOEmission(const std::string& vehicleID);
75  static double getHCEmission(const std::string& vehicleID);
76  static double getPMxEmission(const std::string& vehicleID);
77  static double getNOxEmission(const std::string& vehicleID);
78  static double getFuelConsumption(const std::string& vehicleID);
79  static double getNoiseEmission(const std::string& vehicleID);
80  static double getElectricityConsumption(const std::string& vehicleID);
81  static int getPersonNumber(const std::string& vehicleID);
82  static std::vector<std::string> getPersonIDList(const std::string& vehicleID);
83  static std::pair<std::string, double> getLeader(const std::string& vehicleID, double dist = 0.);
84  static double getWaitingTime(const std::string& vehicleID);
85  static double getAccumulatedWaitingTime(const std::string& vehicleID);
86  static double getAdaptedTraveltime(const std::string& vehicleID, double time, const std::string& edgeID);
87  static double getEffort(const std::string& vehicleID, double time, const std::string& edgeID);
88  static bool isRouteValid(const std::string& vehicleID);
89  static std::vector<std::string> getRoute(const std::string& vehicleID);
90  static int getSignals(const std::string& vehicleID);
91  static std::vector<TraCIBestLanesData> getBestLanes(const std::string& vehicleID);
92  static std::vector<TraCINextTLSData> getNextTLS(const std::string& vehicleID);
93  static std::vector<TraCINextStopData> getNextStops(const std::string& vehicleID);
94  static int getStopState(const std::string& vehicleID);
95  static double getDistance(const std::string& vehicleID);
96  static double getDrivingDistance(const std::string& vehicleID, const std::string& edgeID, double position, int laneIndex = 0);
97  static double getDrivingDistance2D(const std::string& vehicleID, double x, double y);
98  static double getAllowedSpeed(const std::string& vehicleID);
99  static int getSpeedMode(const std::string& vehicleID);
100  static int getLaneChangeMode(const std::string& vehicleID);
101  static int getRoutingMode(const std::string& vehicleID);
102  static std::string getLine(const std::string& vehicleID);
103  static std::vector<std::string> getVia(const std::string& vehicleID);
104  static std::pair<int, int> getLaneChangeState(const std::string& vehicleID, int direction);
105  static double getLastActionTime(const std::string& vehicleID);
106  static std::string getParameter(const std::string& vehicleID, const std::string& key);
107  static std::vector<std::pair<std::string, double> > getNeighbors(const std::string& vehicleID, const int mode);
109 
111 
114 
115  static void setStop(const std::string& vehicleID,
116  const std::string& edgeID,
117  double pos = 1.,
118  int laneIndex = 0,
119  double duration = INVALID_DOUBLE_VALUE,
120  int flags = STOP_DEFAULT,
121  double startPos = INVALID_DOUBLE_VALUE,
122  double until = INVALID_DOUBLE_VALUE);
123 
124  static void rerouteParkingArea(const std::string& vehicleID,
125  const std::string& parkingAreaID);
126 
127  static void resume(const std::string& vehicleID);
128 
129  static void add(const std::string& vehicleID,
130  const std::string& routeID,
131  const std::string& typeID = "DEFAULT_VEHTYPE",
132  const std::string& depart = "now",
133  const std::string& departLane = "first",
134  const std::string& departPos = "base",
135  const std::string& departSpeed = "0",
136  const std::string& arrivalLane = "current",
137  const std::string& arrivalPos = "max",
138  const std::string& arrivalSpeed = "current",
139  const std::string& fromTaz = "",
140  const std::string& toTaz = "",
141  const std::string& line = "",
142  int personCapacity = 4,
143  int personNumber = 0);
144 
145  static void changeTarget(const std::string& vehicleID, const std::string& edgeID);
146  static void changeLane(const std::string& vehicleID, int laneIndex, double duration);
147  static void changeLaneRelative(const std::string& vehicleID, int indexOffset, double duration);
148  static void changeSublane(const std::string& vehicleID, double latDist);
149 
150  static void slowDown(const std::string& vehicleID, double speed, double duration);
151  static void openGap(const std::string& vehicleID, double newTimeHeadway, double newSpaceHeadway, double duration, double changeRate, double maxDecel = INVALID_DOUBLE_VALUE, const std::string& referenceVehID = "");
152  static void deactivateGapControl(const std::string& vehicleID);
153  static void requestToC(const std::string& vehID, double leadTime);
154  static void setSpeed(const std::string& vehicleID, double speed);
155  static void setSpeedMode(const std::string& vehicleID, int speedMode);
156  static void setLaneChangeMode(const std::string& vehicleID, int laneChangeMode);
157  static void setRoutingMode(const std::string& vehicleID, int routingMode);
158  static void setType(const std::string& vehicleID, const std::string& typeID);
159  static void setRouteID(const std::string& vehicleID, const std::string& routeID);
160  static void setRoute(const std::string& vehicleID, const std::vector<std::string>& edgeIDs);
161  static void updateBestLanes(const std::string& vehicleID);
162  static void setAdaptedTraveltime(const std::string& vehicleID, const std::string& edgeID,
163  double time = INVALID_DOUBLE_VALUE, double begSeconds = 0, double endSeconds = std::numeric_limits<double>::max());
164  static void setEffort(const std::string& vehicleID, const std::string& edgeID,
165  double effort = INVALID_DOUBLE_VALUE, double begSeconds = 0, double endSeconds = std::numeric_limits<double>::max());
166  static void rerouteTraveltime(const std::string& vehicleID, const bool currentTravelTimes = true);
167  static void rerouteEffort(const std::string& vehicleID);
168  static void setSignals(const std::string& vehicleID, int signals);
169  static void moveTo(const std::string& vehicleID, const std::string& laneID, double position);
170  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);
171  static void remove(const std::string& vehicleID, char reason = REMOVE_VAPORIZED);
172  static void setLine(const std::string& vehicleID, const std::string& line);
173  static void setVia(const std::string& vehicleID, const std::vector<std::string>& via);
174  static void setParameter(const std::string& vehicleID, const std::string& key, const std::string& value);
175  static void highlight(const std::string& vehicleID, const TraCIColor& col, double size, const int alphaMax, const double duration, const int type);
177 
179 
181 
182  static void subscribeLeader(const std::string& vehicleID, double dist = 0., double beginTime = libsumo::INVALID_DOUBLE_VALUE, double endTime = libsumo::INVALID_DOUBLE_VALUE);
183 
188  static void storeShape(const std::string& id, PositionVector& shape);
189 
190  static std::shared_ptr<VariableWrapper> makeWrapper();
191 
192  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper);
193 
194 
195 private:
196  static bool isVisible(const SUMOVehicle* veh);
197 
198  static bool isOnInit(const std::string& vehicleID);
199 
200 private:
203 
205  Vehicle() = delete;
206 };
207 
208 
209 }
210 
211 
212 #endif
213 
214 /****************************************************************************/
libsumo::Vehicle::getLaneID
static std::string getLaneID(const std::string &vehicleID)
Definition: Vehicle.cpp:166
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:1681
libsumo::Vehicle::setSpeed
static void setSpeed(const std::string &vehicleID, double speed)
Definition: Vehicle.cpp:1237
libsumo::Vehicle::myContextSubscriptionResults
static ContextSubscriptionResults myContextSubscriptionResults
Definition: Vehicle.h:202
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:831
libsumo::Vehicle::setLaneChangeMode
static void setLaneChangeMode(const std::string &vehicleID, int laneChangeMode)
Definition: Vehicle.cpp:1253
libsumo::Vehicle::getHCEmission
static double getHCEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:228
libsumo::Vehicle::mySubscriptionResults
static SubscriptionResults mySubscriptionResults
Definition: Vehicle.h:201
libsumo::Vehicle::getRouteID
static std::string getRouteID(const std::string &vehicleID)
Definition: Vehicle.cpp:186
libsumo::Vehicle::getPosition
static TraCIPosition getPosition(const std::string &vehicleID, const bool includeZ=false)
Definition: Vehicle.cpp:129
LIBSUMO_SUBSCRIPTION_API
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:42
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:1206
libsumo::Vehicle::getEffort
static double getEffort(const std::string &vehicleID, double time, const std::string &edgeID)
Definition: Vehicle.cpp:314
libsumo::INVALID_DOUBLE_VALUE
TRACI_CONST double INVALID_DOUBLE_VALUE
Definition: TraCIConstants.h:363
libsumo::Vehicle::getFuelConsumption
static double getFuelConsumption(const std::string &vehicleID)
Definition: Vehicle.cpp:246
libsumo::Vehicle::getCO2Emission
static double getCO2Emission(const std::string &vehicleID)
Definition: Vehicle.cpp:216
libsumo::Vehicle::getLaneChangeState
static std::pair< int, int > getLaneChangeState(const std::string &vehicleID, int direction)
Definition: Vehicle.cpp:599
libsumo::Vehicle::getStopState
static int getStopState(const std::string &vehicleID)
Definition: Vehicle.cpp:473
libsumo::Vehicle::getSpeedMode
static int getSpeedMode(const std::string &vehicleID)
Definition: Vehicle.cpp:569
libsumo::Vehicle::isRouteValid
static bool isRouteValid(const std::string &vehicleID)
Definition: Vehicle.cpp:323
libsumo::Vehicle::getSlope
static double getSlope(const std::string &vehicleID)
Definition: Vehicle.cpp:152
libsumo::Vehicle::handleVariable
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition: Vehicle.cpp:1759
libsumo::TraCIPosition
A 3D-position.
Definition: TraCIDefs.h:110
libsumo::VariableWrapper
Definition: Subscription.h:114
libsumo::Vehicle::getLaneIndex
static int getLaneIndex(const std::string &vehicleID)
Definition: Vehicle.cpp:173
libsumo::Vehicle::getAccumulatedWaitingTime
static double getAccumulatedWaitingTime(const std::string &vehicleID)
Definition: Vehicle.cpp:299
libsumo::Vehicle::resume
static void resume(const std::string &vehicleID)
Definition: Vehicle.cpp:908
libsumo::Vehicle
Definition: Vehicle.h:51
libsumo::Vehicle::setRouteID
static void setRouteID(const std::string &vehicleID, const std::string &routeID)
Definition: Vehicle.cpp:1272
libsumo::Vehicle::makeWrapper
static std::shared_ptr< VariableWrapper > makeWrapper()
Definition: Vehicle.cpp:1753
libsumo::Vehicle::getSignals
static int getSignals(const std::string &vehicleID)
Definition: Vehicle.cpp:342
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:61
libsumo::ContextSubscriptionResults
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:205
libsumo::Vehicle::moveTo
static void moveTo(const std::string &vehicleID, const std::string &laneID, double position)
Definition: Vehicle.cpp:1398
VehicleType.h
libsumo::TraCIColor
A color.
Definition: TraCIDefs.h:136
libsumo::Vehicle::deactivateGapControl
static void deactivateGapControl(const std::string &vehicleID)
Definition: Vehicle.cpp:1224
PositionVector
A list of positions.
Definition: PositionVector.h:46
libsumo::Vehicle::getBestLanes
static std::vector< TraCIBestLanesData > getBestLanes(const std::string &vehicleID)
Definition: Vehicle.cpp:348
libsumo
Definition: Edge.cpp:30
libsumo::Vehicle::getLateralLanePosition
static double getLateralLanePosition(const std::string &vehicleID)
Definition: Vehicle.cpp:210
libsumo::Vehicle::getLastActionTime
static double getLastActionTime(const std::string &vehicleID)
Definition: Vehicle.cpp:759
libsumo::Vehicle::getDrivingDistance
static double getDrivingDistance(const std::string &vehicleID, const std::string &edgeID, double position, int laneIndex=0)
Definition: Vehicle.cpp:519
libsumo::Vehicle::changeSublane
static void changeSublane(const std::string &vehicleID, double latDist)
Definition: Vehicle.cpp:971
libsumo::Vehicle::setSignals
static void setSignals(const std::string &vehicleID, int signals)
Definition: Vehicle.cpp:1385
libsumo::Vehicle::getVia
static std::vector< std::string > getVia(const std::string &vehicleID)
Definition: Vehicle.cpp:593
libsumo::Vehicle::getPosition3D
static TraCIPosition getPosition3D(const std::string &vehicleID)
Definition: Vehicle.cpp:139
libsumo::Vehicle::getIDCount
static int getIDCount()
Definition: Vehicle.cpp:96
LIBSUMO_VEHICLE_TYPE_GETTER
#define LIBSUMO_VEHICLE_TYPE_GETTER
Definition: VehicleType.h:30
libsumo::Vehicle::rerouteParkingArea
static void rerouteParkingArea(const std::string &vehicleID, const std::string &parkingAreaID)
Definition: Vehicle.cpp:898
libsumo::Vehicle::setParameter
static void setParameter(const std::string &vehicleID, const std::string &key, const std::string &value)
Definition: Vehicle.cpp:1628
TraCIConstants.h
libsumo::Vehicle::getLateralSpeed
static double getLateralSpeed(const std::string &vehicleID)
Definition: Vehicle.cpp:108
libsumo::Vehicle::requestToC
static void requestToC(const std::string &vehID, double leadTime)
Definition: Vehicle.cpp:1232
libsumo::Vehicle::setRoute
static void setRoute(const std::string &vehicleID, const std::vector< std::string > &edgeIDs)
Definition: Vehicle.cpp:1292
libsumo::Vehicle::getCOEmission
static double getCOEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:222
libsumo::Vehicle::getIDList
static std::vector< std::string > getIDList()
Definition: Vehicle.cpp:84
libsumo::STOP_DEFAULT
TRACI_CONST int STOP_DEFAULT
Definition: TraCIConstants.h:412
libsumo::REMOVE_VAPORIZED
TRACI_CONST int REMOVE_VAPORIZED
Definition: TraCIConstants.h:389
libsumo::Vehicle::isOnInit
static bool isOnInit(const std::string &vehicleID)
Definition: Vehicle.cpp:77
libsumo::Vehicle::getRoutingMode
static int getRoutingMode(const std::string &vehicleID)
Definition: Vehicle.cpp:581
LIBSUMO_VEHICLE_TYPE_SETTER
#define LIBSUMO_VEHICLE_TYPE_SETTER
Definition: VehicleType.h:54
libsumo::Vehicle::getParameter
static std::string getParameter(const std::string &vehicleID, const std::string &key)
Definition: Vehicle.cpp:610
libsumo::Vehicle::updateBestLanes
static void updateBestLanes(const std::string &vehicleID)
Definition: Vehicle.cpp:1309
libsumo::Vehicle::getPersonIDList
static std::vector< std::string > getPersonIDList(const std::string &vehicleID)
Definition: Vehicle.cpp:274
libsumo::Vehicle::getAcceleration
static double getAcceleration(const std::string &vehicleID)
Definition: Vehicle.cpp:115
libsumo::Vehicle::getSpeed
static double getSpeed(const std::string &vehicleID)
Definition: Vehicle.cpp:102
libsumo::Vehicle::remove
static void remove(const std::string &vehicleID, char reason=REMOVE_VAPORIZED)
Definition: Vehicle.cpp:1452
libsumo::Vehicle::getTypeID
static std::string getTypeID(const std::string &vehicleID)
Definition: Vehicle.cpp:180
libsumo::Vehicle::changeLane
static void changeLane(const std::string &vehicleID, int laneIndex, double duration)
Definition: Vehicle.cpp:953
libsumo::Vehicle::slowDown
static void slowDown(const std::string &vehicleID, double speed, double duration)
Definition: Vehicle.cpp:1197
libsumo::Vehicle::getLine
static std::string getLine(const std::string &vehicleID)
Definition: Vehicle.cpp:587
libsumo::Vehicle::changeTarget
static void changeTarget(const std::string &vehicleID, const std::string &edgeID)
Definition: Vehicle.cpp:927
libsumo::Vehicle::getAllowedSpeed
static double getAllowedSpeed(const std::string &vehicleID)
Definition: Vehicle.cpp:552
libsumo::Vehicle::getNextStops
static std::vector< TraCINextStopData > getNextStops(const std::string &vehicleID)
Definition: Vehicle.cpp:433
libsumo::Vehicle::setLine
static void setLine(const std::string &vehicleID, const std::string &line)
Definition: Vehicle.cpp:1506
libsumo::Vehicle::getRouteIndex
static int getRouteIndex(const std::string &vehicleID)
Definition: Vehicle.cpp:192
libsumo::Vehicle::rerouteTraveltime
static void rerouteTraveltime(const std::string &vehicleID, const bool currentTravelTimes=true)
Definition: Vehicle.cpp:1368
libsumo::Vehicle::rerouteEffort
static void rerouteEffort(const std::string &vehicleID)
Definition: Vehicle.cpp:1377
libsumo::Vehicle::isVisible
static bool isVisible(const SUMOVehicle *veh)
Definition: Vehicle.cpp:71
libsumo::Vehicle::setSpeedMode
static void setSpeedMode(const std::string &vehicleID, int speedMode)
Definition: Vehicle.cpp:1248
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:1747
libsumo::Vehicle::getDrivingDistance2D
static double getDrivingDistance2D(const std::string &vehicleID, double x, double y)
Definition: Vehicle.cpp:535
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:1740
libsumo::Vehicle::getNoiseEmission
static double getNoiseEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:252
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:1342
libsumo::Vehicle::getAdaptedTraveltime
static double getAdaptedTraveltime(const std::string &vehicleID, double time, const std::string &edgeID)
Definition: Vehicle.cpp:305
libsumo::Vehicle::getSpeedWithoutTraCI
static double getSpeedWithoutTraCI(const std::string &vehicleID)
Definition: Vehicle.cpp:122
libsumo::Vehicle::setType
static void setType(const std::string &vehicleID, const std::string &typeID)
Definition: Vehicle.cpp:1263
libsumo::Vehicle::getAngle
static double getAngle(const std::string &vehicleID)
Definition: Vehicle.cpp:145
libsumo::Vehicle::getNOxEmission
static double getNOxEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:240
libsumo::Vehicle::getWaitingTime
static double getWaitingTime(const std::string &vehicleID)
Definition: Vehicle.cpp:293
libsumo::Vehicle::getPersonNumber
static int getPersonNumber(const std::string &vehicleID)
Definition: Vehicle.cpp:264
config.h
libsumo::Vehicle::getPMxEmission
static double getPMxEmission(const std::string &vehicleID)
Definition: Vehicle.cpp:234
libsumo::Vehicle::getLaneChangeMode
static int getLaneChangeMode(const std::string &vehicleID)
Definition: Vehicle.cpp:575
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:1316
libsumo::Vehicle::getLanePosition
static double getLanePosition(const std::string &vehicleID)
Definition: Vehicle.cpp:204
libsumo::Vehicle::getNeighbors
static std::vector< std::pair< std::string, double > > getNeighbors(const std::string &vehicleID, const int mode)
Definition: Vehicle.cpp:649
libsumo::Vehicle::Vehicle
Vehicle()=delete
invalidated standard constructor
libsumo::Vehicle::setRoutingMode
static void setRoutingMode(const std::string &vehicleID, int routingMode)
Definition: Vehicle.cpp:1258
TraCIDefs.h
libsumo::Vehicle::getLeader
static std::pair< std::string, double > getLeader(const std::string &vehicleID, double dist=0.)
Definition: Vehicle.cpp:279
libsumo::Vehicle::getRoute
static std::vector< std::string > getRoute(const std::string &vehicleID)
Definition: Vehicle.cpp:330
libsumo::Vehicle::setVia
static void setVia(const std::string &vehicleID, const std::vector< std::string > &via)
Definition: Vehicle.cpp:1512
libsumo::SubscriptionResults
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:204
libsumo::Vehicle::getNextTLS
static std::vector< TraCINextTLSData > getNextTLS(const std::string &vehicleID)
Definition: Vehicle.cpp:374
libsumo::Vehicle::getRoadID
static std::string getRoadID(const std::string &vehicleID)
Definition: Vehicle.cpp:159
libsumo::Vehicle::changeLaneRelative
static void changeLaneRelative(const std::string &vehicleID, int indexOffset, double duration)
Definition: Vehicle.cpp:961
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:977
libsumo::Vehicle::getDistance
static double getDistance(const std::string &vehicleID)
Definition: Vehicle.cpp:492
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:1085
libsumo::Vehicle::getElectricityConsumption
static double getElectricityConsumption(const std::string &vehicleID)
Definition: Vehicle.cpp:258