165 virtual bool replaceRoute(
ConstMSRoutePtr route,
const std::string& info,
bool onInit =
false,
int offset = 0,
bool addStops =
true,
bool removeStops =
true, std::string* msgReturn =
nullptr) = 0;
257 std::string
getStringParam(
const std::string& paramName,
const bool required =
false,
const std::string& deflt =
"")
const;
273 bool getBoolParam(
const std::string& paramName,
const bool required =
false,
const bool deflt =
false)
const;
std::shared_ptr< const MSRoute > ConstMSRoutePtr
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
const double INVALID_DOUBLE
invalid double
Abstract in-vehicle / in-person device.
A road/street connecting two junctions.
Representation of a lane in the micro simulation.
The car-following model and parameter.
Base class for objects which have an id.
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle, person, or container.
virtual bool ignoreTransientPermissions() const
Returns whether this object is ignoring transient permission changes (during routing)
virtual NumericalID getNumericalID() const =0
return the numerical ID which is only for internal usage
virtual bool isContainer() const
Whether it is a container.
virtual bool isVehicle() const
Whether it is a vehicle.
bool getBoolParam(const std::string ¶mName, const bool required=false, const bool deflt=false) const
Retrieve a boolean parameter for the traffic object.
virtual bool hasInfluencer() const =0
whether the vehicle is individually influenced (via TraCI or special parameters)
virtual double getAcceleration() const =0
Returns the object's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.
std::string getStringParam(const std::string ¶mName, const bool required=false, const std::string &deflt="") const
Retrieve a string parameter for the traffic object.
virtual double getSlope() const =0
Returns the slope of the road at object's position in degrees.
virtual const MSLane * getLane() const =0
Returns the lane the object is currently at.
virtual const SUMOVTypeParameter & getVTypeParameter() const =0
Returns the object's "vehicle" type parameter.
virtual int getRNGIndex() const =0
SUMOTime getTimeParam(const std::string ¶mName, const bool required=false, const SUMOTime deflt=SUMOTime_MIN) const
Retrieve a time parameter for the traffic object.
virtual const MSLane * getBackLane() const =0
Returns the lane the where the rear of the object is currently at.
virtual MSDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or nullptr if not.
virtual bool replaceRoute(ConstMSRoutePtr route, const std::string &info, bool onInit=false, int offset=0, bool addStops=true, bool removeStops=true, std::string *msgReturn=nullptr)=0
Replaces the current route by the given one.
virtual double getPreviousSpeed() const =0
Returns the object's previous speed.
virtual double getChosenSpeedFactor() const =0
long long int NumericalID
virtual double getSpeed() const =0
Returns the object's current speed.
virtual SUMOTime getWaitingTime(const bool accumulated=false) const =0
virtual bool isStopped() const =0
Returns whether the object is at a stop.
virtual bool isPerson() const
Whether it is a person.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
virtual double getAngle() const =0
Returns the object's angle in degrees.
virtual double getMaxSpeed() const =0
Returns the object's maximum speed (minimum of technical and desired maximum speed)
virtual SUMOVehicleClass getVClass() const =0
Returns the object's access class.
double getFloatParam(const std::string ¶mName, const bool required=false, const double deflt=INVALID_DOUBLE) const
Retrieve a floating point parameter for the traffic object.
virtual SumoRNG * getRNG() const =0
Returns the associated RNG for this object.
virtual ~SUMOTrafficObject()
Destructor.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
virtual bool isSelected() const =0
whether this object is selected in the GUI
virtual int getRoutePosition() const =0
return index of edge within route
virtual const std::set< NumericalID > getUpcomingEdgeIDs() const =0
returns the numerical IDs of edges to be used (possibly of future stages)
virtual bool hasArrived() const =0
Returns whether this object has arrived.
virtual double getBackPositionOnLane(const MSLane *lane) const =0
Get the object's back position along the given lane.
virtual const MSEdge * getEdge() const =0
Returns the edge the object is currently at.
virtual const MSEdge * getNextEdgePtr() const =0
returns the next edge (possibly an internal edge)
virtual const MSEdge * getRerouteDestination() const =0
Returns the end point for reroutes (usually the last edge of the route)
virtual int getRoutingMode() const =0
SUMOTrafficObject(const std::string &id)
Constructor.
virtual void replaceVehicleType(MSVehicleType *type)=0
Replaces the current vehicle type by the one given.
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Structure representing possible vehicle parameter.
Structure representing possible vehicle parameter.