SUMO - Simulation of Urban MObility
TraCIServerAPI_Simulation.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // APIs for getting/setting edge values via TraCI
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #ifndef NO_TRACI
35 
36 #include <utils/common/StdDefs.h>
38 #include <microsim/MSNet.h>
39 #include <microsim/MSEdgeControl.h>
41 #include <microsim/MSEdge.h>
42 #include <microsim/MSLane.h>
43 #include <microsim/MSVehicle.h>
44 #include "TraCIConstants.h"
46 
47 #ifdef CHECK_MEMORY_LEAKS
48 #include <foreign/nvwa/debug_new.h>
49 #endif // CHECK_MEMORY_LEAKS
50 
51 
52 // ===========================================================================
53 // method definitions
54 // ===========================================================================
55 bool
57  tcpip::Storage& outputStorage) {
58  // variable & id
59  int variable = inputStorage.readUnsignedByte();
60  std::string id = inputStorage.readString();
61  // check variable
62  if (variable != VAR_TIME_STEP
63  && variable != VAR_LOADED_VEHICLES_NUMBER && variable != VAR_LOADED_VEHICLES_IDS
64  && variable != VAR_DEPARTED_VEHICLES_NUMBER && variable != VAR_DEPARTED_VEHICLES_IDS
67  && variable != VAR_ARRIVED_VEHICLES_NUMBER && variable != VAR_ARRIVED_VEHICLES_IDS
68  && variable != VAR_DELTA_T && variable != VAR_NET_BOUNDING_BOX
69  && variable != VAR_MIN_EXPECTED_VEHICLES
70  && variable != POSITION_CONVERSION && variable != DISTANCE_REQUEST
71  && variable != VAR_BUS_STOP_WAITING
76  ) {
77  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Get Simulation Variable: unsupported variable specified", outputStorage);
78  }
79  // begin response building
80  tcpip::Storage tempMsg;
81  // response-code, variableID, objectID
83  tempMsg.writeUnsignedByte(variable);
84  tempMsg.writeString(id);
85  // process request
86  switch (variable) {
87  case VAR_TIME_STEP:
89  tempMsg.writeInt(MSNet::getInstance()->getCurrentTimeStep());
90  break;
93  break;
95  const std::vector<std::string>& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_BUILT)->second;
97  tempMsg.writeStringList(ids);
98  }
99  break;
102  break;
105  break;
108  break;
111  break;
114  break;
117  break;
120  break;
123  break;
126  break;
129  break;
132  break;
135  break;
138  break;
141  break;
144  break;
147  break;
148  case VAR_DELTA_T:
150  tempMsg.writeInt(DELTA_T);
151  break;
152  case VAR_NET_BOUNDING_BOX: {
155  tempMsg.writeDouble(b.xmin());
156  tempMsg.writeDouble(b.ymin());
157  tempMsg.writeDouble(b.xmax());
158  tempMsg.writeDouble(b.ymax());
159  break;
160  }
161  break;
164  tempMsg.writeInt(MSNet::getInstance()->getVehicleControl().getActiveVehicleCount() + MSNet::getInstance()->getInsertionControl().getPendingFlowCount());
165  break;
166  case POSITION_CONVERSION:
167  if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) {
168  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Position conversion requires a compound object.", outputStorage);
169  }
170  if (inputStorage.readInt() != 2) {
171  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Position conversion requires a source position and a position type as parameter.", outputStorage);
172  }
173  if (!commandPositionConversion(server, inputStorage, tempMsg, CMD_GET_SIM_VARIABLE)) {
174  return false;
175  }
176  break;
177  case DISTANCE_REQUEST:
178  if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) {
179  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of distance requires a compound object.", outputStorage);
180  }
181  if (inputStorage.readInt() != 3) {
182  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of distance requires two positions and a distance type as parameter.", outputStorage);
183  }
184  if (!commandDistanceRequest(server, inputStorage, tempMsg, CMD_GET_SIM_VARIABLE)) {
185  return false;
186  }
187  break;
188  case VAR_BUS_STOP_WAITING: {
189  std::string id;
190  if (!server.readTypeCheckingString(inputStorage, id)) {
191  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Retrieval of persons at busstop requires a string.", outputStorage);
192  }
194  if (s == 0) {
195  return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Unknown bus stop '" + id + "'.", outputStorage);
196  }
198  tempMsg.writeInt(s->getPersonNumber());
199  break;
200  }
201  default:
202  break;
203  }
204  server.writeStatusCmd(CMD_GET_SIM_VARIABLE, RTYPE_OK, "", outputStorage);
205  server.writeResponseWithLength(outputStorage, tempMsg);
206  return true;
207 }
208 
209 
210 bool
212  tcpip::Storage& outputStorage) {
213  std::string warning = ""; // additional description for response
214  // variable
215  int variable = inputStorage.readUnsignedByte();
216  if (variable != CMD_CLEAR_PENDING_VEHICLES) {
217  return server.writeErrorStatusCmd(CMD_SET_SIM_VARIABLE, "Set Simulation Variable: unsupported variable specified", outputStorage);
218  }
219  // id
220  std::string id = inputStorage.readString();
221  // process
222  switch (variable) {
224  //clear any pending vehicle insertions
225  std::string route;
226  if (!server.readTypeCheckingString(inputStorage, route)) {
227  return server.writeErrorStatusCmd(CMD_SET_SIM_VARIABLE, "A string is needed for clearing pending vehicles.", outputStorage);
228  }
230  }
231  break;
232  default:
233  break;
234  }
235  server.writeStatusCmd(CMD_SET_SIM_VARIABLE, RTYPE_OK, warning, outputStorage);
236  return true;
237 }
238 
239 
240 void
242  const std::vector<std::string>& ids = server.getVehicleStateChanges().find(state)->second;
243  outputStorage.writeUnsignedByte(TYPE_INTEGER);
244  outputStorage.writeInt((int) ids.size());
245 }
246 
247 
248 void
250  const std::vector<std::string>& ids = server.getVehicleStateChanges().find(state)->second;
251  outputStorage.writeUnsignedByte(TYPE_STRINGLIST);
252  outputStorage.writeStringList(ids);
253 }
254 
255 
256 std::pair<MSLane*, SUMOReal>
258  std::pair<MSLane*, SUMOReal> result;
259  std::vector<std::string> allEdgeIds;
261 
262  allEdgeIds = MSNet::getInstance()->getEdgeControl().getEdgeNames();
263  for (std::vector<std::string>::iterator itId = allEdgeIds.begin(); itId != allEdgeIds.end(); itId++) {
264  const std::vector<MSLane*>& allLanes = MSEdge::dictionary((*itId))->getLanes();
265  for (std::vector<MSLane*>::const_iterator itLane = allLanes.begin(); itLane != allLanes.end(); itLane++) {
266  const SUMOReal newDistance = (*itLane)->getShape().distance(pos);
267  if (newDistance < minDistance) {
268  minDistance = newDistance;
269  result.first = (*itLane);
270  }
271  }
272  }
273  // @todo this may be a place where 3D is required but 2D is delivered
274  result.second = result.first->getShape().nearest_offset_to_point2D(pos, false);
275  return result;
276 }
277 
278 
279 const MSLane*
280 TraCIServerAPI_Simulation::getLaneChecking(std::string roadID, int laneIndex, SUMOReal pos) {
281  const MSEdge* edge = MSEdge::dictionary(roadID);
282  if (edge == 0) {
283  throw TraCIException("Unknown edge " + roadID);
284  }
285  if (laneIndex < 0 || laneIndex >= (int)edge->getLanes().size()) {
286  throw TraCIException("Invalid lane index for " + roadID);
287  }
288  const MSLane* lane = edge->getLanes()[laneIndex];
289  if (pos < 0 || pos > lane->getLength()) {
290  throw TraCIException("Position on lane invalid");
291  }
292  return lane;
293 }
294 
295 
296 bool
298  tcpip::Storage& outputStorage, int commandId) {
299  std::pair<MSLane*, SUMOReal> roadPos;
300  Position cartesianPos;
301  Position geoPos;
302  SUMOReal z = 0;
303 
304  // actual position type that will be converted
305  int srcPosType = inputStorage.readUnsignedByte();
306 
307  switch (srcPosType) {
308  case POSITION_2D:
309  case POSITION_3D:
310  case POSITION_LON_LAT:
311  case POSITION_LON_LAT_ALT: {
312  SUMOReal x = inputStorage.readDouble();
313  SUMOReal y = inputStorage.readDouble();
314  if (srcPosType != POSITION_2D && srcPosType != POSITION_LON_LAT) {
315  z = inputStorage.readDouble();
316  }
317  geoPos.set(x, y);
318  cartesianPos.set(x, y);
319  if (srcPosType == POSITION_LON_LAT || srcPosType == POSITION_LON_LAT_ALT) {
321  } else {
323  }
324  }
325  break;
326  case POSITION_ROADMAP: {
327  std::string roadID = inputStorage.readString();
328  SUMOReal pos = inputStorage.readDouble();
329  int laneIdx = inputStorage.readUnsignedByte();
330  try {
331  // convert edge,offset,laneIdx to cartesian position
332  cartesianPos = geoPos = getLaneChecking(roadID, laneIdx, pos)->getShape().positionAtOffset(pos);
333  z = cartesianPos.z();
335  } catch (TraCIException& e) {
336  server.writeStatusCmd(commandId, RTYPE_ERR, e.what());
337  return false;
338  }
339  }
340  break;
341  default:
342  server.writeStatusCmd(commandId, RTYPE_ERR, "Source position type not supported");
343  return false;
344  }
345 
346  int destPosType = 0;
347  if (!server.readTypeCheckingUnsignedByte(inputStorage, destPosType)) {
348  server.writeStatusCmd(commandId, RTYPE_ERR, "Destination position type must be of type ubyte.");
349  return false;
350  }
351 
352  switch (destPosType) {
353  case POSITION_ROADMAP: {
354  // convert cartesion position to edge,offset,lane_index
355  roadPos = convertCartesianToRoadMap(cartesianPos);
356  // write result that is added to response msg
357  outputStorage.writeUnsignedByte(POSITION_ROADMAP);
358  outputStorage.writeString(roadPos.first->getEdge().getID());
359  outputStorage.writeDouble(roadPos.second);
360  const std::vector<MSLane*> lanes = roadPos.first->getEdge().getLanes();
361  outputStorage.writeUnsignedByte((int)distance(lanes.begin(), find(lanes.begin(), lanes.end(), roadPos.first)));
362  }
363  break;
364  case POSITION_2D:
365  case POSITION_3D:
366  case POSITION_LON_LAT:
368  outputStorage.writeUnsignedByte(destPosType);
369  if (destPosType == POSITION_LON_LAT || destPosType == POSITION_LON_LAT_ALT) {
370  outputStorage.writeDouble(geoPos.x());
371  outputStorage.writeDouble(geoPos.y());
372  } else {
373  outputStorage.writeDouble(cartesianPos.x());
374  outputStorage.writeDouble(cartesianPos.y());
375  }
376  if (destPosType != POSITION_2D && destPosType != POSITION_LON_LAT) {
377  outputStorage.writeDouble(z);
378  }
379  break;
380  default:
381  server.writeStatusCmd(commandId, RTYPE_ERR, "Destination position type not supported");
382  return false;
383  }
384  return true;
385 }
386 
387 /****************************************************************************/
388 
389 bool
391  tcpip::Storage& outputStorage, int commandId) {
392  Position pos1;
393  Position pos2;
394  std::pair<const MSLane*, SUMOReal> roadPos1;
395  std::pair<const MSLane*, SUMOReal> roadPos2;
396 
397  // read position 1
398  int posType = inputStorage.readUnsignedByte();
399  switch (posType) {
400  case POSITION_ROADMAP:
401  try {
402  std::string roadID = inputStorage.readString();
403  roadPos1.second = inputStorage.readDouble();
404  roadPos1.first = getLaneChecking(roadID, inputStorage.readUnsignedByte(), roadPos1.second);
405  pos1 = roadPos1.first->getShape().positionAtOffset(roadPos1.second);
406  } catch (TraCIException& e) {
407  server.writeStatusCmd(commandId, RTYPE_ERR, e.what());
408  return false;
409  }
410  break;
411  case POSITION_2D:
412  case POSITION_3D: {
413  SUMOReal p1x = inputStorage.readDouble();
414  SUMOReal p1y = inputStorage.readDouble();
415  pos1.set(p1x, p1y);
416  }
417  if (posType == POSITION_3D) {
418  inputStorage.readDouble();// z value is ignored
419  }
420  roadPos1 = convertCartesianToRoadMap(pos1);
421  break;
422  default:
423  server.writeStatusCmd(commandId, RTYPE_ERR, "Unknown position format used for distance request");
424  return false;
425  }
426 
427  // read position 2
428  posType = inputStorage.readUnsignedByte();
429  switch (posType) {
430  case POSITION_ROADMAP:
431  try {
432  std::string roadID = inputStorage.readString();
433  roadPos2.second = inputStorage.readDouble();
434  roadPos2.first = getLaneChecking(roadID, inputStorage.readUnsignedByte(), roadPos2.second);
435  pos2 = roadPos2.first->getShape().positionAtOffset(roadPos2.second);
436  } catch (TraCIException& e) {
437  server.writeStatusCmd(commandId, RTYPE_ERR, e.what());
438  return false;
439  }
440  break;
441  case POSITION_2D:
442  case POSITION_3D: {
443  SUMOReal p2x = inputStorage.readDouble();
444  SUMOReal p2y = inputStorage.readDouble();
445  pos2.set(p2x, p2y);
446  }
447  if (posType == POSITION_3D) {
448  inputStorage.readDouble();// z value is ignored
449  }
450  roadPos2 = convertCartesianToRoadMap(pos2);
451  break;
452  default:
453  server.writeStatusCmd(commandId, RTYPE_ERR, "Unknown position format used for distance request");
454  return false;
455  }
456 
457  // read distance type
458  int distType = inputStorage.readUnsignedByte();
459 
460  SUMOReal distance = 0.0;
461  if (distType == REQUEST_DRIVINGDIST) {
462  // compute driving distance
463  if ((roadPos1.first == roadPos2.first) && (roadPos1.second <= roadPos2.second)) {
464  // same edge
465  distance = roadPos2.second - roadPos1.second;
466  } else {
467  ConstMSEdgeVector newRoute;
469  &roadPos1.first->getEdge(), &roadPos2.first->getEdge(), 0, MSNet::getInstance()->getCurrentTimeStep(), newRoute);
470  MSRoute route("", newRoute, false, 0, std::vector<SUMOVehicleParameter::Stop>());
471  distance = route.getDistanceBetween(roadPos1.second, roadPos2.second, &roadPos1.first->getEdge(), &roadPos2.first->getEdge());
472  }
473  } else {
474  // compute air distance (default)
475  distance = pos1.distanceTo(pos2);
476  }
477  // write response command
478  outputStorage.writeUnsignedByte(TYPE_DOUBLE);
479  outputStorage.writeDouble(distance);
480  return true;
481 }
482 
483 
484 #endif
485 
486 /****************************************************************************/
The vehicle has departed (was inserted into the network)
Definition: MSNet.h:487
#define CMD_CLEAR_PENDING_VEHICLES
#define VAR_TIME_STEP
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
#define REQUEST_DRIVINGDIST
static void writeVehicleStateIDs(TraCIServer &server, tcpip::Storage &outputStorage, MSNet::VehicleState state)
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation. ...
#define TYPE_COMPOUND
#define POSITION_2D
#define VAR_PARKING_STARTING_VEHICLES_IDS
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:186
static const MSLane * getLaneChecking(std::string roadID, int laneIndex, SUMOReal pos)
std::vector< std::string > getEdgeNames() const
Returns the list of names of all known edges.
#define VAR_STOP_ENDING_VEHICLES_IDS
#define VAR_PARKING_ENDING_VEHICLES_NUMBER
SUMOReal ymin() const
Returns minimum y-coordinate.
Definition: Boundary.cpp:124
SUMOReal getLength() const
Returns the lane's length.
Definition: MSLane.h:370
#define POSITION_LON_LAT_ALT
#define RTYPE_OK
#define POSITION_ROADMAP
#define DISTANCE_REQUEST
virtual double readDouble()
SUMOReal xmin() const
Returns minimum x-coordinate.
Definition: Boundary.cpp:112
#define VAR_LOADED_VEHICLES_IDS
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xab: Get Simulation Variable)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:159
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
#define TYPE_STRINGLIST
#define RESPONSE_GET_SIM_VARIABLE
#define POSITION_3D
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:531
#define VAR_TELEPORT_STARTING_VEHICLES_IDS
static std::pair< MSLane *, SUMOReal > convertCartesianToRoadMap(Position pos)
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:79
SUMOReal distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
Definition: Position.h:229
virtual void writeUnsignedByte(int)
#define POSITION_LON_LAT
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:235
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
#define VAR_LOADED_VEHICLES_NUMBER
SUMOReal x() const
Returns the x-position.
Definition: Position.h:63
SUMOReal xmax() const
Returns maximum x-coordinate.
Definition: Boundary.cpp:118
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
#define VAR_STOP_STARTING_VEHICLES_NUMBER
static void writeVehicleStateNumber(TraCIServer &server, tcpip::Storage &outputStorage, MSNet::VehicleState state)
virtual void writeInt(int)
virtual int readUnsignedByte()
The vehicles starts to stop.
Definition: MSNet.h:501
#define POSITION_CONVERSION
A road/street connecting two junctions.
Definition: MSEdge.h:81
#define VAR_DEPARTED_VEHICLES_NUMBER
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xcb: Set Simulation Variable)
#define max(a, b)
Definition: polyfonts.c:65
#define VAR_MIN_EXPECTED_VEHICLES
The vehicle arrived at his destination (is deleted)
Definition: MSNet.h:493
The vehicles starts to park.
Definition: MSNet.h:497
virtual int readInt()
SUMOReal getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true) const
Compute the distance between 2 given edges on this route, including the length of internal lanes...
Definition: MSRoute.cpp:255
const std::map< MSNet::VehicleState, std::vector< std::string > > & getVehicleStateChanges() const
Definition: TraCIServer.h:159
#define VAR_STOP_STARTING_VEHICLES_IDS
#define VAR_NET_BOUNDING_BOX
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A lane area vehicles can halt at.
Definition: MSBusStop.h:64
#define VAR_TELEPORT_STARTING_VEHICLES_NUMBER
#define TYPE_BOUNDINGBOX
SUMOReal z() const
Returns the z-position.
Definition: Position.h:73
virtual void writeStringList(const std::vector< std::string > &s)
static bool commandPositionConversion(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, int commandId)
#define VAR_TELEPORT_ENDING_VEHICLES_IDS
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
The vehicle started to teleport.
Definition: MSNet.h:489
#define CMD_GET_SIM_VARIABLE
virtual std::string readString()
#define VAR_DEPARTED_VEHICLES_IDS
void clearPendingVehicles(std::string &route)
clears out all pending vehicles from a route, "" for all routes
MSBusStop * getBusStop(const std::string &id) const
Returns the named bus stop.
Definition: MSNet.cpp:748
The vehicle ends to park.
Definition: MSNet.h:499
const Boundary & getConvBoundary() const
Returns the converted boundary.
bool readTypeCheckingUnsignedByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and an unsigned byte, verifying the type.
#define VAR_DELTA_T
TraCI server used to control sumo by a remote TraCI client.
Definition: TraCIServer.h:74
#define CMD_SET_SIM_VARIABLE
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:483
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:790
static bool commandDistanceRequest(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, int commandId)
The vehicle was built, but has not yet departed.
Definition: MSNet.h:485
#define VAR_ARRIVED_VEHICLES_NUMBER
virtual void writeString(const std::string &s)
#define TYPE_DOUBLE
#define VAR_STOP_ENDING_VEHICLES_NUMBER
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:329
SUMOReal y() const
Returns the y-position.
Definition: Position.h:68
void set(SUMOReal x, SUMOReal y)
Definition: Position.h:78
#define VAR_PARKING_ENDING_VEHICLES_IDS
The vehicle ends to stop.
Definition: MSNet.h:503
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
virtual void writeDouble(double)
#define VAR_TELEPORT_ENDING_VEHICLES_NUMBER
const PositionVector & getShape() const
Returns this lane's shape.
Definition: MSLane.h:323
#define SUMOReal
Definition: config.h:218
virtual void compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into)=0
Builds the route between the given edges using the minimum effort at the given time The definition of...
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
SUMOReal ymax() const
Returns maximum y-coordinate.
Definition: Boundary.cpp:130
MSEdgeControl & getEdgeControl()
Returns the edge control.
Definition: MSNet.h:319
#define DELTA_T
Definition: SUMOTime.h:50
#define VAR_PARKING_STARTING_VEHICLES_NUMBER
#define RTYPE_ERR
unsigned int getPersonNumber() const
Returns the number of persons waiting on this stop.
Definition: MSBusStop.h:140
#define TYPE_INTEGER
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
#define VAR_ARRIVED_VEHICLES_IDS
The vehicle ended being teleported.
Definition: MSNet.h:491
#define VAR_BUS_STOP_WAITING