46 std::vector<std::string>
48 std::vector<std::string> ids;
56 std::vector<std::string> ids;
85 std::vector<std::string>
109 std::vector<libsumo::TraCIVehicleData>
112 std::vector<libsumo::TraCIVehicleData> tvd;
113 for (std::vector<MSInductLoop::VehicleData>::const_iterator vdi = vd.begin(); vdi != vd.end(); ++vdi) {
115 tvd.back().id = vdi->idM;
116 tvd.back().length = vdi->lengthM;
117 tvd.back().entryTime = vdi->entryTimeM;
118 tvd.back().leaveTime = vdi->leaveTimeM;
119 tvd.back().typeID = vdi->typeIDM;
145 const float cmin[2] = {(float) p.
x(), (float) p.
y()};
146 const float cmax[2] = {(float) p.
x(), (float) p.
y()};
147 t->
Insert(cmin, cmax, il);
160 std::shared_ptr<VariableWrapper>
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
const MSLane * getLane() const
Returns the lane the reminder works on.
TRACI_CONST int VAR_LANE_ID
virtual bool wrapInt(const std::string &objID, const int variable, const int value)=0
alternative tag for e1 detector
TRACI_CONST int LAST_STEP_LENGTH
mirrors MSInductLoop::VehicleData
static std::string getLaneID(const std::string &detID)
int size() const
Returns the number of stored items within the container.
double y() const
Returns the y-position.
std::vector< std::string > getCurrentVehicleIDs() const
Returns the ids of vehicles that have passed the detector.
T get(const std::string &id) const
Retrieves an item.
A RT-tree for efficient storing of SUMO's Named objects.
double x() const
Returns the x-position.
TRACI_CONST int VAR_POSITION
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double getCurrentLength() const
Returns the length of the vehicle on the detector.
const PositionVector & getShape() const
Returns this lane's shape.
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
const std::string & getID() const
Returns the id.
virtual bool wrapString(const std::string &objID, const int variable, const std::string &value)=0
static std::shared_ptr< VariableWrapper > makeWrapper()
void insertIDs(std::vector< std::string > &into) const
static void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
static std::vector< std::string > getIDList()
static double getLastStepOccupancy(const std::string &detID)
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int LAST_STEP_VEHICLE_ID_LIST
A point in 2D or 3D with translation and scaling methods.
double getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
static double getTimeSinceDetection(const std::string &detID)
double getPosition() const
Returns the position of the detector on the lane.
static std::vector< std::string > getLastStepVehicleIDs(const std::string &detID)
static MSInductLoop * getDetector(const std::string &detID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
MSDetectorControl & getDetectorControl()
Returns the detector control.
double getTimeSinceLastDetection() const
Returns the time since the last vehicle left the detector.
virtual bool wrapDouble(const std::string &objID, const int variable, const double value)=0
int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
TRACI_CONST int LAST_STEP_MEAN_SPEED
static int getLastStepVehicleNumber(const std::string &detID)
static std::vector< libsumo::TraCIVehicleData > getVehicleData(const std::string &detID)
static SubscriptionResults mySubscriptionResults
TRACI_CONST int LAST_STEP_OCCUPANCY
TRACI_CONST int LAST_STEP_VEHICLE_NUMBER
static double getLastStepMeanSpeed(const std::string &detID)
static LIBSUMO_SUBSCRIPTION_API NamedRTree * getTree()
Returns a tree filled with inductive loop instances.
TRACI_CONST int LAST_STEP_TIME_SINCE_DETECTION
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
static double getPosition(const std::string &detID)
virtual bool wrapStringList(const std::string &objID, const int variable, const std::vector< std::string > &value)=0
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
double getCurrentOccupancy() const
Returns the current occupancy.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
static ContextSubscriptionResults myContextSubscriptionResults
An unextended detector measuring at a fixed position on a fixed lane.
static double getLastStepMeanLength(const std::string &detID)