SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TraCIServerAPI_Lane.cpp
Go to the documentation of this file.
1 /****************************************************************************/
11 // APIs for getting/setting lane values via TraCI
12 /****************************************************************************/
13 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
14 // Copyright (C) 2009-2016 DLR (http://www.dlr.de/) and contributors
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 /****************************************************************************/
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #ifndef NO_TRACI
36 
37 #include <microsim/MSEdge.h>
38 #include <microsim/MSEdgeControl.h>
39 #include <microsim/MSLane.h>
40 #include <microsim/MSNet.h>
41 #include <microsim/MSVehicle.h>
42 #include "TraCIConstants.h"
43 #include "TraCIServer.h"
44 #include "TraCIServerAPI_Lane.h"
45 
46 #ifdef CHECK_MEMORY_LEAKS
47 #include <foreign/nvwa/debug_new.h>
48 #endif // CHECK_MEMORY_LEAKS
49 
50 
51 // ===========================================================================
52 // method definitions
53 // ===========================================================================
54 bool
56  tcpip::Storage& outputStorage) {
57  // variable
58  int variable = inputStorage.readUnsignedByte();
59  std::string id = inputStorage.readString();
60  // check variable
61  if (variable != ID_LIST && variable != LANE_LINK_NUMBER && variable != LANE_EDGE_ID && variable != VAR_LENGTH
62  && variable != VAR_MAXSPEED && variable != LANE_LINKS && variable != VAR_SHAPE
63  && variable != VAR_CO2EMISSION && variable != VAR_COEMISSION && variable != VAR_HCEMISSION && variable != VAR_PMXEMISSION
64  && variable != VAR_NOXEMISSION && variable != VAR_FUELCONSUMPTION && variable != VAR_NOISEEMISSION
65  && variable != VAR_ELECTRICITYCONSUMPTION && variable != VAR_WAITING_TIME
66  && variable != LAST_STEP_MEAN_SPEED && variable != LAST_STEP_VEHICLE_NUMBER
67  && variable != LAST_STEP_VEHICLE_ID_LIST && variable != LAST_STEP_OCCUPANCY && variable != LAST_STEP_VEHICLE_HALTING_NUMBER
68  && variable != LAST_STEP_LENGTH && variable != VAR_CURRENT_TRAVELTIME
69  && variable != LANE_ALLOWED && variable != LANE_DISALLOWED && variable != VAR_WIDTH && variable != ID_COUNT
70  && variable != VAR_PARAMETER
71  ) {
72  return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, "Get Lane Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage);
73  }
74  // begin response building
75  tcpip::Storage tempMsg;
76  // response-code, variableID, objectID
78  tempMsg.writeUnsignedByte(variable);
79  tempMsg.writeString(id);
80  if (variable == ID_LIST) {
81  std::vector<std::string> ids;
82  MSLane::insertIDs(ids);
84  tempMsg.writeStringList(ids);
85  } else if (variable == ID_COUNT) {
86  std::vector<std::string> ids;
87  MSLane::insertIDs(ids);
89  tempMsg.writeInt((int) ids.size());
90  } else {
91  MSLane* lane = MSLane::dictionary(id);
92  if (lane == 0) {
93  return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, "Lane '" + id + "' is not known", outputStorage);
94  }
95  switch (variable) {
96  case LANE_LINK_NUMBER:
98  tempMsg.writeUnsignedByte((int) lane->getLinkCont().size());
99  break;
100  case LANE_EDGE_ID:
102  tempMsg.writeString(lane->getEdge().getID());
103  break;
104  case VAR_LENGTH:
106  tempMsg.writeDouble(lane->getLength());
107  break;
108  case VAR_MAXSPEED:
110  tempMsg.writeDouble(lane->getSpeedLimit());
111  break;
112  case LANE_LINKS: {
114  tcpip::Storage tempContent;
115  int cnt = 0;
116  tempContent.writeUnsignedByte(TYPE_INTEGER);
117  const MSLinkCont& links = lane->getLinkCont();
118  tempContent.writeInt((int) links.size());
119  ++cnt;
120  const SUMOTime currTime = MSNet::getInstance()->getCurrentTimeStep();
121  for (MSLinkCont::const_iterator i = links.begin(); i != links.end(); ++i) {
122  MSLink* link = (*i);
123  // approached non-internal lane (if any)
124  tempContent.writeUnsignedByte(TYPE_STRING);
125  tempContent.writeString(link->getLane() != 0 ? link->getLane()->getID() : "");
126  ++cnt;
127  // approached "via", internal lane (if any)
128  tempContent.writeUnsignedByte(TYPE_STRING);
129 #ifdef HAVE_INTERNAL_LANES
130  tempContent.writeString(link->getViaLane() != 0 ? link->getViaLane()->getID() : "");
131 #else
132  tempContent.writeString("");
133 #endif
134  ++cnt;
135  // priority
136  tempContent.writeUnsignedByte(TYPE_UBYTE);
137  tempContent.writeUnsignedByte(link->havePriority() ? 1 : 0);
138  ++cnt;
139  // opened
140  tempContent.writeUnsignedByte(TYPE_UBYTE);
141  const SUMOReal speed = MIN2(lane->getSpeedLimit(), link->getLane()->getSpeedLimit());
142  tempContent.writeUnsignedByte(link->opened(currTime, speed, speed, SUMOVTypeParameter::getDefault().length,
144  ++cnt;
145  // approaching foe
146  tempContent.writeUnsignedByte(TYPE_UBYTE);
147  tempContent.writeUnsignedByte(link->hasApproachingFoe(currTime, currTime, 0, SUMOVTypeParameter::getDefaultDecel()) ? 1 : 0);
148  ++cnt;
149  // state (not implemented, yet)
150  tempContent.writeUnsignedByte(TYPE_STRING);
151  tempContent.writeString(SUMOXMLDefinitions::LinkStates.getString(link->getState()));
152  ++cnt;
153  // direction
154  tempContent.writeUnsignedByte(TYPE_STRING);
155  tempContent.writeString(SUMOXMLDefinitions::LinkDirections.getString(link->getDirection()));
156  ++cnt;
157  // length
158  tempContent.writeUnsignedByte(TYPE_DOUBLE);
159  tempContent.writeDouble(link->getLength());
160  ++cnt;
161  }
162  tempMsg.writeInt((int) cnt);
163  tempMsg.writeStorage(tempContent);
164  }
165  break;
166  case LANE_ALLOWED: {
168  SVCPermissions permissions = lane->getPermissions();
169  if (permissions == SVCAll) { // special case: write nothing
170  permissions = 0;
171  }
172  tempMsg.writeStringList(getVehicleClassNamesList(permissions));
173  }
174  case LANE_DISALLOWED: {
176  tempMsg.writeStringList(getVehicleClassNamesList(~(lane->getPermissions()))); // negation yields disallowed
177  }
178  break;
179  case VAR_SHAPE:
181  tempMsg.writeUnsignedByte(MIN2(255, (int)lane->getShape().size()));
182  for (int iPoint = 0; iPoint < MIN2(255, (int)lane->getShape().size()); ++iPoint) {
183  tempMsg.writeDouble(lane->getShape()[iPoint].x());
184  tempMsg.writeDouble(lane->getShape()[iPoint].y());
185  }
186  break;
187  case VAR_CO2EMISSION:
189  tempMsg.writeDouble(lane->getCO2Emissions());
190  break;
191  case VAR_COEMISSION:
193  tempMsg.writeDouble(lane->getCOEmissions());
194  break;
195  case VAR_HCEMISSION:
197  tempMsg.writeDouble(lane->getHCEmissions());
198  break;
199  case VAR_PMXEMISSION:
201  tempMsg.writeDouble(lane->getPMxEmissions());
202  break;
203  case VAR_NOXEMISSION:
205  tempMsg.writeDouble(lane->getNOxEmissions());
206  break;
207  case VAR_FUELCONSUMPTION:
209  tempMsg.writeDouble(lane->getFuelConsumption());
210  break;
211  case VAR_NOISEEMISSION:
213  tempMsg.writeDouble(lane->getHarmonoise_NoiseEmissions());
214  break;
217  tempMsg.writeDouble(lane->getElectricityConsumption());
218  break;
221  tempMsg.writeInt((int) lane->getVehicleNumber());
222  break;
225  tempMsg.writeDouble(lane->getMeanSpeed());
226  break;
228  std::vector<std::string> vehIDs;
229  const MSLane::VehCont& vehs = lane->getVehiclesSecure();
230  for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
231  vehIDs.push_back((*j)->getID());
232  }
233  lane->releaseVehicles();
235  tempMsg.writeStringList(vehIDs);
236  }
237  break;
238  case LAST_STEP_OCCUPANCY:
240  tempMsg.writeDouble(lane->getNettoOccupancy());
241  break;
243  int halting = 0;
244  const MSLane::VehCont& vehs = lane->getVehiclesSecure();
245  for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
246  if ((*j)->getSpeed() < SUMO_const_haltingSpeed) {
247  ++halting;
248  }
249  }
250  lane->releaseVehicles();
252  tempMsg.writeInt(halting);
253  }
254  break;
255  case LAST_STEP_LENGTH: {
256  SUMOReal lengthSum = 0;
257  const MSLane::VehCont& vehs = lane->getVehiclesSecure();
258  for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
259  lengthSum += (*j)->getVehicleType().getLength();
260  }
262  if (vehs.size() == 0) {
263  tempMsg.writeDouble(0);
264  } else {
265  tempMsg.writeDouble(lengthSum / (SUMOReal) vehs.size());
266  }
267  lane->releaseVehicles();
268  }
269  break;
270  case VAR_WAITING_TIME: {
272  tempMsg.writeDouble(lane->getWaitingSeconds());
273  }
274  break;
275  case VAR_CURRENT_TRAVELTIME: {
276  SUMOReal meanSpeed = lane->getMeanSpeed();
278  if (meanSpeed != 0) {
279  tempMsg.writeDouble(lane->getLength() / meanSpeed);
280  } else {
281  tempMsg.writeDouble(1000000.);
282  }
283  }
284  break;
285  case VAR_WIDTH:
287  tempMsg.writeDouble(lane->getWidth());
288  break;
289  case VAR_PARAMETER: {
290  std::string paramName = "";
291  if (!server.readTypeCheckingString(inputStorage, paramName)) {
292  return server.writeErrorStatusCmd(RESPONSE_GET_LANE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage);
293  }
295  tempMsg.writeString(lane->getParameter(paramName, ""));
296  }
297  break;
298  default:
299  break;
300  }
301  }
302  server.writeStatusCmd(CMD_GET_LANE_VARIABLE, RTYPE_OK, "", outputStorage);
303  server.writeResponseWithLength(outputStorage, tempMsg);
304  return true;
305 }
306 
307 
308 bool
310  tcpip::Storage& outputStorage) {
311  std::string warning = ""; // additional description for response
312  // variable
313  int variable = inputStorage.readUnsignedByte();
314  if (variable != VAR_MAXSPEED && variable != VAR_LENGTH && variable != LANE_ALLOWED && variable != LANE_DISALLOWED
315  && variable != VAR_PARAMETER) {
316  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Change Lane State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage);
317  }
318  // id
319  std::string id = inputStorage.readString();
320  MSLane* l = MSLane::dictionary(id);
321  if (l == 0) {
322  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Lane '" + id + "' is not known", outputStorage);
323  }
324  // process
325  switch (variable) {
326  case VAR_MAXSPEED: {
327  double value = 0;
328  if (!server.readTypeCheckingDouble(inputStorage, value)) {
329  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The speed must be given as a double.", outputStorage);
330  }
331  l->setMaxSpeed(value);
332  }
333  break;
334  case VAR_LENGTH: {
335  double value = 0;
336  if (!server.readTypeCheckingDouble(inputStorage, value)) {
337  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The length must be given as a double.", outputStorage);
338  }
339  l->setLength(value);
340  }
341  break;
342  case LANE_ALLOWED: {
343  std::vector<std::string> classes;
344  if (!server.readTypeCheckingStringList(inputStorage, classes)) {
345  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Allowed classes must be given as a list of strings.", outputStorage);
346  }
349  }
350  break;
351  case LANE_DISALLOWED: {
352  std::vector<std::string> classes;
353  if (!server.readTypeCheckingStringList(inputStorage, classes)) {
354  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Not allowed classes must be given as a list of strings.", outputStorage);
355  }
356  l->setPermissions(~parseVehicleClasses(classes), MSLane::CHANGE_PERMISSIONS_PERMANENT); // negation yields allowed
358  }
359  break;
360  case VAR_PARAMETER: {
361  if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) {
362  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage);
363  }
364  //readt itemNo
365  inputStorage.readInt();
366  std::string name;
367  if (!server.readTypeCheckingString(inputStorage, name)) {
368  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The name of the parameter must be given as a string.", outputStorage);
369  }
370  std::string value;
371  if (!server.readTypeCheckingString(inputStorage, value)) {
372  return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage);
373  }
374  l->addParameter(name, value);
375  }
376  break;
377  default:
378  break;
379  }
380  server.writeStatusCmd(CMD_SET_LANE_VARIABLE, RTYPE_OK, warning, outputStorage);
381  return true;
382 }
383 
384 
385 bool
386 TraCIServerAPI_Lane::getShape(const std::string& id, PositionVector& shape) {
387  const MSLane* const l = MSLane::dictionary(id);
388  if (l == 0) {
389  return false;
390  }
391  shape = l->getShape();
392  return true;
393 }
394 
395 
396 void
398  switch (myDomain) {
400  const MSLane::VehCont& vehs = l->getVehiclesSecure();
401  for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
402  if (myShape.distance2D((*j)->getPosition()) <= myRange) {
403  myIDs.insert((*j)->getID());
404  }
405  }
406  l->releaseVehicles();
407  }
408  break;
409  case CMD_GET_EDGE_VARIABLE: {
410  if (myShape.size() != 1 || l->getShape().distance2D(myShape[0]) <= myRange) {
411  myIDs.insert(l->getEdge().getID());
412  }
413  }
414  break;
415  case CMD_GET_LANE_VARIABLE: {
416  if (myShape.size() != 1 || l->getShape().distance2D(myShape[0]) <= myRange) {
417  myIDs.insert(l->getID());
418  }
419  }
420  break;
421  default:
422  break;
423 
424  }
425 }
426 
427 
428 #endif
429 
430 
431 /****************************************************************************/
432 
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa3: Get Lane Variable)
#define LAST_STEP_MEAN_SPEED
MSEdge & getEdge() const
Returns the lane's edge.
Definition: MSLane.h:571
long long int SUMOTime
Definition: SUMOTime.h:43
#define VAR_CO2EMISSION
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
Definition: MSLane.h:353
#define VAR_LENGTH
SUMOReal getWaitingSeconds() const
Returns the overall waiting time on this lane.
Definition: MSLane.cpp:2071
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc3: Change Lane State)
static void insertIDs(std::vector< std::string > &into)
Adds the ids of all stored lanes into the given vector.
Definition: MSLane.cpp:1318
#define CMD_GET_VEHICLE_VARIABLE
#define TYPE_COMPOUND
#define VAR_CURRENT_TRAVELTIME
#define LANE_LINKS
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
Definition: MSLane.h:407
#define LANE_EDGE_ID
#define LANE_LINK_NUMBER
SUMOReal getLength() const
Returns the lane's length.
Definition: MSLane.h:480
#define TYPE_UBYTE
int SVCPermissions
#define RTYPE_OK
void setLength(SUMOReal val)
Sets a new length for the lane (used by TraCI only)
Definition: MSLane.cpp:1525
#define VAR_WAITING_TIME
std::vector< std::string > getVehicleClassNamesList(SVCPermissions permissions)
Returns the ids of the given classes, divided using a ' '.
#define TYPE_POLYGON
SUMOReal length
The physical vehicle length.
SUMOReal getFuelConsumption() const
Returns the sum of last step fuel consumption.
Definition: MSLane.cpp:2160
SUMOReal getWidth() const
Returns the lane's width.
Definition: MSLane.h:496
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:159
SUMOReal getNettoOccupancy() const
Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)...
Definition: MSLane.cpp:2056
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
#define TYPE_STRINGLIST
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
SUMOReal getElectricityConsumption() const
Returns the sum of last step electricity consumption.
Definition: MSLane.cpp:2172
std::set< std::string > & myIDs
The container.
static StringBijection< LinkState > LinkStates
const SVCPermissions SVCAll
virtual void writeUnsignedByte(int)
const std::string & getParameter(const std::string &key, const std::string &defaultValue) const
Returns the value for a given key.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:254
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_SHAPE
#define VAR_NOISEEMISSION
#define VAR_FUELCONSUMPTION
virtual void writeInt(int)
SUMOReal getHCEmissions() const
Returns the sum of last step HC emissions.
Definition: MSLane.cpp:2148
SUMOReal distance2D(const Position &p, bool perpendicular=false) const
closest 2D-distance to point p (or -1 if perpendicular is true and the point is beyond this vector) ...
#define TYPE_STRING
virtual int readUnsignedByte()
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
Definition: MSLane.h:380
#define LAST_STEP_LENGTH
void setMaxSpeed(SUMOReal val)
Sets a new maximum speed for the lane (used by TraCI and MSCalibrator)
Definition: MSLane.cpp:1518
#define VAR_NOXEMISSION
static StringBijection< LinkDirection > LinkDirections
const std::string & getID() const
Returns the id.
Definition: Named.h:66
#define RESPONSE_GET_LANE_VARIABLE
#define LANE_ALLOWED
void rebuildAllowedLanes()
Definition: MSEdge.cpp:251
virtual int readInt()
void add(const MSLane *const l) const
Adds the given object to the container.
A list of positions.
SUMOReal getMeanSpeed() const
Returns the mean speed on this lane.
Definition: MSLane.cpp:2084
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
virtual void writeStringList(const std::vector< std::string > &s)
#define VAR_PMXEMISSION
#define CMD_GET_LANE_VARIABLE
T MIN2(T a, T b)
Definition: StdDefs.h:69
SUMOReal getSpeedLimit() const
Returns the lane's maximum allowed speed.
Definition: MSLane.h:472
virtual std::string readString()
#define CMD_GET_EDGE_VARIABLE
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
Definition: MSLane.h:488
TraCI server used to control sumo by a remote TraCI client.
Definition: TraCIServer.h:73
virtual void writeStorage(tcpip::Storage &store)
std::vector< MSVehicle * > VehCont
Container for vehicles.
Definition: MSLane.h:91
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
#define LAST_STEP_VEHICLE_NUMBER
void addParameter(const std::string &key, const std::string &value)
Adds a parameter.
void setPermissions(SVCPermissions permissions, long transientID)
Sets the permissions to the given value. If a transientID is given, the permissions are recored as te...
Definition: MSLane.cpp:2603
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
Definition: MSLane.cpp:1286
SUMOReal getNOxEmissions() const
Returns the sum of last step NOx emissions.
Definition: MSLane.cpp:2136
#define VAR_COEMISSION
SUMOReal getPMxEmissions() const
Returns the sum of last step PMx emissions.
Definition: MSLane.cpp:2124
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
#define LANE_DISALLOWED
static SUMOReal getDefaultDecel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default deceleration for the given vehicle class This needs to be a function because the ...
SUMOReal impatience
The vehicle's impatience (willingness to obstruct others)
#define TYPE_DOUBLE
std::string toHex(const T i, std::streamsize numDigits=0)
Definition: ToString.h:65
SUMOReal getCO2Emissions() const
Returns the sum of last step CO2 emissions.
Definition: MSLane.cpp:2100
#define CMD_SET_LANE_VARIABLE
#define VAR_ELECTRICITYCONSUMPTION
SUMOReal getCOEmissions() const
Returns the sum of last step CO emissions.
Definition: MSLane.cpp:2112
const SUMOReal SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
Definition: StdDefs.h:57
virtual void writeDouble(double)
const PositionVector & getShape() const
Returns this lane's shape.
Definition: MSLane.h:427
#define SUMOReal
Definition: config.h:214
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
#define LAST_STEP_OCCUPANCY
#define VAR_MAXSPEED
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
Definition: MSLane.cpp:1512
#define VAR_PARAMETER
#define ID_COUNT
SUMOReal getHarmonoise_NoiseEmissions() const
Returns the sum of last step noise emissions.
Definition: MSLane.cpp:2184
static const long CHANGE_PERMISSIONS_PERMANENT
Definition: MSLane.h:977
static const SUMOVTypeParameter & getDefault()
return the default parameters, this is a function due to the http://www.parashift.com/c++-faq/static-init-order.html
#define TYPE_INTEGER
#define ID_LIST
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
#define LAST_STEP_VEHICLE_HALTING_NUMBER
#define VAR_HCEMISSION
#define VAR_WIDTH
static bool getShape(const std::string &id, PositionVector &shape)
Returns the named lane's shape.