SUMO - Simulation of Urban MObility
TraCI_Lane.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // C++ TraCI client API implementation
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2012-2017 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef TraCI_Lane_h
24 #define TraCI_Lane_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <vector>
37 #include <traci-server/TraCIDefs.h>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class MSLane;
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
52 class TraCI_Lane {
53 public:
54 
55  // Getter
56  static std::vector<std::string> getIDList();
57  static int getIDCount();
58  static int getLinkNumber(std::string laneID);
59  static std::string getEdgeID(std::string laneID);
60  static double getLength(std::string laneID);
61  static double getMaxSpeed(std::string laneID);
62  static std::vector<std::string> getAllowed(std::string laneID);
63  static std::vector<std::string> getDisallowed(std::string laneID);
64  static std::vector<TraCIConnection> getLinks(std::string laneID);
65  static TraCIPositionVector getShape(std::string laneID);
66  static double getWidth(std::string laneID);
67  static double getCO2Emission(std::string laneID);
68  static double getCOEmission(std::string laneID);
69  static double getHCEmission(std::string laneID);
70  static double getPMxEmission(std::string laneID);
71  static double getNOxEmission(std::string laneID);
72  static double getFuelConsumption(std::string laneID);
73  static double getNoiseEmission(std::string laneID);
74  static double getElectricityConsumption(std::string laneID);
75  static double getLastStepMeanSpeed(std::string laneID);
76  static double getLastStepOccupancy(std::string laneID);
77  static double getLastStepLength(std::string laneID);
78  static double getWaitingTime(std::string laneID);
79  static double getTraveltime(std::string laneID);
80  static int getLastStepVehicleNumber(std::string laneID);
81  static int getLastStepHaltingNumber(std::string laneID);
82  static std::vector<std::string> getLastStepVehicleIDs(std::string laneID);
83 
84  // Setter
85  static void setAllowed(std::string laneID, std::vector<std::string> allowedClasses);
86  static void setDisallowed(std::string laneID, std::vector<std::string> disallowedClasses);
87  static void setMaxSpeed(std::string laneID, double speed);
88  static void setLength(std::string laneID, double length);
89 
90  // Generic parameter get/set
91  static std::string getParameter(const std::string& laneID, const std::string& param);
92  static void setParameter(const std::string& routeID, const std::string& key, const std::string& value); // not needed so far
93 
94  // Subscriptions (TODO?)
95  static void subscribe(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, const std::vector<int>& vars);
96  static void subscribeContext(const std::string& objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector<int>& vars);
97 
98  static const MSLane* getLane(const std::string& id);
99 
100 private:
102  TraCI_Lane();
103 
105  TraCI_Lane(const TraCI_Lane& src);
106 
108  TraCI_Lane& operator=(const TraCI_Lane& src);
109 };
110 
111 
112 #endif
113 
114 /****************************************************************************/
115 
static double getCO2Emission(std::string laneID)
Definition: TraCI_Lane.cpp:146
static int getLastStepHaltingNumber(std::string laneID)
Definition: TraCI_Lane.cpp:244
static double getHCEmission(std::string laneID)
Definition: TraCI_Lane.cpp:158
static double getLength(std::string laneID)
Definition: TraCI_Lane.cpp:67
static std::vector< std::string > getLastStepVehicleIDs(std::string laneID)
Definition: TraCI_Lane.cpp:259
static double getWaitingTime(std::string laneID)
Definition: TraCI_Lane.cpp:221
static void setAllowed(std::string laneID, std::vector< std::string > allowedClasses)
Definition: TraCI_Lane.cpp:274
static double getElectricityConsumption(std::string laneID)
Definition: TraCI_Lane.cpp:187
static std::string getEdgeID(std::string laneID)
Definition: TraCI_Lane.cpp:61
static std::vector< std::string > getIDList()
Definition: TraCI_Lane.cpp:47
static std::vector< TraCIConnection > getLinks(std::string laneID)
Definition: TraCI_Lane.cpp:85
static double getNoiseEmission(std::string laneID)
Definition: TraCI_Lane.cpp:181
TraCI_Lane()
invalidated standard constructor
static void subscribeContext(const std::string &objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector< int > &vars)
static void setDisallowed(std::string laneID, std::vector< std::string > disallowedClasses)
Definition: TraCI_Lane.cpp:282
static double getWidth(std::string laneID)
Definition: TraCI_Lane.cpp:140
static double getLastStepMeanSpeed(std::string laneID)
Definition: TraCI_Lane.cpp:193
static double getNOxEmission(std::string laneID)
Definition: TraCI_Lane.cpp:170
static double getLastStepLength(std::string laneID)
Definition: TraCI_Lane.cpp:205
static double getTraveltime(std::string laneID)
Definition: TraCI_Lane.cpp:227
static int getIDCount()
Definition: TraCI_Lane.cpp:55
static std::string getParameter(const std::string &laneID, const std::string &param)
Definition: TraCI_Lane.cpp:304
TraCI_Lane & operator=(const TraCI_Lane &src)
invalidated assignment operator
static std::vector< std::string > getAllowed(std::string laneID)
Definition: TraCI_Lane.cpp:109
static TraCIPositionVector getShape(std::string laneID)
Definition: TraCI_Lane.cpp:125
static double getLastStepOccupancy(std::string laneID)
Definition: TraCI_Lane.cpp:199
C++ TraCI client API implementation.
Definition: TraCI_Lane.h:52
static double getFuelConsumption(std::string laneID)
Definition: TraCI_Lane.cpp:175
static int getLinkNumber(std::string laneID)
Definition: TraCI_Lane.cpp:79
static void setParameter(const std::string &routeID, const std::string &key, const std::string &value)
Definition: TraCI_Lane.cpp:310
static void setLength(std::string laneID, double length)
Definition: TraCI_Lane.cpp:297
static const MSLane * getLane(const std::string &id)
Definition: TraCI_Lane.cpp:317
long long int SUMOTime
Definition: TraCIDefs.h:52
static double getCOEmission(std::string laneID)
Definition: TraCI_Lane.cpp:152
static int getLastStepVehicleNumber(std::string laneID)
Definition: TraCI_Lane.cpp:239
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
A list of positions.
static void subscribe(const std::string &objID, SUMOTime beginTime, SUMOTime endTime, const std::vector< int > &vars)
static double getPMxEmission(std::string laneID)
Definition: TraCI_Lane.cpp:164
static std::vector< std::string > getDisallowed(std::string laneID)
Definition: TraCI_Lane.cpp:119
static void setMaxSpeed(std::string laneID, double speed)
Definition: TraCI_Lane.cpp:290
static double getMaxSpeed(std::string laneID)
Definition: TraCI_Lane.cpp:73