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:
PedestrianState

Public Member Functions

SUMOReal distToLaneEnd () const
 the absolute distance to the end of the lane in walking direction (or to the arrivalPos) More...
 
SUMOReal getImpatience (SUMOTime now) const
 returns the impatience More...
 
SUMOReal getLength () const
 return the length of the pedestrian More...
 
SUMOReal getMingap () const
 return the speed-dependent minGap of the pedestrian 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 (SUMOReal relY) const
 
 PState (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
 
int stripe () const
 
int stripe (SUMOReal relY) const
 
void walk (const Obstacles &obs, SUMOTime currentTime)
 perform position update More...
 
 ~PState ()
 
SUMOReal 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...
 
SUMOReal 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...
 
SUMOReal getSpeed (const MSPerson::MSPersonStage_Walking &stage) const
 return the current speed of the person More...
 

Data Fields

bool myAmJammed
 whether the person is jammed 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
 
SUMOReal myRelX
 the advancement along the current lane More...
 
SUMOReal myRelY
 the orthogonal shift on the current lane More...
 
SUMOReal 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...
 

Detailed Description

Container for pedestrian state and individual position update function.

Definition at line 209 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

MSPModel_Striping::PState::~PState ( )
inline

Definition at line 223 of file MSPModel_Striping.h.

Member Function Documentation

SUMOReal MSPModel_Striping::PState::distToLaneEnd ( ) const

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

Definition at line 848 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, and SUMOReal.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

SUMOReal 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 1146 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, PositionVector::rotationDegreeAtOffset(), and SUMOReal.

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

abstract methods inherited from PedestrianState

Implements PedestrianState.

Definition at line 1125 of file MSPModel_Striping.cpp.

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

returns the impatience

Definition at line 1117 of file MSPModel_Striping.cpp.

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

Referenced by MSPModel_Striping::moveInDirectionOnLane().

SUMOReal MSPModel_Striping::PState::getLength ( ) const
SUMOReal MSPModel_Striping::PState::getMingap ( ) const

return the speed-dependent minGap of the pedestrian

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

return the current speed of the person

Implements PedestrianState.

Definition at line 1167 of file MSPModel_Striping.cpp.

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 1161 of file MSPModel_Striping.cpp.

bool MSPModel_Striping::PState::moveToNextLane ( SUMOTime  currentTime)
int MSPModel_Striping::PState::otherStripe ( ) const
int MSPModel_Striping::PState::otherStripe ( SUMOReal  relY) const
int MSPModel_Striping::PState::stripe ( ) const
int MSPModel_Striping::PState::stripe ( SUMOReal  relY) const

Field Documentation

bool MSPModel_Striping::PState::myAmJammed

whether the person is jammed

Definition at line 245 of file MSPModel_Striping.h.

const MSLane* MSPModel_Striping::PState::myLane

the current lane of this pedestrian

Definition at line 227 of file MSPModel_Striping.h.

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

NextLaneInfo MSPModel_Striping::PState::myNLI

information about the upcoming lane

Definition at line 241 of file MSPModel_Striping.h.

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

SUMOReal MSPModel_Striping::PState::myRelY

the orthogonal shift on the current lane

Definition at line 231 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::moveInDirection(), and PState().

SUMOReal MSPModel_Striping::PState::mySpeed

the current walking speed

Definition at line 235 of file MSPModel_Striping.h.

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

SUMOTime MSPModel_Striping::PState::myWaitingTime

the consecutive time spent at speed 0

Definition at line 239 of file MSPModel_Striping.h.

bool MSPModel_Striping::PState::myWaitingToEnter
WalkingAreaPath* MSPModel_Striping::PState::myWalkingAreaPath

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