44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
53 const std::string& vType,
55 :
Named(id), myVType(vType), myOutputDevice(od), myFrequency(frequency) {
71 for (; it != end; ++it) {
81 <<
"\" x=\"" << pos.
x()
82 <<
"\" y=\"" << pos.
y();
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
Representation of a vehicle in the micro simulation.
Position positionAtOffset(SUMOReal pos) const
Returns the position at the given length.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
MSEventControl & getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
MSVTypeProbe(const std::string &id, const std::string &vType, OutputDevice &od, SUMOTime frequency)
Constructor.
#define GEO_OUTPUT_ACCURACY
std::string time2string(SUMOTime t)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOTime myFrequency
The frequency of reporting.
SUMOReal getPositionOnLane() const
Get the vehicle's position along the lane.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
SUMOReal x() const
Returns the x-position.
bool writeXMLHeader(const std::string &rootElement, const std::string &attrs="", const std::string &comment="")
Writes an XML header with optional configuration.
const std::string & getID() const
Returns the id.
void setPrecision(unsigned int precision=OUTPUT_ACCURACY)
Sets the precison or resets it to default.
SUMOTime execute(SUMOTime currentTime)
Writes values into the given stream.
A point in 2D or 3D with translation and scaling methods.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
OutputDevice & myOutputDevice
The device to write into.
virtual SUMOTime addEvent(Command *operation, SUMOTime execTimeStep, AdaptType type)
Adds an Event.
Base class for objects which have an id.
std::string myVType
The id of the vehicle type vehicles must have to be reported.
SUMOReal y() const
Returns the y-position.
virtual ~MSVTypeProbe()
Destructor.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
const std::string & getID() const
Returns the name of the vehicle type.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
SUMOReal getSpeed() const
Returns the vehicle's current speed.
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
const PositionVector & getShape() const
Returns this lane's shape.
Patch the time in a way that it is at least as high as the simulation begin time. ...
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
The class responsible for building and deletion of vehicles.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
MSLane * getLane() const
Returns the lane the vehicle is on.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
const std::string & getID() const
Returns the name of the vehicle.