Eclipse SUMO - Simulation of Urban MObility
MSPModel_Striping::PStateVehicle Class Reference

#include <MSPModel_Striping.h>

Inheritance diagram for MSPModel_Striping::PStateVehicle:
[legend]
Collaboration diagram for MSPModel_Striping::PStateVehicle:
[legend]

Public Member Functions

double distanceTo (const Obstacle &obs, const bool includeMinGap=true) const
 
double distToLaneEnd () const
 the absolute distance to the end of the lane in walking direction (or to the arrivalPos) More...
 
const std::string & getID () const
 return the person id More...
 
double getImpatience (SUMOTime now) const
 returns the impatience More...
 
double getLength () const
 return the length of the pedestrian More...
 
double getMaxX (const bool includeMinGap=true) const
 return the maximum position on the lane More...
 
double getMinGap () const
 return the minimum gap of the pedestrian More...
 
double getMinX (const bool includeMinGap=true) const
 return the minimum position on the lane More...
 
double getWidth () const
 return the person width More...
 
bool ignoreRed (const MSLink *link) const
 whether the pedestrian may ignore a red light More...
 
bool isRemoteControlled () const
 whether the person is currently being controlled via TraCI More...
 
void mergeObstacles (Obstacles &into, const Obstacles &obs2)
 replace obstacles in the first vector with obstacles from the second if they are closer to me More...
 
bool moveToNextLane (SUMOTime currentTime)
 return whether this pedestrian has passed the end of the current lane and update myRelX if so More...
 
int otherStripe () const
 
int otherStripe (const double relY) const
 
 PStateVehicle (const MSVehicle *veh, const MSLane *walkingarea, double relX, double relY)
 
virtual void saveState (std::ostringstream &out)
 Saves the current state into the given stream. More...
 
int stripe () const
 
void walk (const Obstacles &obs, SUMOTime currentTime)
 perform position update More...
 
double getEdgePos (const MSStageMoving &stage, SUMOTime now) const
 abstract methods inherited from PedestrianState More...
 
Position getPosition (const MSStageMoving &stage, SUMOTime now) const
 return the network coordinate of the transportable More...
 
double getAngle (const MSStageMoving &stage, SUMOTime now) const
 return the direction in which the transportable faces in degrees More...
 
SUMOTime getWaitingTime (const MSStageMoving &stage, SUMOTime now) const
 return the time the transportable spent standing More...
 
double getSpeed (const MSStageMoving &stage) const
 return the current speed of the transportable More...
 
const MSEdgegetNextEdge (const MSStageMoving &stage) const
 return the list of internal edges if the transportable is on an intersection More...
 
void moveToXY (MSPerson *p, Position pos, MSLane *lane, double lanePos, double lanePosLat, double angle, int routeOffset, const ConstMSEdgeVector &edges, SUMOTime t)
 try to move transportable to the given position More...
 
bool isJammed () const
 whether the transportable is jammed More...
 
const MSLanegetLane () const
 whether the transportable is jammed More...
 

Static Public Member Functions

static void mergeObstacles (Obstacles &into, const Obstacles &obs2, int dir, int offset)
 replace obstacles in the first vector with obstacles from the second if they are closer in the given direction More...
 
static int stripe (const double relY)
 

Data Fields

bool myAmJammed
 whether the person is jammed More...
 
double myAngle
 cached angle More...
 
int myDir
 the walking direction on the current lane (1 forward, -1 backward) More...
 
const MSLanemyLane
 the current lane of this pedestrian More...
 
NextLaneInfo myNLI
 information about the upcoming lane More...
 
MSPersonmyPerson
 
double myRelX
 the advancement along the current lane More...
 
double myRelY
 the orthogonal shift on the current lane More...
 
Position myRemoteXYPos
 remote-controlled position More...
 
double mySpeed
 the current walking speed More...
 
MSStageMovingmyStage
 
SUMOTime myWaitingTime
 the consecutive time spent at speed 0 More...
 
bool myWaitingToEnter
 whether the pedestrian is waiting to start its walk More...
 
const WalkingAreaPathmyWalkingAreaPath
 the current walkingAreaPath or 0 More...
 

Private Attributes

const MSVehiclemyVehicle
 

Detailed Description

Definition at line 373 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

◆ PStateVehicle()

MSPModel_Striping::PStateVehicle::PStateVehicle ( const MSVehicle veh,
const MSLane walkingarea,
double  relX,
double  relY 
)

Member Function Documentation

◆ distanceTo()

double MSPModel_Striping::PState::distanceTo ( const Obstacle obs,
const bool  includeMinGap = true 
) const
inherited

◆ distToLaneEnd()

double MSPModel_Striping::PState::distToLaneEnd ( ) const
inherited

the absolute distance to the end of the lane in walking direction (or to the arrivalPos)

Definition at line 1516 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

Referenced by MSPModel_Striping::arriveAndAdvance(), and MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ getAngle()

double MSPModel_Striping::PState::getAngle ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

return the direction in which the transportable faces in degrees

Implements MSTransportableStateAdapter.

Definition at line 1901 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, M_PI, and PositionVector::rotationAtOffset().

◆ getEdgePos()

double MSPModel_Striping::PState::getEdgePos ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

abstract methods inherited from PedestrianState

Implements MSTransportableStateAdapter.

Definition at line 1866 of file MSPModel_Striping.cpp.

◆ getID()

const std::string & MSPModel_Striping::PStateVehicle::getID ( ) const
virtual

return the person id

Reimplemented from MSPModel_Striping::PState.

Definition at line 2169 of file MSPModel_Striping.cpp.

◆ getImpatience()

double MSPModel_Striping::PState::getImpatience ( SUMOTime  now) const
inherited

returns the impatience

Definition at line 1859 of file MSPModel_Striping.cpp.

References MAX2(), MSPModel_Striping::MAX_WAIT_TOLERANCE, MIN2(), and STEPS2TIME.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ getLane()

const MSLane * MSPModel_Striping::PState::getLane ( ) const
virtualinherited

whether the transportable is jammed

Reimplemented from MSTransportableStateAdapter.

Definition at line 2058 of file MSPModel_Striping.cpp.

◆ getLength()

double MSPModel_Striping::PState::getLength ( ) const
inherited

return the length of the pedestrian

Definition at line 1467 of file MSPModel_Striping.cpp.

Referenced by MSPModel_Striping::blockedAtDist(), and MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ getMaxX()

double MSPModel_Striping::PStateVehicle::getMaxX ( const bool  includeMinGap = true) const
virtual

return the maximum position on the lane

Reimplemented from MSPModel_Striping::PState.

Definition at line 2184 of file MSPModel_Striping.cpp.

References MSPModel::SAFETY_GAP.

◆ getMinGap()

double MSPModel_Striping::PState::getMinGap ( ) const
inherited

return the minimum gap of the pedestrian

Definition at line 1473 of file MSPModel_Striping.cpp.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ getMinX()

double MSPModel_Striping::PStateVehicle::getMinX ( const bool  includeMinGap = true) const
virtual

return the minimum position on the lane

Reimplemented from MSPModel_Striping::PState.

Definition at line 2179 of file MSPModel_Striping.cpp.

References MSPModel::SAFETY_GAP.

◆ getNextEdge()

const MSEdge * MSPModel_Striping::PState::getNextEdge ( const MSStageMoving stage) const
virtualinherited

return the list of internal edges if the transportable is on an intersection

Implements MSTransportableStateAdapter.

Definition at line 1933 of file MSPModel_Striping.cpp.

◆ getPosition()

Position MSPModel_Striping::PState::getPosition ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

return the network coordinate of the transportable

Implements MSTransportableStateAdapter.

Definition at line 1872 of file MSPModel_Striping.cpp.

References MSStage::getLanePosition(), Position::INVALID, and MSPModel_Striping::stripeWidth.

Referenced by MSPModel_Striping::getNextLaneObstacles(), and MSPModel_Striping::moveInDirection().

Here is the caller graph for this function:

◆ getSpeed()

double MSPModel_Striping::PState::getSpeed ( const MSStageMoving stage) const
virtualinherited

return the current speed of the transportable

Implements MSTransportableStateAdapter.

Definition at line 1927 of file MSPModel_Striping.cpp.

◆ getWaitingTime()

SUMOTime MSPModel_Striping::PState::getWaitingTime ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

return the time the transportable spent standing

Implements MSTransportableStateAdapter.

Definition at line 1921 of file MSPModel_Striping.cpp.

◆ getWidth()

double MSPModel_Striping::PStateVehicle::getWidth ( ) const
virtual

return the person width

Reimplemented from MSPModel_Striping::PState.

Definition at line 2174 of file MSPModel_Striping.cpp.

◆ ignoreRed()

bool MSPModel_Striping::PState::ignoreRed ( const MSLink link) const
inherited

whether the pedestrian may ignore a red light

Definition at line 2124 of file MSPModel_Striping.cpp.

References DEBUGCOND, MSNet::getInstance(), MSLink::getLastStateChange(), MSLink::haveRed(), SIMTIME, STEPS2TIME, and SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ isJammed()

bool MSPModel_Striping::PState::isJammed ( ) const
virtualinherited

whether the transportable is jammed

Reimplemented from MSTransportableStateAdapter.

Definition at line 2053 of file MSPModel_Striping.cpp.

◆ isRemoteControlled()

bool MSPModel_Striping::PState::isRemoteControlled ( ) const
inherited

whether the person is currently being controlled via TraCI

Definition at line 2153 of file MSPModel_Striping.cpp.

Referenced by MSPModel_Striping::arriveAndAdvance().

Here is the caller graph for this function:

◆ mergeObstacles() [1/2]

