![]() |
SUMO - Simulation of Urban MObility
|
The base class for microscopic and mesoscopic vehicles. More...
#include <MSBaseVehicle.h>
Public Types | |
typedef long long int | NumericalID |
Public Member Functions | |
virtual void | activateReminders (const MSMoveReminder::Notification reason, const MSLane *enteredLane=0) |
"Activates" all current move reminder More... | |
virtual void | addContainer (MSTransportable *container) |
Adds a container to this vehicle. More... | |
virtual void | addPerson (MSTransportable *person) |
Adds a person to this vehicle. More... | |
void | addReminder (MSMoveReminder *rem) |
Adds a MoveReminder dynamically. More... | |
virtual bool | addStop (const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0, bool collision=false, ConstMSEdgeVector::const_iterator *searchStart=0)=0 |
Adds a stop. More... | |
void | addStops (const bool ignoreStopErrors) |
Adds stops to the built vehicle. More... | |
void | createDevice (const std::string &deviceName) |
create device of the given type More... | |
virtual double | getAcceleration () const |
Returns the vehicle's acceleration. More... | |
virtual SUMOTime | getAccumulatedWaitingTime () const =0 |
virtual double | getAngle () const =0 |
Get the vehicle's angle. More... | |
virtual double | getArrivalPos () const |
Returns this vehicle's desired arrivalPos for its current route (may change on reroute) More... | |
virtual double | getBackPositionOnLane (const MSLane *lane) const =0 |
Get the vehicle's back position along the given lane. More... | |
virtual double | getBrakeGap () const =0 |
get distance for coming to a stop (used for rerouting checks) More... | |
double | getChosenSpeedFactor () const |
Returns the precomputed factor by which the driver wants to be faster than the speed limit. More... | |
int | getContainerNumber () const |
Returns the number of containers. More... | |
const std::vector< MSTransportable * > & | getContainers () const |
retrieve riding containers More... | |
const MSRouteIterator & | getCurrentRouteEdge () const |
Returns an iterator pointing to the current edge in this vehicles route. More... | |
SUMOTime | getDepartDelay () const |
Returns the depart delay. More... | |
double | getDepartPos () const |
Returns this vehicle's real departure position. More... | |
SUMOTime | getDeparture () const |
Returns this vehicle's real departure time. More... | |
MSVehicleDevice * | getDevice (const std::type_info &type) const |
Returns a device of the given type if it exists or 0. More... | |
std::string | getDeviceParameter (const std::string &deviceName, const std::string &key) const |
try to retrieve the given parameter from any of the vehicles devices, raise InvalidArgument if no device parameter by that name exists More... | |
const std::vector< MSVehicleDevice * > & | getDevices () const |
Returns this vehicle's devices. More... | |
const MSEdge * | getEdge () const |
Returns the edge the vehicle is currently at. More... | |
const std::string & | getID () const |
Returns the name of the vehicle. More... | |
double | getImpatience () const |
Returns this vehicles impatience. More... | |
virtual MSLane * | getLane () const =0 |
Returns the lane the vehicle is on. More... | |
virtual double | getLateralPositionOnLane () const |
Get the vehicle's lateral position on the lane. More... | |
double | getLength () const |
Returns the vehicle's length. More... | |
double | getMaxSpeed () const |
Returns the maximum speed. More... | |
virtual MSParkingArea * | getNextParkingArea ()=0 |
int | getNumberReroutes () const |
Returns the number of new routes this vehicle got. More... | |
NumericalID | getNumericalID () const |
return the numerical ID which is only for internal usage More... | |
const SUMOVehicleParameter & | getParameter () const |
Returns the vehicle's parameter (including departure definition) More... | |
std::vector< std::string > | getPersonIDList () const |
Returns the list of persons. More... | |
int | getPersonNumber () const |
Returns the number of persons. More... | |
const std::vector< MSTransportable * > & | getPersons () const |
retrieve riding persons More... | |
virtual Position | getPosition (const double offset=0) const =0 |
Return current position (x/y, cartesian) More... | |
virtual double | getPositionOnLane () const =0 |
Get the vehicle's position along the lane. More... | |
double | getPreviousSpeed () const |
Returns the vehicle's previous speed. More... | |
virtual const MSEdge * | getRerouteOrigin () const |
Returns the starting point for reroutes (usually the current edge) More... | |
const MSRoute & | getRoute () const |
Returns the current route. More... | |
MSVehicleType & | getSingularType () |
Replaces the current vehicle type with a new one used by this vehicle only. More... | |
virtual double | getSlope () const |
Returns the slope of the road at vehicle's position. More... | |
virtual double | getSpeed () const =0 |
Returns the vehicle's current speed. More... | |
SUMOVehicleClass | getVClass () const |
Returns the vehicle's access class. More... | |
const MSVehicleType & | getVehicleType () const |
Returns the vehicle's type definition. More... | |
virtual SUMOTime | getWaitingTime () const =0 |
double | getWidth () const |
Returns the vehicle's width. More... | |
virtual bool | hasArrived () const |
Returns whether this vehicle has already arived (by default this is true if the vehicle has reached its final edge) More... | |
bool | hasDeparted () const |
Returns whether this vehicle has already departed. More... | |
bool | hasDevice (const std::string &deviceName) const |
check whether the vehicle is equiped with a device of the given type More... | |
bool | hasValidRoute (std::string &msg, const MSRoute *route=0) const |
Validates the current or given route. More... | |
virtual bool | isFrontOnLane (const MSLane *) const |
Returns the information whether the front of the vehhicle is on the given lane. More... | |
virtual bool | isOnRoad () const |
Returns the information whether the vehicle is on a road (is simulated) More... | |
virtual bool | isParking () const =0 |
Returns the information whether the vehicle is parked. More... | |
virtual bool | isRemoteControlled () const |
Returns the information whether the vehicle is fully controlled via TraCI. More... | |
virtual bool | isSelected () const |
whether this vehicle is selected in the GUI More... | |
virtual bool | isStopped () const =0 |
Returns whether the vehicle is at a stop. More... | |
virtual bool | isStoppedInRange (double pos) const =0 |
Returns whether the vehicle is stoped in range of the given position. More... | |
virtual bool | isStoppedTriggered () const =0 |
Returns whether the vehicle is at a stop and waiting for a person or container to continue. More... | |
MSBaseVehicle (SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor) | |
Constructor. More... | |
void | onDepart () |
Called when the vehicle is inserted into the network. More... | |
virtual SUMOTime | remainingStopDuration () const =0 |
Returns the remaining stop duration for a stopped vehicle or 0. More... | |
void | removeReminder (MSMoveReminder *rem) |
Removes a MoveReminder dynamically. More... | |
void | removeTransportable (MSTransportable *t) |
removes a person or container More... | |
void | replaceParameter (const SUMOVehicleParameter *newParameter) |
replace the vehicle parameter (deleting the old one) More... | |
virtual bool | replaceParkingArea (MSParkingArea *parkingArea, std::string &errorMsg)=0 |
Replaces a stop. More... | |
virtual bool | replaceRoute (const MSRoute *route, const std::string &info, bool onInit=false, int offset=0, bool addStops=true, bool removeStops=true)=0 |
Replaces the current route by the given one. More... | |
bool | replaceRouteEdges (ConstMSEdgeVector &edges, double cost, double savings, const std::string &info, bool onInit=false, bool check=false, bool removeStops=true) |
Replaces the current route by the given edges. More... | |
void | replaceVehicleType (MSVehicleType *type) |
Replaces the current vehicle type by the one given. More... | |
void | reroute (SUMOTime t, const std::string &info, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, const bool onInit=false, const bool withTaz=false) |
Performs a rerouting using the given router. More... | |
virtual void | setArrivalPos (double arrivalPos) |
Sets this vehicle's desired arrivalPos for its current route. More... | |
void | setChosenSpeedFactor (const double factor) |
Returns the precomputed factor by which the driver wants to be faster than the speed limit. More... | |
void | setDeviceParameter (const std::string &deviceName, const std::string &key, const std::string &value) |
try to set the given parameter from any of the vehicles devices, raise InvalidArgument if no device parameter by that name exists More... | |
const MSEdge * | succEdge (int nSuccs) const |
Returns the nSuccs'th successor of edge the vehicle is currently at. More... | |
virtual bool | wasRemoteControlled (SUMOTime lookBack=DELTA_T) const |
Returns the information whether the vehicle is fully controlled via TraCI. More... | |
virtual | ~MSBaseVehicle () |
Destructor. More... | |
state io | |
virtual void | saveState (OutputDevice &out) |
Saves the (common) state of a vehicle. More... | |
state io | |
virtual void | loadState (const SUMOSAXAttributes &attrs, const SUMOTime offset)=0 |
Loads the state of this vehicle from the given description. More... | |
Protected Member Functions | |
void | calculateArrivalParams () |
(Re-)Calculates the arrival position and lane from the vehicle parameters More... | |
virtual const ConstMSEdgeVector | getStopEdges () const =0 |
Returns the list of still pending stop edges. More... | |
Protected Attributes | |
int | myArrivalLane |
The destination lane where the vehicle stops. More... | |
double | myArrivalPos |
The position on the destination lane where the vehicle stops. More... | |
double | myChosenSpeedFactor |
A precomputed factor by which the driver wants to be faster than the speed limit. More... | |
MSDevice_Transportable * | myContainerDevice |
The containers this vehicle may have. More... | |
MSRouteIterator | myCurrEdge |
Iterator to current route-edge. More... | |
double | myDepartPos |
The real depart position. More... | |
SUMOTime | myDeparture |
The real departure time. More... | |
std::vector< MSVehicleDevice * > | myDevices |
The devices this vehicle has. More... | |
int | myNumberReroutes |
The number of reroutings. More... | |
const SUMOVehicleParameter * | myParameter |
This vehicle's parameter. More... | |
MSDevice_Transportable * | myPersonDevice |
The passengers this vehicle may have. More... | |
const MSRoute * | myRoute |
This vehicle's route. More... | |
MSVehicleType * | myType |
This vehicle's type. More... | |
Static Protected Attributes | |
static std::vector< MSTransportable * > | myEmptyTransportableVector |
static const SUMOTime | NOT_YET_DEPARTED = SUMOTime_MAX |
Private Member Functions | |
MSBaseVehicle & | operator= (const MSBaseVehicle &s) |
invalidated assignment operator More... | |
Private Attributes | |
const NumericalID | myNumericalID |
Static Private Attributes | |
static NumericalID | myCurrentNumericalIndex = 0 |
Friends | |
class | GUIBaseVehicle |
Move reminder structures | |
typedef std::vector< std::pair< MSMoveReminder *, double > > | MoveReminderCont |
Definition of a move reminder container. More... | |
MoveReminderCont | myMoveReminders |
Currently relevant move reminders. More... | |
The base class for microscopic and mesoscopic vehicles.
Definition at line 52 of file MSBaseVehicle.h.
|
protected |
Definition of a move reminder container.
Definition at line 502 of file MSBaseVehicle.h.
|
inherited |
Definition at line 62 of file SUMOVehicle.h.
MSBaseVehicle::MSBaseVehicle | ( | SUMOVehicleParameter * | pars, |
const MSRoute * | route, | ||
MSVehicleType * | type, | ||
const double | speedFactor | ||
) |
Constructor.
[in] | pars | The vehicle description |
[in] | route | The vehicle's route |
[in] | type | The vehicle's type |
[in] | speedFactor | The factor for driven lane's speed limits |
ProcessError | If a value is wrong |
Definition at line 68 of file MSBaseVehicle.cpp.
References MSRoute::addReference(), MSRoute::begin(), MSDevice::buildVehicleDevices(), calculateArrivalParams(), MSGlobals::gCheckRoutes, MSRoute::getLastEdge(), hasValidRoute(), SUMOVehicleParameter::id, MSEdge::isTazConnector(), myDevices, myMoveReminders, myRoute, SUMOVehicleParameter::parametersSet, VEHPARS_FORCE_REROUTE, and SUMOVehicleParameter::wasSet().
|
virtual |
Destructor.
Definition at line 110 of file MSBaseVehicle.cpp.
References MSRoute::checkDist(), myDevices, myParameter, myRoute, MSRoute::release(), SUMOVehicleParameter::repetitionNumber, and SUMOVehicleParameter::routeid.
|
virtual |
"Activates" all current move reminder
For all move reminder stored in "myMoveReminders", their method "MSMoveReminder::notifyEnter" is called.
[in] | reason | The reason for changing the reminders' states |
[in] | enteredLane | The lane, which is entered (if applicable) |
Reimplemented in MSVehicle.
Definition at line 414 of file MSBaseVehicle.cpp.
References myMoveReminders.
Referenced by getDevices(), MESegment::receive(), and MELoop::teleportVehicle().
|
virtual |
Adds a container to this vehicle.
The default implementation does nothing since containers are not supported by default
[in] | container | The container to add |
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 347 of file MSBaseVehicle.cpp.
References MSDevice_Transportable::addTransportable(), MSDevice_Transportable::buildVehicleDevices(), SUMOVehicleParameter::depart, DEPART_TRIGGERED, SUMOVehicleParameter::departProcedure, MSNet::getCurrentTimeStep(), MSNet::getInstance(), myContainerDevice, myDevices, myMoveReminders, and myParameter.
Referenced by MSVehicle::addContainer(), and getDevices().
|
virtual |
Adds a person to this vehicle.
The default implementation does nothing since persons are not supported by default
[in] | person | The person to add |
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 335 of file MSBaseVehicle.cpp.
References MSDevice_Transportable::addTransportable(), MSDevice_Transportable::buildVehicleDevices(), SUMOVehicleParameter::depart, DEPART_TRIGGERED, SUMOVehicleParameter::departProcedure, MSNet::getCurrentTimeStep(), MSNet::getInstance(), myDevices, myMoveReminders, myParameter, and myPersonDevice.
Referenced by MSVehicle::addPerson(), and getDevices().
void MSBaseVehicle::addReminder | ( | MSMoveReminder * | rem | ) |
Adds a MoveReminder dynamically.
[in] | rem | the reminder to add |
Definition at line 387 of file MSBaseVehicle.cpp.
References myMoveReminders.
Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MESegment::addReminders(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), getDevices(), and MSVehicle::processNextStop().
|
pure virtualinherited |
Adds a stop.
The stop is put into the sorted list.
[in] | stop | The stop to add |
Implemented in MSVehicle, and MEVehicle.
Referenced by addStops(), and SUMOVehicle::~SUMOVehicle().
void MSBaseVehicle::addStops | ( | const bool | ignoreStopErrors | ) |
Adds stops to the built vehicle.
This code needs to be separated from the MSBaseVehicle constructor since it is not allowed to call virtual functions from a constructor
[in] | ignoreStopErrors | whether invalid stops trigger a warning only |
Definition at line 515 of file MSBaseVehicle.cpp.
References SUMOVehicle::addStop(), SUMOVehicleParameter::depart, MSRoute::getStops(), myParameter, myRoute, SUMOVehicleParameter::repetitionOffset, SUMOVehicleParameter::repetitionsDone, SUMOVehicleParameter::stops, and WRITE_WARNING.
Referenced by MEVehicleControl::buildVehicle(), GUIMEVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), MSVehicleControl::buildVehicle(), MEVehicle::getBlockTimeSeconds(), MSVehicle::replaceRoute(), and setChosenSpeedFactor().
|
protected |
(Re-)Calculates the arrival position and lane from the vehicle parameters
Definition at line 436 of file MSBaseVehicle.cpp.
References ARRIVAL_LANE_GIVEN, ARRIVAL_POS_CENTER, ARRIVAL_POS_GIVEN, ARRIVAL_POS_RANDOM, ARRIVAL_SPEED_GIVEN, SUMOVehicleParameter::arrivalLane, SUMOVehicleParameter::arrivalLaneProcedure, SUMOVehicleParameter::arrivalPos, SUMOVehicleParameter::arrivalPosProcedure, SUMOVehicleParameter::arrivalSpeed, SUMOVehicleParameter::arrivalSpeedProcedure, Named::getID(), getID(), MSEdge::getLanes(), MSRoute::getLastEdge(), MSVehicleType::getVehicleClass(), MSEdge::isTazConnector(), MAX2(), MIN2(), myArrivalLane, myArrivalPos, myParameter, myRoute, myType, RandHelper::rand(), toString(), and WRITE_WARNING.
Referenced by getNumericalID(), MSBaseVehicle(), MSVehicle::replaceRoute(), MEVehicle::replaceRoute(), and reroute().
void MSBaseVehicle::createDevice | ( | const std::string & | deviceName | ) |
create device of the given type
Definition at line 604 of file MSBaseVehicle.cpp.
References MSDevice_Routing::buildVehicleDevices(), getDevice(), hasDeparted(), hasDevice(), myDevices, myParameter, MSMoveReminder::NOTIFICATION_DEPARTED, and MSDevice_Routing::notifyEnter().
Referenced by libsumo::Vehicle::setParameter().
|
virtual |
Returns the vehicle's acceleration.
This default implementation returns always 0.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 304 of file MSBaseVehicle.cpp.
Referenced by getCurrentRouteEdge().
|
pure virtualinherited |
Implemented in MSVehicle, and MEVehicle.
Referenced by MSTriggeredRerouter::notifyEnter(), and SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
Get the vehicle's angle.
Implemented in MSVehicle, GUIMEVehicle, GUIVehicle, and MEVehicle.
Referenced by MSDevice_Battery::notifyMove(), MSEmissionExport::write(), MSFCDExport::write(), MSFullExport::writeVehicles(), and SUMOVehicle::~SUMOVehicle().
|
inlinevirtual |
Returns this vehicle's desired arrivalPos for its current route (may change on reroute)
Implements SUMOVehicle.
Definition at line 274 of file MSBaseVehicle.h.
References myArrivalPos.
Referenced by MSLCM_SL2015::_wantsChangeSublane(), and MSVehicle::rerouteParkingArea().
|
pure virtualinherited |
Get the vehicle's back position along the given lane.
Implemented in MSVehicle, and MEVehicle.
Referenced by MSE3Collector::MSE3EntryReminder::notifyEnter(), MSInductLoop::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSE2Collector::notifyEnter(), and SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
get distance for coming to a stop (used for rerouting checks)
Implemented in MSVehicle, and MEVehicle.
Referenced by MSTriggeredRerouter::rerouteParkingArea(), and SUMOVehicle::~SUMOVehicle().
|
inlinevirtual |
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
Implements SUMOVehicle.
Definition at line 407 of file MSBaseVehicle.h.
References myChosenSpeedFactor.
Referenced by libsumo::Vehicle::getAllowedSpeed(), GUIMEVehicle::getParameterWindow(), and GUIVehicle::getParameterWindow().
|
virtual |
Returns the number of containers.
Implements SUMOVehicle.
Definition at line 555 of file MSBaseVehicle.cpp.
References SUMOVehicleParameter::containerNumber, myContainerDevice, myParameter, and MSDevice_Transportable::size().
Referenced by getNumberReroutes(), GUIVehicle::getParameterWindow(), MSVehicle::processNextStop(), MEVehicle::processStop(), and MSXMLRawOut::writeVehicle().
|
virtual |
retrieve riding containers
Implements SUMOVehicle.
Definition at line 582 of file MSBaseVehicle.cpp.
References MSDevice_Transportable::getTransportables(), myContainerDevice, and myEmptyTransportableVector.
Referenced by getDevices(), and MSXMLRawOut::writeVehicle().
|
inlinevirtual |
Returns an iterator pointing to the current edge in this vehicles route.
Implements SUMOVehicle.
Definition at line 197 of file MSBaseVehicle.h.
References getAcceleration(), getSlope(), myCurrEdge, onDepart(), replaceRouteEdges(), and reroute().
Referenced by libsumo::Vehicle::getDistance(), GUIVehicle::getPreviousLane(), and libsumo::Vehicle::moveToXY().
|
inlinevirtual |
Returns the depart delay.
Implements SUMOVehicle.
Definition at line 258 of file MSBaseVehicle.h.
References SUMOVehicleParameter::depart, getDeparture(), and getParameter().
Referenced by GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIMEVehicle::getParameterWindow(), and GUIVehicle::getParameterWindow().
|
inlinevirtual |
Returns this vehicle's real departure position.
Implements SUMOVehicle.
Definition at line 266 of file MSBaseVehicle.h.
References myDepartPos.
Referenced by libsumo::Vehicle::getDistance().
|
inlinevirtual |
Returns this vehicle's real departure time.
Implements SUMOVehicle.
Definition at line 253 of file MSBaseVehicle.h.
References myDeparture.
Referenced by getDepartDelay(), and MSVehicle::Influencer::postProcessRemoteControl().
|
virtual |
Returns a device of the given type if it exists or 0.
Implements SUMOVehicle.
Definition at line 488 of file MSBaseVehicle.cpp.
References myDevices.
Referenced by createDevice(), GUIBaseVehicle::drawOnPos(), MEVehicle::processStop(), MSVehicle::resumeFromStopping(), setChosenSpeedFactor(), and MSBatteryExport::write().
std::string MSBaseVehicle::getDeviceParameter | ( | const std::string & | deviceName, |
const std::string & | key | ||
) | const |
try to retrieve the given parameter from any of the vehicles devices, raise InvalidArgument if no device parameter by that name exists
Definition at line 623 of file MSBaseVehicle.cpp.
References myDevices.
Referenced by libsumo::Vehicle::getParameter().
|
inlinevirtual |
Returns this vehicle's devices.
Implements SUMOVehicle.
Definition at line 322 of file MSBaseVehicle.h.
References activateReminders(), addContainer(), addPerson(), addReminder(), getContainers(), getPersons(), hasValidRoute(), myDevices, removeReminder(), and removeTransportable().
|
virtual |
Returns the edge the vehicle is currently at.
Implements SUMOVehicle.
Definition at line 156 of file MSBaseVehicle.cpp.
References myCurrEdge.
Referenced by MSVehicleTransfer::add(), MELoop::changeSegment(), GUIApplicationWindow::checkGamingEvents(), MSVehicleTransfer::checkInsertions(), MSVehicle::enterLaneAtLaneChange(), METriggeredCalibrator::execute(), MEVehicle::getAngle(), libsumo::Vehicle::getDrivingDistance2D(), MSVehicle::getLatOffset(), GUIMEVehicle::getParameterWindow(), MEVehicle::getPosition(), MEVehicle::getSlope(), getVClass(), libsumo::Vehicle::moveTo(), TraCIServerAPI_Vehicle::processSet(), MEVehicle::processStop(), MESegment::receive(), MSVehicle::rerouteParkingArea(), MELoop::teleportVehicle(), and MSBatteryExport::write().
|
virtual |
Returns the name of the vehicle.
Implements SUMOVehicle.
Definition at line 123 of file MSBaseVehicle.cpp.
References SUMOVehicleParameter::id, and myParameter.
Referenced by MSLCM_LC2013::_patchSpeed(), MSLCM_SL2015::_patchSpeed(), MSCFModel_CACC::_v(), MSCFModel_ACC::_v(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChangerSublane::abortLCManeuver(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSVehicleTransfer::add(), MSPModel_Striping::addCrossingVehs(), MSLCM_SL2015::addLCSpeedAdvice(), MSVehicle::addTraciStopAtStoppingPlace(), MSCFModel::applyHeadwayAndSpeedDifferencePerceptionErrors(), MSCFModel::applyHeadwayPerceptionError(), libsumo::Helper::applySubscriptionFilters(), calculateArrivalParams(), MSLaneChangerSublane::change(), MSLaneChanger::change(), MSLCM_SL2015::changed(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), libsumo::Vehicle::changeTarget(), MSLaneChanger::checkChange(), MSLaneChangerSublane::checkChangeSublane(), MSLane::checkFailure(), MSLane::checkForPedestrians(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSLaneChanger::checkTraCICommands(), MSAbstractLaneChangeModel::checkTraCICommands(), MSDevice_SSM::classifyEncounter(), MSLCM_SL2015::commitManoeuvre(), MSVehicle::computeAngle(), MSLCM_SL2015::computeSpeedLat(), MSDevice_SSM::computeSSMs(), MSLaneChanger::continueChange(), MSLaneChangerSublane::continueChangeSublane(), MSLCM_SL2015::decideDirection(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSDevice_SSM::Encounter::Encounter(), MSCalibrator::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), MSCFModel_Daniel1::finalizeSpeed(), MSCFModel::finalizeSpeed(), MSLaneChanger::findCandidate(), MSDevice_SSM::findFoeConflictLane(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushGlobalMeasures(), MSCFModel_CACC::followSpeed(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), MSLane::getCriticalLeader(), MSLane::getFirstVehicleInformation(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), GUIMEVehicle::getParameterWindow(), MSLane::getPartialBehind(), MSSimpleDriverState::getPerceivedHeadway(), MSSimpleDriverState::getPerceivedSpeedDifference(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSAbstractLaneChangeModel::getShadowLane(), getSingularType(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSLink::getZipperSpeed(), MSLane::handleCollisionBetween(), MSVehicle::ignoreRed(), MSLCM_LC2013::inform(), MSLCM_SL2015::inform(), MSLCM_LC2013::informFollower(), MSLCM_SL2015::informFollower(), MSLCM_LC2013::informLeader(), MSLCM_SL2015::informLeader(), MESegment::initialise(), MSPedestrianPushButton::isActiveForEdge(), MSLane::isInsertionSuccess(), MSVehicle::isLeader(), MSAbstractLaneChangeModel::laneChangeOutput(), MSVehicle::lateralDistanceToLane(), MSVehicle::leaveLane(), libsumo::Vehicle::moveToXY(), MSLCM_LC2013::MSLCM_LC2013(), MSSimpleDriverState::MSSimpleDriverState(), MSCalibrator::VehicleRemover::notifyEnter(), MSVehicle::onRemovalFromNet(), MSLaneChangerSublane::outputLCStarted(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLCM_SL2015::prepareStep(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkAproaches(), MSVehicle::processNextStop(), MSVehicle::processTraCISpeedControl(), MSVehicle::removePassedDriveItems(), replaceRouteEdges(), reroute(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), libsumo::Vehicle::resume(), MSLane::safeInsertionSpeed(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), saveState(), MSCalibrator::scheduleRemoval(), GUIVehicle::selectBlockingFoes(), MSVehicle::setAngle(), MSVehicle::setApproachingForAllLinks(), MSSimpleDriverState::setAwareness(), MSAbstractLaneChangeModel::setManeuverDist(), MSLane::setManeuverReservation(), MSLCM_SL2015::setOwnState(), MSLane::setPartialOccupation(), libsumo::Helper::setRemoteControlled(), libsumo::Vehicle::setRoute(), libsumo::Vehicle::setRouteID(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSimpleDriverState::update(), MSVehicle::updateBestLanes(), MSVehicle::updateDriveItems(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSLCM_SL2015::updateGaps(), MSAbstractLaneChangeModel::updateShadowLane(), MSVehicle::updateState(), MSAbstractLaneChangeModel::updateTargetLane(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), MSBatteryExport::write(), and MSXMLRawOut::writeVehicle().
|
virtual |
Returns this vehicles impatience.
Implements SUMOVehicle.
Definition at line 481 of file MSBaseVehicle.cpp.
References getVehicleType(), SUMOVehicle::getWaitingTime(), MSGlobals::gTimeToImpatience, MAX2(), and MIN2().
Referenced by MSVehicle::checkRewindLinkLanes(), MSLane::getCriticalLeader(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), getNumberReroutes(), GUIVehicle::getParameterWindow(), MSLCM_LC2013::informFollower(), MSLane::isInsertionSuccess(), MESegment::isOpen(), MSVehicle::processLinkAproaches(), and GUIVehicle::selectBlockingFoes().
|
pure virtualinherited |
Returns the lane the vehicle is on.
Implemented in MSVehicle, and MEVehicle.
Referenced by MSE2Collector::calculateTimeLossAndTimeOnDetector(), GUIBaseVehicle::drawOnPos(), MSTransportable::Stage_Driving::getEdge(), MSParkingArea::getLastFreePosWithReservation(), libsumo::Vehicle::isOnInit(), MSTriggeredRerouter::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_SSM::notifyLeave(), MSDevice_Battery::notifyMove(), MSDevice_Bluelight::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSFCDExport::write(), and SUMOVehicle::~SUMOVehicle().
|
inlinevirtual |
Get the vehicle's lateral position on the lane.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 180 of file MSBaseVehicle.h.
|
inline |
Returns the vehicle's length.
Definition at line 391 of file MSBaseVehicle.h.
References MSVehicleType::getLength(), and myType.
Referenced by MSVehicle::addStop(), libsumo::Helper::applySubscriptionFilters(), MSVehicle::basePos(), MSDevice_SSM::checkConflictEntryAndExit(), MSDevice_SSM::classifyEncounter(), MSDevice_SSM::determineConflictPoint(), MSDevice_SSM::determineTTCandDRAC(), MSVehicle::enterLaneAtInsertion(), MSDevice_SSM::findSurroundingVehicles(), MSLink::getLeaderInfo(), MSDevice_SSM::getUpstreamVehicles(), MSVehicle::updateFurtherLanes(), and MSDevice_SSM::updatePassedEncounter().
|
virtual |
Returns the maximum speed.
Implements SUMOVehicle.
Definition at line 140 of file MSBaseVehicle.cpp.
References MSVehicleType::getMaxSpeed(), and myType.
Referenced by MSCFModel_Wiedemann::_v(), MSVehicleTransfer::checkInsertions(), MSCFModel_ACC::followSpeed(), MSCFModel_CACC::followSpeed(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), getVClass(), and MSVehicle::Influencer::implicitDeltaPosRemote().
|
pure virtualinherited |
returns the next imminent stop in the stop queue
Implemented in MSVehicle, and MEVehicle.
Referenced by MSTriggeredRerouter::rerouteParkingArea(), and SUMOVehicle::~SUMOVehicle().
|
inlinevirtual |
Returns the number of new routes this vehicle got.
Implements SUMOVehicle.
Definition at line 296 of file MSBaseVehicle.h.
References getContainerNumber(), getImpatience(), getPersonIDList(), getPersonNumber(), and myNumberReroutes.
Referenced by GUIBaseVehicle::drawGLAdditional(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), and replaceRouteEdges().
|
inlinevirtual |
return the numerical ID which is only for internal usage
Implements SUMOVehicle.
Definition at line 464 of file MSBaseVehicle.h.
References calculateArrivalParams(), getStopEdges(), and myNumericalID.
|
virtual |
Returns the vehicle's parameter (including departure definition)
Implements SUMOVehicle.
Definition at line 129 of file MSBaseVehicle.cpp.
References myParameter.
Referenced by MSLCM_SL2015::_wantsChangeSublane(), GUIBaseVehicle::drawOnPos(), getDepartDelay(), MSEdge::getDepartLane(), MSEdge::getDepartPosBound(), MSLane::getDepartPosLat(), MSLane::getDepartSpeed(), libsumo::Vehicle::getLine(), libsumo::Vehicle::getParameter(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), libsumo::Vehicle::getVia(), MSLane::insertVehicle(), MSLane::isInsertionSuccess(), MSVehicle::planMoveInternal(), libsumo::Vehicle::remove(), MSVehicle::rerouteParkingArea(), GUIBaseVehicle::setFunctionalColor(), libsumo::Vehicle::setLine(), libsumo::Vehicle::setParameter(), libsumo::Vehicle::setVia(), and METriggeredCalibrator::tryEmit().
|
virtual |
Returns the list of persons.
Implements SUMOVehicle.
Definition at line 545 of file MSBaseVehicle.cpp.
References getPersons().
Referenced by getNumberReroutes(), and libsumo::Vehicle::getPersonIDList().
|
virtual |
Returns the number of persons.
Implements SUMOVehicle.
Definition at line 539 of file MSBaseVehicle.cpp.
References myParameter, myPersonDevice, SUMOVehicleParameter::personNumber, and MSDevice_Transportable::size().
Referenced by getNumberReroutes(), GUIVehicle::getParameterWindow(), libsumo::Vehicle::getPersonNumber(), MSVehicle::processNextStop(), MEVehicle::processStop(), and MSXMLRawOut::writeVehicle().
|
virtual |
retrieve riding persons
Implements SUMOVehicle.
Definition at line 572 of file MSBaseVehicle.cpp.
References MSDevice_Transportable::getTransportables(), myEmptyTransportableVector, and myPersonDevice.
Referenced by getDevices(), getPersonIDList(), MSVehicle::rerouteParkingArea(), and MSXMLRawOut::writeVehicle().
|
pure virtualinherited |
Return current position (x/y, cartesian)
If the vehicle is not in the net, Position::INVALID.
[in] | offset | optional offset in longitudinal direction |
Implemented in MSVehicle, MEVehicle, GUIMEVehicle, and GUIVehicle.
Referenced by GUIBaseVehicle::drawOnPos(), MSVTypeProbe::execute(), MSTransportable::Stage_Driving::getPosition(), MSDevice_BTsender::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Bluelight::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSEmissionExport::write(), MSFCDExport::write(), MSFullExport::writeVehicles(), and SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
Get the vehicle's position along the lane.
Implemented in MSVehicle, and MEVehicle.
Referenced by MSDevice_Tripinfo::computeLengthAndDuration(), MSVTypeProbe::execute(), MSTransportable::Stage_Driving::getEdgePos(), MSE2Collector::makeVehicleInfo(), MSDevice_Vehroutes::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSInductLoop::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Battery::notifyMove(), onDepart(), MSTransportable::Stage_Driving::setArrived(), MSTransportable::Stage_Driving::setVehicle(), MSStopOut::stopEnded(), MSEmissionExport::write(), MSFCDExport::write(), MSXMLRawOut::writeVehicle(), MSFullExport::writeVehicles(), and SUMOVehicle::~SUMOVehicle().
|
virtual |
Returns the vehicle's previous speed.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 63 of file MSBaseVehicle.cpp.
|
inlinevirtual |
Returns the starting point for reroutes (usually the current edge)
This differs from *myCurrEdge only if the vehicle is on an internal edge
Reimplemented in MSVehicle.
Definition at line 189 of file MSBaseVehicle.h.
References myCurrEdge.
Referenced by replaceRouteEdges(), and reroute().
|
inlinevirtual |
Returns the current route.
Implements SUMOVehicle.
Definition at line 107 of file MSBaseVehicle.h.
References myRoute.
Referenced by MSLCM_SL2015::_wantsChangeSublane(), GUIBaseVehicle::drawRoute(), MSEdge::getDepartLane(), libsumo::Vehicle::getDistance(), libsumo::Vehicle::getDrivingDistance(), libsumo::Vehicle::getDrivingDistance2D(), libsumo::Vehicle::getRoute(), libsumo::Vehicle::getRouteID(), MSLane::isInsertionSuccess(), libsumo::Vehicle::moveToXY(), MSVehicle::Influencer::postProcessRemoteControl(), MSVehicle::rerouteParkingArea(), and GUIBaseVehicle::setFunctionalColor().
MSVehicleType & MSBaseVehicle::getSingularType | ( | ) |
Replaces the current vehicle type with a new one used by this vehicle only.
If the currently used vehicle type is already marked as being used by this vehicle only, no new type is created.
Definition at line 656 of file MSBaseVehicle.cpp.
References MSVehicleType::buildSingularType(), OutputDevice::closeTag(), MSMoveReminder::getDescription(), OutputDevice::getDeviceByOption(), getID(), MSVehicleType::getID(), MSNet::getInstance(), OptionsCont::getStringVector(), OptionsCont::isSet(), MSVehicleType::isVehicleSpecific(), myType, OutputDevice::openTag(), replaceVehicleType(), STEPS2TIME, SUMO_ATTR_ID, SUMO_ATTR_TIME, toString(), and OutputDevice::writeAttr().
Referenced by libsumo::Vehicle::moveTo(), TraCIServerAPI_Vehicle::processSet(), setChosenSpeedFactor(), and libsumo::Vehicle::setVia().
|
virtual |
Returns the slope of the road at vehicle's position.
This default implementation returns always 0.
Implements SUMOVehicle.
Reimplemented in MSVehicle, and MEVehicle.
Definition at line 310 of file MSBaseVehicle.cpp.
Referenced by getCurrentRouteEdge().
|
pure virtualinherited |
Returns the vehicle's current speed.
Implemented in MSVehicle, and MEVehicle.
Referenced by MSChargingStation::addChargeValueForOutput(), MSE2Collector::calculateTimeLossAndTimeOnDetector(), MSInductLoop::collectVehiclesOnDet(), MSE3Collector::detectorUpdate(), MSE3Collector::enter(), MSVTypeProbe::execute(), MSVehicle::Influencer::gapControlSpeed(), MSVehicleControl::getHaltingVehicleNo(), MSTransportable::Stage_Driving::getSpeed(), MSVehicleControl::getVehicleMeanSpeeds(), MSE3Collector::leave(), MSDevice_Vehroutes::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSInstantInductLoop::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Battery::notifyMove(), MSEmissionExport::write(), MSFCDExport::write(), MSAmitranTrajectories::writeVehicle(), MSXMLRawOut::writeVehicle(), MSFullExport::writeVehicles(), and SUMOVehicle::~SUMOVehicle().
|
protectedpure virtual |
Returns the list of still pending stop edges.
Implemented in MSVehicle, and MEVehicle.
Referenced by getNumericalID(), and reroute().
|
inlinevirtual |
Returns the vehicle's access class.
Implements SUMOVehicle.
Definition at line 123 of file MSBaseVehicle.h.
References getEdge(), getMaxSpeed(), MSVehicleType::getParameter(), myType, succEdge(), and SUMOVTypeParameter::vehicleClass.
Referenced by MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), GUIVehicle::drawRouteHelper(), MSLane::getStopOffset(), MSPedestrianPushButton::isActiveForEdge(), and reroute().
|
inlinevirtual |
Returns the vehicle's type definition.
Implements SUMOVehicle.
Definition at line 115 of file MSBaseVehicle.h.
References myType.
Referenced by MSLCM_LC2013::_patchSpeed(), MSLCM_SL2015::_patchSpeed(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSCFModel_ACC::accelGapControl(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeaders(), MSPModel_Striping::addCrossingVehs(), libsumo::Helper::applySubscriptionFilters(), MSVehicle::basePos(), MSLaneChanger::change(), MSLaneChanger::changeOpposite(), MSLCM_SL2015::checkBlocking(), MSLaneChanger::checkChange(), MSLaneChangerSublane::checkChangeToNewLane(), MSLane::checkFailure(), MSLane::checkForPedestrians(), GUIApplicationWindow::checkGamingEvents(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSDevice_SSM::classifyEncounter(), MSLCM_SL2015::commitManoeuvre(), MSLaneChanger::computeOvertakingTime(), MSLCM_SL2015::computeSpeedLat(), MSAbstractLaneChangeModel::computeSpeedLat(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), GUIVehicle::drawAction_drawLinkItems(), GUIVehicle::drawAction_drawRailCarriages(), GUIVehicle::drawAction_drawVehicleBlinker(), GUIVehicle::drawAction_drawVehicleBrakeLight(), GUIEdge::drawMesoVehicles(), MSLane::enteredByLaneChange(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSDevice_SSM::estimateConflictTimes(), MSAbstractLaneChangeModel::estimateLCDuration(), MEVehicle::estimateLeaveSpeed(), MSVehicle::estimateLeaveSpeed(), MSLane::executeMovements(), MSLane::freeInsertion(), MSVehicle::Influencer::gapControlSpeed(), MEVehicle::getBackPositionOnLane(), MSLane::getBruttoOccupancy(), GUIBaseVehicle::getCenteringBoundary(), MSLaneChanger::getColumnleader(), MSLane::getCriticalLeader(), MSEdge::getDepartLane(), MSEdge::getDepartPosBound(), MSLane::getDepartPosLat(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), getImpatience(), MSVehicle::getLateralOverlap(), MSLane::getLeader(), MSVehicle::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), GUIVehicle::getLeftSideOnEdge(), MSLane::getNettoOccupancy(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSVehicle::getRightSideOnEdge(), MSVehicle::getRightSideOnLane(), MSVehicle::getSafeFollowSpeed(), MSLeaderInfo::getSubLanes(), MSVehicle::getTimeGapOnLane(), MESegment::getTimeHeadway(), libsumo::Vehicle::getTypeID(), MSPModel_Striping::getVehicleObstacles(), libsumo::Vehicle::getVehicleType(), GUIBaseVehicle::getVType(), MSLCM_SL2015::getWidth(), MSLink::getZipperSpeed(), MSLane::handleCollisionBetween(), MESegment::hasSpaceFor(), MSVehicle::ignoreRed(), MSLane::incorporateVehicle(), MSLCM_SL2015::informFollower(), MSLCM_SL2015::informLeader(), MSLCM_SL2015::informLeaders(), MSLane::insertVehicle(), MSLane::integrateNewVehicle(), MSLane::isInsertionSuccess(), MESegment::isOpen(), MSVehicle::keepClear(), MSLCM_SL2015::keepLatGap(), MSAbstractLaneChangeModel::laneChangeOutput(), MSLane::lastInsertion(), MSLane::leftByLaneChange(), MESegment::loadState(), libsumo::Vehicle::moveToXY(), libsumo::Vehicle::openGap(), MSVehicle::overlap(), MSLCM_LC2013::overtakeDistance(), MSLCM_DK2008::patchSpeed(), MSCFModel_Krauss::patchSpeedBeforeLC(), MSVehicle::planMoveInternal(), MSVehicle::Influencer::postProcessRemoteControl(), MSVehicle::processLinkAproaches(), MSVehicle::processNextStop(), MSVehicle::processTraCISpeedControl(), MESegment::receive(), MSLaneChanger::ChangeElem::registerHop(), MSLaneChanger::registerUnchanged(), MSAbstractLaneChangeModel::remainingTime(), MESegment::removeCar(), MSLane::removeVehicle(), MSLane::safeInsertionSpeed(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), saveState(), GUIVehicle::selectBlockingFoes(), MSVehicleType::setActionStepLength(), MSAbstractLaneChangeModel::setFollowerGaps(), GUIBaseVehicle::setFunctionalColor(), MSAbstractLaneChangeModel::setLeaderGaps(), MSAbstractLaneChangeModel::setOrigLeaderGaps(), MSVehicle::setTentativeLaneAndPosition(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSCFModel_CACC::speedGapControl(), MSLaneChangerSublane::startChangeSublane(), MSVehicle::unsafeLinkAhead(), MSLCM_SL2015::updateCFRelated(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSLCM_SL2015::updateGaps(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), MSBatteryExport::write(), and MSQueueExport::writeLane().
|
pure virtualinherited |
Implemented in MSVehicle, and MEVehicle.
Referenced by getImpatience(), MSTriggeredRerouter::notifyEnter(), MSDevice_Tripinfo::notifyMoveInternal(), and SUMOVehicle::~SUMOVehicle().
|
inline |
Returns the vehicle's width.
Definition at line 399 of file MSBaseVehicle.h.
References MSVehicleType::getWidth(), and myType.
Referenced by MSDevice_SSM::classifyEncounter(), MSAbstractLaneChangeModel::determineTargetLane(), GUIVehicle::drawAction_drawVehicleBlinker(), GUIVehicle::drawAction_drawVehicleBrakeLight(), MSVehicle::getLateralOverlap(), MSVehicle::lateralDistanceToLane(), MSVehicle::planMoveInternal(), MSLaneChangerSublane::startChangeSublane(), and MSDevice_SSM::updatePassedEncounter().
|
virtual |
Returns whether this vehicle has already arived (by default this is true if the vehicle has reached its final edge)
Implements SUMOVehicle.
Reimplemented in MSVehicle, and MEVehicle.
Definition at line 330 of file MSBaseVehicle.cpp.
References succEdge().
Referenced by setArrivalPos().
|
virtual |
Returns whether this vehicle has already departed.
Implements SUMOVehicle.
Definition at line 324 of file MSBaseVehicle.cpp.
References myDeparture, and NOT_YET_DEPARTED.
Referenced by MSVehicle::addStop(), createDevice(), MSLane::forceVehicleInsertion(), libsumo::Vehicle::getRouteIndex(), MEVehicle::loadState(), MSVehicle::loadState(), libsumo::Vehicle::moveTo(), libsumo::Vehicle::remove(), saveState(), and setArrivalPos().
bool MSBaseVehicle::hasDevice | ( | const std::string & | deviceName | ) | const |
check whether the vehicle is equiped with a device of the given type
Definition at line 593 of file MSBaseVehicle.cpp.
References myDevices.
Referenced by createDevice(), MSDevice_ToC::ensureDriverStateExistence(), and libsumo::Vehicle::getParameter().
|
virtual |
Validates the current or given route.
[out] | msg | Description why the route is not valid (if it is the case) |
[in] | route | The route to check (or 0 if the current route shall be checked) |
Implements SUMOVehicle.
Definition at line 359 of file MSBaseVehicle.cpp.
References MSRoute::begin(), MSRoute::end(), MSVehicleType::getVehicleClass(), myCurrEdge, myRoute, and myType.
Referenced by getDevices(), MESegment::initialise(), libsumo::Vehicle::isRouteValid(), MSBaseVehicle(), replaceRouteEdges(), and libsumo::Vehicle::setRouteID().
|
inlinevirtual |
Returns the information whether the front of the vehhicle is on the given lane.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 172 of file MSBaseVehicle.h.
|
inlinevirtual |
Returns the information whether the vehicle is on a road (is simulated)
Implements SUMOVehicle.
Reimplemented in MSVehicle, and MEVehicle.
Definition at line 152 of file MSBaseVehicle.h.
Referenced by GUIBaseVehicle::drawGLAdditional(), and MSXMLRawOut::writeVehicle().
|
pure virtualinherited |
Returns the information whether the vehicle is parked.
Implemented in MSVehicle, and MEVehicle.
Referenced by GUIVehicleControl::insertVehicleIDs(), libsumo::Vehicle::isVisible(), MSFCDExport::write(), and SUMOVehicle::~SUMOVehicle().
|
inlinevirtual |
Returns the information whether the vehicle is fully controlled via TraCI.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 160 of file MSBaseVehicle.h.
|
inlinevirtual |
whether this vehicle is selected in the GUI
Implements SUMOVehicle.
Reimplemented in GUIVehicle.
Definition at line 460 of file MSBaseVehicle.h.
Referenced by MSCFModel_IDM::followSpeed().
|
pure virtualinherited |
Returns whether the vehicle is at a stop.
Implemented in MSVehicle, and MEVehicle.
Referenced by MSVehicleControl::getVehicleMeanSpeeds(), MSDevice_Transportable::notifyMove(), MSDevice_Tripinfo::notifyMove(), MSDevice_Transportable::removeTransportable(), MSTransportable::Stage_Driving::setArrived(), and SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
Returns whether the vehicle is stoped in range of the given position.
Implemented in MSVehicle, and MEVehicle.
Referenced by SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
Returns whether the vehicle is at a stop and waiting for a person or container to continue.
Implemented in MSVehicle, and MEVehicle.
Referenced by SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
Loads the state of this vehicle from the given description.
Implemented in MSVehicle, and MEVehicle.
Referenced by MSStateHandler::closeVehicle(), and SUMOVehicle::~SUMOVehicle().
|
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.
Implements SUMOVehicle.
Definition at line 316 of file MSBaseVehicle.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), SUMOVehicle::getPositionOnLane(), MSNet::getVehicleControl(), myDepartPos, myDeparture, and MSVehicleControl::vehicleDeparted().
Referenced by MSVehicle::enterLaneAtInsertion(), getCurrentRouteEdge(), MSVehicle::Influencer::postProcessRemoteControl(), and MESegment::receive().
|
private |
invalidated assignment operator
|
pure virtualinherited |
Returns the remaining stop duration for a stopped vehicle or 0.
Implemented in MSVehicle, and MEVehicle.
Referenced by SUMOVehicle::~SUMOVehicle().
void MSBaseVehicle::removeReminder | ( | MSMoveReminder * | rem | ) |
Removes a MoveReminder dynamically.
[in] | rem | the reminder to remove |
Definition at line 398 of file MSBaseVehicle.cpp.
References myMoveReminders.
Referenced by getDevices().
|
virtual |
removes a person or container
Implements SUMOVehicle.
Definition at line 562 of file MSBaseVehicle.cpp.
References myContainerDevice, myPersonDevice, and MSDevice_Transportable::removeTransportable().
Referenced by getDevices().
|
virtual |
replace the vehicle parameter (deleting the old one)
Implements SUMOVehicle.
Definition at line 134 of file MSBaseVehicle.cpp.
References myParameter.
Referenced by MSVehicle::rerouteParkingArea().
|
pure virtualinherited |
Replaces a stop.
The stop replace the next stop into the sorted list.
[in] | stop | The stop to add |
Implemented in MSVehicle, and MEVehicle.
Referenced by SUMOVehicle::~SUMOVehicle().
|
pure virtualinherited |
Replaces the current route by the given one.
Implemented in MEVehicle, and MSVehicle.
Referenced by MSTriggeredRerouter::notifyEnter(), MSDevice_Routing::preInsertionReroute(), replaceRouteEdges(), and SUMOVehicle::~SUMOVehicle().
|
virtual |
Replaces the current route by the given edges.
It is possible that the new route is not accepted, if a) it does not contain the vehicle's current edge, or b) something fails on insertion into the routes container (see in-line comments).
[in] | edges | The new list of edges to pass |
[in] | onInit | Whether the vehicle starts with this route |
[in] | check | Whether the route should be checked for validity |
[in] | removeStops | Whether stops should be removed if they do not fit onto the new route |
Implements SUMOVehicle.
Definition at line 249 of file MSBaseVehicle.cpp.
References MSRoute::addReference(), MSRoute::begin(), RGBColor::DEFAULT_COLOR, MSRoute::dictionary(), MSGlobals::gCheckRoutes, MSRoute::getColor(), MSRoute::getEdges(), Named::getID(), getID(), getNumberReroutes(), getRerouteOrigin(), hasValidRoute(), myCurrEdge, myRoute, MSRoute::release(), SUMOVehicle::replaceRoute(), MSRoute::setCosts(), MSRoute::setSavings(), MSRoute::size(), toString(), and WRITE_WARNING.
Referenced by libsumo::Vehicle::changeTarget(), getCurrentRouteEdge(), MSVehicle::Influencer::postProcessRemoteControl(), reroute(), MSVehicle::rerouteParkingArea(), and libsumo::Vehicle::setRoute().
void MSBaseVehicle::replaceVehicleType | ( | MSVehicleType * | type | ) |
Replaces the current vehicle type by the one given.
If the currently used vehicle type is marked as being used by this vehicle only, it is deleted, first. The new, given type is then assigned to "myType".
[in] | type | The new vehicle type |
Definition at line 646 of file MSBaseVehicle.cpp.
References MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleType::isVehicleSpecific(), myType, and MSVehicleControl::removeVType().
Referenced by getSingularType(), setChosenSpeedFactor(), libsumo::Vehicle::setType(), and MSDevice_ToC::switchHolderType().
|
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 |
Implements SUMOVehicle.
Definition at line 162 of file MSBaseVehicle.cpp.
References MSEdge::allowedLanes(), calculateArrivalParams(), SUMOAbstractRouter< E, V >::compute(), MSInsertionControl::descheduleDeparture(), MSEdge::dictionary(), MSRoute::end(), SUMOVehicleParameter::fromTaz, MSGlobals::gCheckRoutes, Named::getID(), getID(), MSNet::getInsertionControl(), MSNet::getInstance(), MSRoute::getLastEdge(), getRerouteOrigin(), getStopEdges(), getVClass(), MSEdge::isTazConnector(), myCurrEdge, myParameter, myRoute, SUMOAbstractRouter< E, V >::recomputeCosts(), replaceRouteEdges(), SUMOVehicleParameter::toTaz, SUMOVehicleParameter::via, and WRITE_WARNING.
Referenced by libsumo::Vehicle::changeTarget(), getCurrentRouteEdge(), libsumo::Vehicle::rerouteEffort(), and libsumo::Vehicle::rerouteTraveltime().
|
virtual |
Saves the (common) state of a vehicle.
Implements SUMOVehicle.
Reimplemented in MSVehicle, and MEVehicle.
Definition at line 499 of file MSBaseVehicle.cpp.
References Named::getID(), getID(), OptionsCont::getOptions(), getVehicleType(), hasDeparted(), myChosenSpeedFactor, myParameter, myRoute, SUMO_ATTR_REROUTE, SUMO_ATTR_ROUTE, SUMO_ATTR_SPEEDFACTOR, SUMO_TAG_VEHICLE, VEHPARS_FORCE_REROUTE, SUMOVehicleParameter::wasSet(), SUMOVehicleParameter::write(), and OutputDevice::writeAttr().
Referenced by MEVehicle::saveState(), MSVehicle::saveState(), and setChosenSpeedFactor().
|
inlinevirtual |
Sets this vehicle's desired arrivalPos for its current route.
Implements SUMOVehicle.
Definition at line 280 of file MSBaseVehicle.h.
References hasArrived(), hasDeparted(), and myArrivalPos.
|
inlinevirtual |
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
Implements SUMOVehicle.
Definition at line 414 of file MSBaseVehicle.h.
References addStops(), getDevice(), getSingularType(), myChosenSpeedFactor, replaceVehicleType(), and saveState().
Referenced by libsumo::Vehicle::remove().
void MSBaseVehicle::setDeviceParameter | ( | const std::string & | deviceName, |
const std::string & | key, | ||
const std::string & | value | ||
) |
try to set the given parameter from any of the vehicles devices, raise InvalidArgument if no device parameter by that name exists
Definition at line 634 of file MSBaseVehicle.cpp.
References myDevices.
Referenced by libsumo::Vehicle::setParameter().
|
virtual |
Returns the nSuccs'th successor of edge the vehicle is currently at.
If the rest of the route (counted from the current edge) has less than nSuccs edges, 0 is returned.
[in] | nSuccs | The number of edge to look forward |
Implements SUMOVehicle.
Definition at line 146 of file MSBaseVehicle.cpp.
References MSRoute::begin(), myCurrEdge, and myRoute.
Referenced by MSVehicleTransfer::add(), MSLane::appropriate(), MSVehicleTransfer::checkInsertions(), MESegment::getLink(), getVClass(), hasArrived(), MSPedestrianPushButton::isActiveForEdge(), libsumo::Vehicle::moveTo(), MELoop::nextSegment(), and MESegment::receive().
Returns the information whether the vehicle is fully controlled via TraCI.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 164 of file MSBaseVehicle.h.
References UNUSED_PARAMETER.
|
friend |
Definition at line 63 of file MSBaseVehicle.h.
|
protected |
The destination lane where the vehicle stops.
Definition at line 527 of file MSBaseVehicle.h.
Referenced by calculateArrivalParams(), and MSVehicle::updateBestLanes().
|
protected |
The position on the destination lane where the vehicle stops.
Definition at line 524 of file MSBaseVehicle.h.
Referenced by calculateArrivalParams(), getArrivalPos(), MEVehicle::hasArrived(), MSVehicle::hasArrived(), MSVehicle::planMoveInternal(), MSVehicle::resetRoutePosition(), setArrivalPos(), and MSVehicle::updateBestLanes().
|
protected |
A precomputed factor by which the driver wants to be faster than the speed limit.
Definition at line 491 of file MSBaseVehicle.h.
Referenced by getChosenSpeedFactor(), saveState(), and setChosenSpeedFactor().
|
protected |
The containers this vehicle may have.
Definition at line 515 of file MSBaseVehicle.h.
Referenced by addContainer(), GUIBaseVehicle::drawAction_drawPersonsAndContainers(), getContainerNumber(), getContainers(), MSVehicle::processNextStop(), and removeTransportable().
|
protected |
Iterator to current route-edge.
Definition at line 488 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), MSVehicle::canReverse(), MSVehicle::enterLaneAtMove(), getCurrentRouteEdge(), MSVehicle::getDistanceToPosition(), getEdge(), getRerouteOrigin(), MSVehicle::getRerouteOrigin(), MSVehicle::getRoutePosition(), MEVehicle::hasArrived(), MSVehicle::hasArrived(), hasValidRoute(), MSVehicle::leaveLane(), MEVehicle::loadState(), MSVehicle::loadState(), MEVehicle::moveRoutePointer(), MSVehicle::planMoveInternal(), MSVehicle::Influencer::postProcessRemoteControl(), MSVehicle::processLaneAdvances(), MSVehicle::processNextStop(), MSVehicle::replaceRoute(), MEVehicle::replaceRoute(), replaceRouteEdges(), reroute(), MSVehicle::rerouteParkingArea(), MSVehicle::resetRoutePosition(), MEVehicle::saveState(), MSVehicle::saveState(), succEdge(), MSVehicle::updateBestLanes(), and MSVehicle::willPass().
|
staticprivate |
Definition at line 542 of file MSBaseVehicle.h.
|
protected |
The real depart position.
Definition at line 521 of file MSBaseVehicle.h.
Referenced by getDepartPos(), MSVehicle::loadState(), onDepart(), and MSVehicle::saveState().
|
protected |
The real departure time.
Definition at line 518 of file MSBaseVehicle.h.
Referenced by MSVehicle::enterLaneAtInsertion(), getDeparture(), hasDeparted(), MEVehicle::loadState(), MSVehicle::loadState(), onDepart(), MEVehicle::saveState(), and MSVehicle::saveState().
|
protected |
The devices this vehicle has.
Definition at line 509 of file MSBaseVehicle.h.
Referenced by addContainer(), addPerson(), createDevice(), getDevice(), getDeviceParameter(), getDevices(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIBaseVehicle::GUIBaseVehicle(), hasDevice(), MSBaseVehicle(), MEVehicle::saveState(), MSVehicle::saveState(), setDeviceParameter(), and ~MSBaseVehicle().
|
staticprotected |
Definition at line 537 of file MSBaseVehicle.h.
Referenced by getContainers(), and getPersons().
|
protected |
Currently relevant move reminders.
Definition at line 505 of file MSBaseVehicle.h.
Referenced by activateReminders(), MSVehicle::activateReminders(), MSVehicle::adaptLaneEntering2MoveReminder(), addContainer(), addPerson(), addReminder(), GUIBaseVehicle::GUIBaseVehicle(), MSVehicle::leaveLane(), MSBaseVehicle(), removeReminder(), MEVehicle::updateDetectorForWriting(), MEVehicle::updateDetectors(), and MSVehicle::workOnMoveReminders().
|
protected |
The number of reroutings.
Definition at line 530 of file MSBaseVehicle.h.
Referenced by getNumberReroutes(), MSVehicle::replaceRoute(), and MEVehicle::replaceRoute().
|
private |
Definition at line 540 of file MSBaseVehicle.h.
Referenced by getNumericalID().
|
protected |
This vehicle's parameter.
Definition at line 479 of file MSBaseVehicle.h.
Referenced by addContainer(), addPerson(), MSVehicle::addStop(), addStops(), MSVehicle::addTraciStop(), calculateArrivalParams(), createDevice(), MSVehicle::enterLaneAtMove(), getContainerNumber(), getID(), getParameter(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), getPersonNumber(), MEVehicle::moveRoutePointer(), MSVehicle::planMoveInternal(), replaceParameter(), MSVehicle::replaceParkingArea(), reroute(), MEVehicle::saveState(), saveState(), MSVehicle::saveState(), MSVehicle::updateBestLanes(), and ~MSBaseVehicle().
|
protected |
The passengers this vehicle may have.
Definition at line 512 of file MSBaseVehicle.h.
Referenced by addPerson(), GUIBaseVehicle::drawAction_drawPersonsAndContainers(), GUIVehicle::getNumPassengers(), getPersonNumber(), getPersons(), MSVehicle::processNextStop(), and removeTransportable().
|
protected |
This vehicle's route.
Definition at line 482 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), addStops(), MSVehicle::basePos(), calculateArrivalParams(), MSVehicle::canReverse(), GUIVehicle::drawRouteHelper(), MSVehicle::getDistanceToPosition(), GUIVehicle::getPreviousLane(), MSVehicle::getRerouteOrigin(), getRoute(), MSVehicle::getRoutePosition(), MEVehicle::hasArrived(), MSVehicle::hasArrived(), hasValidRoute(), MEVehicle::moveRoutePointer(), MSBaseVehicle(), MSVehicle::planMoveInternal(), MSVehicle::processLaneAdvances(), MSVehicle::replaceRoute(), MEVehicle::replaceRoute(), replaceRouteEdges(), reroute(), MSVehicle::rerouteParkingArea(), MSVehicle::resetRoutePosition(), MEVehicle::saveState(), saveState(), MSVehicle::saveState(), succEdge(), MSVehicle::updateBestLanes(), MSVehicle::willPass(), and ~MSBaseVehicle().
|
protected |
This vehicle's type.
Definition at line 485 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), calculateArrivalParams(), MSVehicle::enterLaneAtInsertion(), MSVehicle::executeMove(), MSVehicle::getActionStepLength(), MSVehicle::getActionStepLengthSecs(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), MSVehicle::getBoundingBox(), MSVehicle::getBoundingPoly(), MSVehicle::getCarFollowModel(), MSVehicle::getCO2Emissions(), MSVehicle::getCOEmissions(), MSVehicle::getElectricityConsumption(), MSVehicle::getFuelConsumption(), MSVehicle::getHarmonoise_NoiseEmissions(), MSVehicle::getHCEmissions(), getLength(), getMaxSpeed(), MSVehicle::getMaxSpeedOnLane(), MSVehicle::getNOxEmissions(), MSVehicle::getPMxEmissions(), MSVehicle::getPositionOnLane(), getSingularType(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), getVClass(), getVehicleType(), getWidth(), hasValidRoute(), MSVehicle::processLaneAdvances(), MSVehicle::processNextStop(), replaceVehicleType(), MSVehicle::updateBestLanes(), and MSVehicle::~MSVehicle().
|
staticprotected |
Definition at line 535 of file MSBaseVehicle.h.
Referenced by MSVehicle::enterLaneAtInsertion(), hasDeparted(), and MSVehicle::Influencer::postProcessRemoteControl().