SUMO - Simulation of Urban MObility
SUMOVehicle Class Reference

Representation of a vehicle. More...

#include <SUMOVehicle.h>

Inheritance diagram for SUMOVehicle:
MSBaseVehicle MSVehicle GUIVehicle

Public Member Functions

virtual SUMOReal adaptMaxSpeed (SUMOReal referenceSpeed)=0
 Adapt the vehicle's maximum speed depending on the reference speed.
virtual void addPerson (MSPerson *person)=0
 Adds a person to this vehicle.
virtual bool addStop (const SUMOVehicleParameter::Stop &stopPar, SUMOTime untilOffset=0)=0
 Adds a stop.
virtual SUMOTime getDeparture () const =0
 Returns this vehicle's real departure time.
virtual const std::vector
< MSDevice * > & 
getDevices () const =0
 Returns this vehicle's devices.
virtual const MSEdgegetEdge () const =0
 Returns the edge the vehicle is currently at.
virtual const std::string & getID () const =0
 Get the vehicle's ID.
virtual SUMOReal getMaxSpeed () const =0
 Returns the vehicle's maximum speed.
virtual unsigned int getNumberReroutes () const =0
 Returns the number of new routes this vehicle got.
virtual const
SUMOVehicleParameter
getParameter () const =0
 Returns the vehicle's parameter (including departure definition)
virtual SUMOReal getPositionOnLane () const =0
 Get the vehicle's position along the lane.
virtual SUMOReal getPreDawdleAcceleration () const =0
 Returns the vehicle's acceleration before dawdling.
virtual const MSRoutegetRoute () const =0
 Returns the current route.
virtual SUMOReal getSpeed () const =0
 Returns the vehicle's current speed.
virtual const MSVehicleTypegetVehicleType () const =0
 Returns the vehicle's type.
virtual bool isOnRoad () const =0
 Returns the information whether the vehicle is on a road (is simulated)
virtual bool isStopped () const =0
 Returns whether the vehicle is at a stop.
virtual void onDepart ()=0
 Called when the vehicle is inserted into the network.
virtual bool replaceRoute (const MSRoute *route, bool onInit=false)=0
 Replaces the current route by the given one.
virtual bool replaceRouteEdges (const MSEdgeVector &edges, bool onInit=false)=0
 Replaces the current route by the given edges.
virtual void reroute (SUMOTime t, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, bool withTaz=false)=0
 Performs a rerouting using the given router.
virtual const MSEdgesuccEdge (unsigned int nSuccs) const =0
 Returns the nSuccs'th successor of edge the vehicle is currently at.
virtual ~SUMOVehicle ()
 Destructor.

Detailed Description

Representation of a vehicle.

Definition at line 61 of file SUMOVehicle.h.


Constructor & Destructor Documentation

virtual SUMOVehicle::~SUMOVehicle ( ) [inline, virtual]

Destructor.

Definition at line 64 of file SUMOVehicle.h.


Member Function Documentation

virtual SUMOReal SUMOVehicle::adaptMaxSpeed ( SUMOReal  referenceSpeed) [pure virtual]

Adapt the vehicle's maximum speed depending on the reference speed.

Parameters:
[in]themaximum speed on the edge
Returns:
The vehicle's new maximum speed

Implemented in MSBaseVehicle.

virtual void SUMOVehicle::addPerson ( MSPerson person) [pure virtual]

Adds a person to this vehicle.

May do nothing since persons are not supported by default

Parameters:
[in]personThe person to add

Implemented in MSVehicle, and MSBaseVehicle.

Referenced by MSPerson::MSPersonStage_Driving::proceed().

virtual bool SUMOVehicle::addStop ( const SUMOVehicleParameter::Stop stopPar,
SUMOTime  untilOffset = 0 
) [pure virtual]

Adds a stop.

The stop is put into the sorted list.

Parameters:
[in]stopThe stop to add
Returns:
Whether the stop could be added

Implemented in MSVehicle.

virtual SUMOTime SUMOVehicle::getDeparture ( ) const [pure virtual]

Returns this vehicle's real departure time.

Returns:
This vehicle's real departure time

Implemented in MSBaseVehicle.

