SUMO - Simulation of Urban MObility
|
A vehicle from the mesoscopic point of view. More...
#include <MEVehicle.h>
Public Types | |
typedef Named::NamedLikeComparatorIdLess < SUMOVehicle > | ComparatorIdLess |
Public Member Functions | |
virtual void | activateReminders (const MSMoveReminder::Notification reason) |
"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... | |
bool | addStop (const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0) |
Adds a stop. More... | |
void | addStops (const bool ignoreStopErrors) |
Adds stops to the built vehicle. More... | |
SUMOReal | estimateLeaveSpeed (const MSLink *link) const |
Returns the vehicle's estimated speed after driving accross the link. More... | |
virtual SUMOReal | getAcceleration () const |
Returns the vehicle's acceleration. More... | |
SUMOReal | getAngle () const |
Returns the vehicle's direction in degrees. More... | |
virtual SUMOReal | getArrivalPos () const |
Returns this vehicle's desired arrivalPos for its current route (may change on reroute) More... | |
SUMOReal | getAverageSpeed () const |
Returns the vehicle's estimated average speed on the segment assuming no further delays. More... | |
SUMOReal | getBackPositionOnLane (const MSLane *lane) const |
Get the vehicle's position relative to the given lane. More... | |
SUMOTime | getBlockTime () const |
Returns the time at which the vehicle was blocked. More... | |
SUMOReal | getBlockTimeSeconds () const |
Returns the time at which the vehicle was blocked on the current segment. More... | |
SUMOReal | getChosenSpeedFactor () const |
Returns the precomputed factor by which the driver wants to be faster than the speed limit. More... | |
SUMOReal | getConservativeSpeed (SUMOTime &earliestArrival) const |
Returns the vehicle's estimated speed taking into account delays. More... | |
const MSRouteIterator & | getCurrentRouteEdge () const |
Returns an iterator pointing to the current edge in this vehicles route. More... | |
SUMOReal | getCurrentTLSPenaltySeconds () const |
Returns the delay that is accrued due to option –meso-tls-penalty. More... | |
SUMOTime | getDepartDelay () const |
Returns the depart delay. More... | |
SUMOReal | getDepartPos () const |
Returns this vehicle's real departure position. More... | |
SUMOTime | getDeparture () const |
Returns this vehicle's real departure time. More... | |
MSDevice * | getDevice (const std::type_info &type) const |
Returns a device of the given type if it exists or 0. More... | |
const std::vector< MSDevice * > & | getDevices () const |
Returns this vehicle's devices. More... | |
const MSEdge * | getEdge () const |
Returns the edge the vehicle is currently at. More... | |
SUMOTime | getEventTime () const |
Returns the (planned) time at which the vehicle leaves his current cell. More... | |
SUMOReal | getEventTimeSeconds () const |
Returns the earliest leave time for the current segment. More... | |
const std::string & | getID () const |
Returns the name of the vehicle. More... | |
SUMOReal | getImpatience () const |
Returns this vehicles impatience. More... | |
MSLane * | getLane () const |
Returns the lane the vehicle is on. More... | |
SUMOTime | getLastEntryTime () const |
Returns the time the vehicle entered the current segment. More... | |
SUMOReal | getLastEntryTimeSeconds () const |
Returns the entry time for the current segment. More... | |
virtual SUMOReal | getLateralPositionOnLane () const |
Get the vehicle's lateral position on the lane. More... | |
SUMOReal | getMaxSpeed () const |
Returns the maximum speed. More... | |
int | getNumberReroutes () const |
Returns the number of new routes this vehicle got. More... | |
const SUMOVehicleParameter & | getParameter () const |
Returns the vehicle's parameter (including departure definition) More... | |
Position | getPosition (const SUMOReal offset=0) const |
Return current position (x/y, cartesian) More... | |
SUMOReal | getPositionOnLane () const |
Get the vehicle's position along the lane. More... | |
SUMOReal | getPreviousSpeed () const |
Returns the vehicle's previous speed. More... | |
int | getQueIndex () const |
Returns the index of the que the vehicle is in. 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... | |
MESegment * | getSegment () const |
Returns the current segment the vehicle is on. More... | |
SUMOReal | getSlope () const |
Returns the slope of the road at vehicle's position. More... | |
SUMOReal | getSpeed () const |
Returns the vehicle's estimated speed assuming no delays. More... | |
const ConstMSEdgeVector | getStopEdges () const |
Returns the list of still pending stop edges. More... | |
SUMOTime | getStoptime (const MESegment *const seg) const |
Returns how long to stop at the given segment. More... | |
SUMOVehicleClass | getVClass () const |
Returns the vehicle's access class. More... | |
const MSVehicleType & | getVehicleType () const |
Returns the vehicle's type definition. More... | |
SUMOReal | getWaitingSeconds () const |
Returns the number of seconds waited (speed was lesser than 0.1m/s) More... | |
SUMOTime | getWaitingTime () const |
Returns the duration for which the vehicle was blocked. More... | |
bool | hasArrived () const |
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge) More... | |
bool | hasDeparted () const |
Returns whether this vehicle has already departed. 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... | |
bool | isOnRoad () const |
Returns the information whether the vehicle is on a road (is simulated) More... | |
bool | isParking () const |
Returns whether the vehicle is parking. More... | |
virtual bool | isRemoteControlled () const |
Returns the information whether the vehicle is fully controlled via TraCI. More... | |
bool | isStopped () const |
Returns whether the vehicle is at a stop. More... | |
bool | isStoppedTriggered () const |
Returns whether the vehicle is on a triggered stop. More... | |
bool | mayProceed () const |
Returns whether the vehicle is allowed to pass the next junction. More... | |
MEVehicle (SUMOVehicleParameter *pars, const MSRoute *route, const MSVehicleType *type, const SUMOReal speedFactor) | |
Constructor. More... | |
bool | moveRoutePointer () |
Update when the vehicle enters a new edge in the move step. More... | |
void | onDepart () |
Called when the vehicle is inserted into the network. More... | |
void | removeReminder (MSMoveReminder *rem) |
Removes a MoveReminder dynamically. More... | |
bool | replaceRoute (const MSRoute *route, bool onInit=false, int offset=0) |
Replaces the current route by the given one. More... | |
bool | replaceRouteEdges (ConstMSEdgeVector &edges, bool onInit=false, bool check=false) |
Replaces the current route by the given edges. More... | |
void | reroute (SUMOTime t, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, const bool onInit=false, const bool withTaz=false) |
Performs a rerouting using the given router. More... | |
virtual void | setArrivalPos (SUMOReal arrivalPos) |
Sets this vehicle's desired arrivalPos for its current route. More... | |
void | setBlockTime (const SUMOTime t) |
Sets the time at which the vehicle was blocked. More... | |
void | setChosenSpeedFactor (const SUMOReal factor) |
Returns the precomputed factor by which the driver wants to be faster than the speed limit. More... | |
void | setEventTime (SUMOTime t, bool hasDelay=true) |
Sets the (planned) time at which the vehicle leaves his current cell. More... | |
void | setLastEntryTime (SUMOTime t) |
Sets the entry time for the current segment. More... | |
virtual void | setSegment (MESegment *s, int idx=0) |
Sets the current segment the vehicle is at together with its que. More... | |
const MSEdge * | succEdge (int nSuccs) const |
Returns the nSuccs'th successor of edge the vehicle is currently at. More... | |
void | updateDetectorForWriting (MSMoveReminder *rem, SUMOTime currentTime, SUMOTime exitTime) |
Updates a single vehicle detector if present. More... | |
void | updateDetectors (SUMOTime currentTime, const bool isLeave, const MSMoveReminder::Notification reason=MSMoveReminder::NOTIFICATION_JUNCTION) |
Updates all vehicle detectors. More... | |
state io | |
void | saveState (OutputDevice &out) |
Saves the states of a vehicle. More... | |
void | loadState (const SUMOSAXAttributes &attrs, const SUMOTime offset) |
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... | |
Protected Attributes | |
int | myArrivalLane |
The destination lane where the vehicle stops. More... | |
SUMOReal | myArrivalPos |
The position on the destination lane where the vehicle stops. More... | |
SUMOTime | myBlockTime |
The time at which the vehicle was blocked on its current segment. More... | |
SUMOReal | myChosenSpeedFactor |
A precomputed factor by which the driver wants to be faster than the speed limit. More... | |
MSRouteIterator | myCurrEdge |
Iterator to current route-edge. More... | |
SUMOReal | myDepartPos |
The real depart position. More... | |
SUMOTime | myDeparture |
The real departure time. More... | |
std::vector< MSDevice * > | myDevices |
The devices this vehicle has. More... | |
SUMOTime | myEventTime |
The (planned) time of leaving the segment (cell) More... | |
SUMOTime | myLastEntryTime |
The time the vehicle entered its current segment. More... | |
int | myNumberReroutes |
The number of reroutings. More... | |
const SUMOVehicleParameter * | myParameter |
This Vehicle's parameter. More... | |
int | myQueIndex |
Index of the que the vehicle is in (important for multiqueue extension) More... | |
const MSRoute * | myRoute |
This Vehicle's route. More... | |
MESegment * | mySegment |
The segment the vehicle is at. More... | |
std::map< const MESegment *const, SUMOTime > | myStops |
where to stop More... | |
const MSVehicleType * | myType |
This Vehicle's type. More... | |
Static Protected Attributes | |
static const SUMOTime | NOT_YET_DEPARTED = SUMOTime_MAX |
Move reminder structures | |
MoveReminderCont | myMoveReminders |
Currently relevant move reminders. More... | |
typedef std::vector< std::pair < MSMoveReminder *, SUMOReal > > | MoveReminderCont |
Definition of a move reminder container. More... | |
A vehicle from the mesoscopic point of view.
Definition at line 52 of file MEVehicle.h.
|
inherited |
Definition at line 79 of file SUMOVehicle.h.
|
protectedinherited |
Definition of a move reminder container.
Definition at line 414 of file MSBaseVehicle.h.
MEVehicle::MEVehicle | ( | SUMOVehicleParameter * | pars, |
const MSRoute * | route, | ||
const MSVehicleType * | type, | ||
const SUMOReal | 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 57 of file MEVehicle.cpp.
References DEPART_SPEED_GIVEN, SUMOVehicleParameter::departSpeed, SUMOVehicleParameter::departSpeedProcedure, MSEdge::EDGEFUNCTION_DISTRICT, MSVehicleType::getID(), MSVehicleType::getMaxSpeed(), MSVehicleType::getVehicleClass(), and SUMOVehicleParameter::id.
|
virtualinherited |
"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 |
Reimplemented in MSVehicle.
Definition at line 347 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myMoveReminders.
Referenced by MESegment::receive(), and MELoop::teleportVehicle().
|
virtualinherited |
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 288 of file MSBaseVehicle.cpp.
|
virtualinherited |
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 284 of file MSBaseVehicle.cpp.
|
inherited |
Adds a MoveReminder dynamically.
[in] | rem | the reminder to add |
Definition at line 320 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myMoveReminders.
Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MESegment::addReminders(), MSVehicle::enterLaneAtInsertion(), and MSVehicle::enterLaneAtLaneChange().
|
virtual |
Adds a stop.
The stop is put into the sorted list.
[in] | stop | The stop to add |
Implements SUMOVehicle.
Definition at line 221 of file MEVehicle.cpp.
References MSEdge::dictionary(), SUMOVehicleParameter::Stop::duration, SUMOVehicleParameter::Stop::endPos, MELoop::getSegmentForEdge(), MSGlobals::gMesoNet, SUMOVehicleParameter::Stop::lane, and myStops.
|
inherited |
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 442 of file MSBaseVehicle.cpp.
References SUMOVehicle::addStop(), MSRoute::getStops(), MSBaseVehicle::myParameter, MSBaseVehicle::myRoute, SUMOVehicleParameter::stops, and WRITE_WARNING.
Referenced by MEVehicleControl::buildVehicle(), GUIMEVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), and MSVehicleControl::buildVehicle().
|
protectedinherited |
(Re-)Calculates the arrival position and lane from the vehicle parameters
Definition at line 369 of file MSBaseVehicle.cpp.
References ARRIVAL_LANE_GIVEN, ARRIVAL_POS_GIVEN, ARRIVAL_POS_RANDOM, ARRIVAL_SPEED_GIVEN, SUMOVehicleParameter::arrivalLane, SUMOVehicleParameter::arrivalLaneProcedure, SUMOVehicleParameter::arrivalPos, SUMOVehicleParameter::arrivalPosProcedure, SUMOVehicleParameter::arrivalSpeed, SUMOVehicleParameter::arrivalSpeedProcedure, Named::getID(), MSBaseVehicle::getID(), MSEdge::getLanes(), MSRoute::getLastEdge(), MSVehicleType::getVehicleClass(), MSEdge::isTaz(), MAX2(), MIN2(), MSBaseVehicle::myArrivalLane, MSBaseVehicle::myArrivalPos, MSBaseVehicle::myParameter, MSBaseVehicle::myRoute, MSBaseVehicle::myType, RandHelper::rand(), SUMOReal, toString(), and WRITE_WARNING.
Referenced by MSBaseVehicle::MSBaseVehicle(), MSVehicle::replaceRoute(), replaceRoute(), and MSBaseVehicle::reroute().
Returns the vehicle's estimated speed after driving accross the link.
Definition at line 129 of file MEVehicle.cpp.
References MSVehicleType::getCarFollowModel(), MSLink::getLength(), MSCFModel::getMaxAccel(), getSpeed(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSLink::getViaLaneOrLane(), MIN2(), and SUMOReal.
Referenced by MESegment::isOpen().
|
virtualinherited |
Returns the vehicle's acceleration.
This default implementation returns always 0.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 253 of file MSBaseVehicle.cpp.
|
virtual |
Returns the vehicle's direction in degrees.
Implements SUMOVehicle.
Definition at line 92 of file MEVehicle.cpp.
References MSBaseVehicle::getEdge(), MSEdge::getLanes(), getPositionOnLane(), MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::rotationAtOffset().
Referenced by GUIMEVehicle::getAngle().
|
inlinevirtualinherited |
Returns this vehicle's desired arrivalPos for its current route (may change on reroute)
Implements SUMOVehicle.
Definition at line 258 of file MSBaseVehicle.h.
References MSBaseVehicle::myArrivalPos.
Referenced by MSLCM_SL2015::_wantsChangeSublane().
SUMOReal MEVehicle::getAverageSpeed | ( | ) | const |
Returns the vehicle's estimated average speed on the segment assuming no further delays.
Definition at line 123 of file MEVehicle.cpp.
References MESegment::getLength(), myEventTime, myLastEntryTime, mySegment, and STEPS2TIME.
Referenced by getSpeed().
Get the vehicle's position relative to the given lane.
Implements SUMOVehicle.
Definition at line 78 of file MEVehicle.cpp.
References MSVehicleType::getLength(), getPositionOnLane(), and MSBaseVehicle::getVehicleType().
|
inline |
Returns the time at which the vehicle was blocked.
Definition at line 254 of file MEVehicle.h.
References myBlockTime.
Referenced by MELoop::checkCar(), and getBlockTimeSeconds().
|
inline |
Returns the time at which the vehicle was blocked on the current segment.
Definition at line 287 of file MEVehicle.h.
References getBlockTime(), and STEPS2TIME.
Referenced by GUIMEVehicle::getParameterWindow().
|
inlinevirtualinherited |
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
Implements SUMOVehicle.
Definition at line 348 of file MSBaseVehicle.h.
References MSBaseVehicle::myChosenSpeedFactor.
Referenced by GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), and TraCIServerAPI_Vehicle::processGet().
Returns the vehicle's estimated speed taking into account delays.
[in,out] | earliestArrival | A lower bound on leaveTime, modified to contain new lower bound on leave Time |
Definition at line 138 of file MEVehicle.cpp.
References DELTA_T, MESegment::getLength(), MAX2(), myEventTime, myLastEntryTime, mySegment, and STEPS2TIME.
|
inlinevirtualinherited |
Returns an iterator pointing to the current edge in this vehicles route.
Implements SUMOVehicle.
Definition at line 182 of file MSBaseVehicle.h.
References MSBaseVehicle::myCurrEdge.
Referenced by TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition().
SUMOReal MEVehicle::getCurrentTLSPenaltySeconds | ( | ) | const |
Returns the delay that is accrued due to option –meso-tls-penalty.
Definition at line 268 of file MEVehicle.cpp.
References MESegment::getTLSPenalty(), mySegment, and STEPS2TIME.
Referenced by GUIMEVehicle::getParameterWindow().
|
inlinevirtualinherited |
Returns the depart delay.
Implements SUMOVehicle.
Definition at line 242 of file MSBaseVehicle.h.
References SUMOVehicleParameter::depart, MSBaseVehicle::getDeparture(), and MSBaseVehicle::getParameter().
Referenced by GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIMEVehicle::getParameterWindow(), and GUIVehicle::getParameterWindow().
|
inlinevirtualinherited |
Returns this vehicle's real departure position.
Implements SUMOVehicle.
Definition at line 250 of file MSBaseVehicle.h.
References MSBaseVehicle::myDepartPos.
Referenced by TraCIServerAPI_Vehicle::processGet().
|
inlinevirtualinherited |
Returns this vehicle's real departure time.
Implements SUMOVehicle.
Definition at line 237 of file MSBaseVehicle.h.
References MSBaseVehicle::myDeparture.
Referenced by MSBaseVehicle::getDepartDelay().
|
virtualinherited |
Returns a device of the given type if it exists or 0.
Implements SUMOVehicle.
Definition at line 420 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myDevices.
Referenced by GUIBaseVehicle::drawOnPos(), and MSBatteryExport::write().
|
inlinevirtualinherited |
Returns this vehicle's devices.
Implements SUMOVehicle.
Definition at line 291 of file MSBaseVehicle.h.
References MSBaseVehicle::myDevices.
|
virtualinherited |
Returns the edge the vehicle is currently at.
Implements SUMOVehicle.
Definition at line 142 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myCurrEdge.
Referenced by MSVehicleTransfer::add(), MELoop::changeSegment(), GUIApplicationWindow::checkGamingEvents(), MSVehicleTransfer::checkInsertions(), TraCIServerAPI_Vehicle::commandDistanceRequest(), MSVehicle::enterLaneAtLaneChange(), METriggeredCalibrator::execute(), getAngle(), GUIMEVehicle::getParameterWindow(), getPosition(), getSlope(), TraCIServerAPI_Vehicle::processSet(), MESegment::receive(), MELoop::teleportVehicle(), and TraCIServerAPI_Vehicle::vtdMap().
|
inline |
Returns the (planned) time at which the vehicle leaves his current cell.
Definition at line 195 of file MEVehicle.h.
References myEventTime.
Referenced by MELoop::addLeaderCar(), MELoop::checkCar(), getEventTimeSeconds(), MESegment::isOpen(), MESegment::receive(), MELoop::removeLeaderCar(), MESegment::send(), MELoop::setApproaching(), MESegment::setSpeedForQueue(), MELoop::teleportVehicle(), and updateDetectors().
|
inline |
Returns the earliest leave time for the current segment.
Definition at line 277 of file MEVehicle.h.
References getEventTime(), and STEPS2TIME.
Referenced by GUIMEVehicle::getParameterWindow().
|
virtualinherited |
Returns the name of the vehicle.
Implements SUMOVehicle.
Definition at line 114 of file MSBaseVehicle.cpp.
References SUMOVehicleParameter::id, and MSBaseVehicle::myParameter.
Referenced by MSLCM_SL2015::_patchSpeed(), MSLCM_LC2013::_patchSpeed(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSVehicleTransfer::add(), MSVehicle::addTraciBusOrContainerStop(), MSBaseVehicle::calculateArrivalParams(), MSLaneChangerSublane::change(), MSLaneChanger::change(), MSLCM_SL2015::changed(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSLaneChanger::checkChange(), MSLaneChangerSublane::checkChangeSublane(), MSLane::checkFailure(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSAbstractLaneChangeModel::cleanupShadowLane(), MSVehicle::computeAngle(), MSLaneChanger::continueChange(), MSLCM_SL2015::decideDirection(), MSCalibrator::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), MSVehicle::getCenterOnEdge(), MSLane::getFirstVehicleInformation(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLane::getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), MSLane::getPartialBehind(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSAbstractLaneChangeModel::getShadowLane(), MSLane::handleCollisionBetween(), MSLCM_SL2015::inform(), MSLCM_LC2013::inform(), MSLCM_LC2013::informFollower(), MSLCM_SL2015::informFollower(), MSLCM_LC2013::informLeader(), MSLCM_SL2015::informLeader(), MESegment::initialise(), MSPedestrianPushButton::isActiveForEdge(), MSLane::isInsertionSuccess(), MSVehicle::leaveLane(), MSCFModel_Daniel1::moveHelper(), MSCFModel_KraussOrig1::moveHelper(), MSCFModel_SmartSK::moveHelper(), MSLCM_LC2013::MSLCM_LC2013(), MSCalibrator::VehicleRemover::notifyEnter(), MSLCM_DK2008::patchSpeed(), MSLCM_SL2015::patchSpeed(), MSLCM_LC2013::patchSpeed(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSAbstractLaneChangeModel::primaryLaneChanged(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), MSBaseVehicle::replaceRouteEdges(), MSBaseVehicle::reroute(), MSLane::resetPartialOccupation(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), MSCalibrator::scheduleRemoval(), MSLane::setPartialOccupation(), TraCIServer::setVTDControlled(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateGaps(), MSAbstractLaneChangeModel::updateShadowLane(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), MSBatteryExport::write(), and MSXMLRawOut::writeVehicle().
|
virtualinherited |
Returns this vehicles impatience.
Implements SUMOVehicle.
Definition at line 411 of file MSBaseVehicle.cpp.
References MSBaseVehicle::getVehicleType(), SUMOVehicle::getWaitingTime(), MSGlobals::gTimeToGridlock, MAX2(), MIN2(), and SUMOReal.
Referenced by MSLCM_SL2015::checkBlockingVehicles(), MSVehicle::checkRewindLinkLanes(), MSVehicle::executeMove(), MSLane::getCriticalLeader(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), GUIVehicle::getParameterWindow(), MSLane::isInsertionSuccess(), MESegment::isOpen(), and GUIVehicle::selectBlockingFoes().
|
inlinevirtual |
Returns the lane the vehicle is on.
Implements SUMOVehicle.
Definition at line 91 of file MEVehicle.h.
|
inline |
Returns the time the vehicle entered the current segment.
Definition at line 237 of file MEVehicle.h.
References myLastEntryTime.
Referenced by getLastEntryTimeSeconds(), MESegment::newArrival(), updateDetectorForWriting(), and updateDetectors().
|
inline |
Returns the entry time for the current segment.
Definition at line 282 of file MEVehicle.h.
References getLastEntryTime(), and STEPS2TIME.
Referenced by GUIMEVehicle::getParameterWindow().
|
inlinevirtualinherited |
Get the vehicle's lateral position on the lane.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 165 of file MSBaseVehicle.h.
|
virtualinherited |
Returns the maximum speed.
Implements SUMOVehicle.
Definition at line 126 of file MSBaseVehicle.cpp.
References MSVehicleType::getMaxSpeed(), and MSBaseVehicle::myType.
Referenced by MSCFModel_Wiedemann::_v(), MSVehicleTransfer::checkInsertions(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSVehicle::Influencer::implicitDeltaPosVTD(), and MSVehicle::Influencer::implicitSpeedVTD().
|
inlinevirtualinherited |
Returns the number of new routes this vehicle got.
Implements SUMOVehicle.
Definition at line 280 of file MSBaseVehicle.h.
References MSBaseVehicle::myNumberReroutes.
Referenced by GUIBaseVehicle::drawGLAdditional(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), and MSBaseVehicle::replaceRouteEdges().
|
virtualinherited |
Returns the vehicle's parameter (including departure definition)
Implements SUMOVehicle.
Definition at line 120 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myParameter.
Referenced by MSLCM_SL2015::_wantsChangeSublane(), MSTransportableControl::boardAnyWaiting(), GUIBaseVehicle::drawOnPos(), MSBaseVehicle::getDepartDelay(), MSEdge::getDepartLane(), MSLane::getDepartSpeed(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), MSLane::insertVehicle(), MSLane::isInsertionSuccess(), MSTransportableControl::loadAnyWaiting(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), GUIBaseVehicle::setFunctionalColor(), and METriggeredCalibrator::tryEmit().
Return current position (x/y, cartesian)
If the vehicle's myLane is 0, Position::INVALID.
[in] | offset | optional offset in longitudinal direction |
Implements SUMOVehicle.
Definition at line 106 of file MEVehicle.cpp.
References MSLane::geometryPositionAtOffset(), MSBaseVehicle::getEdge(), MSEdge::getLanes(), and getPositionOnLane().
Referenced by GUIMEVehicle::getPosition().
|
virtual |
Get the vehicle's position along the lane.
Implements SUMOVehicle.
Definition at line 84 of file MEVehicle.cpp.
References MESegment::getIndex(), MESegment::getLength(), mySegment, and SUMOReal.
Referenced by getAngle(), getBackPositionOnLane(), GUIMEVehicle::getParameterWindow(), getPosition(), getSlope(), and hasArrived().
|
virtualinherited |
Returns the vehicle's previous speed.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 65 of file MSBaseVehicle.cpp.
|
inline |
Returns the index of the que the vehicle is in.
Definition at line 221 of file MEVehicle.h.
References myQueIndex.
Referenced by MESegment::getLink(), MESegment::removeCar(), saveState(), and MESegment::send().
|
inlinevirtualinherited |
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 174 of file MSBaseVehicle.h.
References MSBaseVehicle::myCurrEdge.
Referenced by MSBaseVehicle::replaceRouteEdges(), and MSBaseVehicle::reroute().
|
inlinevirtualinherited |
Returns the current route.
Implements SUMOVehicle.
Definition at line 97 of file MSBaseVehicle.h.
References MSBaseVehicle::myRoute.
Referenced by MSLCM_SL2015::_wantsChangeSublane(), TraCIServerAPI_Vehicle::commandDistanceRequest(), GUIBaseVehicle::drawRoute(), MSEdge::getDepartLane(), MSLane::isInsertionSuccess(), MSVehicle::Influencer::postProcessVTD(), TraCIServerAPI_Vehicle::processGet(), GUIBaseVehicle::setFunctionalColor(), TraCIServerAPI_Vehicle::vtdMap(), and TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition().
|
inline |
Returns the current segment the vehicle is on.
Definition at line 213 of file MEVehicle.h.
References mySegment.
Referenced by MELoop::changeSegment(), MELoop::checkCar(), GUIMEVehicle::getColorValue(), GUIMEVehicle::getParameterWindow(), isOnRoad(), MESegment::loadState(), MELoop::setApproaching(), and MELoop::teleportVehicle().
|
virtual |
Returns the slope of the road at vehicle's position.
Reimplemented from MSBaseVehicle.
Definition at line 99 of file MEVehicle.cpp.
References MSBaseVehicle::getEdge(), MSEdge::getLanes(), getPositionOnLane(), MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::slopeDegreeAtOffset().
|
virtual |
Returns the vehicle's estimated speed assuming no delays.
Implements SUMOVehicle.
Definition at line 113 of file MEVehicle.cpp.
References getAverageSpeed(), and getWaitingTime().
Referenced by estimateLeaveSpeed(), GUIMEVehicle::getColorValue(), GUIMEVehicle::getParameterWindow(), MESegment::isOpen(), MESegment::newArrival(), MESegment::receive(), and MELoop::setApproaching().
|
virtual |
Returns the list of still pending stop edges.
Implements MSBaseVehicle.
Definition at line 252 of file MEVehicle.cpp.
References myStops.
Returns how long to stop at the given segment.
[in] | seg | The segment in question |
Definition at line 243 of file MEVehicle.cpp.
References myStops.
Referenced by MESegment::receive().
|
inlinevirtualinherited |
Returns the vehicle's access class.
Implements SUMOVehicle.
Definition at line 113 of file MSBaseVehicle.h.
References MSVehicleType::getParameter(), MSBaseVehicle::myType, and SUMOVTypeParameter::vehicleClass.
Referenced by MSPedestrianPushButton::isActiveForEdge(), and MSBaseVehicle::reroute().
|
inlinevirtualinherited |
Returns the vehicle's type definition.
Implements SUMOVehicle.
Definition at line 105 of file MSBaseVehicle.h.
References MSBaseVehicle::myType.
Referenced by MSLCM_SL2015::_patchSpeed(), MSLCM_LC2013::_patchSpeed(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSVehicle::adaptToLeaders(), MSVehicle::addStop(), MSLane::basePos(), MSTransportableControl::boardAnyWaiting(), MSLaneChanger::changeOpposite(), MSLCM_SL2015::checkBlocking(), MSLCM_SL2015::checkBlockingVehicles(), MSLaneChanger::checkChange(), MSLane::checkFailure(), GUIApplicationWindow::checkGamingEvents(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkRewindLinkLanes(), MSLaneChanger::computeOvertakingTime(), MSLaneChanger::continueChange(), MSLane::detectCollisionBetween(), GUIVehicle::drawAction_drawLinkItems(), GUIVehicle::drawAction_drawRailCarriages(), GUIVehicle::drawAction_drawVehicleBlinker(), GUIVehicle::drawAction_drawVehicleBrakeLight(), GUIEdge::drawMesoVehicles(), MSLane::enteredByLaneChange(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), estimateLeaveSpeed(), MSVehicle::estimateLeaveSpeed(), MSVehicle::executeMove(), MSLane::executeMovements(), MSLane::freeInsertion(), getBackPositionOnLane(), MSLane::getBruttoOccupancy(), GUIBaseVehicle::getCenteringBoundary(), MSLane::getCriticalLeader(), MSEdge::getDepartLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), MSBaseVehicle::getImpatience(), MSVehicle::getLateralOverlap(), MSLane::getLeader(), MSVehicle::getLeader(), MSLane::getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), MSLane::getNettoOccupancy(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSVehicle::getRightSideOnEdge(), MSVehicle::getRightSideOnLane(), MSLeaderInfo::getSubLanes(), MSVehicle::getTimeGap(), MSLink::getZipperSpeed(), MESegment::hasSpaceFor(), MSLane::incorporateVehicle(), MSLCM_SL2015::informFollower(), MSLCM_SL2015::informLeader(), MSLane::insertVehicle(), MSLane::integrateNewVehicle(), MSLane::isInsertionSuccess(), MESegment::isOpen(), MSLCM_SL2015::keepLatGap(), MSLane::lastInsertion(), MSLane::leftByLaneChange(), MSTransportableControl::loadAnyWaiting(), MESegment::loadState(), MSVehicle::overlap(), MSLCM_LC2013::overtakeDistance(), MSLCM_DK2008::patchSpeed(), MSVehicle::planMoveInternal(), MSVehicle::Influencer::postProcessVTD(), TraCIServerAPI_Vehicle::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), MESegment::receive(), MSLaneChanger::registerUnchanged(), MESegment::removeCar(), MSLane::removeVehicle(), MSLane::safeInsertionSpeed(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), GUIVehicle::selectBlockingFoes(), MESegment::send(), GUIBaseVehicle::setFunctionalColor(), MSVehicle::setTentativeLaneAndPosition(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChanger::startChange(), MSLaneChangerSublane::startChangeSublane(), MSVehicle::unsafeLinkAhead(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSVehicle::updateFurtherLanes(), MSLCM_SL2015::updateGaps(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), MSBatteryExport::write(), and MSQueueExport::writeLane().
|
inline |
Returns the number of seconds waited (speed was lesser than 0.1m/s)
The value is reset if the vehicle moves faster than 0.1m/s Intentional stopping does not count towards this time.
Definition at line 271 of file MEVehicle.h.
References getWaitingTime(), and STEPS2TIME.
Referenced by GUIMEVehicle::getColorValue(), and GUIMEVehicle::getParameterWindow().
|
inlinevirtual |
Returns the duration for which the vehicle was blocked.
Implements SUMOVehicle.
Definition at line 260 of file MEVehicle.h.
References MAX2(), myBlockTime, and myEventTime.
Referenced by MELoop::checkCar(), getSpeed(), getWaitingSeconds(), MESegment::isOpen(), and MELoop::setApproaching().
|
virtual |
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge)
Reimplemented from MSBaseVehicle.
Definition at line 159 of file MEVehicle.cpp.
References MSRoute::end(), getPositionOnLane(), MSBaseVehicle::myArrivalPos, MSBaseVehicle::myCurrEdge, myEventTime, MSBaseVehicle::myRoute, mySegment, POSITION_EPS, and SUMOTime_MIN.
Referenced by moveRoutePointer(), and MESegment::receive().
|
virtualinherited |
Returns whether this vehicle has already departed.
Implements SUMOVehicle.
Definition at line 273 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myDeparture, and MSBaseVehicle::NOT_YET_DEPARTED.
Referenced by MSVehicle::addStop(), MSLane::forceVehicleInsertion(), loadState(), MSVehicle::loadState(), TraCIServerAPI_Vehicle::processGet(), and TraCIServerAPI_Vehicle::processSet().
|
virtualinherited |
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 292 of file MSBaseVehicle.cpp.
References MSRoute::begin(), MSRoute::end(), MSVehicleType::getVehicleClass(), MSBaseVehicle::myCurrEdge, MSBaseVehicle::myRoute, and MSBaseVehicle::myType.
Referenced by MESegment::initialise(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), and MSBaseVehicle::replaceRouteEdges().
|
inlinevirtualinherited |
Returns the information whether the front of the vehhicle is on the given lane.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 157 of file MSBaseVehicle.h.
|
virtual |
Returns the information whether the vehicle is on a road (is simulated)
Reimplemented from MSBaseVehicle.
Definition at line 168 of file MEVehicle.cpp.
References getSegment().
|
virtual |
Returns whether the vehicle is parking.
Implements SUMOVehicle.
Definition at line 174 of file MEVehicle.cpp.
Referenced by GUIMEVehicle::getStopInfo().
|
inlinevirtualinherited |
Returns the information whether the vehicle is fully controlled via TraCI.
Implements SUMOVehicle.
Reimplemented in MSVehicle.
Definition at line 150 of file MSBaseVehicle.h.
|
virtual |
Returns whether the vehicle is at a stop.
Implements SUMOVehicle.
Definition at line 231 of file MEVehicle.cpp.
References mySegment, and myStops.
Referenced by MELoop::checkCar(), and GUIMEVehicle::getStopInfo().
|
virtual |
Returns whether the vehicle is on a triggered stop.
Implements SUMOVehicle.
Definition at line 237 of file MEVehicle.cpp.
|
virtual |
Loads the state of this vehicle from the given description.
Implements SUMOVehicle.
Definition at line 347 of file MEVehicle.cpp.
References MELoop::addLeaderCar(), MESegment::getIndex(), MESegment::getNextSegment(), MELoop::getSegmentForEdge(), SUMOSAXAttributes::getString(), MSGlobals::gMesoNet, SUMOSAXAttributes::hasAttribute(), MSBaseVehicle::hasDeparted(), myBlockTime, MSBaseVehicle::myCurrEdge, MSBaseVehicle::myDeparture, myEventTime, myLastEntryTime, setSegment(), SUMO_ATTR_POSITION, SUMO_ATTR_STATE, SUMOTime_MAX, and SUMOTime_MIN.
bool MEVehicle::mayProceed | ( | ) | const |
Returns whether the vehicle is allowed to pass the next junction.
Definition at line 262 of file MEVehicle.cpp.
References MESegment::isOpen(), and mySegment.
Referenced by MELoop::changeSegment(), and MELoop::checkCar().
bool MEVehicle::moveRoutePointer | ( | ) |
Update when the vehicle enters a new edge in the move step.
Definition at line 145 of file MEVehicle.cpp.
References MSRoute::end(), hasArrived(), MSBaseVehicle::myCurrEdge, and MSBaseVehicle::myRoute.
Referenced by METriggeredCalibrator::execute(), MESegment::receive(), and MELoop::teleportVehicle().
|
virtualinherited |
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 265 of file MSBaseVehicle.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), SUMOVehicle::getPositionOnLane(), MSNet::getVehicleControl(), MSBaseVehicle::myDepartPos, MSBaseVehicle::myDeparture, and MSVehicleControl::vehicleDeparted().
Referenced by MSVehicle::enterLaneAtInsertion(), and MESegment::receive().
|
inherited |
Removes a MoveReminder dynamically.
[in] | rem | the reminder to remove |
Definition at line 331 of file MSBaseVehicle.cpp.
References MSBaseVehicle::myMoveReminders.
|
virtual |
Replaces the current route by the given one.
Implements SUMOVehicle.
Definition at line 180 of file MEVehicle.cpp.
References MSRoute::addReference(), MSRoute::begin(), MSBaseVehicle::calculateArrivalParams(), MSRoute::contains(), MSRoute::getEdges(), MSNet::getInstance(), MESegment::getLink(), MSNet::informVehicleStateListener(), MSBaseVehicle::myCurrEdge, MSBaseVehicle::myNumberReroutes, MSBaseVehicle::myRoute, mySegment, MSRoute::release(), MSLink::removeApproaching(), MELoop::setApproaching(), and MSNet::VEHICLE_STATE_NEWROUTE.
|
virtualinherited |
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 |
Implements SUMOVehicle.
Definition at line 199 of file MSBaseVehicle.cpp.
References MSRoute::addReference(), MSRoute::begin(), RGBColor::DEFAULT_COLOR, MSRoute::dictionary(), MSGlobals::gCheckRoutes, MSRoute::getColor(), MSRoute::getEdges(), Named::getID(), MSBaseVehicle::getID(), MSBaseVehicle::getNumberReroutes(), MSBaseVehicle::getRerouteOrigin(), MSRoute::getStops(), MSBaseVehicle::hasValidRoute(), MSBaseVehicle::myCurrEdge, MSBaseVehicle::myRoute, MSRoute::release(), SUMOVehicle::replaceRoute(), MSRoute::size(), toString(), and WRITE_WARNING.
Referenced by MSVehicle::Influencer::postProcessVTD(), TraCIServerAPI_Vehicle::processSet(), and MSBaseVehicle::reroute().
|
virtualinherited |
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 148 of file MSBaseVehicle.cpp.
References MSEdge::allowedLanes(), MSBaseVehicle::calculateArrivalParams(), SUMOAbstractRouter< E, V >::compute(), MSEdge::dictionary(), MSEdge::EDGEFUNCTION_DISTRICT, SUMOVehicleParameter::fromTaz, Named::getID(), MSBaseVehicle::getID(), MSRoute::getLastEdge(), MSBaseVehicle::getRerouteOrigin(), MSBaseVehicle::getStopEdges(), MSBaseVehicle::getVClass(), MSBaseVehicle::myParameter, MSBaseVehicle::myRoute, MSBaseVehicle::replaceRouteEdges(), SUMOVehicleParameter::toTaz, and SUMOVehicleParameter::via.
Referenced by TraCIServerAPI_Vehicle::processSet().
|
virtual |
Saves the states of a vehicle.
Reimplemented from MSBaseVehicle.
Definition at line 330 of file MEVehicle.cpp.
References MSRoute::begin(), OutputDevice::closeTag(), MESegment::getEdge(), MESegment::getIndex(), getQueIndex(), myBlockTime, MSBaseVehicle::myCurrEdge, MSBaseVehicle::myDeparture, myEventTime, myLastEntryTime, MSBaseVehicle::myRoute, mySegment, MSBaseVehicle::saveState(), SUMO_ATTR_STATE, toString(), and OutputDevice::writeAttr().
|
inlinevirtualinherited |
Sets this vehicle's desired arrivalPos for its current route.
Implements SUMOVehicle.
Definition at line 264 of file MSBaseVehicle.h.
References MSBaseVehicle::myArrivalPos.
|
inline |
Sets the time at which the vehicle was blocked.
[in] | t | The blocking time |
Definition at line 245 of file MEVehicle.h.
References myBlockTime, and myLastEntryTime.
Referenced by MELoop::checkCar(), and MESegment::receive().
|
inlinevirtualinherited |
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
Implements SUMOVehicle.
Definition at line 355 of file MSBaseVehicle.h.
References MSBaseVehicle::myChosenSpeedFactor.
Referenced by TraCIServerAPI_Vehicle::processSet().
|
inline |
Sets the (planned) time at which the vehicle leaves his current cell.
[in] | t | The leaving time |
Definition at line 183 of file MEVehicle.h.
References MESegment::getEdge(), MSEdge::markDelayed(), myEventTime, myLastEntryTime, and mySegment.
Referenced by MELoop::checkCar(), METriggeredCalibrator::execute(), MESegment::receive(), MESegment::send(), MESegment::setSpeedForQueue(), and MELoop::teleportVehicle().
|
inline |
Sets the entry time for the current segment.
[in] | t | The entry time |
Definition at line 229 of file MEVehicle.h.
References myLastEntryTime.
Referenced by MESegment::receive().
|
inlinevirtual |
Sets the current segment the vehicle is at together with its que.
[in] | s | The current segment |
[in] | q | The current que |
Definition at line 204 of file MEVehicle.h.
References myQueIndex, and mySegment.
Referenced by MELoop::changeSegment(), METriggeredCalibrator::execute(), loadState(), MESegment::receive(), and MELoop::teleportVehicle().
|
virtualinherited |
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 132 of file MSBaseVehicle.cpp.
References MSRoute::begin(), MSBaseVehicle::myCurrEdge, and MSBaseVehicle::myRoute.
Referenced by MSVehicleTransfer::add(), MSLane::appropriate(), MSVehicleTransfer::checkInsertions(), MESegment::getLink(), MSBaseVehicle::hasArrived(), MSPedestrianPushButton::isActiveForEdge(), MELoop::nextSegment(), TraCIServerAPI_Vehicle::processSet(), and MESegment::receive().
void MEVehicle::updateDetectorForWriting | ( | MSMoveReminder * | rem, |
SUMOTime | currentTime, | ||
SUMOTime | exitTime | ||
) |
Updates a single vehicle detector if present.
Definition at line 278 of file MEVehicle.cpp.
References MESegment::getIndex(), getLastEntryTime(), MESegment::getLength(), MSBaseVehicle::myMoveReminders, mySegment, and MSMoveReminder::updateDetector().
void MEVehicle::updateDetectors | ( | SUMOTime | currentTime, |
const bool | isLeave, | ||
const MSMoveReminder::Notification | reason = MSMoveReminder::NOTIFICATION_JUNCTION |
||
) |
Updates all vehicle detectors.
Definition at line 296 of file MEVehicle.cpp.
References getEventTime(), MESegment::getIndex(), getLastEntryTime(), MESegment::getLength(), MSBaseVehicle::myMoveReminders, mySegment, and MSMoveReminder::NOTIFICATION_SEGMENT.
Referenced by MESegment::setSpeedForQueue(), and MESegment::updateDetectorsOnLeave().
|
protectedinherited |
The destination lane where the vehicle stops.
Definition at line 433 of file MSBaseVehicle.h.
Referenced by MSBaseVehicle::calculateArrivalParams(), and MSVehicle::updateBestLanes().
|
protectedinherited |
The position on the destination lane where the vehicle stops.
Definition at line 430 of file MSBaseVehicle.h.
Referenced by MSBaseVehicle::calculateArrivalParams(), MSBaseVehicle::getArrivalPos(), hasArrived(), MSVehicle::hasArrived(), MSVehicle::planMoveInternal(), MSVehicle::resetRoutePosition(), MSBaseVehicle::setArrivalPos(), and MSVehicle::updateBestLanes().
|
protected |
The time at which the vehicle was blocked on its current segment.
Definition at line 338 of file MEVehicle.h.
Referenced by getBlockTime(), getWaitingTime(), loadState(), saveState(), and setBlockTime().
|
protectedinherited |
A precomputed factor by which the driver wants to be faster than the speed limit.
Definition at line 403 of file MSBaseVehicle.h.
Referenced by MSBaseVehicle::getChosenSpeedFactor(), and MSBaseVehicle::setChosenSpeedFactor().
|
protectedinherited |
Iterator to current route-edge.
Definition at line 400 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), MSVehicle::enterLaneAtMove(), MSVehicle::executeMove(), MSBaseVehicle::getCurrentRouteEdge(), MSVehicle::getDistanceToPosition(), MSBaseVehicle::getEdge(), MSBaseVehicle::getRerouteOrigin(), MSVehicle::getRerouteOrigin(), MSVehicle::getRoutePosition(), hasArrived(), MSVehicle::hasArrived(), MSBaseVehicle::hasValidRoute(), MSVehicle::leaveLane(), loadState(), MSVehicle::loadState(), moveRoutePointer(), MSVehicle::planMoveInternal(), MSVehicle::Influencer::postProcessVTD(), MSVehicle::processNextStop(), MSVehicle::replaceRoute(), replaceRoute(), MSBaseVehicle::replaceRouteEdges(), MSVehicle::resetRoutePosition(), saveState(), MSVehicle::saveState(), MSBaseVehicle::succEdge(), MSVehicle::updateBestLanes(), and MSVehicle::willPass().
|
protectedinherited |
The real depart position.
Definition at line 427 of file MSBaseVehicle.h.
Referenced by MSBaseVehicle::getDepartPos(), and MSBaseVehicle::onDepart().
|
protectedinherited |
The real departure time.
Definition at line 424 of file MSBaseVehicle.h.
Referenced by MSVehicle::enterLaneAtInsertion(), MSBaseVehicle::getDeparture(), MSBaseVehicle::hasDeparted(), loadState(), MSVehicle::loadState(), MSBaseVehicle::onDepart(), saveState(), and MSVehicle::saveState().
|
protectedinherited |
The devices this vehicle has.
Definition at line 421 of file MSBaseVehicle.h.
Referenced by MSVehicle::addContainer(), MSVehicle::addPerson(), MSBaseVehicle::getDevice(), MSBaseVehicle::getDevices(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIBaseVehicle::GUIBaseVehicle(), MSBaseVehicle::MSBaseVehicle(), and MSBaseVehicle::~MSBaseVehicle().
|
protected |
The (planned) time of leaving the segment (cell)
Definition at line 332 of file MEVehicle.h.
Referenced by getAverageSpeed(), getConservativeSpeed(), getEventTime(), getWaitingTime(), hasArrived(), loadState(), saveState(), and setEventTime().
|
protected |
The time the vehicle entered its current segment.
Definition at line 335 of file MEVehicle.h.
Referenced by getAverageSpeed(), getConservativeSpeed(), getLastEntryTime(), loadState(), saveState(), setBlockTime(), setEventTime(), and setLastEntryTime().
|
protectedinherited |
Currently relevant move reminders.
Definition at line 417 of file MSBaseVehicle.h.
Referenced by MSBaseVehicle::activateReminders(), MSVehicle::activateReminders(), MSVehicle::adaptLaneEntering2MoveReminder(), MSVehicle::addContainer(), MSVehicle::addPerson(), MSBaseVehicle::addReminder(), GUIBaseVehicle::GUIBaseVehicle(), MSVehicle::leaveLane(), MSBaseVehicle::MSBaseVehicle(), MSBaseVehicle::removeReminder(), updateDetectorForWriting(), updateDetectors(), and MSVehicle::workOnMoveReminders().
|
protectedinherited |
The number of reroutings.
Definition at line 436 of file MSBaseVehicle.h.
Referenced by MSBaseVehicle::getNumberReroutes(), MSVehicle::replaceRoute(), and replaceRoute().
|
protectedinherited |
This Vehicle's parameter.
Definition at line 391 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), MSBaseVehicle::addStops(), MSBaseVehicle::calculateArrivalParams(), MSVehicle::getContainerNumber(), MSBaseVehicle::getID(), MSBaseVehicle::getParameter(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), MSVehicle::getPersonNumber(), MSVehicle::planMoveInternal(), MSBaseVehicle::reroute(), MSBaseVehicle::saveState(), MSVehicle::updateBestLanes(), and MSBaseVehicle::~MSBaseVehicle().
|
protected |
Index of the que the vehicle is in (important for multiqueue extension)
Definition at line 329 of file MEVehicle.h.
Referenced by getQueIndex(), and setSegment().
|
protectedinherited |
This Vehicle's route.
Definition at line 394 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), MSBaseVehicle::addStops(), MSBaseVehicle::calculateArrivalParams(), GUIVehicle::drawRouteHelper(), MSVehicle::executeMove(), MSVehicle::getDistanceToPosition(), MSVehicle::getRerouteOrigin(), MSBaseVehicle::getRoute(), MSVehicle::getRoutePosition(), hasArrived(), MSVehicle::hasArrived(), MSBaseVehicle::hasValidRoute(), moveRoutePointer(), MSBaseVehicle::MSBaseVehicle(), MSVehicle::planMoveInternal(), MSVehicle::replaceRoute(), replaceRoute(), MSBaseVehicle::replaceRouteEdges(), MSBaseVehicle::reroute(), MSVehicle::resetRoutePosition(), saveState(), MSBaseVehicle::saveState(), MSVehicle::saveState(), MSBaseVehicle::succEdge(), MSVehicle::updateBestLanes(), MSVehicle::willPass(), and MSBaseVehicle::~MSBaseVehicle().
|
protected |
The segment the vehicle is at.
Definition at line 326 of file MEVehicle.h.
Referenced by getAverageSpeed(), getConservativeSpeed(), getCurrentTLSPenaltySeconds(), getPositionOnLane(), getSegment(), hasArrived(), isStopped(), mayProceed(), replaceRoute(), saveState(), setEventTime(), setSegment(), updateDetectorForWriting(), and updateDetectors().
where to stop
Definition at line 341 of file MEVehicle.h.
Referenced by addStop(), getStopEdges(), getStoptime(), and isStopped().
|
protectedinherited |
This Vehicle's type.
Definition at line 397 of file MSBaseVehicle.h.
Referenced by MSVehicle::addStop(), MSBaseVehicle::calculateArrivalParams(), MSVehicle::enterLaneAtInsertion(), MSVehicle::executeMove(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), MSVehicle::getBoundingBox(), MSVehicle::getBoundingPoly(), MSVehicle::getCarFollowModel(), MSVehicle::getCO2Emissions(), MSVehicle::getCOEmissions(), MSVehicle::getElectricityConsumption(), MSVehicle::getFuelConsumption(), MSVehicle::getHarmonoise_NoiseEmissions(), MSVehicle::getHCEmissions(), MSBaseVehicle::getMaxSpeed(), MSVehicle::getMaxSpeedOnLane(), MSVehicle::getNOxEmissions(), MSVehicle::getPMxEmissions(), MSVehicle::getPositionOnLane(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSBaseVehicle::getVClass(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::hasValidRoute(), MSVehicle::processNextStop(), MSVehicle::replaceVehicleType(), MSBaseVehicle::saveState(), MSVehicle::updateBestLanes(), and MSVehicle::~MSVehicle().
|
staticprotectedinherited |
Definition at line 441 of file MSBaseVehicle.h.
Referenced by MSVehicle::enterLaneAtInsertion(), and MSBaseVehicle::hasDeparted().