SUMO - Simulation of Urban MObility
|
Representation of a vehicle. More...
#include <SUMOVehicle.h>
Public Member Functions | |
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 SUMOReal | getAcceleration () const =0 |
Returns the vehicle's acceleration. | |
virtual SUMOReal | getArrivalPos () const =0 |
Returns this vehicle's desired arrivalPos for its current route (may change on reroute) | |
virtual SUMOReal | getChosenSpeedFactor () const =0 |
virtual SUMOTime | getDeparture () const =0 |
Returns this vehicle's real departure time. | |
virtual MSDevice * | getDevice (const std::type_info &type) const =0 |
Returns a device of the given type if it exists or 0. | |
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 | getImpatience () const =0 |
Returns this vehicles impatience. | |
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 const MSRoute & | getRoute () const =0 |
Returns the current route. | |
virtual SUMOReal | getSlope () const =0 |
Returns the slope of the road at vehicle's position. | |
virtual SUMOReal | getSpeed () const =0 |
Returns the vehicle's current speed. | |
virtual const MSVehicleType & | getVehicleType () const =0 |
Returns the vehicle's type. | |
virtual SUMOTime | getWaitingTime () const =0 |
virtual bool | hasArrived () const =0 |
Returns whether this vehicle has arrived. | |
virtual bool | hasDeparted () const =0 |
Returns whether this vehicle has departed. | |
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, int offset=0)=0 |
Replaces the current route by the given one. | |
virtual bool | replaceRouteEdges (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. | |
state io | |
virtual void | saveState (OutputDevice &out)=0 |
Saves the states of a vehicle. | |
virtual void | loadState (const SUMOSAXAttributes &attrs, const SUMOTime offset)=0 |
Loads the state of this vehicle from the given description. |
Representation of a vehicle.
Definition at line 64 of file SUMOVehicle.h.
|
inlinevirtual |
Destructor.
Definition at line 67 of file SUMOVehicle.h.
|
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.
|
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 the vehicle's acceleration.
Implemented in MSVehicle, and MSBaseVehicle.
Referenced by MSDevice_Emissions::notifyMove(), MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal(), and MSAmitranTrajectories::writeVehicle().
|
pure virtual |
Returns this vehicle's desired arrivalPos for its current route (may change on reroute)
Implemented in MSBaseVehicle.
Referenced by MSDevice_Tripinfo::notifyLeave().
|
pure virtual |
Implemented in MSBaseVehicle.
Referenced by MSLane::getVehicleMaxSpeed().
|
pure virtual |
Returns this vehicle's real departure time.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Tripinfo::generateOutput(), MSDevice_Vehroutes::generateOutput(), MSVehicleControl::scheduleVehicleRemoval(), MSVehicleControl::vehicleDeparted(), and MSAmitranTrajectories::writeVehicle().
|
pure virtual |
Returns a device of the given type if it exists or 0.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Example::notifyMove().
|
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(), MSDevice_Example::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_Person::notifyLeave(), MSDevice_Vehroutes::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Person::notifyMove(), and MSInsertionControl::tryInsert().
|
pure virtual |
Get the vehicle's ID.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Person::buildVehicleDevices(), MSDevice_Tripinfo::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice_BTsender::buildVehicleDevices(), MSDevice_Vehroutes::buildVehicleDevices(), MSDevice_BTreceiver::buildVehicleDevices(), MSDevice_Emissions::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), MSInductLoop::collectVehiclesOnDet(), MSVehicleControl::deleteVehicle(), MSE3Collector::enter(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice_Tripinfo::generateOutput(), MSDevice_Vehroutes::generateOutput(), TraCIServerAPI_Vehicle::getSingularType(), MSEdge::insertVehicle(), MSE3Collector::leave(), MSInductLoop::leaveDetectorByMove(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSLane::succLinkSec(), TraCIServer::vehicleStateChanged(), MSInstantInductLoop::write(), and MSAmitranTrajectories::writeVehicle().
|
pure virtual |
Returns this vehicles impatience.
Implemented in MSBaseVehicle.
|
pure virtual |
Returns the vehicle's maximum speed.
Implemented in MSBaseVehicle.
Referenced by MSEdge::getMinimumTravelTime().
|
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_Example::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), MSRouteHandler::closeVehicle(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice_Tripinfo::generateOutput(), MSDevice_Vehroutes::generateOutput(), MSVehicleControl::getWaitingVehicle(), MSEdge::insertVehicle(), MSDevice_Routing::MSDevice_Routing(), MSDevice_Routing::preInsertionReroute(), MSInsertionControl::tryInsert(), and MSVehicleControl::vehicleDeparted().
|
pure virtual |
Get the vehicle's position along the lane.
Implemented in MSVehicle.
Referenced by MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSE2Collector::by_vehicle_position_sorter::operator()(), and MSXMLRawOut::writeVehicle().
|
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 slope of the road at vehicle's position.
Implemented in MSVehicle, and MSBaseVehicle.
Referenced by MSDevice_Emissions::notifyMove(), and MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal().
|
pure virtual |
Returns the vehicle's current speed.
Implemented in MSVehicle.
Referenced by MSInductLoop::collectVehiclesOnDet(), MSE3Collector::detectorUpdate(), MSE3Collector::enter(), MSE3Collector::leave(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSInstantInductLoop::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSAmitranTrajectories::writeVehicle(), and MSXMLRawOut::writeVehicle().
|
pure virtual |
Returns the vehicle's type.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Example::buildVehicleDevices(), MSInductLoop::collectVehiclesOnDet(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice_Tripinfo::generateOutput(), MSDevice_Vehroutes::generateOutput(), MSBusStop::getLastFreePos(), TraCIServerAPI_Vehicle::getSingularType(), MSInductLoop::leaveDetectorByMove(), MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(), MSE2Collector::notifyEnter(), MSE2Collector::notifyLeave(), MSInstantInductLoop::notifyMove(), MSDevice_Emissions::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSInductLoop::notifyMove(), MSE2Collector::notifyMove(), MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Amitran::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSEdge::prohibits(), MSLink::setApproaching(), MSLane::succLinkSec(), MSMeanData::MeanDataValues::vehicleApplies(), MSInstantInductLoop::write(), and MSAmitranTrajectories::writeVehicle().
|
pure virtual |
Implemented in MSVehicle.
Referenced by MSBaseVehicle::getImpatience().
|
pure virtual |
Returns whether this vehicle has arrived.
Implemented in MSBaseVehicle, and MSVehicle.
Referenced by MSDevice_Vehroutes::generateOutput(), and MSMeanData::MeanDataValues::notifyMove().
|
pure virtual |
Returns whether this vehicle has departed.
Implemented in MSBaseVehicle.
Referenced by MSDevice_Vehroutes::addRoute().
|
pure virtual |
Returns the information whether the vehicle is on a road (is simulated)
Implemented in MSVehicle, and MSBaseVehicle.
Referenced by GUIVehicleControl::insertVehicleIDs(), MSE2Collector::notifyEnter(), and MSAmitranTrajectories::writeVehicle().
|
pure virtual |
Returns whether the vehicle is at a stop.
Implemented in MSVehicle.
Referenced by MSDevice_Person::notifyMove().
|
pure virtual |
Loads the state of this vehicle from the given description.
Implemented in MSVehicle.
Referenced by MSStateHandler::myStartElement().
|
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().
|
pure virtual |
Replaces the current route by the given one.
Implemented in MSVehicle.
Referenced by MSTriggeredRerouter::notifyEnter(), MSDevice_Routing::preInsertionReroute(), and MSBaseVehicle::replaceRouteEdges().
|
pure virtual |
Replaces the current route by the given edges.
Implemented in MSBaseVehicle.
|
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(), and MSDevice_Routing::wrappedRerouteCommandExecute().
|
pure virtual |
Saves the states of a vehicle.
Implemented in MSVehicle, and MSBaseVehicle.
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 MSLane::succLinkSec().