SUMO - Simulation of Urban MObility
|
Representation of a vehicle. More...
#include <SUMOVehicle.h>
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 MSEdge * | getEdge () 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 MSRoute & | getRoute () const =0 |
Returns the current route. | |
virtual SUMOReal | getSpeed () const =0 |
Returns the vehicle's current speed. | |
virtual const MSVehicleType & | getVehicleType () 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 MSEdge * | succEdge (unsigned int nSuccs) const =0 |
Returns the nSuccs'th successor of edge the vehicle is currently at. | |
virtual | ~SUMOVehicle () |
Destructor. |
Representation of a vehicle.
Definition at line 61 of file SUMOVehicle.h.
|
inlinevirtual |
Destructor.
Definition at line 64 of file SUMOVehicle.h.
Adapt the vehicle's maximum speed depending on the reference speed.
[in] | the | maximum speed on the edge |
Implemented in MSBaseVehicle.
|
pure virtual |
Adds a person to this vehicle.
May do nothing since persons are not supported by default
[in] | person | The person to add |
Implemented in MSVehicle, and MSBaseVehicle.
Referenced by MSPerson::MSPersonStage_Driving::proceed().
|
pure virtual |
Adds a stop.
The stop is put into the sorted list.
[in] | stop | The stop to add |
Implemented in MSVehicle.
|
pure virtual |
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().
|
pure virtual |
Returns this vehicle's devices.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Tripinfo::generateOutput(), and MSVehicleControl::scheduleVehicleRemoval().
|
pure virtual |
Returns the edge the vehicle is currently at.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Vehroutes::addRoute(), MSDevice_Tripinfo::generateOutput(), MSTriggeredRerouter::notifyEnter(), MSDevice_Vehroutes::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Person::notifyMove(), TraCIServerAPI_Vehicle::processSet(), and MSInsertionControl::tryInsert().
|
pure virtual |
Get the vehicle's ID.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Tripinfo::buildVehicleDevices(), MSDevice_Person::buildVehicleDevices(), MSDevice_Vehroutes::buildVehicleDevices(), MSDevice_HBEFA::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), MSInductLoop::collectVehiclesOnDet(), MSVehicleControl::deleteVehicle(), MSE3Collector::enter(), MSDevice_Vehroutes::generateOutput(), MSDevice_Tripinfo::generateOutput(), TraCIServerAPI_Vehicle::getSingularType(), MSEdge::insertVehicle(), MSE3Collector::leave(), MSInductLoop::leaveDetectorByMove(), MSMeanData::MeanDataValues::notifyMove(), TraCIServerAPI_Vehicle::processSet(), traci::TraCIServer::vehicleStateChanged(), and MSInstantInductLoop::write().
|
pure virtual |
Returns the vehicle's maximum speed.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Routing::getEffort().
|
pure virtual |
Returns the number of new routes this vehicle got.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Tripinfo::generateOutput(), and MSDevice_Vehroutes::writeXMLRoute().
|
pure virtual |
Returns the vehicle's parameter (including departure definition)
Implemented in MSBaseVehicle.
Referenced by MSVehicleContainer::add(), MSDevice_Routing::buildVehicleDevices(), MSRouteHandler::closeVehicle(), MSDevice_Vehroutes::generateOutput(), MSDevice_Tripinfo::generateOutput(), MSVehicleControl::getWaitingVehicle(), MSEdge::insertVehicle(), MSDevice_Routing::MSDevice_Routing(), MSDevice_Routing::preInsertionReroute(), MSPerson::MSPersonStage_Driving::proceed(), TraCIServerAPI_Vehicle::processSet(), MSInsertionControl::tryInsert(), and MSVehicleControl::vehicleDeparted().
|
pure virtual |
Get the vehicle's position along the lane.
Implemented in MSVehicle.
Referenced by MSDevice_Tripinfo::notifyEnter(), MSInstantInductLoop::notifyEnter(), MSInductLoop::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSE2Collector::by_vehicle_position_sorter::operator()(), and MSXMLRawOut::writeVehicle().
|
pure virtual |
Returns the vehicle's acceleration before dawdling.
Implemented in MSVehicle, and MSBaseVehicle.
Referenced by MSDevice_HBEFA::notifyMove(), MSMeanData_HBEFA::MSLaneMeanDataValues::notifyMoveInternal(), and MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal().
|
pure virtual |
Returns the current route.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Vehroutes::addRoute(), MSDevice_Tripinfo::generateOutput(), MSTriggeredRerouter::getCurrentReroute(), MSTriggeredRerouter::hasCurrentReroute(), MSRouteProbe::notifyEnter(), MSTriggeredRerouter::notifyEnter(), and MSDevice_Routing::preInsertionReroute().
|
pure virtual |
Returns the vehicle's current speed.
Implemented in MSVehicle.
Referenced by MSInductLoop::collectVehiclesOnDet(), MSE3Collector::detectorUpdate(), MSE3Collector::enter(), MSE3Collector::leave(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSInstantInductLoop::notifyLeave(), TraCIServerAPI_Vehicle::processSet(), and MSXMLRawOut::writeVehicle().
|
pure virtual |
Returns the vehicle's type.
Implemented in MSBaseVehicle.
Referenced by MSInductLoop::collectVehiclesOnDet(), MSDevice_Vehroutes::generateOutput(), MSDevice_Tripinfo::generateOutput(), MSBusStop::getLastFreePos(), TraCIServerAPI_Vehicle::getSingularType(), MSInductLoop::leaveDetectorByMove(), MSInstantInductLoop::notifyEnter(), MSInductLoop::notifyEnter(), MSE2Collector::notifyEnter(), MSE2Collector::notifyLeave(), MSInstantInductLoop::notifyMove(), MSDevice_HBEFA::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSInductLoop::notifyMove(), MSE2Collector::notifyMove(), MSMeanData_HBEFA::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSEdge::prohibits(), MSLink::setApproaching(), MSLane::succLinkSec(), MSMeanData::MeanDataValues::vehicleApplies(), and MSInstantInductLoop::write().
|
pure virtual |
Returns the information whether the vehicle is on a road (is simulated)
Implemented in MSVehicle, and MSBaseVehicle.
Referenced by GUIVehicleControl::insertVehicleIDs().
|
pure virtual |
Returns whether the vehicle is at a stop.
Implemented in MSVehicle.
Referenced by MSDevice_Person::notifyMove().
|
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().
Replaces the current route by the given one.
Implemented in MSVehicle.
Referenced by MSTriggeredRerouter::notifyEnter(), MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_Vehicle::processSet(), and MSBaseVehicle::replaceRouteEdges().
|
pure virtual |
Replaces the current route by the given edges.
Implemented in MSBaseVehicle.
Referenced by TraCIServerAPI_Vehicle::processSet().
|
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.
[in] | t | The time for which the route is computed |
[in] | router | The router to use |
Implemented in MSBaseVehicle.
Referenced by MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_Vehicle::processSet(), and MSDevice_Routing::wrappedRerouteCommandExecute().
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.
[in] | nSuccs | The number of edge to look forward |
Implemented in MSBaseVehicle.
Referenced by TraCIServerAPI_Vehicle::processSet(), and MSLane::succLinkSec().