Referenced by MSDevice_Vehroutes::addRoute(), MSDevice_Vehroutes::generateOutput(), MSDevice_Tripinfo::generateOutput(), MSVehicleControl::scheduleVehicleRemoval(), and MSVehicleControl::vehicleDeparted().

virtual const std::vector<MSDevice*>& SUMOVehicle::getDevices ( ) const [pure virtual]

Returns this vehicle's devices.

Returns:
This vehicle's devices

Implemented in MSBaseVehicle.

Referenced by MSDevice_Tripinfo::generateOutput(), and MSVehicleControl::scheduleVehicleRemoval().

virtual SUMOReal SUMOVehicle::getMaxSpeed ( ) const [pure virtual]

Returns the vehicle's maximum speed.

Returns:
The vehicle's maximum speed

Implemented in MSBaseVehicle.

Referenced by MSDevice_Routing::getEffort().

virtual unsigned int SUMOVehicle::getNumberReroutes ( ) const [pure virtual]

Returns the number of new routes this vehicle got.

Returns:
the number of new routes this vehicle got

Implemented in MSBaseVehicle.

Referenced by MSDevice_Tripinfo::generateOutput(), and MSDevice_Vehroutes::writeXMLRoute().

virtual SUMOReal SUMOVehicle::getPositionOnLane ( ) const [pure virtual]
virtual SUMOReal SUMOVehicle::getPreDawdleAcceleration ( ) const [pure virtual]

Returns the vehicle's acceleration before dawdling.

Returns:
The acceleration before dawdling

Implemented in MSVehicle, and MSBaseVehicle.

Referenced by MSDevice_HBEFA::notifyMove(), MSMeanData_HBEFA::MSLaneMeanDataValues::notifyMoveInternal(), and MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal().

virtual bool SUMOVehicle::isOnRoad ( ) const [pure virtual]

Returns the information whether the vehicle is on a road (is simulated)

Returns:
Whether the vehicle is simulated

Implemented in MSVehicle, and MSBaseVehicle.

Referenced by GUIVehicleControl::insertVehicleIDs().

virtual bool SUMOVehicle::isStopped ( ) const [pure virtual]

Returns whether the vehicle is at a stop.

Returns:
Whether the has stopped

Implemented in MSVehicle.

Referenced by MSDevice_Person::notifyMove().

virtual void SUMOVehicle::onDepart ( ) [pure virtual]

Called when the vehicle is inserted into the network.

Sets optional information about departure time, informs the vehicle control about a further running vehicle.

Implemented in MSBaseVehicle.

Referenced by MSInsertionControl::tryInsert().

virtual bool SUMOVehicle::replaceRoute ( const MSRoute route,
bool  onInit = false 
) [pure virtual]
virtual bool SUMOVehicle::replaceRouteEdges ( const MSEdgeVector edges,
bool  onInit = false 
) [pure virtual]

Replaces the current route by the given edges.

Implemented in MSBaseVehicle.

Referenced by TraCIServerAPI_Vehicle::processSet().

virtual void SUMOVehicle::reroute ( SUMOTime  t,
SUMOAbstractRouter< MSEdge, SUMOVehicle > &  router,
bool  withTaz = false 
) [pure virtual]

Performs a rerouting using the given router.

Tries to find a new route between the current edge and the destination edge, first. Tries to replace the current route by the new one using replaceRoute.

Parameters:
[in]tThe time for which the route is computed
[in]routerThe router to use
See also:
replaceRoute

Implemented in MSBaseVehicle.

Referenced by MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_Vehicle::processSet(), and MSDevice_Routing::wrappedRerouteCommandExecute().

virtual const MSEdge* SUMOVehicle::succEdge ( unsigned int  nSuccs) const [pure virtual]

Returns the nSuccs'th successor of edge the vehicle is currently at.

If the rest of the route (counted from the current edge) than nSuccs, 0 is returned.

Parameters:
[in]nSuccsThe number of edge to look forward
Returns:
The nSuccs'th following edge in the vehicle's route

Implemented in MSBaseVehicle.

Referenced by TraCIServerAPI_Vehicle::processSet(), and MSLane::succLinkSec().


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines