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

Container for pedestrian state and individual position update function. More...

#include <MSPModel_Striping.h>

Inheritance diagram for MSPModel_Striping::PState:
Collaboration diagram for MSPModel_Striping::PState:

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...
 
virtual 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...
 
virtual 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...
 
virtual double getMinX (const bool includeMinGap=true) const
 return the minimum position on the lane More...
 
virtual double getWidth () const
 return the person width More...
 
bool ignoreRed (const MSLink *link) const
 whether the pedestrian may ignore a red light 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
 
 PState (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
 
int stripe () const
 
void walk (const Obstacles &obs, SUMOTime currentTime)
 perform position update More...
 
 ~PState ()
 
double getEdgePos (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 abstract methods inherited from PedestrianState More...
 
Position getPosition (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 return the network coordinate of the person More...
 
double getAngle (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 return the direction in which the person faces in degrees More...
 
SUMOTime getWaitingTime (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 return the time the person spent standing More...
 
double getSpeed (const MSPerson::MSPersonStage_Walking &stage) const
 return the current speed of the person More...
 
const MSEdgegetNextEdge (const MSPerson::MSPersonStage_Walking &stage) const
 return the list of internal edges if the pedestrian 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 person to the given position 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...
 
MSPerson::MSPersonStage_WalkingmyStage
 
SUMOTime myWaitingTime
 the consecutive time spent at speed 0 More...
 
bool myWaitingToEnter
 whether the pedestrian is waiting to start its walk More...
 
WalkingAreaPathmyWalkingAreaPath
 the current walkingAreaPath or 0 More...
 

Protected Member Functions

 PState ()
 constructor for PStateVehicle More...
 

Detailed Description

Container for pedestrian state and individual position update function.

Definition at line 264 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

◆ PState() [1/2]

◆ ~PState()

MSPModel_Striping::PState::~PState ( )
inline

Definition at line 284 of file MSPModel_Striping.h.

◆ PState() [2/2]

MSPModel_Striping::PState::PState ( )
protected

constructor for PStateVehicle

Definition at line 1346 of file MSPModel_Striping.cpp.

Member Function Documentation

◆ distanceTo()

◆ distToLaneEnd()

double MSPModel_Striping::PState::distToLaneEnd ( ) const

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

Definition at line 1433 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, and POSITION_EPS.

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

◆ getAngle()

double MSPModel_Striping::PState::getAngle ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

return the direction in which the person faces in degrees

Implements PedestrianState.

Definition at line 1819 of file MSPModel_Striping.cpp.

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

◆ getEdgePos()

double MSPModel_Striping::PState::getEdgePos ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

abstract methods inherited from PedestrianState

Implements PedestrianState.

Definition at line 1784 of file MSPModel_Striping.cpp.

◆ getID()

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

return the person id

Reimplemented in MSPModel_Striping::PStateVehicle.

Definition at line 1985 of file MSPModel_Striping.cpp.

Referenced by MSPModel_Striping::by_xpos_sorter::operator()().

◆ getImpatience()

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

returns the impatience

Definition at line 1777 of file MSPModel_Striping.cpp.

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

Referenced by MSPModel_Striping::moveInDirectionOnLane().

◆ getLength()

double MSPModel_Striping::PState::getLength ( ) const

return the length of the pedestrian

Definition at line 1384 of file MSPModel_Striping.cpp.

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

◆ getMaxX()

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

return the maximum position on the lane

Reimplemented in MSPModel_Striping::PStateVehicle.

Definition at line 1374 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

Referenced by MSPModel_Striping::getVehicleObstacles().

◆ getMinGap()

double MSPModel_Striping::PState::getMinGap ( ) const

return the minimum gap of the pedestrian

Definition at line 1390 of file MSPModel_Striping.cpp.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

◆ getMinX()

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

return the minimum position on the lane

Reimplemented in MSPModel_Striping::PStateVehicle.

Definition at line 1364 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

Referenced by MSPModel_Striping::getVehicleObstacles().

◆ getNextEdge()

const MSEdge * MSPModel_Striping::PState::getNextEdge ( const MSPerson::MSPersonStage_Walking stage) const
virtual

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

Implements PedestrianState.

Definition at line 1850 of file MSPModel_Striping.cpp.

◆ getPosition()

Position MSPModel_Striping::PState::getPosition ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

◆ getSpeed()

double MSPModel_Striping::PState::getSpeed ( const MSPerson::MSPersonStage_Walking stage) const
virtual

return the current speed of the person

Implements PedestrianState.

Definition at line 1844 of file MSPModel_Striping.cpp.

◆ getWaitingTime()

SUMOTime MSPModel_Striping::PState::getWaitingTime ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

return the time the person spent standing

Implements PedestrianState.

Definition at line 1838 of file MSPModel_Striping.cpp.

◆ getWidth()

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

return the person width

Reimplemented in MSPModel_Striping::PStateVehicle.

Definition at line 1990 of file MSPModel_Striping.cpp.

◆ ignoreRed()

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

◆ mergeObstacles() [1/2]

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

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

Definition at line 1926 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().

◆ mergeObstacles() [2/2]

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

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

Definition at line 1948 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

◆ moveToNextLane()

◆ moveToXY()

void MSPModel_Striping::PState::moveToXY ( MSPerson p,
Position  pos,
MSLane lane,
double  lanePos,
double  lanePosLat,
double  angle,
int  routeOffset,
const ConstMSEdgeVector edges,
SUMOTime  t 
)
virtual

◆ otherStripe() [1/2]

◆ otherStripe() [2/2]

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

◆ stripe() [1/2]

◆ stripe() [2/2]

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

Definition at line 1396 of file MSPModel_Striping.cpp.

References MSPModel_Striping::stripeWidth.

◆ walk()

Field Documentation

◆ myAmJammed

bool MSPModel_Striping::PState::myAmJammed

whether the person is jammed

Definition at line 306 of file MSPModel_Striping.h.

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

◆ myAngle

double MSPModel_Striping::PState::myAngle
mutable

cached angle

Definition at line 310 of file MSPModel_Striping.h.

◆ myDir

◆ myLane

const MSLane* MSPModel_Striping::PState::myLane

◆ myNLI

NextLaneInfo MSPModel_Striping::PState::myNLI

information about the upcoming lane

Definition at line 302 of file MSPModel_Striping.h.

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

◆ myPerson

◆ myRelX

◆ myRelY

◆ myRemoteXYPos

Position MSPModel_Striping::PState::myRemoteXYPos

remote-controlled position

Definition at line 308 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

◆ mySpeed

double MSPModel_Striping::PState::mySpeed

the current walking speed

Definition at line 296 of file MSPModel_Striping.h.

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

◆ myStage

◆ myWaitingTime

SUMOTime MSPModel_Striping::PState::myWaitingTime

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

◆ myWalkingAreaPath

WalkingAreaPath* MSPModel_Striping::PState::myWalkingAreaPath

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