44std::vector<std::string>
45MultiEntryExit::getIDList() {
46 std::vector<std::string> ids;
53MultiEntryExit::getIDCount() {
58std::vector<std::string>
60 std::vector<std::string> ids;
62 ids.push_back(cs.myLane->getID());
68std::vector<std::string>
70 std::vector<std::string> ids;
72 ids.push_back(cs.myLane->getID());
80 std::vector<double> pos;
82 pos.push_back(cs.myPosition);
90 std::vector<double> pos;
92 pos.push_back(cs.myPosition);
110std::vector<std::string>
118 return getDetector(detID)->getCurrentHaltingNumber();
124 return getDetector(detID)->getLastIntervalMeanTravelTime();
130 return getDetector(detID)->getLastIntervalMeanHaltsPerVehicle();
136 return getDetector(detID)->getLastIntervalMeanTimeLoss();
142 return getDetector(detID)->getLastIntervalVehicleSum();
147MultiEntryExit::getParameter(
const std::string& detID,
const std::string& param) {
148 return getDetector(detID)->getParameter(param,
"");
156MultiEntryExit::setParameter(
const std::string& detID,
const std::string& name,
const std::string&
value) {
157 getDetector(detID)->setParameter(name,
value);
168 throw TraCIException(
"Multi entry exit detector '" +
id +
"' is not known");
174std::shared_ptr<VariableWrapper>
184 return wrapper->wrapStringList(objID, variable, getIDList());
186 return wrapper->wrapInt(objID, variable, getIDCount());
204 return wrapper->wrapStringList(objID, variable,
getEntryLanes(objID));
206 return wrapper->wrapStringList(objID, variable,
getExitLanes(objID));
213 return wrapper->wrapString(objID, variable, getParameter(objID, paramData->
readString()));
216 return wrapper->wrapStringPair(objID, variable, getParameterWithKey(objID, paramData->
readString()));
const std::string invalid_return< std::string >::value
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOM)
#define LIBSUMO_GET_PARAMETER_WITH_KEY_IMPLEMENTATION(CLASS)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static double getLastIntervalMeanHaltsPerVehicle(const std::string &detID)
static std::vector< std::string > getEntryLanes(const std::string &detID)
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
static int getLastStepVehicleNumber(const std::string &detID)
static int getLastStepHaltingNumber(const std::string &detID)
static std::vector< double > getEntryPositions(const std::string &detID)
static double getLastStepMeanSpeed(const std::string &detID)
static SubscriptionResults mySubscriptionResults
static double getLastIntervalMeanTravelTime(const std::string &detID)
static ContextSubscriptionResults myContextSubscriptionResults
static std::vector< std::string > getExitLanes(const std::string &detID)
static int getLastIntervalVehicleSum(const std::string &detID)
static std::vector< std::string > getLastStepVehicleIDs(const std::string &detID)
static MSE3Collector * getDetector(const std::string &detID)
static std::vector< double > getExitPositions(const std::string &detID)
static double getLastIntervalMeanTimeLoss(const std::string &detID)
A simple description of a position on a lane (crossing of a lane).
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
A detector of vehicles passing an area between entry/exit points.
MSDetectorControl & getDetectorControl()
Returns the detector control.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
C++ TraCI client API implementation.
T get(const std::string &id) const
Retrieves an item.
void insertIDs(std::vector< std::string > &into) const
int size() const
Returns the number of stored items within the container.
virtual std::string readString()
virtual int readUnsignedByte()
TRACI_CONST int VAR_LAST_INTERVAL_TRAVELTIME
TRACI_CONST int LAST_STEP_VEHICLE_ID_LIST
TRACI_CONST int VAR_EXIT_POSITIONS
TRACI_CONST int LAST_STEP_VEHICLE_NUMBER
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int VAR_LANES
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
TRACI_CONST int VAR_TIMELOSS
TRACI_CONST int VAR_POSITION
TRACI_CONST int LAST_STEP_MEAN_SPEED
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
TRACI_CONST int LAST_STEP_VEHICLE_HALTING_NUMBER
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_EXIT_LANES
TRACI_CONST int VAR_LAST_INTERVAL_VEHICLE_NUMBER
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int VAR_LAST_INTERVAL_MEAN_HALTING_NUMBER