void MSPModel_Striping::PState::mergeObstacles ( Obstacles into,
const Obstacles obs2 
)
inherited

replace obstacles in the first vector with obstacles from the second if they are closer to me

Definition at line 2083 of file MSPModel_Striping.cpp.

References gDebugFlag1, MSPModel_Striping::OBSTACLE_PED, and MSPModel_Striping::OBSTACLE_VEHICLE.

Referenced by MSPModel_Striping::getNextLaneObstacles(), and MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ mergeObstacles() [2/2]

void MSPModel_Striping::PState::mergeObstacles ( Obstacles into,
const Obstacles obs2,
int  dir,
int  offset 
)
staticinherited

replace obstacles in the first vector with obstacles from the second if they are closer in the given direction

Definition at line 2105 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

◆ moveToNextLane()

bool MSPModel_Striping::PState::moveToNextLane ( SUMOTime  currentTime)
inherited

return whether this pedestrian has passed the end of the current lane and update myRelX if so

Definition at line 1527 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, DEBUGCOND, MSPModel::FORWARD, MSEdge::getFromJunction(), Named::getID(), Named::getIDSecure(), MSPModel_Striping::getNextLane(), OptionsCont::getOptions(), MSPModel_Striping::getStripeOffset(), MSEdge::getToJunction(), MSPModel_Striping::getWalkingAreaPath(), NORMAL, MSPModel_Striping::numStripes(), SIMTIME, MSPModel_Striping::stripeWidth, MSPModel::UNDEFINED_DIRECTION, and UNUSED_PARAMETER.

Referenced by MSPModel_Striping::arriveAndAdvance().

Here is the caller graph for this function:

◆ moveToXY()

◆ otherStripe() [1/2]

int MSPModel_Striping::PState::otherStripe ( ) const
inherited

Definition at line 1510 of file MSPModel_Striping.cpp.

References MAX2(), MIN2(), and MSPModel_Striping::numStripes().

Referenced by MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLaneObstacles(), and MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ otherStripe() [2/2]

int MSPModel_Striping::PState::otherStripe ( const double  relY) const
inherited

◆ saveState()

virtual void MSTransportableStateAdapter::saveState ( std::ostringstream &  out)
inlinevirtualinherited

Saves the current state into the given stream.

Reimplemented in MSPModel_NonInteracting::PState.

Definition at line 180 of file MSPModel.h.

References UNUSED_PARAMETER.

◆ stripe() [1/2]

int MSPModel_Striping::PState::stripe ( ) const
inherited

Definition at line 1504 of file MSPModel_Striping.cpp.

References MAX2(), MIN2(), and MSPModel_Striping::numStripes().

Referenced by MSPModel_Striping::addCrossingVehs(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::getVehicleObstacles(), and MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

◆ stripe() [2/2]

int MSPModel_Striping::PState::stripe ( const double  relY)
staticinherited

Definition at line 1479 of file MSPModel_Striping.cpp.

References MSPModel_Striping::stripeWidth.

◆ walk()

void MSPModel_Striping::PState::walk ( const Obstacles obs,
SUMOTime  currentTime 
)
inherited

Field Documentation

◆ myAmJammed

bool MSPModel_Striping::PState::myAmJammed
inherited

◆ myAngle

double MSPModel_Striping::PState::myAngle
mutableinherited

cached angle

Definition at line 310 of file MSPModel_Striping.h.

◆ myDir

◆ myLane

const MSLane* MSPModel_Striping::PState::myLane
inherited

the current lane of this pedestrian

Definition at line 288 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::arriveAndAdvance(), MSPModel_Striping::moveInDirectionOnLane(), and PStateVehicle().

◆ myNLI

NextLaneInfo MSPModel_Striping::PState::myNLI
inherited

information about the upcoming lane

Definition at line 302 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::PState::PState().

◆ myPerson

◆ myRelX

◆ myRelY

◆ myRemoteXYPos

Position MSPModel_Striping::PState::myRemoteXYPos
inherited

remote-controlled position

Definition at line 308 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

◆ mySpeed

double MSPModel_Striping::PState::mySpeed
inherited

the current walking speed

Definition at line 296 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::moveInDirection(), and MSPModel_Striping::moveInDirectionOnLane().

◆ myStage

◆ myVehicle

const MSVehicle* MSPModel_Striping::PStateVehicle::myVehicle
private

Definition at line 381 of file MSPModel_Striping.h.

◆ myWaitingTime

SUMOTime MSPModel_Striping::PState::myWaitingTime
inherited

the consecutive time spent at speed 0

Definition at line 300 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::blockedAtDist().

◆ myWaitingToEnter

bool MSPModel_Striping::PState::myWaitingToEnter
inherited

◆ myWalkingAreaPath

const WalkingAreaPath* MSPModel_Striping::PState::myWalkingAreaPath
inherited

The documentation for this class was generated from the following files: