 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
49 fclass = fclass.substr(0, fclass.find_first_of(
"@"));
60 const MEVehicle* mesoVeh = dynamic_cast<const MEVehicle*>(veh);
64 const MSVehicle* microVeh = dynamic_cast<const MSVehicle*>(veh);
A vehicle from the mesoscopic point of view.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
const std::string & getID() const
Returns the name of the vehicle type.
virtual double getAngle() const =0
Get the vehicle's angle.
virtual double getAcceleration() const =0
Returns the vehicle's acceleration.
Static storage of an output device and its base (abstract) implementation.
virtual const MSEdge * getEdge() const =0
Returns the edge the vehicle is currently at.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
virtual const std::string & getID() const =0
Get the vehicle's ID.
static void write(OutputDevice &of, SUMOTime timestep, int precision)
Writes the complete network state of the given edges into the given device.
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
Representation of a vehicle.
static double naviDegree(const double angle)
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
virtual const std::map< int, double > * getEmissionParameters() const =0
Returns the vehicle's emission model parameter.
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
virtual const MSRoute & getRoute() const =0
Returns the current route.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static double computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
virtual double getSlope() const =0
Returns the slope of the road at vehicle's position.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope, const std::map< int, double > *param=0)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
double x() const
Returns the x-position.
std::string time2string(SUMOTime t)
MSLane * getLane() const
Returns the lane the vehicle is on.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double y() const
Returns the y-position.
Storage for collected values of all emission types.
The class responsible for building and deletion of vehicles.
int gPrecision
the precision for floating point outputs
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
virtual double getPositionOnLane() const =0
Get the vehicle's position along the lane.
const std::string & getID() const
Returns the id.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
virtual double getSpeed() const =0
Returns the vehicle's current speed.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
Representation of a vehicle in the micro simulation.