![]() |
SUMO - Simulation of Urban MObility
|
Container that holds the vehicles driving state (position+speed). More...
#include <MSVehicle.h>
Public Member Functions | |
double | backPos () const |
back Position of this state More... | |
double | lastCoveredDist () const |
previous Speed of this state More... | |
bool | operator!= (const State &state) |
Operator !=. More... | |
State & | operator= (const State &state) |
Assignment operator. More... | |
double | pos () const |
Position of this state. More... | |
double | posLat () const |
Lateral Position of this state (m relative to the centerline of the lane). More... | |
double | speed () const |
Speed of this state. More... | |
State (double pos, double speed, double posLat, double backPos) | |
Constructor. More... | |
State (const State &state) | |
Copy constructor. More... | |
Private Attributes | |
double | myBackPos |
the stored back position More... | |
double | myLastCoveredDist |
double | myPos |
the stored position More... | |
double | myPosLat |
the stored lateral position More... | |
double | myPreviousSpeed |
the speed at the begin of the previous time step More... | |
double | mySpeed |
the stored speed (should be >=0 at any time) More... | |
Friends | |
class | MSLaneChanger |
class | MSLaneChangerSublane |
class | MSVehicle |
vehicle sets states directly More... | |
Container that holds the vehicles driving state (position+speed).
Definition at line 93 of file MSVehicle.h.
MSVehicle::State::State | ( | double | pos, |
double | speed, | ||
double | posLat, | ||
double | backPos | ||
) |
Constructor.
Definition at line 146 of file MSVehicle.cpp.
MSVehicle::State::State | ( | const State & | state | ) |
Copy constructor.
Definition at line 113 of file MSVehicle.cpp.
References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, and mySpeed.
|
inline |
|
inline |
previous Speed of this state
Definition at line 133 of file MSVehicle.h.
References myLastCoveredDist.
Referenced by MSVehicle::getLastStepDist().
bool MSVehicle::State::operator!= | ( | const State & | state | ) |
Operator !=.
Definition at line 136 of file MSVehicle.cpp.
References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, and mySpeed.
MSVehicle::State & MSVehicle::State::operator= | ( | const State & | state | ) |
Assignment operator.
Definition at line 124 of file MSVehicle.cpp.
References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, and mySpeed.
|
inline |
Position of this state.
Definition at line 113 of file MSVehicle.h.
References myPos.
Referenced by MSVehicle::congested(), GUIVehicle::drawAction_drawRailCarriages(), and MSVehicle::processNextStop().
|
inline |
Lateral Position of this state (m relative to the centerline of the lane).
Definition at line 123 of file MSVehicle.h.
References myPosLat.
Referenced by MSVehicle::congested().
|
inline |
Speed of this state.
Definition at line 118 of file MSVehicle.h.
References mySpeed.
Referenced by MSVehicle::congested(), MSVehicle::getCO2Emissions(), MSVehicle::getCOEmissions(), MSVehicle::getElectricityConsumption(), MSVehicle::getFuelConsumption(), MSVehicle::getHarmonoise_NoiseEmissions(), MSVehicle::getHCEmissions(), MSVehicle::getNOxEmissions(), MSVehicle::getPMxEmissions(), and MSVehicle::getVelocityVector().
|
friend |
Definition at line 96 of file MSVehicle.h.
|
friend |
Definition at line 97 of file MSVehicle.h.
|
friend |
vehicle sets states directly
Definition at line 95 of file MSVehicle.h.
|
private |
the stored back position
Definition at line 151 of file MSVehicle.h.
Referenced by backPos(), MSLaneChanger::changeOpposite(), MSVehicle::enterLaneAtInsertion(), MSVehicle::executeMove(), MSVehicle::getBackPositionOnLane(), operator!=(), operator=(), MSVehicle::setTentativeLaneAndPosition(), and State().
|
private |
the distance covered in the last timestep NOTE: In case of ballistic positional update, this is not necessarily given by myPos - SPEED2DIST(mySpeed + myPreviousSpeed)/2, because a stop may have occured within the last step.
Definition at line 160 of file MSVehicle.h.
Referenced by MSVehicle::executeMove(), lastCoveredDist(), operator!=(), operator=(), State(), and MSVehicle::updateState().
|
private |
the stored position
Definition at line 140 of file MSVehicle.h.
Referenced by MSVehicle::adaptToLeaders(), MSVehicle::addStop(), MSLaneChanger::changeOpposite(), MSVehicle::computeAngle(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSVehicle::enterLaneAtMove(), MSVehicle::executeMove(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), MSVehicle::getPosition(), MSVehicle::getPositionOnLane(), MSVehicle::getRerouteOrigin(), MSVehicle::hasArrived(), MSVehicle::leaveLane(), MSVehicle::loadState(), operator!=(), operator=(), MSVehicle::overlap(), MSVehicle::planMoveInternal(), pos(), MSVehicle::processNextStop(), MSVehicle::saveState(), MSVehicle::setTentativeLaneAndPosition(), State(), MSVehicle::updateFurtherLanes(), and MSVehicle::updateState().
|
private |
the stored lateral position
Definition at line 146 of file MSVehicle.h.
Referenced by MSVehicle::computeAngle(), MSLaneChanger::continueChange(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSVehicle::fixPosition(), MSVehicle::getBackPosition(), MSVehicle::getCenterOnEdge(), MSVehicle::getLateralPositionOnLane(), MSVehicle::getLatOffset(), MSVehicle::getPosition(), MSVehicle::getRightSideOnLane(), MSVehicle::loadState(), operator!=(), operator=(), posLat(), MSVehicle::saveState(), MSVehicle::setTentativeLaneAndPosition(), MSLaneChangerSublane::startChangeSublane(), State(), and MSVehicle::updateFurtherLanes().
|
private |
the speed at the begin of the previous time step
Definition at line 154 of file MSVehicle.h.
Referenced by MSVehicle::getPreviousSpeed(), operator!=(), operator=(), State(), and MSVehicle::updateState().
|
private |
the stored speed (should be >=0 at any time)
Definition at line 143 of file MSVehicle.h.
Referenced by MSVehicle::addStop(), MSVehicle::checkRewindLinkLanes(), MSVehicle::congested(), MSVehicle::enterLaneAtInsertion(), MSVehicle::executeMove(), MSVehicle::getDeltaPos(), MSVehicle::getRerouteOrigin(), MSVehicle::getSpeed(), MSVehicle::getSpeedWithoutTraciInfluence(), MSVehicle::loadState(), operator!=(), operator=(), MSVehicle::planMoveInternal(), MSVehicle::processNextStop(), MSVehicle::saveState(), speed(), State(), and MSVehicle::updateState().