Eclipse SUMO - Simulation of Urban MObility
Edge.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2017-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 /****************************************************************************/
14 // C++ TraCI client API implementation
15 /****************************************************************************/
16 
17 #include <iterator>
18 #include <microsim/MSEdge.h>
19 #include <microsim/MSLane.h>
22 #include <microsim/MSVehicle.h>
23 #include <libsumo/TraCIDefs.h>
24 #include <libsumo/TraCIConstants.h>
26 #include "Edge.h"
27 
28 
29 namespace libsumo {
30 // ===========================================================================
31 // static member initializations
32 // ===========================================================================
35 
36 
37 // ===========================================================================
38 // static member definitions
39 // ===========================================================================
40 std::vector<std::string>
42  std::vector<std::string> ids;
43  MSEdge::insertIDs(ids);
44  return ids;
45 }
46 
47 
48 int
50  return (int)getIDList().size();
51 }
52 
53 
54 double
55 Edge::getAdaptedTraveltime(const std::string& id, double time) {
56  const MSEdge* e = getEdge(id);
57  double value;
58  if (!MSNet::getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, time, value)) {
59  return -1.;
60  }
61  return value;
62 }
63 
64 
65 double
66 Edge::getEffort(const std::string& id, double time) {
67  const MSEdge* e = getEdge(id);
68  double value;
69  if (!MSNet::getInstance()->getWeightsStorage().retrieveExistingEffort(e, time, value)) {
70  return -1.;
71  }
72  return value;
73 }
74 
75 
76 double
77 Edge::getTraveltime(const std::string& id) {
78  return getEdge(id)->getCurrentTravelTime();
79 }
80 
81 
82 MSEdge*
83 Edge::getEdge(const std::string& id) {
84  MSEdge* e = MSEdge::dictionary(id);
85  if (e == nullptr) {
86  throw TraCIException("Edge '" + id + "' is not known");
87  }
88  return e;
89 }
90 
91 
92 double
93 Edge::getWaitingTime(const std::string& id) {
94  double wtime = 0;
95  for (MSLane* lane : getEdge(id)->getLanes()) {
96  wtime += lane->getWaitingSeconds();
97  }
98  return wtime;
99 }
100 
101 
102 const std::vector<std::string>
103 Edge::getLastStepPersonIDs(const std::string& id) {
104  std::vector<std::string> personIDs;
105  std::vector<MSTransportable*> persons = getEdge(id)->getSortedPersons(MSNet::getInstance()->getCurrentTimeStep(), true);
106  personIDs.reserve(persons.size());
107  for (MSTransportable* p : persons) {
108  personIDs.push_back(p->getID());
109  }
110  return personIDs;
111 }
112 
113 
114 const std::vector<std::string>
115 Edge::getLastStepVehicleIDs(const std::string& id) {
116  std::vector<std::string> vehIDs;
117  for (MSLane* lane : getEdge(id)->getLanes()) {
118  const MSLane::VehCont& vehs = lane->getVehiclesSecure();
119  for (auto veh : vehs) {
120  vehIDs.push_back(veh->getID());
121  }
122  lane->releaseVehicles();
123  }
124  return vehIDs;
125 }
126 
127 
128 double
129 Edge::getCO2Emission(const std::string& id) {
130  double sum = 0;
131  for (MSLane* lane : getEdge(id)->getLanes()) {
132  sum += lane->getCO2Emissions();
133  }
134  return sum;
135 }
136 
137 
138 double
139 Edge::getCOEmission(const std::string& id) {
140  double sum = 0;
141  for (MSLane* lane : getEdge(id)->getLanes()) {
142  sum += lane->getCOEmissions();
143  }
144  return sum;
145 }
146 
147 
148 double
149 Edge::getHCEmission(const std::string& id) {
150  double sum = 0;
151  for (MSLane* lane : getEdge(id)->getLanes()) {
152  sum += lane->getHCEmissions();
153  }
154  return sum;
155 }
156 
157 
158 double
159 Edge::getPMxEmission(const std::string& id) {
160  double sum = 0;
161  for (MSLane* lane : getEdge(id)->getLanes()) {
162  sum += lane->getPMxEmissions();
163  }
164  return sum;
165 }
166 
167 
168 double
169 Edge::getNOxEmission(const std::string& id) {
170  double sum = 0;
171  for (MSLane* lane : getEdge(id)->getLanes()) {
172  sum += lane->getNOxEmissions();
173  }
174  return sum;
175 }
176 
177 
178 double
179 Edge::getFuelConsumption(const std::string& id) {
180  double sum = 0;
181  for (MSLane* lane : getEdge(id)->getLanes()) {
182  sum += lane->getFuelConsumption();
183  }
184  return sum;
185 }
186 
187 
188 double
189 Edge::getNoiseEmission(const std::string& id) {
190  double sum = 0;
191  for (MSLane* lane : getEdge(id)->getLanes()) {
192  sum += pow(10., (lane->getHarmonoise_NoiseEmissions() / 10.));
193  }
194  if (sum != 0) {
195  return HelpersHarmonoise::sum(sum);
196  }
197  return sum;
198 }
199 
200 
201 double
202 Edge::getElectricityConsumption(const std::string& id) {
203  double sum = 0;
204  for (MSLane* lane : getEdge(id)->getLanes()) {
205  sum += lane->getElectricityConsumption();
206  }
207  return sum;
208 }
209 
210 
211 int
212 Edge::getLastStepVehicleNumber(const std::string& id) {
213  int sum = 0;
214  for (MSLane* lane : getEdge(id)->getLanes()) {
215  sum += lane->getVehicleNumber();
216  }
217  return sum;
218 }
219 
220 
221 double
222 Edge::getLastStepMeanSpeed(const std::string& id) {
223  return getEdge(id)->getMeanSpeed();
224 }
225 
226 
227 double
228 Edge::getLastStepOccupancy(const std::string& id) {
229  double sum = 0;
230  const std::vector<MSLane*>& lanes = getEdge(id)->getLanes();
231  for (auto lane : lanes) {
232  sum += lane->getNettoOccupancy();
233  }
234  return sum / (double)lanes.size();
235 }
236 
237 
238 int
239 Edge::getLastStepHaltingNumber(const std::string& id) {
240  int halting = 0;
241  for (MSLane* lane : getEdge(id)->getLanes()) {
242  const MSLane::VehCont& vehs = lane->getVehiclesSecure();
243  for (auto veh : vehs) {
244  if (veh->getSpeed() < SUMO_const_haltingSpeed) {
245  ++halting;
246  }
247  }
248  lane->releaseVehicles();
249  }
250  return halting;
251 }
252 
253 
254 double
255 Edge::getLastStepLength(const std::string& id) {
256  double lengthSum = 0;
257  int noVehicles = 0;
258  for (MSLane* lane : getEdge(id)->getLanes()) {
259  const MSLane::VehCont& vehs = lane->getVehiclesSecure();
260  for (auto veh : vehs) {
261  lengthSum += veh->getVehicleType().getLength();
262  }
263  noVehicles += (int)vehs.size();
264  lane->releaseVehicles();
265  }
266  if (noVehicles == 0) {
267  return 0;
268  }
269  return lengthSum / (double)noVehicles;
270 }
271 
272 
273 int
274 Edge::getLaneNumber(const std::string& id) {
275  return (int)getEdge(id)->getLanes().size();
276 }
277 
278 
279 std::string
280 Edge::getStreetName(const std::string& id) {
281  return getEdge(id)->getStreetName();
282 }
283 
284 
285 std::string
286 Edge::getParameter(const std::string& id, const std::string& paramName) {
287  return getEdge(id)->getParameter(paramName, "");
288 }
289 
290 
291 void
292 Edge::setAllowedVehicleClasses(const std::string& id, std::vector<std::string> classes) {
293  SVCPermissions permissions = parseVehicleClasses(classes);
294  setAllowedSVCPermissions(id, permissions);
295 }
296 
297 
298 void
299 Edge::setDisallowedVehicleClasses(const std::string& id, std::vector<std::string> classes) {
300  SVCPermissions permissions = invertPermissions(parseVehicleClasses(classes));
301  setAllowedSVCPermissions(id, permissions);
302 }
303 
304 
305 void
306 Edge::setAllowedSVCPermissions(const std::string& id, int permissions) {
307  MSEdge* e = getEdge(id);
308  for (MSLane* lane : e->getLanes()) {
309  lane->setPermissions(permissions, MSLane::CHANGE_PERMISSIONS_PERMANENT);
310  }
311  e->rebuildAllowedLanes();
312  for (MSEdge* const pred : e->getPredecessors()) {
313  pred->rebuildAllowedTargets();
314  }
315 }
316 
317 
318 void
319 Edge::adaptTraveltime(const std::string& id, double value, double begTime, double endTime) {
320  MSNet::getInstance()->getWeightsStorage().addTravelTime(getEdge(id), begTime, endTime, value);
321 }
322 
323 
324 void
325 Edge::setEffort(const std::string& id, double value, double begTime, double endTime) {
326  MSNet::getInstance()->getWeightsStorage().addEffort(getEdge(id), begTime, endTime, value);
327 }
328 
329 
330 void
331 Edge::setMaxSpeed(const std::string& id, double value) {
332  for (MSLane* lane : getEdge(id)->getLanes()) {
333  lane->setMaxSpeed(value);
334  }
335 }
336 
337 
338 void
339 Edge::setParameter(const std::string& id, const std::string& name, const std::string& value) {
340  getEdge(id)->setParameter(name, value);
341 }
342 
343 
345 
346 
347 void
348 Edge::storeShape(const std::string& id, PositionVector& shape) {
349  const MSEdge* const e = getEdge(id);
350  const std::vector<MSLane*>& lanes = e->getLanes();
351  shape = lanes.front()->getShape();
352  if (lanes.size() > 1) {
353  copy(lanes.back()->getShape().begin(), lanes.back()->getShape().end(), back_inserter(shape));
354  }
355 }
356 
357 
358 std::shared_ptr<VariableWrapper>
360  return std::make_shared<Helper::SubscriptionWrapper>(handleVariable, mySubscriptionResults, myContextSubscriptionResults);
361 }
362 
363 
364 bool
365 Edge::handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper) {
366  switch (variable) {
367  case TRACI_ID_LIST:
368  return wrapper->wrapStringList(objID, variable, getIDList());
369  case ID_COUNT:
370  return wrapper->wrapInt(objID, variable, getIDCount());
372  return wrapper->wrapDouble(objID, variable, getTraveltime(objID));
373  case VAR_WAITING_TIME:
374  return wrapper->wrapDouble(objID, variable, getWaitingTime(objID));
376  return wrapper->wrapStringList(objID, variable, getLastStepPersonIDs(objID));
378  return wrapper->wrapStringList(objID, variable, getLastStepVehicleIDs(objID));
379  case VAR_CO2EMISSION:
380  return wrapper->wrapDouble(objID, variable, getCO2Emission(objID));
381  case VAR_COEMISSION:
382  return wrapper->wrapDouble(objID, variable, getCOEmission(objID));
383  case VAR_HCEMISSION:
384  return wrapper->wrapDouble(objID, variable, getHCEmission(objID));
385  case VAR_PMXEMISSION:
386  return wrapper->wrapDouble(objID, variable, getPMxEmission(objID));
387  case VAR_NOXEMISSION:
388  return wrapper->wrapDouble(objID, variable, getNOxEmission(objID));
389  case VAR_FUELCONSUMPTION:
390  return wrapper->wrapDouble(objID, variable, getFuelConsumption(objID));
391  case VAR_NOISEEMISSION:
392  return wrapper->wrapDouble(objID, variable, getNoiseEmission(objID));
394  return wrapper->wrapDouble(objID, variable, getElectricityConsumption(objID));
396  return wrapper->wrapInt(objID, variable, getLastStepVehicleNumber(objID));
398  return wrapper->wrapDouble(objID, variable, getLastStepMeanSpeed(objID));
399  case LAST_STEP_OCCUPANCY:
400  return wrapper->wrapDouble(objID, variable, getLastStepOccupancy(objID));
402  return wrapper->wrapInt(objID, variable, getLastStepHaltingNumber(objID));
403  case LAST_STEP_LENGTH:
404  return wrapper->wrapDouble(objID, variable, getLastStepLength(objID));
405  case VAR_LANE_INDEX:
406  return wrapper->wrapInt(objID, variable, getLaneNumber(objID));
407  case VAR_NAME:
408  return wrapper->wrapString(objID, variable, getStreetName(objID));
409  default:
410  return false;
411  }
412 }
413 
414 
415 }
416 
417 
418 /****************************************************************************/
libsumo::Edge::getLastStepHaltingNumber
static int getLastStepHaltingNumber(const std::string &id)
Definition: Edge.cpp:239
MSEdge::getCurrentTravelTime
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
Definition: MSEdge.cpp:749
libsumo::Edge::getEdge
static MSEdge * getEdge(const std::string &id)
Definition: Edge.cpp:83
libsumo::Edge::mySubscriptionResults
static SubscriptionResults mySubscriptionResults
Definition: Edge.h:101
libsumo::Edge::getElectricityConsumption
static double getElectricityConsumption(const std::string &id)
Definition: Edge.cpp:202
libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER
TRACI_CONST int LAST_STEP_VEHICLE_HALTING_NUMBER
Definition: TraCIConstants.h:525
libsumo::Edge::getCO2Emission
static double getCO2Emission(const std::string &id)
Definition: Edge.cpp:129
libsumo::Edge::getLastStepPersonIDs
static const std::vector< std::string > getLastStepPersonIDs(const std::string &id)
Definition: Edge.cpp:103
libsumo::Edge::adaptTraveltime
static void adaptTraveltime(const std::string &id, double value, double begTime=0., double endTime=std::numeric_limits< double >::max())
Definition: Edge.cpp:319
MSEdge::getStreetName
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:272
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
libsumo::Edge::getLastStepOccupancy
static double getLastStepOccupancy(const std::string &id)
Definition: Edge.cpp:228
libsumo::VariableWrapper::wrapString
virtual bool wrapString(const std::string &objID, const int variable, const std::string &value)=0
libsumo::Edge::setParameter
static void setParameter(const std::string &id, const std::string &name, const std::string &value)
Definition: Edge.cpp:339
libsumo::VAR_FUELCONSUMPTION
TRACI_CONST int VAR_FUELCONSUMPTION
Definition: TraCIConstants.h:799
MSEdge::getSortedPersons
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
Definition: MSEdge.cpp:907
libsumo::VAR_NAME
TRACI_CONST int VAR_NAME
Definition: TraCIConstants.h:546
libsumo::Edge::setAllowedSVCPermissions
static void setAllowedSVCPermissions(const std::string &id, int permissions)
Definition: Edge.cpp:306
libsumo::VariableWrapper
Definition: Subscription.h:132
libsumo::Edge::setMaxSpeed
static void setMaxSpeed(const std::string &id, double value)
Definition: Edge.cpp:331
libsumo::VAR_WAITING_TIME
TRACI_CONST int VAR_WAITING_TIME
Definition: TraCIConstants.h:825
MSLane::VehCont
std::vector< MSVehicle * > VehCont
Container for vehicles.
Definition: MSLane.h:92
libsumo::Edge::storeShape
static LIBSUMO_SUBSCRIPTION_API void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
Definition: Edge.cpp:348
libsumo::VAR_COEMISSION
TRACI_CONST int VAR_COEMISSION
Definition: TraCIConstants.h:787
libsumo::ContextSubscriptionResults
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:204
libsumo::LAST_STEP_VEHICLE_ID_LIST
TRACI_CONST int LAST_STEP_VEHICLE_ID_LIST
Definition: TraCIConstants.h:519
MSEdge.h
libsumo::Edge::getHCEmission
static double getHCEmission(const std::string &id)
Definition: Edge.cpp:149
libsumo::Edge
Definition: Edge.h:51
libsumo::VAR_NOISEEMISSION
TRACI_CONST int VAR_NOISEEMISSION
Definition: TraCIConstants.h:802
MSTransportable
Definition: MSTransportable.h:58
libsumo::Edge::getLastStepLength
static double getLastStepLength(const std::string &id)
Definition: Edge.cpp:255
PositionVector
A list of positions.
Definition: PositionVector.h:45
MSEdgeWeightsStorage::addEffort
void addEffort(const MSEdge *const e, double begin, double end, double value)
Adds an effort information for an edge and a time span.
Definition: MSEdgeWeightsStorage.cpp:82
libsumo::Edge::getLastStepVehicleNumber
static int getLastStepVehicleNumber(const std::string &id)
Definition: Edge.cpp:212
SUMO_const_haltingSpeed
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
Definition: StdDefs.h:60
libsumo::Edge::getIDList
static std::vector< std::string > getIDList()
Definition: Edge.cpp:41
Parameterised::getParameter
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
Definition: Parameterised.cpp:72
MSVehicle.h
libsumo
Definition: Edge.cpp:29
HelpersHarmonoise.h
libsumo::VAR_NOXEMISSION
TRACI_CONST int VAR_NOXEMISSION
Definition: TraCIConstants.h:796
parseVehicleClasses
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
Definition: SUMOVehicleClass.cpp:222
libsumo::VAR_CURRENT_TRAVELTIME
TRACI_CONST int VAR_CURRENT_TRAVELTIME
Definition: TraCIConstants.h:711
libsumo::VariableWrapper::wrapDouble
virtual bool wrapDouble(const std::string &objID, const int variable, const double value)=0
libsumo::Edge::getTraveltime
static double getTraveltime(const std::string &id)
Definition: Edge.cpp:77
libsumo::Edge::getIDCount
static int getIDCount()
Definition: Edge.cpp:49
TraCIConstants.h
MSEdgeWeightsStorage.h
MSLane::CHANGE_PERMISSIONS_PERMANENT
static const long CHANGE_PERMISSIONS_PERMANENT
Definition: MSLane.h:1205
MSEdge::getMeanSpeed
double getMeanSpeed() const
get the mean speed
Definition: MSEdge.cpp:712
SVCPermissions
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Definition: SUMOVehicleClass.h:218
MSNet::getWeightsStorage
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
Definition: MSNet.cpp:832
libsumo::Edge::getParameter
static std::string getParameter(const std::string &id, const std::string &paramName)
Definition: Edge.cpp:286
libsumo::VariableWrapper::wrapStringList
virtual bool wrapStringList(const std::string &objID, const int variable, const std::vector< std::string > &value)=0
libsumo::Edge::setAllowedVehicleClasses
static void setAllowedVehicleClasses(const std::string &id, std::vector< std::string > vector)
Definition: Edge.cpp:292
MSEdge::dictionary
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary....
Definition: MSEdge.cpp:765
libsumo::Edge::getWaitingTime
static double getWaitingTime(const std::string &id)
Definition: Edge.cpp:93
libsumo::Edge::getNOxEmission
static double getNOxEmission(const std::string &id)
Definition: Edge.cpp:169
libsumo::VAR_PMXEMISSION
TRACI_CONST int VAR_PMXEMISSION
Definition: TraCIConstants.h:793
libsumo::Edge::setDisallowedVehicleClasses
static void setDisallowedVehicleClasses(const std::string &id, std::vector< std::string > classes)
Definition: Edge.cpp:299
libsumo::TRACI_ID_LIST
TRACI_CONST int TRACI_ID_LIST
Definition: TraCIConstants.h:498
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:78
LIBSUMO_SUBSCRIPTION_IMPLEMENTATION
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
Definition: TraCIDefs.h:50
libsumo::ID_COUNT
TRACI_CONST int ID_COUNT
Definition: TraCIConstants.h:501
libsumo::Edge::setEffort
static void setEffort(const std::string &id, double value, double begTime=0., double endTime=std::numeric_limits< double >::max())
Definition: Edge.cpp:325
libsumo::Edge::getFuelConsumption
static double getFuelConsumption(const std::string &id)
Definition: Edge.cpp:179
libsumo::TraCIException
Definition: TraCIDefs.h:89
libsumo::Edge::getStreetName
static std::string getStreetName(const std::string &id)
Definition: Edge.cpp:280
MSEdgeWeightsStorage::addTravelTime
void addTravelTime(const MSEdge *const e, double begin, double end, double value)
Adds a travel time information for an edge and a time span.
Definition: MSEdgeWeightsStorage.cpp:69
libsumo::VAR_CO2EMISSION
TRACI_CONST int VAR_CO2EMISSION
Definition: TraCIConstants.h:784
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:167
libsumo::Edge::makeWrapper
static std::shared_ptr< VariableWrapper > makeWrapper()
Definition: Edge.cpp:359
libsumo::LAST_STEP_PERSON_ID_LIST
TRACI_CONST int LAST_STEP_PERSON_ID_LIST
Definition: TraCIConstants.h:543
libsumo::LAST_STEP_MEAN_SPEED
TRACI_CONST int LAST_STEP_MEAN_SPEED
Definition: TraCIConstants.h:516
libsumo::Edge::getAdaptedTraveltime
static double getAdaptedTraveltime(const std::string &id, double time)
Definition: Edge.cpp:55
MSTransportable.h
libsumo::VariableWrapper::wrapInt
virtual bool wrapInt(const std::string &objID, const int variable, const int value)=0
libsumo::Edge::handleVariable
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition: Edge.cpp:365
libsumo::Edge::myContextSubscriptionResults
static ContextSubscriptionResults myContextSubscriptionResults
Definition: Edge.h:102
Edge.h
noVehicles
bool noVehicles(SVCPermissions permissions)
Returns whether an edge with the given permission forbids vehicles.
Definition: SUMOVehicleClass.cpp:387
MSEdge::getLanes
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:167
Parameterised::setParameter
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
Definition: Parameterised.cpp:46
libsumo::Edge::getNoiseEmission
static double getNoiseEmission(const std::string &id)
Definition: Edge.cpp:189
MSEdge::insertIDs
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
Definition: MSEdge.cpp:814
libsumo::VAR_ELECTRICITYCONSUMPTION
TRACI_CONST int VAR_ELECTRICITYCONSUMPTION
Definition: TraCIConstants.h:849
libsumo::Edge::getLaneNumber
static int getLaneNumber(const std::string &id)
Definition: Edge.cpp:274
libsumo::VAR_HCEMISSION
TRACI_CONST int VAR_HCEMISSION
Definition: TraCIConstants.h:790
libsumo::Edge::getLastStepMeanSpeed
static double getLastStepMeanSpeed(const std::string &id)
Definition: Edge.cpp:222
libsumo::LAST_STEP_VEHICLE_NUMBER
TRACI_CONST int LAST_STEP_VEHICLE_NUMBER
Definition: TraCIConstants.h:513
MSLane.h
libsumo::LAST_STEP_OCCUPANCY
TRACI_CONST int LAST_STEP_OCCUPANCY
Definition: TraCIConstants.h:522
invertPermissions
SVCPermissions invertPermissions(SVCPermissions permissions)
negate the given permissions and ensure that only relevant bits are set
Definition: SUMOVehicleClass.cpp:285
TraCIDefs.h
libsumo::Edge::getCOEmission
static double getCOEmission(const std::string &id)
Definition: Edge.cpp:139
libsumo::VAR_LANE_INDEX
TRACI_CONST int VAR_LANE_INDEX
Definition: TraCIConstants.h:681
libsumo::LAST_STEP_LENGTH
TRACI_CONST int LAST_STEP_LENGTH
Definition: TraCIConstants.h:528
libsumo::SubscriptionResults
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:203
libsumo::Edge::getPMxEmission
static double getPMxEmission(const std::string &id)
Definition: Edge.cpp:159
MSEdge::rebuildAllowedLanes
void rebuildAllowedLanes()
Definition: MSEdge.cpp:243
libsumo::Edge::getEffort
static double getEffort(const std::string &id, double time)
Definition: Edge.cpp:66
HelpersHarmonoise::sum
static double sum(double val)
Computes the resulting noise.
Definition: HelpersHarmonoise.h:60
libsumo::Edge::getLastStepVehicleIDs
static const std::vector< std::string > getLastStepVehicleIDs(const std::string &id)
Definition: Edge.cpp:115
MSEdge::getPredecessors
const MSEdgeVector & getPredecessors() const
Definition: MSEdge.h:354