22 #ifndef MSBaseVehicle_h 23 #define MSBaseVehicle_h 85 const std::string&
getID()
const;
378 void addStops(
const bool ignoreStopErrors);
450 static void initMoveReminderOutput(
const OptionsCont& oc);
457 const bool myTraceMoveReminders;
460 static std::set<std::string> myShallTraceMoveReminders;
void removeReminder(MSMoveReminder *rem)
Removes a MoveReminder dynamically.
const MSVehicleType * myType
This Vehicle's type.
SUMOTime getDeparture() const
Returns this vehicle's real departure time.
bool hasValidRoute(std::string &msg, const MSRoute *route=0) const
Validates the current or given route.
MoveReminderCont myMoveReminders
Currently relevant move reminders.
SUMOReal myArrivalPos
The position on the destination lane where the vehicle stops.
virtual SUMOReal getAcceleration() const
Returns the vehicle's acceleration.
bool hasDeparted() const
Returns whether this vehicle has already departed.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
Notification
Definition of a vehicle state.
SUMOVehicleClass vehicleClass
The vehicle's class.
virtual bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
SUMOTime getDepartDelay() const
Returns the depart delay.
virtual ~MSBaseVehicle()
Destructor.
const MSRoute * myRoute
This Vehicle's route.
const MSRoute & getRoute() const
Returns the current route.
std::vector< const MSEdge * > ConstMSEdgeVector
int myArrivalLane
The destination lane where the vehicle stops.
const SUMOVehicleParameter * myParameter
This Vehicle's parameter.
The base class for microscopic and mesoscopic vehicles.
int getNumberReroutes() const
Returns the number of new routes this vehicle got.
MSBaseVehicle(SUMOVehicleParameter *pars, const MSRoute *route, const MSVehicleType *type, const SUMOReal speedFactor)
Constructor.
The car-following model and parameter.
virtual void saveState(OutputDevice &out)
Saves the (common) state of a vehicle.
std::vector< std::pair< MSMoveReminder *, SUMOReal > > MoveReminderCont
Definition of a move reminder container.
void calculateArrivalParams()
(Re-)Calculates the arrival position and lane from the vehicle parameters
A road/street connecting two junctions.
virtual void addPerson(MSTransportable *person)
Adds a person to this vehicle.
virtual const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
virtual bool isFrontOnLane(const MSLane *) const
Returns the information whether the front of the vehhicle is on the given lane.
virtual SUMOReal getArrivalPos() const
Returns this vehicle's desired arrivalPos for its current route (may change on reroute) ...
Representation of a vehicle.
void setChosenSpeedFactor(const SUMOReal factor)
Returns the precomputed factor by which the driver wants to be faster than the speed limit...
SUMOReal getDepartPos() const
Returns this vehicle's real departure position.
MSBaseVehicle & operator=(const MSBaseVehicle &s)
invalidated assignment operator
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
ConstMSEdgeVector::const_iterator MSRouteIterator
SUMOTime depart
The vehicle's departure time.
SUMOReal getMaxSpeed() const
Returns the maximum speed.
A MSVehicle extended by some values for usage within the gui.
virtual void setArrivalPos(SUMOReal arrivalPos)
Sets this vehicle's desired arrivalPos for its current route.
virtual const ConstMSEdgeVector getStopEdges() const =0
Returns the list of still pending stop edges.
Something on a lane to be noticed about vehicle movement.
const std::vector< MSDevice * > & getDevices() const
Returns this vehicle's devices.
const SUMOVTypeParameter & getParameter() const
SUMOReal getPreviousSpeed() const
Returns the vehicle's previous speed.
Abstract in-vehicle device.
SUMOReal myChosenSpeedFactor
A precomputed factor by which the driver wants to be faster than the speed limit. ...
SUMOVehicleClass getVClass() const
Returns the vehicle's access class.
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
Structure representing possible vehicle parameter.
MSDevice * getDevice(const std::type_info &type) const
Returns a device of the given type if it exists or 0.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
virtual SUMOReal getSlope() const
Returns the slope of the road at vehicle's position.
virtual bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
virtual bool hasArrived() const
Returns whether this vehicle has already arived (by default this is true if the vehicle has reached i...
virtual void activateReminders(const MSMoveReminder::Notification reason)
"Activates" all current move reminder
SUMOReal getChosenSpeedFactor() const
Returns the precomputed factor by which the driver wants to be faster than the speed limit...
virtual SUMOReal getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
void onDepart()
Called when the vehicle is inserted into the network.
A storage for options typed value containers)
bool replaceRouteEdges(ConstMSEdgeVector &edges, bool onInit=false, bool check=false)
Replaces the current route by the given edges.
int myNumberReroutes
The number of reroutings.
const MSEdge * succEdge(int nSuccs) const
Returns the nSuccs'th successor of edge the vehicle is currently at.
Static storage of an output device and its base (abstract) implementation.
MSRouteIterator myCurrEdge
Iterator to current route-edge.
void reroute(SUMOTime t, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, const bool onInit=false, const bool withTaz=false)
Performs a rerouting using the given router.
SUMOReal getImpatience() const
Returns this vehicles impatience.
const MSRouteIterator & getCurrentRouteEdge() const
Returns an iterator pointing to the current edge in this vehicles route.
SUMOReal myDepartPos
The real depart position.
const std::string & getID() const
Returns the name of the vehicle.
void addReminder(MSMoveReminder *rem)
Adds a MoveReminder dynamically.
Representation of a lane in the micro simulation.
std::vector< MSDevice * > myDevices
The devices this vehicle has.
virtual void addContainer(MSTransportable *container)
Adds a container to this vehicle.
SUMOTime myDeparture
The real departure time.
static const SUMOTime NOT_YET_DEPARTED