Eclipse SUMO - Simulation of Urban MObility
TraCIAPI.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++ TraCI client API implementation
17 /****************************************************************************/
18 #ifndef TraCIAPI_h
19 #define TraCIAPI_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <vector>
26 #include <limits>
27 #include <string>
28 #include <sstream>
29 #include <iomanip>
30 #include <foreign/tcpip/socket.h>
31 #include <libsumo/TraCIConstants.h>
32 #include <libsumo/TraCIDefs.h>
33 
34 // ===========================================================================
35 // global definitions
36 // ===========================================================================
37 #define DEFAULT_VIEW "View #0"
38 #define PRECISION 2
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
49 class TraCIAPI {
50 public:
53  TraCIAPI();
54 
56  ~TraCIAPI();
57 
60 
66  void connect(const std::string& host, int port);
67 
69  void setOrder(int order);
70 
72  void close();
74 
76  void simulationStep(double time = 0);
77 
79  void load(const std::vector<std::string>& args);
80 
83  int getUnsignedByte(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
84  int getByte(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
85  int getInt(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
86  double getDouble(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
87  libsumo::TraCIPositionVector getPolygon(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
88  libsumo::TraCIPosition getPosition(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
89  libsumo::TraCIPosition getPosition3D(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
90  std::string getString(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
91  std::vector<std::string> getStringVector(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
92  libsumo::TraCIColor getColor(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
93  libsumo::TraCIStage getTraCIStage(int cmd, int var, const std::string& id, tcpip::Storage* add = 0);
95 
97  return myOutput;
98  }
99 
106  public:
110  TraCIScopeWrapper(TraCIAPI& parent, int cmdGetID, int cmdSetID, int subscribeID, int contextSubscribeID) :
111  myParent(parent),
112  myCmdGetID(cmdGetID),
113  myCmdSetID(cmdSetID),
114  mySubscribeID(subscribeID),
115  myContextSubscribeID(contextSubscribeID) {
116  }
117 
119  virtual ~TraCIScopeWrapper() {}
120 
122  std::string getParameter(const std::string& objectID, const std::string& key) const;
123 
125  void setParameter(const std::string& objectID, const std::string& key, const std::string& value) const;
126 
127  void subscribe(const std::string& objID, const std::vector<int>& vars, double beginTime, double endTime) const;
128  void subscribeContext(const std::string& objID, int domain, double range, const std::vector<int>& vars, double beginTime, double endTime) const;
129 
131  const libsumo::TraCIResults getSubscriptionResults(const std::string& objID) const;
132 
134  const libsumo::SubscriptionResults getContextSubscriptionResults(const std::string& objID) const;
135 
136  // the following are only for internal use
140 
141 
142  protected:
151 
152 
153  private:
156 
159 
160  };
161 
162 
163 
164 
165 
169  class EdgeScope : public TraCIScopeWrapper {
170  public:
172  virtual ~EdgeScope() {}
173 
174  std::vector<std::string> getIDList() const;
175  int getIDCount() const;
176  double getAdaptedTraveltime(const std::string& edgeID, double time) const;
177  double getEffort(const std::string& edgeID, double time) const;
178  double getCO2Emission(const std::string& edgeID) const;
179  double getCOEmission(const std::string& edgeID) const;
180  double getHCEmission(const std::string& edgeID) const;
181  double getPMxEmission(const std::string& edgeID) const;
182  double getNOxEmission(const std::string& edgeID) const;
183  double getFuelConsumption(const std::string& edgeID) const;
184  double getNoiseEmission(const std::string& edgeID) const;
185  double getElectricityConsumption(const std::string& edgeID) const;
186  double getLastStepMeanSpeed(const std::string& edgeID) const;
187  double getLastStepOccupancy(const std::string& edgeID) const;
188  double getLastStepLength(const std::string& edgeID) const;
189  double getTraveltime(const std::string& edgeID) const;
190  int getLastStepVehicleNumber(const std::string& edgeID) const;
191  double getLastStepHaltingNumber(const std::string& edgeID) const;
192  std::vector<std::string> getLastStepVehicleIDs(const std::string& edgeID) const;
193  int getLaneNumber(const std::string& edgeID) const;
194  std::string getStreetName(const std::string& id) const;
195 
196  void adaptTraveltime(const std::string& edgeID, double time, double beginSeconds = 0., double endSeconds = std::numeric_limits<double>::max()) const;
197  void setEffort(const std::string& edgeID, double effort, double beginSeconds = 0., double endSeconds = std::numeric_limits<double>::max()) const;
198  void setMaxSpeed(const std::string& edgeID, double speed) const;
199 
200  private:
202  EdgeScope(const EdgeScope& src);
203 
206 
207  };
208 
209 
210 
211 
212 
216  class GUIScope : public TraCIScopeWrapper {
217  public:
219  virtual ~GUIScope() {}
220 
221  std::vector<std::string> getIDList() const;
222  double getZoom(const std::string& viewID = DEFAULT_VIEW) const;
223  libsumo::TraCIPosition getOffset(const std::string& viewID = DEFAULT_VIEW) const;
224  std::string getSchema(const std::string& viewID = DEFAULT_VIEW) const;
225  libsumo::TraCIPositionVector getBoundary(const std::string& viewID = DEFAULT_VIEW) const;
226  void setZoom(const std::string& viewID, double zoom) const;
227  void setOffset(const std::string& viewID, double x, double y) const;
228  void setSchema(const std::string& viewID, const std::string& schemeName) const;
229  void setBoundary(const std::string& viewID, double xmin, double ymin, double xmax, double ymax) const;
230  void screenshot(const std::string& viewID, const std::string& filename, const int width = -1, const int height = -1) const;
231  void trackVehicle(const std::string& viewID, const std::string& vehID) const;
232 
233  private:
235  GUIScope(const GUIScope& src);
236 
239 
240  };
241 
242 
243 
244 
245 
250  public:
252  virtual ~InductionLoopScope() {}
253 
254  std::vector<std::string> getIDList() const;
255  double getPosition(const std::string& loopID) const;
256  std::string getLaneID(const std::string& loopID) const;
257  int getLastStepVehicleNumber(const std::string& loopID) const;
258  double getLastStepMeanSpeed(const std::string& loopID) const;
259  std::vector<std::string> getLastStepVehicleIDs(const std::string& loopID) const;
260  double getLastStepOccupancy(const std::string& loopID) const;
261  double getLastStepMeanLength(const std::string& loopID) const;
262  double getTimeSinceDetection(const std::string& loopID) const;
263  std::vector<libsumo::TraCIVehicleData> getVehicleData(const std::string& loopID) const;
264 
265 
266  private:
269 
272 
273  };
274 
275 
276 
277 
278 
283  public:
285  virtual ~JunctionScope() {}
286 
287  std::vector<std::string> getIDList() const;
288  int getIDCount() const;
289  libsumo::TraCIPosition getPosition(const std::string& junctionID) const;
290  libsumo::TraCIPositionVector getShape(const std::string& junctionID) const;
291 
292  private:
295 
298 
299  };
300 
301 
302 
303 
304 
308  class LaneScope : public TraCIScopeWrapper {
309  public:
311  virtual ~LaneScope() {}
312 
313  std::vector<std::string> getIDList() const;
314  int getIDCount() const;
315  double getLength(const std::string& laneID) const;
316  double getMaxSpeed(const std::string& laneID) const;
317  double getWidth(const std::string& laneID) const;
318  std::vector<std::string> getAllowed(const std::string& laneID) const;
319  std::vector<std::string> getDisallowed(const std::string& laneID) const;
320  int getLinkNumber(const std::string& laneID) const;
321  std::vector<libsumo::TraCIConnection> getLinks(const std::string& laneID) const;
322  libsumo::TraCIPositionVector getShape(const std::string& laneID) const;
323  std::string getEdgeID(const std::string& laneID) const;
324  double getCO2Emission(const std::string& laneID) const;
325  double getCOEmission(const std::string& laneID) const;
326  double getHCEmission(const std::string& laneID) const;
327  double getPMxEmission(const std::string& laneID) const;
328  double getNOxEmission(const std::string& laneID) const;
329  double getFuelConsumption(const std::string& laneID) const;
330  double getNoiseEmission(const std::string& laneID) const;
331  double getElectricityConsumption(const std::string& laneID) const;
332  double getLastStepMeanSpeed(const std::string& laneID) const;
333  double getLastStepOccupancy(const std::string& laneID) const;
334  double getLastStepLength(const std::string& laneID) const;
335  double getTraveltime(const std::string& laneID) const;
336  int getLastStepVehicleNumber(const std::string& laneID) const;
337  int getLastStepHaltingNumber(const std::string& laneID) const;
338  std::vector<std::string> getLastStepVehicleIDs(const std::string& laneID) const;
339  std::vector<std::string> getFoes(const std::string& laneID, const std::string& toLaneID) const;
340  std::vector<std::string> getInternalFoes(const std::string& laneID) const;
341 
342  void setAllowed(const std::string& laneID, const std::vector<std::string>& allowedClasses) const;
343  void setDisallowed(const std::string& laneID, const std::vector<std::string>& disallowedClasses) const;
344  void setMaxSpeed(const std::string& laneID, double speed) const;
345  void setLength(const std::string& laneID, double length) const;
346 
347  private:
349  LaneScope(const LaneScope& src);
350 
353 
354  };
355 
356 
361  public:
363  virtual ~LaneAreaScope() {}
364 
365  std::vector<std::string> getIDList() const;
366 
367  private:
370 
373 
374  };
375 
376 
380  class MeMeScope : public TraCIScopeWrapper {
381  public:
383  virtual ~MeMeScope() {}
384 
385  std::vector<std::string> getIDList() const;
386  int getLastStepVehicleNumber(const std::string& detID) const;
387  double getLastStepMeanSpeed(const std::string& detID) const;
388  std::vector<std::string> getLastStepVehicleIDs(const std::string& detID) const;
389  int getLastStepHaltingNumber(const std::string& detID) const;
390 
391  private:
393  MeMeScope(const MeMeScope& src);
394 
397 
398  };
399 
400 
401 
402 
403 
407  class POIScope : public TraCIScopeWrapper {
408  public:
410  virtual ~POIScope() {}
411 
412  std::vector<std::string> getIDList() const;
413  int getIDCount() const;
414  std::string getType(const std::string& poiID) const;
415  libsumo::TraCIPosition getPosition(const std::string& poiID) const;
416  libsumo::TraCIColor getColor(const std::string& poiID) const;
417  double getWidth(const std::string& poiID) const;
418  double getHeight(const std::string& poiID) const;
419  double getAngle(const std::string& poiID) const;
420  std::string getImageFile(const std::string& poiID) const;
421 
422  void setType(const std::string& poiID, const std::string& setType) const;
423  void setPosition(const std::string& poiID, double x, double y) const;
424  void setColor(const std::string& poiID, const libsumo::TraCIColor& c) const;
425  void setWidth(const std::string& poiID, double width) const;
426  void setHeight(const std::string& poiID, double height) const;
427  void setAngle(const std::string& poiID, double angle) const;
428  void setImageFile(const std::string& poiID, const std::string& imageFile) const;
429  void add(const std::string& poiID, double x, double y, const libsumo::TraCIColor& c, const std::string& type, int layer, const std::string& imgFile, double width, double height, double angle) const;
430  void remove(const std::string& poiID, int layer = 0) const;
431 
432  private:
434  POIScope(const POIScope& src);
435 
438 
439  };
440 
441 
442 
443 
444 
449  public:
451  virtual ~PolygonScope() {}
452 
453  std::vector<std::string> getIDList() const;
454  int getIDCount() const;
455  double getLineWidth(const std::string& polygonID) const;
456  std::string getType(const std::string& polygonID) const;
457  libsumo::TraCIPositionVector getShape(const std::string& polygonID) const;
458  libsumo::TraCIColor getColor(const std::string& polygonID) const;
459  void setType(const std::string& polygonID, const std::string& setType) const;
460  void setShape(const std::string& polygonID, const libsumo::TraCIPositionVector& shape) const;
461  void setColor(const std::string& polygonID, const libsumo::TraCIColor& c) const;
462  void setLineWidth(const std::string& polygonID, const double lineWidth) const;
463  void add(const std::string& polygonID, const libsumo::TraCIPositionVector& shape, const libsumo::TraCIColor& c, bool fill, const std::string& type, int layer) const;
464  void remove(const std::string& polygonID, int layer = 0) const;
465 
466  private:
469 
472 
473  };
474 
475 
476 
477 
478 
482  class RouteScope : public TraCIScopeWrapper {
483  public:
485  virtual ~RouteScope() {}
486 
487  std::vector<std::string> getIDList() const;
488  std::vector<std::string> getEdges(const std::string& routeID) const;
489 
490  void add(const std::string& routeID, const std::vector<std::string>& edges) const;
491 
492  private:
494  RouteScope(const RouteScope& src);
495 
498 
499  };
500 
501 
502 
507  public:
509  virtual ~SimulationScope() {}
510 
511  int getCurrentTime() const;
512  double getTime() const;
513  int getLoadedNumber() const;
514  std::vector<std::string> getLoadedIDList() const;
515  int getDepartedNumber() const;
516  std::vector<std::string> getDepartedIDList() const;
517  int getArrivedNumber() const;
518  std::vector<std::string> getArrivedIDList() const;
519  int getStartingTeleportNumber() const;
520  std::vector<std::string> getStartingTeleportIDList() const;
521  int getEndingTeleportNumber() const;
522  std::vector<std::string> getEndingTeleportIDList() const;
523  double getDeltaT() const;
525  int getMinExpectedNumber() const;
526 
527  int getBusStopWaiting(const std::string& stopID) const;
528  std::vector<std::string> getBusStopWaitingIDList(const std::string& stopID) const;
529 
530  libsumo::TraCIPosition convert2D(const std::string& edgeID, double pos, int laneIndex = 0, bool toGeo = false) const;
531  libsumo::TraCIPosition convert3D(const std::string& edgeID, double pos, int laneIndex = 0, bool toGeo = false) const;
532  libsumo::TraCIRoadPosition convertRoad(double x, double y, bool isGeo = false, const std::string& vClass = "ignoring") const;
533  libsumo::TraCIPosition convertGeo(double x, double y, bool fromGeo = false) const;
534 
535  double getDistance2D(double x1, double y1, double x2, double y2, bool isGeo = false, bool isDriving = false);
536  double getDistanceRoad(const std::string& edgeID1, double pos1, const std::string& edgeID2, double pos2, bool isDriving = false);
537  libsumo::TraCIStage findRoute(const std::string& fromEdge, const std::string& toEdge, const std::string& vType = "", double pos = -1., int routingMode = 0) const;
538  void writeMessage(const std::string msg);
539 
540  private:
543 
546 
547  };
548 
549 
550 
551 
552 
557  public:
559  virtual ~TrafficLightScope() {}
560 
561  std::vector<std::string> getIDList() const;
562  int getIDCount() const;
563  std::string getRedYellowGreenState(const std::string& tlsID) const;
564  std::vector<libsumo::TraCILogic> getCompleteRedYellowGreenDefinition(const std::string& tlsID) const;
565  std::vector<std::string> getControlledLanes(const std::string& tlsID) const;
566  std::vector<std::vector<libsumo::TraCILink> > getControlledLinks(const std::string& tlsID) const;
567  std::string getProgram(const std::string& tlsID) const;
568  int getPhase(const std::string& tlsID) const;
569  double getPhaseDuration(const std::string& tlsID) const;
570  double getNextSwitch(const std::string& tlsID) const;
571  int getServedPersonCount(const std::string& tlsID, int index) const;
572  std::string getPhaseName(const std::string& tlsID) const;
573 
574  void setRedYellowGreenState(const std::string& tlsID, const std::string& state) const;
575  void setPhase(const std::string& tlsID, int index) const;
576  void setPhaseName(const std::string& tlsID, const std::string& name) const;
577  void setProgram(const std::string& tlsID, const std::string& programID) const;
578  void setPhaseDuration(const std::string& tlsID, double phaseDuration) const;
579  void setCompleteRedYellowGreenDefinition(const std::string& tlsID, const libsumo::TraCILogic& logic) const;
580 
581  private:
584 
587 
588  };
589 
590 
591 
592 
593 
598  public:
600  virtual ~VehicleTypeScope() {}
601 
602  std::vector<std::string> getIDList() const;
603  double getLength(const std::string& typeID) const;
604  double getMaxSpeed(const std::string& typeID) const;
605  double getSpeedFactor(const std::string& typeID) const;
606  double getSpeedDeviation(const std::string& typeID) const;
607  double getAccel(const std::string& typeID) const;
608  double getDecel(const std::string& typeID) const;
609  double getEmergencyDecel(const std::string& typeID) const;
610  double getApparentDecel(const std::string& typeID) const;
611  double getImperfection(const std::string& typeID) const;
612  double getTau(const std::string& typeID) const;
613  std::string getVehicleClass(const std::string& typeID) const;
614  std::string getEmissionClass(const std::string& typeID) const;
615  std::string getShapeClass(const std::string& typeID) const;
616  double getMinGap(const std::string& typeID) const;
617  double getWidth(const std::string& typeID) const;
618  double getHeight(const std::string& typeID) const;
619  libsumo::TraCIColor getColor(const std::string& typeID) const;
620  double getMinGapLat(const std::string& typeID) const;
621  double getMaxSpeedLat(const std::string& typeID) const;
622  std::string getLateralAlignment(const std::string& typeID) const;
623  int getPersonCapacity(const std::string& typeID) const;
624 
625  void setLength(const std::string& typeID, double length) const;
626  void setMaxSpeed(const std::string& typeID, double speed) const;
627  void setVehicleClass(const std::string& typeID, const std::string& clazz) const;
628  void setSpeedFactor(const std::string& typeID, double factor) const;
629  void setSpeedDeviation(const std::string& typeID, double deviation) const;
630  void setEmissionClass(const std::string& typeID, const std::string& clazz) const;
631  void setShapeClass(const std::string& typeID, const std::string& shapeClass) const;
632  void setWidth(const std::string& typeID, double width) const;
633  void setHeight(const std::string& typeID, double height) const;
634  void setMinGap(const std::string& typeID, double minGap) const;
635  void setAccel(const std::string& typeID, double accel) const;
636  void setDecel(const std::string& typeID, double decel) const;
637  void setEmergencyDecel(const std::string& typeID, double decel) const;
638  void setApparentDecel(const std::string& typeID, double decel) const;
639  void setImperfection(const std::string& typeID, double imperfection) const;
640  void setTau(const std::string& typeID, double tau) const;
641  void setColor(const std::string& typeID, const libsumo::TraCIColor& c) const;
642  void setMinGapLat(const std::string& typeID, double minGapLat) const;
643  void setMaxSpeedLat(const std::string& typeID, double speed) const;
644  void setLateralAlignment(const std::string& typeID, const std::string& latAlignment) const;
645  void copy(const std::string& origTypeID, const std::string& newTypeID) const;
646 
647  private:
650 
653 
654  };
655 
656 
657 
658 
659 
664  public:
666  virtual ~VehicleScope() {}
667 
683  SIGNAL_RESET = -1, /*< sending a negative signal resets all signals to their computed values immediately */
684  };
685 
688  std::vector<std::string> getIDList() const;
689  int getIDCount() const;
690  double getSpeed(const std::string& vehicleID) const;
691  double getLateralSpeed(const std::string& vehicleID) const;
692  double getAcceleration(const std::string& vehicleID) const;
693  libsumo::TraCIPosition getPosition(const std::string& vehicleID) const;
694  libsumo::TraCIPosition getPosition3D(const std::string& vehicleID) const;
695  double getAngle(const std::string& vehicleID) const;
696  std::string getRoadID(const std::string& vehicleID) const;
697  std::string getLaneID(const std::string& vehicleID) const;
698  int getLaneIndex(const std::string& vehicleID) const;
699  std::string getTypeID(const std::string& vehicleID) const;
700  std::string getRouteID(const std::string& vehicleID) const;
701  int getRouteIndex(const std::string& vehicleID) const;
702  std::vector<std::string> getRoute(const std::string& vehicleID) const;
703  libsumo::TraCIColor getColor(const std::string& vehicleID) const;
704  double getLanePosition(const std::string& vehicleID) const;
705  double getDistance(const std::string& vehicleID) const;
706  int getSignals(const std::string& vehicleID) const;
707  double getCO2Emission(const std::string& vehicleID) const;
708  double getCOEmission(const std::string& vehicleID) const;
709  double getHCEmission(const std::string& vehicleID) const;
710  double getPMxEmission(const std::string& vehicleID) const;
711  double getNOxEmission(const std::string& vehicleID) const;
712  double getFuelConsumption(const std::string& vehicleID) const;
713  double getNoiseEmission(const std::string& vehicleID) const;
714  double getElectricityConsumption(const std::string& vehicleID) const;
715  int getSpeedMode(const std::string& vehicleID) const;
716  int getStopState(const std::string& vehicleID) const;
717  double getWaitingTime(const std::string& vehicleID) const;
718  double getAccumulatedWaitingTime(const std::string& vehicleID) const;
719  double getSlope(const std::string& vehicleID) const;
720  double getAllowedSpeed(const std::string& vehicleID) const;
721  int getPersonNumber(const std::string& vehicleID) const;
722  std::vector<std::string> getPersonIDList(const std::string& vehicleID) const;
723  double getSpeedWithoutTraCI(const std::string& vehicleID) const;
724  bool isRouteValid(const std::string& vehicleID) const;
725  double getLateralLanePosition(const std::string& vehicleID) const;
726  double getSpeedFactor(const std::string& vehicleID) const;
727  std::string getLine(const std::string& vehicleID) const;
728  std::vector<std::string> getVia(const std::string& vehicleID) const;
729  std::vector<libsumo::TraCINextTLSData> getNextTLS(const std::string& vehID) const;
730  std::vector<libsumo::TraCIBestLanesData> getBestLanes(const std::string& vehicleID) const;
731  std::pair<std::string, double> getLeader(const std::string& vehicleID, double dist) const;
732  int getRoutingMode(const std::string& vehicleID) const;
733  std::pair<int, int> getLaneChangeState(const std::string& vehicleID, int direction) const;
735 
738  double getLength(const std::string& vehicleID) const;
739  double getMaxSpeed(const std::string& vehicleID) const;
740  double getAccel(const std::string& vehicleID) const;
741  double getDecel(const std::string& vehicleID) const;
742  double getEmergencyDecel(const std::string& vehicleID) const;
743  double getApparentDecel(const std::string& vehicleID) const;
744  double getTau(const std::string& vehicleID) const;
745  double getImperfection(const std::string& vehicleID) const;
746  double getSpeedDeviation(const std::string& vehicleID) const;
747  double getMinGap(const std::string& vehicleID) const;
748  double getWidth(const std::string& vehicleID) const;
749  double getHeight(const std::string& veihcleID) const;
750  double getMaxSpeedLat(const std::string& vehicleID) const;
751  double getMinGapLat(const std::string& vehicleID) const;
752  int getPersonCapacity(const std::string& vehicleID) const;
753  std::string getVehicleClass(const std::string& vehicleID) const;
754  std::string getEmissionClass(const std::string& vehicleID) const;
755  std::string getShapeClass(const std::string& vehicleID) const;
756  std::string getLateralAlignment(const std::string& vehicleID) const;
758 
761  void add(const std::string& vehicleID,
762  const std::string& routeID,
763  const std::string& typeID = "DEFAULT_VEHTYPE",
764  std::string depart = "-1",
765  const std::string& departLane = "first",
766  const std::string& departPos = "base",
767  const std::string& departSpeed = "0",
768  const std::string& arrivalLane = "current",
769  const std::string& arrivalPos = "max",
770  const std::string& arrivalSpeed = "current",
771  const std::string& fromTaz = "",
772  const std::string& toTaz = "",
773  const std::string& line = "",
774  int personCapacity = 0,
775  int personNumber = 0) const;
776 
777  void changeTarget(const std::string& vehicleID, const std::string& edgeID) const;
778  void changeLane(const std::string& vehicleID, int laneIndex, double duration) const;
779  void changeLaneRelative(const std::string& vehicleID, int laneChange, double duration) const;
780  void changeSublane(const std::string& vehicleID, double latDist) const;
781  void setRouteID(const std::string& vehicleID, const std::string& routeID) const;
782  void setRoute(const std::string& vehicleID, const std::vector<std::string>& edge) const;
783  void rerouteTraveltime(const std::string& vehicleID, bool currentTravelTimes = true) const;
784  void moveTo(const std::string& vehicleID, const std::string& laneID, double position) const;
785  void moveToXY(const std::string& vehicleID, const std::string& edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const;
786  void slowDown(const std::string& vehicleID, double speed, double duration) const;
787  void openGap(const std::string& vehicleID, double newTau, double duration, double changeRate, double maxDecel) const;
788  void setSpeed(const std::string& vehicleID, double speed) const;
789  void setSpeedMode(const std::string& vehicleID, int mode) const;
790  void setStop(const std::string vehicleID, const std::string edgeID, const double endPos = 1.,
791  const int laneIndex = 0, const double duration = std::numeric_limits<double>::max(),
792  const int flags = 0, const double startPos = std::numeric_limits<int>::min(),
793  const double until = -1) const;
794  void setType(const std::string& vehicleID, const std::string& typeID) const;
795  void remove(const std::string& vehicleID, char reason = libsumo::REMOVE_VAPORIZED) const;
796  void setColor(const std::string& vehicleID, const libsumo::TraCIColor& c) const;
797  void setLine(const std::string& vehicleID, const std::string& line) const;
798  void setVia(const std::string& vehicleID, const std::vector<std::string>& via) const;
799  void setSignals(const std::string& vehicleID, int signals) const;
800  void setRoutingMode(const std::string& vehicleID, int routingMode) const;
802 
805  void setShapeClass(const std::string& vehicleID, const std::string& clazz) const;
806  void setEmissionClass(const std::string& vehicleID, const std::string& clazz) const;
807  void setSpeedFactor(const std::string& vehicleID, double factor) const;
808  void setMaxSpeed(const std::string& vehicleID, double speed) const;
810 
812  /* @brief Filters are added to the last modified vehicle context
813  * subscription (call these fucntions right after subscribing) */
815 
816  /* @brief Adds a lane-filter, lanes is a list of relative lane indices (-1 -> right neighboring lane of the ego, 0 -> ego lane, etc.)
817  * noOpposite specifies whether vehicles on opposite direction lanes shall be returned
818  * downstreamDist and upstreamDist specify the range of the search for surrounding vehicles along the road net. */
819  void addSubscriptionFilterLanes(const std::vector<int>& lanes,
820  bool noOpposite = false, double downstreamDist = -1, double upstreamDist = -1) const;
821 
822  /* @brief Omits vehicles on other edges than the ego's */
823  void addSubscriptionFilterNoOpposite() const;
824 
825  /* @brief Limits the downstream distance for resulting vehicles */
826  void addSubscriptionFilterDownstreamDistance(double dist) const;
827 
828  /* @brief Limits the updstream distance for resulting vehicles */
829  void addSubscriptionFilterUpstreamDistance(double dist) const;
830 
831  /* @brief Restricts vehicles returned by the last modified vehicle context subscription to leader and follower of the ego.
832  * downstreamDist and upstreamDist specify the range of the search for leader and follower along the road net. */
833  void addSubscriptionFilterCFManeuver(double downstreamDist = -1, double upstreamDist = -1) const;
834 
835  /* @brief Restricts returned vehicles to neighbor and ego-lane leader
836  * and follower of the ego in the given direction
837  * noOpposite specifies whether vehicles on opposite direction lanes shall be returned
838  * downstreamDist and upstreamDist specify the range of the search for leader and follower along the road net.
839  * Combine with: distance filters; vClass/vType filter. */
840  void addSubscriptionFilterLCManeuver(int direction, bool noOpposite = false, double downstreamDist = -1, double upstreamDist = -1) const;
841 
842  /* @brief Restricts returned vehicles to neighbor and ego-lane leader and follower of the ego.
843  * Combine with: lanes-filter to restrict to one direction; distance filters; vClass/vType filter. */
844  void addSubscriptionFilterLeadFollow(const std::vector<int>& lanes) const;
845 
846  /* @brief Restricts returned vehicles to foes on an upcoming junction */
847  void addSubscriptionFilterTurn(double downstreamDist = -1, double upstreamDist = -1) const;
848 
849  /* @brief Restricts returned vehicles to the given classes */
850  void addSubscriptionFilterVClass(const std::vector<std::string>& vClasses) const;
851 
852  /* @brief Restricts returned vehicles to the given types */
853  void addSubscriptionFilterVType(const std::vector<std::string>& vTypes) const;
854 
855  /* @brief Restricts returned vehicles to the givening FOV-angle */
856  void addSubscriptionFilterFieldOfVision(double angle) const;
857 
859 
860  private:
861  void addSubscriptionFilterEmpty(int filterType) const;
862  void addSubscriptionFilterFloat(int filterType, double val) const;
863  void addSubscriptionFilterStringList(int filterType, const std::vector<std::string>& vals) const;
864  void addSubscriptionFilterByteList(int filterType, const std::vector<int>& vals) const;
865 
868 
871 
872  };
873 
878  public:
880  virtual ~PersonScope() {}
881 
882  std::vector<std::string> getIDList() const;
883  int getIDCount() const;
884  double getSpeed(const std::string& personID) const;
885  libsumo::TraCIPosition getPosition(const std::string& personID) const;
886  libsumo::TraCIPosition getPosition3D(const std::string& personID) const;
887  std::string getRoadID(const std::string& personID) const;
888  std::string getTypeID(const std::string& personID) const;
889  double getWaitingTime(const std::string& personID) const;
890  std::string getNextEdge(const std::string& personID) const;
891  std::string getVehicle(const std::string& personID) const;
892  int getRemainingStages(const std::string& personID) const;
893  libsumo::TraCIStage getStage(const std::string& personID, int nextStageIndex = 0) const;
894  std::vector<std::string> getEdges(const std::string& personID, int nextStageIndex = 0) const;
895  double getAngle(const std::string& personID) const;
896  double getSlope(const std::string& personID) const;
897  double getLanePosition(const std::string& personID) const;
898  libsumo::TraCIColor getColor(const std::string& personID) const;
899 
902  double getLength(const std::string& personID) const;
904 
905 
906  void removeStages(const std::string& personID) const;
907  void add(const std::string& personID, const std::string& edgeID, double pos, double depart = libsumo::DEPARTFLAG_NOW, const std::string typeID = "DEFAULT_PEDTYPE");
908  void appendStage(const std::string& personID, const libsumo::TraCIStage& stage);
909  void appendWaitingStage(const std::string& personID, double duration, const std::string& description = "waiting", const std::string& stopID = "");
910  void appendWalkingStage(const std::string& personID, const std::vector<std::string>& edges, double arrivalPos, double duration = -1, double speed = -1, const std::string& stopID = "");
911  void appendDrivingStage(const std::string& personID, const std::string& toEdge, const std::string& lines, const std::string& stopID = "");
912  void removeStage(const std::string& personID, int nextStageIndex) const;
913  void rerouteTraveltime(const std::string& personID) const;
914  void setSpeed(const std::string& personID, double speed) const;
915  void setType(const std::string& personID, const std::string& typeID) const;
916  void setLength(const std::string& personID, double length) const;
917  void setWidth(const std::string& personID, double width) const;
918  void setHeight(const std::string& personID, double height) const;
919  void setMinGap(const std::string& personID, double minGap) const;
920  void setColor(const std::string& personID, const libsumo::TraCIColor& c) const;
921 
922  private:
925 
928  };
929 
930 
931 
932 public:
963 
964 
965 protected:
968 
971  void send_commandSimulationStep(double time) const;
972 
973 
976  void send_commandClose() const;
977 
978 
981  void send_commandSetOrder(int order) const;
982 
990  void createCommand(int cmdID, int varID, const std::string& objID, tcpip::Storage* add = nullptr) const;
991  void createFilterCommand(int cmdID, int varID, tcpip::Storage* add = nullptr) const;
992 
993 
1001  void send_commandSubscribeObjectVariable(int domID, const std::string& objID, double beginTime, double endTime, const std::vector<int>& vars) const;
1002 
1003 
1013  void send_commandSubscribeObjectContext(int domID, const std::string& objID, double beginTime, double endTime,
1014  int domain, double range, const std::vector<int>& vars) const;
1016 
1017 
1020 
1027  void check_resultState(tcpip::Storage& inMsg, int command, bool ignoreCommandId = false, std::string* acknowledgement = 0) const;
1028 
1032  int check_commandGetResult(tcpip::Storage& inMsg, int command, int expectedType = -1, bool ignoreCommandId = false) const;
1033 
1034  bool processGet(int command, int expectedType, bool ignoreCommandId = false);
1035  bool processSet(int command);
1037 
1038  void readVariableSubscription(int cmdId, tcpip::Storage& inMsg);
1039  void readContextSubscription(int cmdId, tcpip::Storage& inMsg);
1040  void readVariables(tcpip::Storage& inMsg, const std::string& objectID, int variableCount, libsumo::SubscriptionResults& into);
1041 
1042  template <class T>
1043  static inline std::string toString(const T& t, std::streamsize accuracy = PRECISION) {
1044  std::ostringstream oss;
1045  oss.setf(std::ios::fixed, std::ios::floatfield);
1046  oss << std::setprecision(accuracy);
1047  oss << t;
1048  return oss.str();
1049  }
1050 
1052  void closeSocket();
1053 
1054 protected:
1055  std::map<int, TraCIScopeWrapper*> myDomains;
1062 };
1063 
1064 
1065 #endif
1066 
1067 /****************************************************************************/
TraCIAPI::EdgeScope::getCO2Emission
double getCO2Emission(const std::string &edgeID) const
Definition: TraCIAPI.cpp:689
libsumo::CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE
Definition: TraCIConstants.h:170
libsumo::CMD_GET_TL_VARIABLE
TRACI_CONST int CMD_GET_TL_VARIABLE
Definition: TraCIConstants.h:119
TraCIAPI::VehicleScope::getLeader
std::pair< std::string, double > getLeader(const std::string &vehicleID, double dist) const
Definition: TraCIAPI.cpp:2665
TraCIAPI::VehicleScope::SIGNAL_BLINKER_RIGHT
@ SIGNAL_BLINKER_RIGHT
Definition: TraCIAPI.h:669
TraCIAPI::PersonScope::setLength
void setLength(const std::string &personID, double length) const
Definition: TraCIAPI.cpp:3579
TraCIAPI::TrafficLightScope::getProgram
std::string getProgram(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1975
TraCIAPI::POIScope::getHeight
double getHeight(const std::string &poiID) const
Definition: TraCIAPI.cpp:1348
TraCIAPI::VehicleScope::getAllowedSpeed
double getAllowedSpeed(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2771
TraCIAPI::PolygonScope::operator=
PolygonScope & operator=(const PolygonScope &src)
invalidated assignment operator
TraCIAPI::VehicleScope::addSubscriptionFilterNoOpposite
void addSubscriptionFilterNoOpposite() const
Definition: TraCIAPI.cpp:3203
TraCIAPI::EdgeScope::getFuelConsumption
double getFuelConsumption(const std::string &edgeID) const
Definition: TraCIAPI.cpp:715
TraCIAPI::PersonScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:3330
TraCIAPI::POIScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:1323
TraCIAPI::PolygonScope::PolygonScope
PolygonScope(const PolygonScope &src)
invalidated copy constructor
TraCIAPI::SimulationScope::getArrivedNumber
int getArrivedNumber() const
Definition: TraCIAPI.cpp:1655
TraCIAPI::POIScope::add
void add(const std::string &poiID, double x, double y, const libsumo::TraCIColor &c, const std::string &type, int layer, const std::string &imgFile, double width, double height, double angle) const
Definition: TraCIAPI.cpp:1438
TraCIAPI::VehicleTypeScope::getHeight
double getHeight(const std::string &typeID) const
Definition: TraCIAPI.cpp:2204
TraCIAPI::TrafficLightScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1874
TraCIAPI::VehicleScope::getPosition
libsumo::TraCIPosition getPosition(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2444
libsumo::CMD_GET_POLYGON_VARIABLE
TRACI_CONST int CMD_GET_POLYGON_VARIABLE
Definition: TraCIConstants.h:209
TraCIAPI::VehicleScope::getRoute
std::vector< std::string > getRoute(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2490
TraCIAPI::VehicleScope::getSpeedWithoutTraCI
double getSpeedWithoutTraCI(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2791
TraCIAPI::VehicleScope::changeLane
void changeLane(const std::string &vehicleID, int laneIndex, double duration) const
Definition: TraCIAPI.cpp:2897
TraCIAPI::VehicleScope::changeLaneRelative
void changeLaneRelative(const std::string &vehicleID, int laneChange, double duration) const
Definition: TraCIAPI.cpp:2911
TraCIAPI::PersonScope::setType
void setType(const std::string &personID, const std::string &typeID) const
Definition: TraCIAPI.cpp:3570
TraCIAPI::MeMeScope::operator=
MeMeScope & operator=(const MeMeScope &src)
invalidated assignment operator
TraCIAPI::VehicleScope::changeTarget
void changeTarget(const std::string &vehicleID, const std::string &edgeID) const
Definition: TraCIAPI.cpp:2887
libsumo::CMD_SET_GUI_VARIABLE
TRACI_CONST int CMD_SET_GUI_VARIABLE
Definition: TraCIConstants.h:273
TraCIAPI::MeMeScope::getLastStepMeanSpeed
double getLastStepMeanSpeed(const std::string &detID) const
Definition: TraCIAPI.cpp:1298
TraCIAPI::LaneAreaScope::LaneAreaScope
LaneAreaScope(TraCIAPI &parent)
Definition: TraCIAPI.h:362
TraCIAPI::VehicleScope::setMaxSpeed
void setMaxSpeed(const std::string &vehicleID, double speed) const
Definition: TraCIAPI.cpp:3108
TraCIAPI::VehicleScope::getPersonNumber
int getPersonNumber(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2776
TraCIAPI::GUIScope::getSchema
std::string getSchema(const std::string &viewID=DEFAULT_VIEW) const
Definition: TraCIAPI.cpp:845
TraCIAPI::VehicleScope::getRoadID
std::string getRoadID(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2459
TraCIAPI::VehicleScope::getPosition3D
libsumo::TraCIPosition getPosition3D(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2449
TraCIAPI::VehicleScope::moveToXY
void moveToXY(const std::string &vehicleID, const std::string &edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const
Definition: TraCIAPI.cpp:2990
TraCIAPI::VehicleScope::addSubscriptionFilterCFManeuver
void addSubscriptionFilterCFManeuver(double downstreamDist=-1, double upstreamDist=-1) const
Definition: TraCIAPI.cpp:3219
TraCIAPI::LaneScope::getNOxEmission
double getNOxEmission(const std::string &laneID) const
Definition: TraCIAPI.cpp:1153
TraCIAPI::VehicleTypeScope::getMinGapLat
double getMinGapLat(const std::string &typeID) const
Definition: TraCIAPI.cpp:2179
TraCIAPI::PersonScope::getAngle
double getAngle(const std::string &personID) const
Definition: TraCIAPI.cpp:3350
TraCIAPI::VehicleTypeScope::getMaxSpeedLat
double getMaxSpeedLat(const std::string &typeID) const
Definition: TraCIAPI.cpp:2184
TraCIAPI::lane
LaneScope lane
Scope for interaction with lanes.
Definition: TraCIAPI.h:942
libsumo::CMD_SUBSCRIBE_VEHICLE_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_VEHICLE_VARIABLE
Definition: TraCIConstants.h:155
TraCIAPI::EdgeScope::getNOxEmission
double getNOxEmission(const std::string &edgeID) const
Definition: TraCIAPI.cpp:710
TraCIAPI::InductionLoopScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:925
tcpip::Socket
Definition: socket.h:61
TraCIAPI::JunctionScope::JunctionScope
JunctionScope(const JunctionScope &src)
invalidated copy constructor
TraCIAPI::LaneScope::getInternalFoes
std::vector< std::string > getInternalFoes(const std::string &laneID) const
Definition: TraCIAPI.cpp:1225
TraCIAPI::readContextSubscription
void readContextSubscription(int cmdId, tcpip::Storage &inMsg)
Definition: TraCIAPI.cpp:605
TraCIAPI::close
void close()
ends the simulation and closes the connection
Definition: TraCIAPI.cpp:102
TraCIAPI::LaneScope::getHCEmission
double getHCEmission(const std::string &laneID) const
Definition: TraCIAPI.cpp:1143
TraCIAPI::JunctionScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:1013
TraCIAPI::processSet
bool processSet(int command)
Definition: TraCIAPI.cpp:342
TraCIAPI::LaneScope::getFoes
std::vector< std::string > getFoes(const std::string &laneID, const std::string &toLaneID) const
Definition: TraCIAPI.cpp:1209
TraCIAPI::VehicleTypeScope::getTau
double getTau(const std::string &typeID) const
Definition: TraCIAPI.cpp:2154
TraCIAPI::LaneScope::getLastStepLength
double getLastStepLength(const std::string &laneID) const
Definition: TraCIAPI.cpp:1183
TraCIAPI::POIScope::getPosition
libsumo::TraCIPosition getPosition(const std::string &poiID) const
Definition: TraCIAPI.cpp:1333
TraCIAPI::PersonScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:3325
TraCIAPI::POIScope::getType
std::string getType(const std::string &poiID) const
Definition: TraCIAPI.cpp:1328
TraCIAPI::VehicleScope::moveTo
void moveTo(const std::string &vehicleID, const std::string &laneID, double position) const
Definition: TraCIAPI.cpp:2977
TraCIAPI::VehicleTypeScope::VehicleTypeScope
VehicleTypeScope(const VehicleTypeScope &src)
invalidated copy constructor
TraCIAPI::EdgeScope::getNoiseEmission
double getNoiseEmission(const std::string &edgeID) const
Definition: TraCIAPI.cpp:720
TraCIAPI::LaneScope::~LaneScope
virtual ~LaneScope()
Definition: TraCIAPI.h:311
libsumo::TraCIResults
std::map< int, std::shared_ptr< TraCIResult > > TraCIResults
{variable->value}
Definition: TraCIDefs.h:201
libsumo::TraCIPosition
A 3D-position.
Definition: TraCIDefs.h:109
TraCIAPI::PersonScope::getPosition
libsumo::TraCIPosition getPosition(const std::string &personID) const
Definition: TraCIAPI.cpp:3340
TraCIAPI::VehicleScope::setSpeedFactor
void setSpeedFactor(const std::string &vehicleID, double factor) const
Definition: TraCIAPI.cpp:3099
TraCIAPI::GUIScope
Scope for interaction with the gui.
Definition: TraCIAPI.h:216
DEFAULT_VIEW
#define DEFAULT_VIEW
Definition: TraCIAPI.h:37
TraCIAPI::TraCIScopeWrapper::getContextSubscriptionResults
const libsumo::SubscriptionResults getContextSubscriptionResults(const std::string &objID) const
Definition: TraCIAPI.cpp:3697
TraCIAPI::VehicleScope::setRoutingMode
void setRoutingMode(const std::string &vehicleID, int routingMode) const
Definition: TraCIAPI.cpp:3159
libsumo::CMD_SUBSCRIBE_ROUTE_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_ROUTE_CONTEXT
Definition: TraCIConstants.h:175
TraCIAPI::MeMeScope::getLastStepVehicleNumber
int getLastStepVehicleNumber(const std::string &detID) const
Definition: TraCIAPI.cpp:1293
TraCIAPI::POIScope
Scope for interaction with POIs.
Definition: TraCIAPI.h:407
TraCIAPI::VehicleScope::getLength
double getLength(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2756
TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper
virtual ~TraCIScopeWrapper()
Destructor.
Definition: TraCIAPI.h:119
TraCIAPI::junction
JunctionScope junction
Scope for interaction with junctions.
Definition: TraCIAPI.h:940
TraCIAPI::POIScope::setAngle
void setAngle(const std::string &poiID, double angle) const
Definition: TraCIAPI.cpp:1418
TraCIAPI::send_commandSetOrder
void send_commandSetOrder(int order) const
Sends a SetOrder command.
Definition: TraCIAPI.cpp:147
TraCIAPI::VehicleScope::getMinGap
double getMinGap(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2746
TraCIAPI::TrafficLightScope::setPhase
void setPhase(const std::string &tlsID, int index) const
Definition: TraCIAPI.cpp:2019
TraCIAPI::VehicleScope::addSubscriptionFilterStringList
void addSubscriptionFilterStringList(int filterType, const std::vector< std::string > &vals) const
Definition: TraCIAPI.cpp:3299
TraCIAPI::RouteScope::~RouteScope
virtual ~RouteScope()
Definition: TraCIAPI.h:485
TraCIAPI::PersonScope::getVehicle
std::string getVehicle(const std::string &personID) const
Definition: TraCIAPI.cpp:3396
TraCIAPI::VehicleScope::SIGNAL_FOGLIGHT
@ SIGNAL_FOGLIGHT
Definition: TraCIAPI.h:674
TraCIAPI::VehicleTypeScope::setShapeClass
void setShapeClass(const std::string &typeID, const std::string &shapeClass) const
Definition: TraCIAPI.cpp:2335
TraCIAPI::LaneScope::LaneScope
LaneScope(TraCIAPI &parent)
Definition: TraCIAPI.h:310
TraCIAPI::PolygonScope::add
void add(const std::string &polygonID, const libsumo::TraCIPositionVector &shape, const libsumo::TraCIColor &c, bool fill, const std::string &type, int layer) const
Definition: TraCIAPI.cpp:1561
libsumo::CMD_GET_PERSON_VARIABLE
TRACI_CONST int CMD_GET_PERSON_VARIABLE
Definition: TraCIConstants.h:297
TraCIAPI::VehicleScope::SIGNAL_FRONTLIGHT
@ SIGNAL_FRONTLIGHT
Definition: TraCIAPI.h:673
TraCIAPI::VehicleTypeScope::getSpeedDeviation
double getSpeedDeviation(const std::string &typeID) const
Definition: TraCIAPI.cpp:2124
TraCIAPI::POIScope::setImageFile
void setImageFile(const std::string &poiID, const std::string &imageFile) const
Definition: TraCIAPI.cpp:1428
libsumo::CMD_SET_POI_VARIABLE
TRACI_CONST int CMD_SET_POI_VARIABLE
Definition: TraCIConstants.h:198
TraCIAPI::getPolygon
libsumo::TraCIPositionVector getPolygon(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:395
TraCIAPI::SimulationScope::getDistanceRoad
double getDistanceRoad(const std::string &edgeID1, double pos1, const std::string &edgeID2, double pos2, bool isDriving=false)
Definition: TraCIAPI.cpp:1821
TraCIAPI::VehicleScope::setSpeedMode
void setSpeedMode(const std::string &vehicleID, int mode) const
Definition: TraCIAPI.cpp:3057
TraCIAPI::TrafficLightScope::getRedYellowGreenState
std::string getRedYellowGreenState(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1884
TraCIAPI::InductionLoopScope::InductionLoopScope
InductionLoopScope(TraCIAPI &parent)
Definition: TraCIAPI.h:251
TraCIAPI::TraCIScopeWrapper::subscribe
void subscribe(const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const
Definition: TraCIAPI.cpp:3653
TraCIAPI::person
PersonScope person
Scope for interaction with persons.
Definition: TraCIAPI.h:948
TraCIAPI::TrafficLightScope::operator=
TrafficLightScope & operator=(const TrafficLightScope &src)
invalidated assignment operator
TraCIAPI::LaneAreaScope
Scope for interaction with lane area detectors.
Definition: TraCIAPI.h:360
TraCIAPI::RouteScope::RouteScope
RouteScope(const RouteScope &src)
invalidated copy constructor
TraCIAPI::VehicleScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:2414
libsumo::CMD_SET_POLYGON_VARIABLE
TRACI_CONST int CMD_SET_POLYGON_VARIABLE
Definition: TraCIConstants.h:213
TraCIAPI::VehicleTypeScope::setMinGap
void setMinGap(const std::string &typeID, double minGap) const
Definition: TraCIAPI.cpp:2289
TraCIAPI::EdgeScope
Scope for interaction with edges.
Definition: TraCIAPI.h:169
TraCIAPI::PersonScope::PersonScope
PersonScope(const PersonScope &src)
invalidated copy constructor
TraCIAPI::LaneScope::getLinks
std::vector< libsumo::TraCIConnection > getLinks(const std::string &laneID) const
Definition: TraCIAPI.cpp:1073
TraCIAPI::VehicleScope::SIGNAL_DOOR_OPEN_LEFT
@ SIGNAL_DOOR_OPEN_LEFT
Definition: TraCIAPI.h:678
TraCIAPI::LaneScope
Scope for interaction with lanes.
Definition: TraCIAPI.h:308
TraCIAPI::VehicleScope::addSubscriptionFilterTurn
void addSubscriptionFilterTurn(double downstreamDist=-1, double upstreamDist=-1) const
Definition: TraCIAPI.cpp:3254
TraCIAPI::LaneScope::setAllowed
void setAllowed(const std::string &laneID, const std::vector< std::string > &allowedClasses) const
Definition: TraCIAPI.cpp:1231
libsumo::CMD_GET_LANEAREA_VARIABLE
TRACI_CONST int CMD_GET_LANEAREA_VARIABLE
Definition: TraCIConstants.h:284
TraCIAPI::setOrder
void setOrder(int order)
set priority (execution order) for the client
Definition: TraCIAPI.cpp:87
TraCIAPI::LaneScope::getLastStepVehicleIDs
std::vector< std::string > getLastStepVehicleIDs(const std::string &laneID) const
Definition: TraCIAPI.cpp:1203
TraCIAPI::VehicleScope::getNoiseEmission
double getNoiseEmission(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2550
TraCIAPI::SimulationScope::getDepartedNumber
int getDepartedNumber() const
Definition: TraCIAPI.cpp:1645
TraCIAPI::GUIScope::setOffset
void setOffset(const std::string &viewID, double x, double y) const
Definition: TraCIAPI.cpp:865
TraCIAPI::VehicleScope::getSlope
double getSlope(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2571
TraCIAPI::SimulationScope::getNetBoundary
libsumo::TraCIPositionVector getNetBoundary() const
Definition: TraCIAPI.cpp:1690
TraCIAPI::SimulationScope::getMinExpectedNumber
int getMinExpectedNumber() const
Definition: TraCIAPI.cpp:1696
TraCIAPI::inductionloop
InductionLoopScope inductionloop
Scope for interaction with inductive loops.
Definition: TraCIAPI.h:938
libsumo::CMD_SET_SIM_VARIABLE
TRACI_CONST int CMD_SET_SIM_VARIABLE
Definition: TraCIConstants.h:258
TraCIAPI::VehicleScope::remove
void remove(const std::string &vehicleID, char reason=libsumo::REMOVE_VAPORIZED) const
Definition: TraCIAPI.cpp:2876
TraCIAPI::TrafficLightScope::setPhaseName
void setPhaseName(const std::string &tlsID, const std::string &name) const
Definition: TraCIAPI.cpp:2028
TraCIAPI::MeMeScope::getLastStepHaltingNumber
int getLastStepHaltingNumber(const std::string &detID) const
Definition: TraCIAPI.cpp:1308
libsumo::ContextSubscriptionResults
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:204
TraCIAPI::RouteScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1601
TraCIAPI::VehicleScope::getLanePosition
double getLanePosition(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2500
TraCIAPI::TrafficLightScope::getControlledLinks
std::vector< std::vector< libsumo::TraCILink > > getControlledLinks(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1947
libsumo::CMD_SUBSCRIBE_PERSON_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_PERSON_CONTEXT
Definition: TraCIConstants.h:293
TraCIAPI::VehicleScope::getLateralAlignment
std::string getLateralAlignment(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2811
TraCIAPI::PolygonScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1481
TraCIAPI::PersonScope::getWaitingTime
double getWaitingTime(const std::string &personID) const
Definition: TraCIAPI.cpp:3385
libsumo::CMD_SUBSCRIBE_JUNCTION_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_JUNCTION_VARIABLE
Definition: TraCIConstants.h:230
TraCIAPI::VehicleScope::setSignals
void setSignals(const std::string &vehicleID, int signals) const
Definition: TraCIAPI.cpp:3150
TraCIAPI::PolygonScope::~PolygonScope
virtual ~PolygonScope()
Definition: TraCIAPI.h:451
TraCIAPI::POIScope::setWidth
void setWidth(const std::string &poiID, double width) const
Definition: TraCIAPI.cpp:1398
TraCIAPI::EdgeScope::getElectricityConsumption
double getElectricityConsumption(const std::string &edgeID) const
Definition: TraCIAPI.cpp:725
TraCIAPI::PersonScope::getStage
libsumo::TraCIStage getStage(const std::string &personID, int nextStageIndex=0) const
Definition: TraCIAPI.cpp:3406
TraCIAPI::myDomains
std::map< int, TraCIScopeWrapper * > myDomains
Definition: TraCIAPI.h:1055
TraCIAPI::VehicleTypeScope::operator=
VehicleTypeScope & operator=(const VehicleTypeScope &src)
invalidated assignment operator
TraCIAPI::VehicleTypeScope::VehicleTypeScope
VehicleTypeScope(TraCIAPI &parent)
Definition: TraCIAPI.h:599
TraCIAPI::EdgeScope::~EdgeScope
virtual ~EdgeScope()
Definition: TraCIAPI.h:172
TraCIAPI::createFilterCommand
void createFilterCommand(int cmdID, int varID, tcpip::Storage *add=nullptr) const
Definition: TraCIAPI.cpp:184
TraCIAPI::VehicleTypeScope::setVehicleClass
void setVehicleClass(const std::string &typeID, const std::string &clazz) const
Definition: TraCIAPI.cpp:2234
TraCIAPI::VehicleTypeScope::getMaxSpeed
double getMaxSpeed(const std::string &typeID) const
Definition: TraCIAPI.cpp:2114
TraCIAPI::RouteScope::operator=
RouteScope & operator=(const RouteScope &src)
invalidated assignment operator
libsumo::TraCIColor
A color.
Definition: TraCIDefs.h:135
TraCIAPI::TraCIScopeWrapper::getAllContextSubscriptionResults
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults() const
Definition: TraCIAPI.cpp:3691
TraCIAPI::VehicleScope::getRouteIndex
int getRouteIndex(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2484
libsumo::CMD_SUBSCRIBE_POI_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_POI_CONTEXT
Definition: TraCIConstants.h:190
libsumo::CMD_SUBSCRIBE_PERSON_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_PERSON_VARIABLE
Definition: TraCIConstants.h:303
TraCIAPI::VehicleScope::addSubscriptionFilterVType
void addSubscriptionFilterVType(const std::vector< std::string > &vTypes) const
Definition: TraCIAPI.cpp:3272
TraCIAPI::VehicleScope::rerouteTraveltime
void rerouteTraveltime(const std::string &vehicleID, bool currentTravelTimes=true) const
Definition: TraCIAPI.cpp:2960
libsumo::CMD_SUBSCRIBE_LANEAREA_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_LANEAREA_CONTEXT
Definition: TraCIConstants.h:280
libsumo::CMD_GET_LANE_VARIABLE
TRACI_CONST int CMD_GET_LANE_VARIABLE
Definition: TraCIConstants.h:134
TraCIAPI::TraCIScopeWrapper::mySubscriptionResults
libsumo::SubscriptionResults mySubscriptionResults
Definition: TraCIAPI.h:149
TraCIAPI::EdgeScope::operator=
EdgeScope & operator=(const EdgeScope &src)
invalidated assignment operator
TraCIAPI::LaneScope::getLength
double getLength(const std::string &laneID) const
Definition: TraCIAPI.cpp:1043
TraCIAPI::VehicleScope::getMaxSpeed
double getMaxSpeed(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2439
TraCIAPI::VehicleScope::setLine
void setLine(const std::string &vehicleID, const std::string &line) const
Definition: TraCIAPI.cpp:3129
TraCIAPI::LaneScope::getShape
libsumo::TraCIPositionVector getShape(const std::string &laneID) const
Definition: TraCIAPI.cpp:1123
TraCIAPI::SimulationScope::getStartingTeleportIDList
std::vector< std::string > getStartingTeleportIDList() const
Definition: TraCIAPI.cpp:1670
TraCIAPI::LaneScope::getLastStepHaltingNumber
int getLastStepHaltingNumber(const std::string &laneID) const
Definition: TraCIAPI.cpp:1198
TraCIAPI::SimulationScope::getBusStopWaitingIDList
std::vector< std::string > getBusStopWaitingIDList(const std::string &stopID) const
Definition: TraCIAPI.cpp:1706
TraCIAPI::VehicleScope::getCO2Emission
double getCO2Emission(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2520
libsumo::CMD_SUBSCRIBE_VEHICLE_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_VEHICLE_CONTEXT
Definition: TraCIConstants.h:145
TraCIAPI::getTraCIStage
libsumo::TraCIStage getTraCIStage(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:480
TraCIAPI::VehicleScope::setEmissionClass
void setEmissionClass(const std::string &vehicleID, const std::string &clazz) const
Definition: TraCIAPI.cpp:3178
TraCIAPI::getColor
libsumo::TraCIColor getColor(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:466
TraCIAPI::GUIScope::~GUIScope
virtual ~GUIScope()
Definition: TraCIAPI.h:219
TraCIAPI::InductionLoopScope
Scope for interaction with inductive loops.
Definition: TraCIAPI.h:249
TraCIAPI::LaneScope::getEdgeID
std::string getEdgeID(const std::string &laneID) const
Definition: TraCIAPI.cpp:1128
TraCIAPI::PersonScope::setWidth
void setWidth(const std::string &personID, double width) const
Definition: TraCIAPI.cpp:3589
TraCIAPI::SimulationScope::getStartingTeleportNumber
int getStartingTeleportNumber() const
Definition: TraCIAPI.cpp:1665
TraCIAPI::PersonScope::rerouteTraveltime
void rerouteTraveltime(const std::string &personID) const
Definition: TraCIAPI.cpp:3432
libsumo::CMD_GET_VEHICLE_VARIABLE
TRACI_CONST int CMD_GET_VEHICLE_VARIABLE
Definition: TraCIConstants.h:149
libsumo::CMD_SET_VEHICLE_VARIABLE
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
Definition: TraCIConstants.h:153
libsumo::CMD_GET_VEHICLETYPE_VARIABLE
TRACI_CONST int CMD_GET_VEHICLETYPE_VARIABLE
Definition: TraCIConstants.h:164
TraCIAPI::InductionLoopScope::getLastStepMeanSpeed
double getLastStepMeanSpeed(const std::string &loopID) const
Definition: TraCIAPI.cpp:945
TraCIAPI::EdgeScope::getLastStepVehicleIDs
std::vector< std::string > getLastStepVehicleIDs(const std::string &edgeID) const
Definition: TraCIAPI.cpp:760
TraCIAPI::LaneAreaScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1277
libsumo::DEPARTFLAG_NOW
TRACI_CONST int DEPARTFLAG_NOW
Definition: TraCIConstants.h:425
TraCIAPI::VehicleScope::addSubscriptionFilterFloat
void addSubscriptionFilterFloat(int filterType, double val) const
Definition: TraCIAPI.cpp:3289
TraCIAPI::TrafficLightScope::setRedYellowGreenState
void setRedYellowGreenState(const std::string &tlsID, const std::string &state) const
Definition: TraCIAPI.cpp:2010
TraCIAPI::createCommand
void createCommand(int cmdID, int varID, const std::string &objID, tcpip::Storage *add=nullptr) const
Sends a GetVariable / SetVariable request if mySocket is connected. Otherwise writes to myOutput only...
Definition: TraCIAPI.cpp:160
TraCIAPI::EdgeScope::getLastStepOccupancy
double getLastStepOccupancy(const std::string &edgeID) const
Definition: TraCIAPI.cpp:735
TraCIAPI::EdgeScope::EdgeScope
EdgeScope(const EdgeScope &src)
invalidated copy constructor
TraCIAPI::RouteScope
Scope for interaction with routes.
Definition: TraCIAPI.h:482
libsumo
Definition: Edge.cpp:29
TraCIAPI::InductionLoopScope::~InductionLoopScope
virtual ~InductionLoopScope()
Definition: TraCIAPI.h:252
TraCIAPI::TraCIScopeWrapper
An abstract interface for accessing type-dependent values.
Definition: TraCIAPI.h:105
TraCIAPI::POIScope::setHeight
void setHeight(const std::string &poiID, double height) const
Definition: TraCIAPI.cpp:1408
TraCIAPI::MeMeScope::getLastStepVehicleIDs
std::vector< std::string > getLastStepVehicleIDs(const std::string &detID) const
Definition: TraCIAPI.cpp:1303
TraCIAPI::VehicleScope::addSubscriptionFilterLCManeuver
void addSubscriptionFilterLCManeuver(int direction, bool noOpposite=false, double downstreamDist=-1, double upstreamDist=-1) const
Definition: TraCIAPI.cpp:3230
TraCIAPI::VehicleScope::getImperfection
double getImperfection(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2726
TraCIAPI::GUIScope::screenshot
void screenshot(const std::string &viewID, const std::string &filename, const int width=-1, const int height=-1) const
Definition: TraCIAPI.cpp:897
TraCIAPI::PersonScope::appendDrivingStage
void appendDrivingStage(const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
Definition: TraCIAPI.cpp:3533
TraCIAPI::VehicleScope::getNOxEmission
double getNOxEmission(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2540
libsumo::CMD_SET_JUNCTION_VARIABLE
TRACI_CONST int CMD_SET_JUNCTION_VARIABLE
Definition: TraCIConstants.h:228
TraCIAPI::LaneScope::getPMxEmission
double getPMxEmission(const std::string &laneID) const
Definition: TraCIAPI.cpp:1148
libsumo::CMD_SUBSCRIBE_EDGE_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_EDGE_VARIABLE
Definition: TraCIConstants.h:245
TraCIAPI::VehicleTypeScope::setSpeedDeviation
void setSpeedDeviation(const std::string &typeID, double deviation) const
Definition: TraCIAPI.cpp:2252
TraCIAPI::GUIScope::getOffset
libsumo::TraCIPosition getOffset(const std::string &viewID=DEFAULT_VIEW) const
Definition: TraCIAPI.cpp:840
TraCIAPI::PersonScope::operator=
PersonScope & operator=(const PersonScope &src)
invalidated assignment operator
TraCIAPI::EdgeScope::getPMxEmission
double getPMxEmission(const std::string &edgeID) const
Definition: TraCIAPI.cpp:705
TraCIAPI::TraCIScopeWrapper::getParameter
std::string getParameter(const std::string &objectID, const std::string &key) const
retrieve generic paramter
Definition: TraCIAPI.cpp:3630
TraCIAPI::VehicleScope::getLateralSpeed
double getLateralSpeed(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2429
TraCIAPI::load
void load(const std::vector< std::string > &args)
Let sumo load a simulation using the given command line like options.
Definition: TraCIAPI.cpp:642
libsumo::CMD_SUBSCRIBE_POLYGON_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_POLYGON_CONTEXT
Definition: TraCIConstants.h:205
TraCIAPI::VehicleScope::addSubscriptionFilterLeadFollow
void addSubscriptionFilterLeadFollow(const std::vector< int > &lanes) const
Definition: TraCIAPI.cpp:3248
TraCIAPI::VehicleScope::getHeight
double getHeight(const std::string &veihcleID) const
Definition: TraCIAPI.cpp:2761
TraCIAPI::SimulationScope::getEndingTeleportNumber
int getEndingTeleportNumber() const
Definition: TraCIAPI.cpp:1675
TraCIAPI::PolygonScope::remove
void remove(const std::string &polygonID, int layer=0) const
Definition: TraCIAPI.cpp:1588
TraCIAPI::PersonScope::~PersonScope
virtual ~PersonScope()
Definition: TraCIAPI.h:880
TraCIAPI::~TraCIAPI
~TraCIAPI()
Destructor.
Definition: TraCIAPI.cpp:68
TraCIAPI::EdgeScope::getStreetName
std::string getStreetName(const std::string &id) const
Definition: TraCIAPI.cpp:772
TraCIAPI::VehicleScope::getStopState
int getStopState(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2701
libsumo::CMD_SUBSCRIBE_SIM_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_SIM_CONTEXT
Definition: TraCIConstants.h:250
TraCIAPI::LaneScope::getDisallowed
std::vector< std::string > getDisallowed(const std::string &laneID) const
Definition: TraCIAPI.cpp:1063
TraCIAPI::PersonScope::setHeight
void setHeight(const std::string &personID, double height) const
Definition: TraCIAPI.cpp:3598
TraCIAPI::SimulationScope::SimulationScope
SimulationScope(const SimulationScope &src)
invalidated copy constructor
TraCIAPI::LaneScope::getLastStepVehicleNumber
int getLastStepVehicleNumber(const std::string &laneID) const
Definition: TraCIAPI.cpp:1193
libsumo::TraCILogic
Definition: TraCIDefs.h:232
TraCIAPI::closeSocket
void closeSocket()
Closes the connection.
Definition: TraCIAPI.cpp:112
TraCIAPI::getCommandStorage
const tcpip::Storage & getCommandStorage() const
Definition: TraCIAPI.h:96
TraCIAPI::PolygonScope::PolygonScope
PolygonScope(TraCIAPI &parent)
Definition: TraCIAPI.h:450
TraCIAPI::VehicleScope::addSubscriptionFilterUpstreamDistance
void addSubscriptionFilterUpstreamDistance(double dist) const
Definition: TraCIAPI.cpp:3213
TraCIAPI::simulationStep
void simulationStep(double time=0)
Advances by one step (or up to the given time)
Definition: TraCIAPI.cpp:620
TraCIAPI::VehicleScope::setColor
void setColor(const std::string &vehicleID, const libsumo::TraCIColor &c) const
Definition: TraCIAPI.cpp:3117
TraCIAPI::send_commandSubscribeObjectVariable
void send_commandSubscribeObjectVariable(int domID, const std::string &objID, double beginTime, double endTime, const std::vector< int > &vars) const
Sends a SubscribeVariable request.
Definition: TraCIAPI.cpp:207
TraCIAPI::VehicleTypeScope::setColor
void setColor(const std::string &typeID, const libsumo::TraCIColor &c) const
Definition: TraCIAPI.cpp:2398
libsumo::CMD_GET_POI_VARIABLE
TRACI_CONST int CMD_GET_POI_VARIABLE
Definition: TraCIConstants.h:194
TraCIAPI::LaneScope::getLastStepOccupancy
double getLastStepOccupancy(const std::string &laneID) const
Definition: TraCIAPI.cpp:1178
TraCIAPI::SimulationScope::convert2D
libsumo::TraCIPosition convert2D(const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) const
Definition: TraCIAPI.cpp:1712
TraCIConstants.h
TraCIAPI::VehicleScope::setType
void setType(const std::string &vehicleID, const std::string &typeID) const
Definition: TraCIAPI.cpp:3090
TraCIAPI::VehicleScope::addSubscriptionFilterFieldOfVision
void addSubscriptionFilterFieldOfVision(double angle) const
Definition: TraCIAPI.cpp:3278
libsumo::CMD_SUBSCRIBE_GUI_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_GUI_VARIABLE
Definition: TraCIConstants.h:275
TraCIAPI::trafficlights
TrafficLightScope trafficlights
Scope for interaction with traffic lights.
Definition: TraCIAPI.h:958
TraCIAPI::TrafficLightScope::getNextSwitch
double getNextSwitch(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1995
TraCIAPI::getInt
int getInt(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:375
TraCIAPI
C++ TraCI client API implementation.
Definition: TraCIAPI.h:49
TraCIAPI::GUIScope::setSchema
void setSchema(const std::string &viewID, const std::string &schemeName) const
Definition: TraCIAPI.cpp:875
libsumo::CMD_SUBSCRIBE_SIM_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_SIM_VARIABLE
Definition: TraCIConstants.h:260
TraCIAPI::VehicleScope::addSubscriptionFilterDownstreamDistance
void addSubscriptionFilterDownstreamDistance(double dist) const
Definition: TraCIAPI.cpp:3208
TraCIAPI::VehicleScope::addSubscriptionFilterLanes
void addSubscriptionFilterLanes(const std::vector< int > &lanes, bool noOpposite=false, double downstreamDist=-1, double upstreamDist=-1) const
Definition: TraCIAPI.cpp:3187
TraCIAPI::EdgeScope::getHCEmission
double getHCEmission(const std::string &edgeID) const
Definition: TraCIAPI.cpp:700
TraCIAPI::POIScope::getImageFile
std::string getImageFile(const std::string &poiID) const
Definition: TraCIAPI.cpp:1358
TraCIAPI::readVariables
void readVariables(tcpip::Storage &inMsg, const std::string &objectID, int variableCount, libsumo::SubscriptionResults &into)
Definition: TraCIAPI.cpp:529
libsumo::CMD_SET_VEHICLETYPE_VARIABLE
TRACI_CONST int CMD_SET_VEHICLETYPE_VARIABLE
Definition: TraCIConstants.h:168
TraCIAPI::VehicleScope::getElectricityConsumption
double getElectricityConsumption(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2555
TraCIAPI::VehicleScope::getLaneIndex
int getLaneIndex(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2469
TraCIAPI::toString
static std::string toString(const T &t, std::streamsize accuracy=PRECISION)
Definition: TraCIAPI.h:1043
TraCIAPI::JunctionScope
Scope for interaction with junctions.
Definition: TraCIAPI.h:282
TraCIAPI::VehicleTypeScope::getWidth
double getWidth(const std::string &typeID) const
Definition: TraCIAPI.cpp:2199
libsumo::REMOVE_VAPORIZED
TRACI_CONST int REMOVE_VAPORIZED
Definition: TraCIConstants.h:388
TraCIAPI::InductionLoopScope::getVehicleData
std::vector< libsumo::TraCIVehicleData > getVehicleData(const std::string &loopID) const
Definition: TraCIAPI.cpp:971
TraCIAPI::SimulationScope::getEndingTeleportIDList
std::vector< std::string > getEndingTeleportIDList() const
Definition: TraCIAPI.cpp:1680
TraCIAPI::PersonScope::getLanePosition
double getLanePosition(const std::string &personID) const
Definition: TraCIAPI.cpp:3360
TraCIAPI::InductionLoopScope::operator=
InductionLoopScope & operator=(const InductionLoopScope &src)
invalidated assignment operator
TraCIAPI::SimulationScope::writeMessage
void writeMessage(const std::string msg)
Definition: TraCIAPI.cpp:1862
TraCIAPI::PersonScope::PersonScope
PersonScope(TraCIAPI &parent)
Definition: TraCIAPI.h:879
libsumo::CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT
Definition: TraCIConstants.h:160
TraCIAPI::VehicleTypeScope::setMaxSpeed
void setMaxSpeed(const std::string &typeID, double speed) const
Definition: TraCIAPI.cpp:2225
TraCIAPI::VehicleScope::SIGNAL_HIGHBEAM
@ SIGNAL_HIGHBEAM
Definition: TraCIAPI.h:675
TraCIAPI::SimulationScope::convert3D
libsumo::TraCIPosition convert3D(const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) const
Definition: TraCIAPI.cpp:1734
libsumo::CMD_SET_LANE_VARIABLE
TRACI_CONST int CMD_SET_LANE_VARIABLE
Definition: TraCIConstants.h:138
TraCIAPI::TraCIScopeWrapper::setParameter
void setParameter(const std::string &objectID, const std::string &key, const std::string &value) const
set generic paramter
Definition: TraCIAPI.cpp:3639
TraCIAPI::JunctionScope::getPosition
libsumo::TraCIPosition getPosition(const std::string &junctionID) const
Definition: TraCIAPI.cpp:1019
TraCIAPI::SimulationScope::~SimulationScope
virtual ~SimulationScope()
Definition: TraCIAPI.h:509
TraCIAPI::GUIScope::getBoundary
libsumo::TraCIPositionVector getBoundary(const std::string &viewID=DEFAULT_VIEW) const
Definition: TraCIAPI.cpp:850
TraCIAPI::VehicleScope::getVia
std::vector< std::string > getVia(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2582
TraCIAPI::POIScope::POIScope
POIScope(TraCIAPI &parent)
Definition: TraCIAPI.h:409
TraCIAPI::EdgeScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:668
TraCIAPI::EdgeScope::EdgeScope
EdgeScope(TraCIAPI &parent)
Definition: TraCIAPI.h:171
libsumo::TraCIStage
Definition: TraCIDefs.h:344
TraCIAPI::VehicleTypeScope::setLength
void setLength(const std::string &typeID, double length) const
Definition: TraCIAPI.cpp:2216
TraCIAPI::MeMeScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1288
TraCIAPI::VehicleScope::VehicleScope
VehicleScope(const VehicleScope &src)
invalidated copy constructor
TraCIAPI::LaneAreaScope::LaneAreaScope
LaneAreaScope(const LaneAreaScope &src)
invalidated copy constructor
TraCIAPI::LaneScope::getFuelConsumption
double getFuelConsumption(const std::string &laneID) const
Definition: TraCIAPI.cpp:1158
TraCIAPI::EdgeScope::getLastStepHaltingNumber
double getLastStepHaltingNumber(const std::string &edgeID) const
Definition: TraCIAPI.cpp:755
TraCIAPI::VehicleScope::getEmissionClass
std::string getEmissionClass(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2587
TraCIAPI::GUIScope::operator=
GUIScope & operator=(const GUIScope &src)
invalidated assignment operator
TraCIAPI::VehicleTypeScope::getLateralAlignment
std::string getLateralAlignment(const std::string &typeID) const
Definition: TraCIAPI.cpp:2189
PRECISION
#define PRECISION
Definition: TraCIAPI.h:38
libsumo::CMD_SUBSCRIBE_POLYGON_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_POLYGON_VARIABLE
Definition: TraCIConstants.h:215
TraCIAPI::VehicleTypeScope::getPersonCapacity
int getPersonCapacity(const std::string &typeID) const
Definition: TraCIAPI.cpp:2194
libsumo::CMD_SUBSCRIBE_LANEAREA_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_LANEAREA_VARIABLE
Definition: TraCIConstants.h:288
TraCIAPI::PersonScope::setMinGap
void setMinGap(const std::string &personID, double minGap) const
Definition: TraCIAPI.cpp:3607
TraCIAPI::getPosition3D
libsumo::TraCIPosition getPosition3D(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:429
TraCIAPI::VehicleScope::getSpeed
double getSpeed(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2424
TraCIAPI::VehicleTypeScope::getColor
libsumo::TraCIColor getColor(const std::string &typeID) const
Definition: TraCIAPI.cpp:2209
TraCIAPI::send_commandSubscribeObjectContext
void send_commandSubscribeObjectContext(int domID, const std::string &objID, double beginTime, double endTime, int domain, double range, const std::vector< int > &vars) const
Sends a SubscribeContext request.
Definition: TraCIAPI.cpp:235
libsumo::CMD_SET_TL_VARIABLE
TRACI_CONST int CMD_SET_TL_VARIABLE
Definition: TraCIConstants.h:123
libsumo::CMD_SET_PERSON_VARIABLE
TRACI_CONST int CMD_SET_PERSON_VARIABLE
Definition: TraCIConstants.h:301
TraCIAPI::MeMeScope
Scope for interaction with multi entry/-exit detectors.
Definition: TraCIAPI.h:380
TraCIAPI::TraCIScopeWrapper::operator=
TraCIScopeWrapper & operator=(const TraCIScopeWrapper &src)
invalidated assignment operator
TraCIAPI::PolygonScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:1486
TraCIAPI::PolygonScope::getType
std::string getType(const std::string &polygonID) const
Definition: TraCIAPI.cpp:1496
libsumo::CMD_GET_SIM_VARIABLE
TRACI_CONST int CMD_GET_SIM_VARIABLE
Definition: TraCIConstants.h:254
TraCIAPI::LaneAreaScope::~LaneAreaScope
virtual ~LaneAreaScope()
Definition: TraCIAPI.h:363
TraCIAPI::getStringVector
std::vector< std::string > getStringVector(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:452
TraCIAPI::VehicleTypeScope::setMinGapLat
void setMinGapLat(const std::string &typeID, double minGapLat) const
Definition: TraCIAPI.cpp:2299
TraCIAPI::TrafficLightScope::getPhase
int getPhase(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1980
TraCIAPI::VehicleTypeScope::setWidth
void setWidth(const std::string &typeID, double width) const
Definition: TraCIAPI.cpp:2271
TraCIAPI::route
RouteScope route
Scope for interaction with routes.
Definition: TraCIAPI.h:954
TraCIAPI::GUIScope::setZoom
void setZoom(const std::string &viewID, double zoom) const
Definition: TraCIAPI.cpp:856
TraCIAPI::POIScope::POIScope
POIScope(const POIScope &src)
invalidated copy constructor
TraCIAPI::VehicleTypeScope::setEmissionClass
void setEmissionClass(const std::string &typeID, const std::string &clazz) const
Definition: TraCIAPI.cpp:2262
TraCIAPI::TrafficLightScope::TrafficLightScope
TrafficLightScope(TraCIAPI &parent)
Definition: TraCIAPI.h:558
TraCIAPI::POIScope::setType
void setType(const std::string &poiID, const std::string &setType) const
Definition: TraCIAPI.cpp:1364
TraCIAPI::EdgeScope::getLastStepMeanSpeed
double getLastStepMeanSpeed(const std::string &edgeID) const
Definition: TraCIAPI.cpp:730
TraCIAPI::VehicleTypeScope::setHeight
void setHeight(const std::string &typeID, double height) const
Definition: TraCIAPI.cpp:2280
TraCIAPI::PersonScope::appendWalkingStage
void appendWalkingStage(const std::string &personID, const std::vector< std::string > &edges, double arrivalPos, double duration=-1, double speed=-1, const std::string &stopID="")
Definition: TraCIAPI.cpp:3512
TraCIAPI::VehicleScope::getHCEmission
double getHCEmission(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2530
TraCIAPI::LaneScope::getTraveltime
double getTraveltime(const std::string &laneID) const
Definition: TraCIAPI.cpp:1188
TraCIAPI::TraCIScopeWrapper::myParent
TraCIAPI & myParent
The parent TraCI client which offers the connection.
Definition: TraCIAPI.h:144
TraCIAPI::InductionLoopScope::getLastStepVehicleNumber
int getLastStepVehicleNumber(const std::string &loopID) const
Definition: TraCIAPI.cpp:940
TraCIAPI::InductionLoopScope::getPosition
double getPosition(const std::string &loopID) const
Definition: TraCIAPI.cpp:930
TraCIAPI::LaneScope::getMaxSpeed
double getMaxSpeed(const std::string &laneID) const
Definition: TraCIAPI.cpp:1048
TraCIAPI::VehicleScope::getAccel
double getAccel(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2711
TraCIAPI::JunctionScope::getShape
libsumo::TraCIPositionVector getShape(const std::string &junctionID) const
Definition: TraCIAPI.cpp:1024
TraCIAPI::VehicleScope::SIGNAL_EMERGENCY_BLUE
@ SIGNAL_EMERGENCY_BLUE
Definition: TraCIAPI.h:680
TraCIAPI::VehicleTypeScope::getMinGap
double getMinGap(const std::string &typeID) const
Definition: TraCIAPI.cpp:2174
TraCIAPI::VehicleTypeScope::setDecel
void setDecel(const std::string &typeID, double decel) const
Definition: TraCIAPI.cpp:2353
TraCIAPI::multientryexit
MeMeScope multientryexit
Scope for interaction with multi-entry/-exit detectors.
Definition: TraCIAPI.h:946
TraCIAPI::TrafficLightScope::getCompleteRedYellowGreenDefinition
std::vector< libsumo::TraCILogic > getCompleteRedYellowGreenDefinition(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1889
TraCIAPI::RouteScope::getEdges
std::vector< std::string > getEdges(const std::string &routeID) const
Definition: TraCIAPI.cpp:1606
TraCIAPI::InductionLoopScope::getTimeSinceDetection
double getTimeSinceDetection(const std::string &loopID) const
Definition: TraCIAPI.cpp:965
TraCIAPI::InductionLoopScope::getLastStepVehicleIDs
std::vector< std::string > getLastStepVehicleIDs(const std::string &loopID) const
Definition: TraCIAPI.cpp:950
TraCIAPI::VehicleScope::setVia
void setVia(const std::string &vehicleID, const std::vector< std::string > &via) const
Definition: TraCIAPI.cpp:3138
TraCIAPI::TraCIScopeWrapper::TraCIScopeWrapper
TraCIScopeWrapper(const TraCIScopeWrapper &src)
invalidated copy constructor
TraCIAPI::VehicleScope::getCOEmission
double getCOEmission(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2525
TraCIAPI::VehicleScope::getWidth
double getWidth(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2751
TraCIAPI::LaneScope::getCOEmission
double getCOEmission(const std::string &laneID) const
Definition: TraCIAPI.cpp:1138
libsumo::CMD_SUBSCRIBE_JUNCTION_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_JUNCTION_CONTEXT
Definition: TraCIConstants.h:220
TraCIAPI::VehicleScope::getSignals
int getSignals(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2510
TraCIAPI::LaneScope::getLastStepMeanSpeed
double getLastStepMeanSpeed(const std::string &laneID) const
Definition: TraCIAPI.cpp:1173
TraCIAPI::simulation
SimulationScope simulation
Scope for interaction with the simulation.
Definition: TraCIAPI.h:956
TraCIAPI::VehicleScope::setShapeClass
void setShapeClass(const std::string &vehicleID, const std::string &clazz) const
Definition: TraCIAPI.cpp:3168
TraCIAPI::VehicleTypeScope::getDecel
double getDecel(const std::string &typeID) const
Definition: TraCIAPI.cpp:2134
TraCIAPI::SimulationScope::getDepartedIDList
std::vector< std::string > getDepartedIDList() const
Definition: TraCIAPI.cpp:1650
TraCIAPI::VehicleScope::getSpeedFactor
double getSpeedFactor(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2731
TraCIAPI::MeMeScope::~MeMeScope
virtual ~MeMeScope()
Definition: TraCIAPI.h:383
TraCIAPI::VehicleScope::SIGNAL_DOOR_OPEN_RIGHT
@ SIGNAL_DOOR_OPEN_RIGHT
Definition: TraCIAPI.h:679
TraCIAPI::VehicleScope::getAngle
double getAngle(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2454
TraCIAPI::VehicleScope::getBestLanes
std::vector< libsumo::TraCIBestLanesData > getBestLanes(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2626
TraCIAPI::TraCIScopeWrapper::myCmdSetID
int myCmdSetID
Definition: TraCIAPI.h:146
TraCIAPI::TrafficLightScope::getPhaseDuration
double getPhaseDuration(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1990
TraCIAPI::PersonScope::getNextEdge
std::string getNextEdge(const std::string &personID) const
Definition: TraCIAPI.cpp:3390
TraCIAPI::VehicleScope::getLateralLanePosition
double getLateralLanePosition(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2515
TraCIAPI::getUnsignedByte
int getUnsignedByte(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:354
TraCIAPI::VehicleScope::slowDown
void slowDown(const std::string &vehicleID, double speed, double duration) const
Definition: TraCIAPI.cpp:3012
TraCIAPI::VehicleScope::setStop
void setStop(const std::string vehicleID, const std::string edgeID, const double endPos=1., const int laneIndex=0, const double duration=std::numeric_limits< double >::max(), const int flags=0, const double startPos=std::numeric_limits< int >::min(), const double until=-1) const
Definition: TraCIAPI.cpp:3066
TraCIAPI::SimulationScope::getCurrentTime
int getCurrentTime() const
Definition: TraCIAPI.cpp:1625
TraCIAPI::PolygonScope::getColor
libsumo::TraCIColor getColor(const std::string &polygonID) const
Definition: TraCIAPI.cpp:1506
libsumo::CMD_SUBSCRIBE_GUI_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_GUI_CONTEXT
Definition: TraCIConstants.h:265
TraCIAPI::PersonScope::getColor
libsumo::TraCIColor getColor(const std::string &personID) const
Definition: TraCIAPI.cpp:3365
TraCIAPI::VehicleTypeScope::~VehicleTypeScope
virtual ~VehicleTypeScope()
Definition: TraCIAPI.h:600
TraCIAPI::PolygonScope::setLineWidth
void setLineWidth(const std::string &polygonID, const double lineWidth) const
Definition: TraCIAPI.cpp:1511
TraCIAPI::GUIScope::trackVehicle
void trackVehicle(const std::string &viewID, const std::string &vehID) const
Definition: TraCIAPI.cpp:912
TraCIAPI::RouteScope::RouteScope
RouteScope(TraCIAPI &parent)
Definition: TraCIAPI.h:484
libsumo::CMD_SUBSCRIBE_POI_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_POI_VARIABLE
Definition: TraCIConstants.h:200
TraCIAPI::VehicleScope::getWaitingTime
double getWaitingTime(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2560
TraCIAPI::EdgeScope::adaptTraveltime
void adaptTraveltime(const std::string &edgeID, double time, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max()) const
Definition: TraCIAPI.cpp:778
TraCIAPI::TrafficLightScope::getControlledLanes
std::vector< std::string > getControlledLanes(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1942
TraCIAPI::myOutput
tcpip::Storage myOutput
The reusable output storage.
Definition: TraCIAPI.h:1059
TraCIAPI::TrafficLightScope
Scope for interaction with traffic lights.
Definition: TraCIAPI.h:556
TraCIAPI::POIScope::setColor
void setColor(const std::string &poiID, const libsumo::TraCIColor &c) const
Definition: TraCIAPI.cpp:1385
TraCIAPI::VehicleTypeScope::getVehicleClass
std::string getVehicleClass(const std::string &typeID) const
Definition: TraCIAPI.cpp:2159
TraCIAPI::VehicleScope::addSubscriptionFilterByteList
void addSubscriptionFilterByteList(int filterType, const std::vector< int > &vals) const
Definition: TraCIAPI.cpp:3309
TraCIAPI::TrafficLightScope::getPhaseName
std::string getPhaseName(const std::string &tlsID) const
Definition: TraCIAPI.cpp:1985
TraCIAPI::PersonScope::removeStage
void removeStage(const std::string &personID, int nextStageIndex) const
Definition: TraCIAPI.cpp:3550
TraCIAPI::SimulationScope::getArrivedIDList
std::vector< std::string > getArrivedIDList() const
Definition: TraCIAPI.cpp:1660
libsumo::CMD_SUBSCRIBE_TL_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_TL_CONTEXT
Definition: TraCIConstants.h:115
TraCIAPI::SimulationScope::convertRoad
libsumo::TraCIRoadPosition convertRoad(double x, double y, bool isGeo=false, const std::string &vClass="ignoring") const
Definition: TraCIAPI.cpp:1757
TraCIAPI::JunctionScope::operator=
JunctionScope & operator=(const JunctionScope &src)
invalidated assignment operator
TraCIAPI::VehicleScope::SIGNAL_WIPER
@ SIGNAL_WIPER
Definition: TraCIAPI.h:677
TraCIAPI::VehicleScope::changeSublane
void changeSublane(const std::string &vehicleID, double latDist) const
Definition: TraCIAPI.cpp:2927
TraCIAPI::PolygonScope::setColor
void setColor(const std::string &polygonID, const libsumo::TraCIColor &c) const
Definition: TraCIAPI.cpp:1549
TraCIAPI::VehicleScope::getShapeClass
std::string getShapeClass(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2592
TraCIAPI::POIScope::remove
void remove(const std::string &poiID, int layer=0) const
Definition: TraCIAPI.cpp:1467
libsumo::CMD_SUBSCRIBE_ROUTE_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_ROUTE_VARIABLE
Definition: TraCIConstants.h:185
TraCIAPI::InductionLoopScope::InductionLoopScope
InductionLoopScope(const InductionLoopScope &src)
invalidated copy constructor
TraCIAPI::LaneScope::getWidth
double getWidth(const std::string &laneID) const
Definition: TraCIAPI.cpp:1053
TraCIAPI::VehicleScope::getRouteID
std::string getRouteID(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2479
TraCIAPI::VehicleTypeScope::setSpeedFactor
void setSpeedFactor(const std::string &typeID, double factor) const
Definition: TraCIAPI.cpp:2243
libsumo::CMD_GET_GUI_VARIABLE
TRACI_CONST int CMD_GET_GUI_VARIABLE
Definition: TraCIConstants.h:269
TraCIAPI::processGet
bool processGet(int command, int expectedType, bool ignoreCommandId=false)
Definition: TraCIAPI.cpp:329
TraCIAPI::VehicleScope::SIGNAL_RESET
@ SIGNAL_RESET
Definition: TraCIAPI.h:683
TraCIAPI::check_commandGetResult
int check_commandGetResult(tcpip::Storage &inMsg, int command, int expectedType=-1, bool ignoreCommandId=false) const
Validates the result state of a command.
Definition: TraCIAPI.cpp:305
TraCIAPI::SimulationScope::getTime
double getTime() const
Definition: TraCIAPI.cpp:1630
TraCIAPI::VehicleScope::SIGNAL_BRAKELIGHT
@ SIGNAL_BRAKELIGHT
Definition: TraCIAPI.h:672
TraCIAPI::VehicleScope::getLine
std::string getLine(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2577
TraCIAPI::VehicleScope::getDistance
double getDistance(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2505
TraCIAPI::EdgeScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:663
TraCIAPI::getByte
int getByte(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:364
TraCIAPI::POIScope::getColor
libsumo::TraCIColor getColor(const std::string &poiID) const
Definition: TraCIAPI.cpp:1338
TraCIAPI::VehicleScope::VehicleSignal
VehicleSignal
Definition: TraCIAPI.h:668
TraCIAPI::VehicleScope::~VehicleScope
virtual ~VehicleScope()
Definition: TraCIAPI.h:666
libsumo::CMD_GET_MULTIENTRYEXIT_VARIABLE
TRACI_CONST int CMD_GET_MULTIENTRYEXIT_VARIABLE
Definition: TraCIConstants.h:106
TraCIAPI::PersonScope::getRoadID
std::string getRoadID(const std::string &personID) const
Definition: TraCIAPI.cpp:3375
TraCIAPI::MeMeScope::MeMeScope
MeMeScope(const MeMeScope &src)
invalidated copy constructor
TraCIAPI::VehicleTypeScope::getImperfection
double getImperfection(const std::string &typeID) const
Definition: TraCIAPI.cpp:2149
TraCIAPI::VehicleScope::SIGNAL_BLINKER_EMERGENCY
@ SIGNAL_BLINKER_EMERGENCY
Definition: TraCIAPI.h:671
libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT
Definition: TraCIConstants.h:89
TraCIAPI::SimulationScope::getDistance2D
double getDistance2D(double x1, double y1, double x2, double y2, bool isGeo=false, bool isDriving=false)
Definition: TraCIAPI.cpp:1801
TraCIAPI::getDouble
double getDouble(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:385
TraCIAPI::vehicle
VehicleScope vehicle
Scope for interaction with vehicles.
Definition: TraCIAPI.h:960
TraCIAPI::LaneScope::setLength
void setLength(const std::string &laneID, double length) const
Definition: TraCIAPI.cpp:1264
TraCIAPI::EdgeScope::setEffort
void setEffort(const std::string &edgeID, double effort, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max()) const
Definition: TraCIAPI.cpp:798
TraCIAPI::TraCIScopeWrapper::getModifiableContextSubscriptionResults
libsumo::SubscriptionResults & getModifiableContextSubscriptionResults(const std::string &objID)
Definition: TraCIAPI.cpp:3720
TraCIAPI::VehicleTypeScope::setMaxSpeedLat
void setMaxSpeedLat(const std::string &typeID, double speed) const
Definition: TraCIAPI.cpp:2308
TraCIAPI::GUIScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:830
TraCIAPI::PersonScope
Scope for interaction with vehicles.
Definition: TraCIAPI.h:877
TraCIAPI::VehicleTypeScope::getApparentDecel
double getApparentDecel(const std::string &typeID) const
Definition: TraCIAPI.cpp:2144
TraCIAPI::LaneScope::getAllowed
std::vector< std::string > getAllowed(const std::string &laneID) const
Definition: TraCIAPI.cpp:1058
TraCIAPI::VehicleScope::getAccumulatedWaitingTime
double getAccumulatedWaitingTime(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2766
libsumo::CMD_GET_INDUCTIONLOOP_VARIABLE
TRACI_CONST int CMD_GET_INDUCTIONLOOP_VARIABLE
Definition: TraCIConstants.h:93
TraCIAPI::InductionLoopScope::getLastStepOccupancy
double getLastStepOccupancy(const std::string &loopID) const
Definition: TraCIAPI.cpp:955
TraCIAPI::VehicleScope::setSpeed
void setSpeed(const std::string &vehicleID, double speed) const
Definition: TraCIAPI.cpp:3048
TraCIAPI::VehicleTypeScope::setAccel
void setAccel(const std::string &typeID, double accel) const
Definition: TraCIAPI.cpp:2344
TraCIAPI::SimulationScope::operator=
SimulationScope & operator=(const SimulationScope &src)
invalidated assignment operator
TraCIAPI::VehicleTypeScope::copy
void copy(const std::string &origTypeID, const std::string &newTypeID) const
Definition: TraCIAPI.cpp:2326
TraCIAPI::VehicleScope::getLaneChangeState
std::pair< int, int > getLaneChangeState(const std::string &vehicleID, int direction) const
Definition: TraCIAPI.cpp:2683
TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults
void clearSubscriptionResults()
Definition: TraCIAPI.cpp:3707
TraCIAPI::TrafficLightScope::setCompleteRedYellowGreenDefinition
void setCompleteRedYellowGreenDefinition(const std::string &tlsID, const libsumo::TraCILogic &logic) const
Definition: TraCIAPI.cpp:2055
TraCIAPI::EdgeScope::getLaneNumber
int getLaneNumber(const std::string &edgeID) const
Definition: TraCIAPI.cpp:766
TraCIAPI::VehicleScope::isRouteValid
bool isRouteValid(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2796
TraCIAPI::VehicleScope::addSubscriptionFilterEmpty
void addSubscriptionFilterEmpty(int filterType) const
Definition: TraCIAPI.cpp:3283
TraCIAPI::EdgeScope::getAdaptedTraveltime
double getAdaptedTraveltime(const std::string &edgeID, double time) const
Definition: TraCIAPI.cpp:673
TraCIAPI::POIScope::~POIScope
virtual ~POIScope()
Definition: TraCIAPI.h:410
TraCIAPI::polygon
PolygonScope polygon
Scope for interaction with polygons.
Definition: TraCIAPI.h:952
TraCIAPI::VehicleScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:2419
TraCIAPI::LaneScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:1038
libsumo::CMD_SUBSCRIBE_LANE_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_LANE_CONTEXT
Definition: TraCIConstants.h:130
TraCIAPI::LaneScope::LaneScope
LaneScope(const LaneScope &src)
invalidated copy constructor
TraCIAPI::VehicleScope::SIGNAL_BLINKER_LEFT
@ SIGNAL_BLINKER_LEFT
Definition: TraCIAPI.h:670
TraCIAPI::VehicleTypeScope::getEmissionClass
std::string getEmissionClass(const std::string &typeID) const
Definition: TraCIAPI.cpp:2164
TraCIAPI::SimulationScope::getLoadedNumber
int getLoadedNumber() const
Definition: TraCIAPI.cpp:1635
TraCIAPI::lanearea
LaneAreaScope lanearea
Scope for interaction with lanes.
Definition: TraCIAPI.h:944
TraCIAPI::InductionLoopScope::getLaneID
std::string getLaneID(const std::string &loopID) const
Definition: TraCIAPI.cpp:935
TraCIAPI::LaneScope::setDisallowed
void setDisallowed(const std::string &laneID, const std::vector< std::string > &disallowedClasses) const
Definition: TraCIAPI.cpp:1243
TraCIAPI::send_commandSimulationStep
void send_commandSimulationStep(double time) const
Sends a SimulationStep command.
Definition: TraCIAPI.cpp:123
TraCIAPI::VehicleTypeScope::setImperfection
void setImperfection(const std::string &typeID, double imperfection) const
Definition: TraCIAPI.cpp:2380
TraCIAPI::VehicleScope::getSpeedDeviation
double getSpeedDeviation(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2736
TraCIAPI::VehicleTypeScope::getShapeClass
std::string getShapeClass(const std::string &typeID) const
Definition: TraCIAPI.cpp:2169
TraCIAPI::TraCIAPI
TraCIAPI()
Constructor.
Definition: TraCIAPI.cpp:41
TraCIAPI::TrafficLightScope::setPhaseDuration
void setPhaseDuration(const std::string &tlsID, double phaseDuration) const
Definition: TraCIAPI.cpp:2046
TraCIAPI::PolygonScope
Scope for interaction with polygons.
Definition: TraCIAPI.h:448
libsumo::CMD_SET_EDGE_VARIABLE
TRACI_CONST int CMD_SET_EDGE_VARIABLE
Definition: TraCIConstants.h:243
TraCIAPI::LaneScope::getCO2Emission
double getCO2Emission(const std::string &laneID) const
Definition: TraCIAPI.cpp:1133
TraCIAPI::send_commandClose
void send_commandClose() const
Sends a Close command.
Definition: TraCIAPI.cpp:136
TraCIAPI::POIScope::setPosition
void setPosition(const std::string &poiID, double x, double y) const
Definition: TraCIAPI.cpp:1374
TraCIAPI::VehicleScope::getLaneID
std::string getLaneID(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2464
TraCIAPI::VehicleScope::setRouteID
void setRouteID(const std::string &vehicleID, const std::string &routeID) const
Definition: TraCIAPI.cpp:2937
TraCIAPI::getPosition
libsumo::TraCIPosition getPosition(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:416
TraCIAPI::poi
POIScope poi
Scope for interaction with POIs.
Definition: TraCIAPI.h:950
TraCIAPI::PolygonScope::getShape
libsumo::TraCIPositionVector getShape(const std::string &polygonID) const
Definition: TraCIAPI.cpp:1501
libsumo::CMD_SUBSCRIBE_EDGE_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_EDGE_CONTEXT
Definition: TraCIConstants.h:235
libsumo::CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE
Definition: TraCIConstants.h:110
TraCIAPI::PersonScope::getLength
double getLength(const std::string &personID) const
Definition: TraCIAPI.cpp:3370
TraCIAPI::VehicleTypeScope::setTau
void setTau(const std::string &typeID, double tau) const
Definition: TraCIAPI.cpp:2389
TraCIAPI::VehicleScope::getTau
double getTau(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2721
TraCIAPI::TraCIScopeWrapper::getModifiableSubscriptionResults
libsumo::SubscriptionResults & getModifiableSubscriptionResults()
Definition: TraCIAPI.cpp:3714
TraCIAPI::JunctionScope::~JunctionScope
virtual ~JunctionScope()
Definition: TraCIAPI.h:285
socket.h
TraCIAPI::TrafficLightScope::TrafficLightScope
TrafficLightScope(const TrafficLightScope &src)
invalidated copy constructor
TraCIAPI::VehicleScope::getPersonCapacity
int getPersonCapacity(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2781
TraCIAPI::EdgeScope::getLastStepVehicleNumber
int getLastStepVehicleNumber(const std::string &edgeID) const
Definition: TraCIAPI.cpp:750
TraCIAPI::PolygonScope::setShape
void setShape(const std::string &polygonID, const libsumo::TraCIPositionVector &shape) const
Definition: TraCIAPI.cpp:1530
TraCIAPI::GUIScope::getZoom
double getZoom(const std::string &viewID=DEFAULT_VIEW) const
Definition: TraCIAPI.cpp:835
TraCIAPI::VehicleScope
Scope for interaction with vehicles.
Definition: TraCIAPI.h:663
TraCIAPI::VehicleTypeScope::getSpeedFactor
double getSpeedFactor(const std::string &typeID) const
Definition: TraCIAPI.cpp:2119
libsumo::CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE
Definition: TraCIConstants.h:97
TraCIAPI::VehicleScope::setRoute
void setRoute(const std::string &vehicleID, const std::vector< std::string > &edge) const
Definition: TraCIAPI.cpp:2947
TraCIAPI::VehicleScope::getMaxSpeedLat
double getMaxSpeedLat(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2801
TraCIAPI::VehicleScope::getAcceleration
double getAcceleration(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2434
TraCIAPI::SimulationScope::SimulationScope
SimulationScope(TraCIAPI &parent)
Definition: TraCIAPI.h:508
libsumo::TraCIRoadPosition
An edgeId, position and laneIndex.
Definition: TraCIDefs.h:121
TraCIAPI::SimulationScope::getLoadedIDList
std::vector< std::string > getLoadedIDList() const
Definition: TraCIAPI.cpp:1640
TraCIAPI::PersonScope::removeStages
void removeStages(const std::string &personID) const
Definition: TraCIAPI.cpp:3422
TraCIAPI::VehicleTypeScope::setLateralAlignment
void setLateralAlignment(const std::string &typeID, const std::string &latAlignment) const
Definition: TraCIAPI.cpp:2317
TraCIAPI::PersonScope::setColor
void setColor(const std::string &personID, const libsumo::TraCIColor &c) const
Definition: TraCIAPI.cpp:3617
TraCIAPI::TraCIScopeWrapper::myContextSubscribeID
int myContextSubscribeID
Definition: TraCIAPI.h:148
TraCIAPI::VehicleScope::getVehicleClass
std::string getVehicleClass(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2741
TraCIAPI::EdgeScope::getLastStepLength
double getLastStepLength(const std::string &edgeID) const
Definition: TraCIAPI.cpp:740
TraCIAPI::VehicleScope::add
void add(const std::string &vehicleID, const std::string &routeID, const std::string &typeID="DEFAULT_VEHTYPE", std::string depart="-1", 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=0, int personNumber=0) const
Definition: TraCIAPI.cpp:2816
TraCIAPI::gui
GUIScope gui
Scope for interaction with the gui.
Definition: TraCIAPI.h:936
TraCIAPI::VehicleScope::getSpeedMode
int getSpeedMode(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2565
TraCIAPI::TrafficLightScope::~TrafficLightScope
virtual ~TrafficLightScope()
Definition: TraCIAPI.h:559
TraCIAPI::TraCIScopeWrapper::myContextSubscriptionResults
libsumo::ContextSubscriptionResults myContextSubscriptionResults
Definition: TraCIAPI.h:150
TraCIAPI::VehicleScope::SIGNAL_BACKDRIVE
@ SIGNAL_BACKDRIVE
Definition: TraCIAPI.h:676
TraCIAPI::RouteScope::add
void add(const std::string &routeID, const std::vector< std::string > &edges) const
Definition: TraCIAPI.cpp:1612
libsumo::CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT
TRACI_CONST int CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT
Definition: TraCIConstants.h:102
libsumo::CMD_SUBSCRIBE_LANE_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_LANE_VARIABLE
Definition: TraCIConstants.h:140
TraCIAPI::VehicleTypeScope::setEmergencyDecel
void setEmergencyDecel(const std::string &typeID, double decel) const
Definition: TraCIAPI.cpp:2362
TraCIAPI::JunctionScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1008
TraCIAPI::EdgeScope::setMaxSpeed
void setMaxSpeed(const std::string &edgeID, double speed) const
Definition: TraCIAPI.cpp:817
TraCIAPI::LaneAreaScope::operator=
LaneAreaScope & operator=(const LaneAreaScope &src)
invalidated assignment operator
TraCIAPI::PolygonScope::setType
void setType(const std::string &polygonID, const std::string &setType) const
Definition: TraCIAPI.cpp:1520
libsumo::TraCIPositionVector
std::vector< TraCIPosition > TraCIPositionVector
Definition: TraCIDefs.h:149
TraCIAPI::SimulationScope::findRoute
libsumo::TraCIStage findRoute(const std::string &fromEdge, const std::string &toEdge, const std::string &vType="", double pos=-1., int routingMode=0) const
Definition: TraCIAPI.cpp:1843
TraCIAPI::SimulationScope::convertGeo
libsumo::TraCIPosition convertGeo(double x, double y, bool fromGeo=false) const
Definition: TraCIAPI.cpp:1780
TraCIAPI::readVariableSubscription
void readVariableSubscription(int cmdId, tcpip::Storage &inMsg)
Definition: TraCIAPI.cpp:597
TraCIAPI::EdgeScope::getTraveltime
double getTraveltime(const std::string &edgeID) const
Definition: TraCIAPI.cpp:745
TraCIAPI::VehicleScope::getTypeID
std::string getTypeID(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2474
TraCIAPI::MeMeScope::MeMeScope
MeMeScope(TraCIAPI &parent)
Definition: TraCIAPI.h:382
TraCIAPI::VehicleScope::getMinGapLat
double getMinGapLat(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2806
TraCIAPI::VehicleTypeScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:2104
TraCIAPI::VehicleTypeScope::getLength
double getLength(const std::string &typeID) const
Definition: TraCIAPI.cpp:2109
TraCIAPI::JunctionScope::JunctionScope
JunctionScope(TraCIAPI &parent)
Definition: TraCIAPI.h:284
TraCIAPI::TraCIScopeWrapper::getSubscriptionResults
const libsumo::TraCIResults getSubscriptionResults(const std::string &objID) const
Definition: TraCIAPI.cpp:3681
TraCIAPI::SimulationScope
Scope for interaction with the simulation.
Definition: TraCIAPI.h:506
TraCIAPI::VehicleScope::SIGNAL_EMERGENCY_YELLOW
@ SIGNAL_EMERGENCY_YELLOW
Definition: TraCIAPI.h:682
TraCIAPI::VehicleTypeScope::getEmergencyDecel
double getEmergencyDecel(const std::string &typeID) const
Definition: TraCIAPI.cpp:2139
TraCIAPI::VehicleScope::operator=
VehicleScope & operator=(const VehicleScope &src)
invalidated assignment operator
TraCIAPI::VehicleScope::VehicleScope
VehicleScope(TraCIAPI &parent)
Definition: TraCIAPI.h:665
TraCIAPI::LaneScope::getLinkNumber
int getLinkNumber(const std::string &laneID) const
Definition: TraCIAPI.cpp:1068
libsumo::CMD_SUBSCRIBE_TL_VARIABLE
TRACI_CONST int CMD_SUBSCRIBE_TL_VARIABLE
Definition: TraCIConstants.h:125
libsumo::CMD_SET_ROUTE_VARIABLE
TRACI_CONST int CMD_SET_ROUTE_VARIABLE
Definition: TraCIConstants.h:183
TraCIAPI::PersonScope::appendWaitingStage
void appendWaitingStage(const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
Definition: TraCIAPI.cpp:3495
TraCIAPI::LaneScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1033
TraCIAPI::TraCIScopeWrapper::TraCIScopeWrapper
TraCIScopeWrapper(TraCIAPI &parent, int cmdGetID, int cmdSetID, int subscribeID, int contextSubscribeID)
Constructor.
Definition: TraCIAPI.h:110
TraCIAPI::LaneScope::getElectricityConsumption
double getElectricityConsumption(const std::string &laneID) const
Definition: TraCIAPI.cpp:1168
TraCIAPI::TraCIScopeWrapper::mySubscribeID
int mySubscribeID
Definition: TraCIAPI.h:147
TraCIAPI::EdgeScope::getCOEmission
double getCOEmission(const std::string &edgeID) const
Definition: TraCIAPI.cpp:695
TraCIAPI::VehicleScope::getPMxEmission
double getPMxEmission(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2535
TraCIAPI::PersonScope::getSlope
double getSlope(const std::string &personID) const
Definition: TraCIAPI.cpp:3355
TraCIAPI::VehicleScope::getEmergencyDecel
double getEmergencyDecel(const std::string &vehicleID) const
TraCIAPI::InductionLoopScope::getLastStepMeanLength
double getLastStepMeanLength(const std::string &loopID) const
Definition: TraCIAPI.cpp:960
TraCIDefs.h
TraCIAPI::PolygonScope::getLineWidth
double getLineWidth(const std::string &polygonID) const
Definition: TraCIAPI.cpp:1491
TraCIAPI::VehicleTypeScope::setApparentDecel
void setApparentDecel(const std::string &typeID, double decel) const
Definition: TraCIAPI.cpp:2371
TraCIAPI::SimulationScope::getBusStopWaiting
int getBusStopWaiting(const std::string &stopID) const
Definition: TraCIAPI.cpp:1701
libsumo::CMD_GET_EDGE_VARIABLE
TRACI_CONST int CMD_GET_EDGE_VARIABLE
Definition: TraCIConstants.h:239
TraCIAPI::VehicleScope::getPersonIDList
std::vector< std::string > getPersonIDList(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2786
TraCIAPI::PersonScope::setSpeed
void setSpeed(const std::string &personID, double speed) const
Definition: TraCIAPI.cpp:3560
TraCIAPI::POIScope::getWidth
double getWidth(const std::string &poiID) const
Definition: TraCIAPI.cpp:1343
TraCIAPI::POIScope::getIDList
std::vector< std::string > getIDList() const
Definition: TraCIAPI.cpp:1318
TraCIAPI::PersonScope::add
void add(const std::string &personID, const std::string &edgeID, double pos, double depart=libsumo::DEPARTFLAG_NOW, const std::string typeID="DEFAULT_PEDTYPE")
Definition: TraCIAPI.cpp:3442
TraCIAPI::TraCIScopeWrapper::getAllSubscriptionResults
const libsumo::SubscriptionResults getAllSubscriptionResults() const
Definition: TraCIAPI.cpp:3675
TraCIAPI::myInput
tcpip::Storage myInput
The reusable input storage.
Definition: TraCIAPI.h:1061
TraCIAPI::TrafficLightScope::getServedPersonCount
int getServedPersonCount(const std::string &tlsID, int index) const
Definition: TraCIAPI.cpp:2001
TraCIAPI::TrafficLightScope::setProgram
void setProgram(const std::string &tlsID, const std::string &programID) const
Definition: TraCIAPI.cpp:2037
TraCIAPI::LaneScope::getNoiseEmission
double getNoiseEmission(const std::string &laneID) const
Definition: TraCIAPI.cpp:1163
TraCIAPI::VehicleScope::getApparentDecel
double getApparentDecel(const std::string &vehicleID) const
TraCIAPI::mySocket
tcpip::Socket * mySocket
The socket.
Definition: TraCIAPI.h:1057
TraCIAPI::TraCIScopeWrapper::subscribeContext
void subscribeContext(const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const
Definition: TraCIAPI.cpp:3665
TraCIAPI::VehicleScope::getNextTLS
std::vector< libsumo::TraCINextTLSData > getNextTLS(const std::string &vehID) const
Definition: TraCIAPI.cpp:2597
TraCIAPI::check_resultState
void check_resultState(tcpip::Storage &inMsg, int command, bool ignoreCommandId=false, std::string *acknowledgement=0) const
Validates the result state of a command.
Definition: TraCIAPI.cpp:266
TraCIAPI::TraCIScopeWrapper::myCmdGetID
int myCmdGetID
Definition: TraCIAPI.h:145
TraCIAPI::connect
void connect(const std::string &host, int port)
Connects to the specified SUMO server.
Definition: TraCIAPI.cpp:74
TraCIAPI::VehicleScope::SIGNAL_EMERGENCY_RED
@ SIGNAL_EMERGENCY_RED
Definition: TraCIAPI.h:681
TraCIAPI::GUIScope::GUIScope
GUIScope(const GUIScope &src)
invalidated copy constructor
TraCIAPI::PersonScope::appendStage
void appendStage(const std::string &personID, const libsumo::TraCIStage &stage)
Definition: TraCIAPI.cpp:3459
TraCIAPI::VehicleScope::getFuelConsumption
double getFuelConsumption(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2545
tcpip::Storage
Definition: storage.h:38
TraCIAPI::PersonScope::getRemainingStages
int getRemainingStages(const std::string &personID) const
Definition: TraCIAPI.cpp:3401
libsumo::SubscriptionResults
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:203
TraCIAPI::VehicleTypeScope
Scope for interaction with vehicle types.
Definition: TraCIAPI.h:597
TraCIAPI::PersonScope::getTypeID
std::string getTypeID(const std::string &personID) const
Definition: TraCIAPI.cpp:3380
TraCIAPI::SimulationScope::getDeltaT
double getDeltaT() const
Definition: TraCIAPI.cpp:1685
TraCIAPI::PersonScope::getPosition3D
libsumo::TraCIPosition getPosition3D(const std::string &personID) const
Definition: TraCIAPI.cpp:3345
TraCIAPI::VehicleTypeScope::getAccel
double getAccel(const std::string &typeID) const
Definition: TraCIAPI.cpp:2129
TraCIAPI::PersonScope::getSpeed
double getSpeed(const std::string &personID) const
Definition: TraCIAPI.cpp:3335
TraCIAPI::EdgeScope::getEffort
double getEffort(const std::string &edgeID, double time) const
Definition: TraCIAPI.cpp:681
TraCIAPI::VehicleScope::addSubscriptionFilterVClass
void addSubscriptionFilterVClass(const std::vector< std::string > &vClasses) const
Definition: TraCIAPI.cpp:3266
TraCIAPI::VehicleScope::openGap
void openGap(const std::string &vehicleID, double newTau, double duration, double changeRate, double maxDecel) const
Definition: TraCIAPI.cpp:3025
TraCIAPI::vehicletype
VehicleTypeScope vehicletype
Scope for interaction with vehicle types.
Definition: TraCIAPI.h:962
TraCIAPI::getString
std::string getString(int cmd, int var, const std::string &id, tcpip::Storage *add=0)
Definition: TraCIAPI.cpp:442
TraCIAPI::edge
EdgeScope edge
Scope for interaction with edges.
Definition: TraCIAPI.h:934
TraCIAPI::GUIScope::GUIScope
GUIScope(TraCIAPI &parent)
Definition: TraCIAPI.h:218
libsumo::CMD_GET_JUNCTION_VARIABLE
TRACI_CONST int CMD_GET_JUNCTION_VARIABLE
Definition: TraCIConstants.h:224
TraCIAPI::VehicleScope::getDecel
double getDecel(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2716
TraCIAPI::VehicleScope::getRoutingMode
int getRoutingMode(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2706
TraCIAPI::GUIScope::setBoundary
void setBoundary(const std::string &viewID, double xmin, double ymin, double xmax, double ymax) const
Definition: TraCIAPI.cpp:884
TraCIAPI::POIScope::operator=
POIScope & operator=(const POIScope &src)
invalidated assignment operator
TraCIAPI::POIScope::getAngle
double getAngle(const std::string &poiID) const
Definition: TraCIAPI.cpp:1353
TraCIAPI::LaneScope::setMaxSpeed
void setMaxSpeed(const std::string &laneID, double speed) const
Definition: TraCIAPI.cpp:1255
libsumo::CMD_GET_ROUTE_VARIABLE
TRACI_CONST int CMD_GET_ROUTE_VARIABLE
Definition: TraCIConstants.h:179
TraCIAPI::LaneScope::operator=
LaneScope & operator=(const LaneScope &src)
invalidated assignment operator
TraCIAPI::TrafficLightScope::getIDCount
int getIDCount() const
Definition: TraCIAPI.cpp:1879
TraCIAPI::VehicleScope::getColor
libsumo::TraCIColor getColor(const std::string &vehicleID) const
Definition: TraCIAPI.cpp:2495
TraCIAPI::PersonScope::getEdges
std::vector< std::string > getEdges(const std::string &personID, int nextStageIndex=0) const
Definition: TraCIAPI.cpp:3414