SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
SUMOReal getImpatience (SUMOTime now) const
 returns the impatience
SUMOReal getLength () const
 return the length of the pedestrian
SUMOReal getMingap () const
 return the speed-dependent minGap of the pedestrian
bool moveToNextLane (SUMOTime currentTime)
 return whether this pedestrian has passed the end of the current lane and update myRelX if so
int otherStripe () const
 PState (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
int stripe () const
void walk (const Obstacles &obs, SUMOTime currentTime)
 perform position update
 ~PState ()
SUMOReal getEdgePos (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 abstract methods inherited from PedestrianState
Position getPosition (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 return the network coordinate of the person
SUMOReal getAngle (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 return the direction in which the person faces in degrees
SUMOTime getWaitingTime (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
 return the time the person spent standing
SUMOReal getSpeed (const MSPerson::MSPersonStage_Walking &stage) const
 return the current speed of the person

Data Fields

int myBlockedByOncoming
 whether the pedestrian is blocked by an oncoming pedestrian
int myDir
 the walking direction on the current lane (1 forward, -1 backward)
const MSLanemyLane
 the current lane of this pedestrian
NextLaneInfo myNLI
 information about the upcoming lane
MSPersonmyPerson
SUMOReal myRelX
 the advancement along the current lane
SUMOReal myRelY
 the orthogonal shift on the current lane
SUMOReal mySpeed
 the current walking speed
MSPerson::MSPersonStage_WalkingmyStage
SUMOTime myWaitingTime
 the consecutive time spent at speed 0
bool myWaitingToEnter
 whether the pedestrian is waiting to start its walk
WalkingAreaPathmyWalkingAreaPath
 the current walkingAreaPath or 0

Detailed Description

Container for pedestrian state and individual position update function.

Definition at line 184 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

MSPModel_Striping::PState::~PState ( )
inline

Definition at line 197 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 715 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, and SUMOReal.

Referenced by MSPModel_Striping::moveInDirection().

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

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

returns the impatience

Definition at line 957 of file MSPModel_Striping.cpp.

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

Referenced by MSPModel_Striping::moveInDirection().

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

return the network coordinate of the person

Implements PedestrianState.

Definition at line 971 of file MSPModel_Striping.cpp.

References MSPerson::MSPersonStage::getLanePosition(), Position::INVALID, MSPModel_Striping::stripeWidth, and SUMOReal.

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

return the current speed of the person

Implements PedestrianState.

Definition at line 1007 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 1001 of file MSPModel_Striping.cpp.

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

Field Documentation

int MSPModel_Striping::PState::myBlockedByOncoming

whether the pedestrian is blocked by an oncoming pedestrian

Definition at line 211 of file MSPModel_Striping.h.

const MSLane* MSPModel_Striping::PState::myLane

the current lane of this pedestrian

Definition at line 201 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::moveInDirection().

NextLaneInfo MSPModel_Striping::PState::myNLI

information about the upcoming lane

Definition at line 217 of file MSPModel_Striping.h.

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

SUMOReal MSPModel_Striping::PState::myRelY

the orthogonal shift on the current lane

Definition at line 205 of file MSPModel_Striping.h.

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

SUMOReal MSPModel_Striping::PState::mySpeed

the current walking speed

Definition at line 209 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::Obstacle::Obstacle().

MSPerson::MSPersonStage_Walking* MSPModel_Striping::PState::myStage
SUMOTime MSPModel_Striping::PState::myWaitingTime

the consecutive time spent at speed 0

Definition at line 215 of file MSPModel_Striping.h.

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

the current walkingAreaPath or 0

Definition at line 219 of file MSPModel_Striping.h.

Referenced by GUIPerson::drawGL(), and MSPModel_Striping::moveInDirection().


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