25 #ifndef MSE2Collector_h 26 #define MSE2Collector_h 118 const std::string& vTypes);
136 const std::set<std::string>& vTypes);
int myMaxVehicleNumber
The max number of vehicles [#veh].
SUMOReal getCurrentMeanSpeed() const
Returns the mean vehicle speed of vehicles currently on the detector.
int myMeanMaxJamInVehicles
The mean jam length [#veh].
std::vector< SUMOTime > myPastIntervalStandingDurations
Halting durations of ended halts for the current interval [s].
SUMOReal getCurrentJamLengthInMeters() const
Returns the length of all jams in meters.
SUMOReal myMaxJamInMeters
The max jam length [m].
std::vector< std::string > getCurrentVehicleIDs() const
Returns the IDs of the vehicles within the area.
int getCurrentJamLengthInVehicles() const
Returns the length of all jams in vehicles.
virtual ~MSE2Collector()
Destructor.
An areal (along a single lane) detector.
std::map< const std::string, SUMOTime > myIntervalHaltingVehicleDurations
Storage for halting durations of known vehicles (current interval)
Internal representation of a jam.
int myCurrentMaxJamLengthInVehicles
The current maximum jam length in vehicles.
SUMOReal myStartedHalts
The number of started halts [#].
SUMOReal getEstimateQueueLength() const
Returns an estimate of the lenght of the queue of vehicles currently stopped on the detector...
Notification
Definition of a vehicle state.
std::vector< SUMOTime > myPastStandingDurations
Halting durations of ended halts [s].
std::map< const std::string, SUMOTime > myHaltingVehicleDurations
Storage for halting durations of known vehicles (for halting vehicles)
int myMeanVehicleNumber
The mean number of vehicles [#veh].
int myCurrentStartedHalts
The number of started halts in the last step.
SUMOReal myCurrentMeanLength
The current mean length.
SUMOReal myVehicleSamples
The number of collected samples [#].
SUMOReal getCurrentMaxJamLengthInMeters() const
Returns the length in meters of the currently largest jam.
SUMOReal getEndPos() const
Returns the end position of the detector.
VehicleInfo(std::string _id, std::string _type, SUMOReal _speed, SUMOReal _timeOnDet, SUMOReal _lengthOnDet, SUMOReal _position, SUMOReal _lengthWithGap, SUMOReal _accel, bool _stillOnDet)
int myTimeSamples
The current aggregation duration [#steps].
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Adds the vehicle to known vehicles if not beyond the dector.
int getCurrentMaxJamLengthInVehicles() const
Returns the length in vehicles of the currently largest jam.
Internal representation of a vehicle.
std::vector< VehicleInfo > myKnownVehicles
List of known vehicles.
MSE2Collector & operator=(const MSE2Collector &)
Invalidated assignment operator.
int myCurrentJamLengthInVehicles
The overall jam length in vehicles.
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
Representation of a vehicle.
int myJamLengthInVehiclesSum
The sum of jam lengths [#veh].
std::vector< VehicleInfo >::const_iterator firstStandingVehicle
The first standing vehicle.
int getCurrentJamNumber() const
Returns the current number of jams.
SUMOReal getCurrentOccupancy() const
Returns the curent detector occupancy.
std::vector< VehicleInfo >::const_iterator lastStandingVehicle
The last standing vehicle.
int myCurrentJamNo
The current jam number.
int getCurrentHaltingNumber() const
Returns the number of current haltings within the area.
SUMOReal getStartPos() const
Returns the begin position of the detector.
Something on a lane to be noticed about vehicle movement.
SUMOReal myJamHaltingSpeedThreshold
A vehicle must driver slower than this to be counted as a part of a jam.
SUMOTime myJamHaltingTimeThreshold
A vehicle must be that long beyond myJamHaltingSpeedThreshold to be counted as a part of a jam...
SUMOReal mySpeedSum
The sum of collected vehicle speeds [m/s].
SUMOReal myCurrentMaxJamLengthInMeters
the current maximum jam length in meters
const std::vector< VehicleInfo > & getCurrentVehicles() const
Returns the vehicles within the area.
SUMOReal myCurrentJamLengthInMeters
The overall jam length in meters.
SUMOReal myStartPos
The position the detector starts at.
void detectorUpdate(const SUMOTime step)
Computes the detector values in each time step.
SUMOReal myEndPos
The position the detector ends at.
void subtractPassedVeh(int passed)
Subtract the number of vehicles indicated from passed from the sensor count.
SUMOReal myCurrentOccupancy
The current occupancy.
SUMOReal myMaxOccupancy
The maximum occupancy [%].
std::vector< VehicleInfo > myPreviousKnownVehicles
List of previously known vehicles.
bool notifyMove(SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Adds/removes vehicles from the list of vehicles to regard.
MSE2Collector(const std::string &id, DetectorUsage usage, MSLane *const lane, SUMOReal startPos, SUMOReal detLength, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold, const std::string &vTypes)
Constructor.
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Writes collected values into the given stream.
DetectorUsage myUsage
Information about how this detector is used.
SUMOReal myCurrentMeanSpeed
The current mean speed.
int getPassedVeh()
Returns the number of vehicles passed over the sensor.
void reset()
Resets all values.
int getCurrentStartedHalts() const
Returns the length of all jams in meters.
virtual DetectorUsage getUsageType() const
Returns the detector's usage type.
int myMaxJamInVehicles
The max jam length [#veh].
SUMOReal myMeanMaxJamInMeters
The mean jam length [m].
SUMOReal myOccupancySum
The sum of occupancies [%].
int getEstimatedCurrentVehicleNumber(SUMOReal speedThreshold) const
Returns an estimate of the number of vehicles currently on the detector.
SUMOReal myJamLengthInMetersSum
The sum of jam lengths [m].
Static storage of an output device and its base (abstract) implementation.
int myCurrentHaltingsNumber
The number of halted vehicles [#].
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
Removes a known vehicle due to its lane-change.
int myPassedVeh
The number of vehicles passed on the sensor.
Representation of a lane in the micro simulation.
Base of value-generating classes (detectors)
SUMOReal getCurrentMeanLength() const
Returns the mean vehicle length of vehicles currently on the detector.
SUMOReal myJamDistanceThreshold
Two standing vehicles must be closer than this to be counted into the same jam.
int getCurrentVehicleNumber() const
Returns the number of vehicles currently on the detector.