SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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:
Inheritance graph
Collaboration diagram for MSPModel_Striping::PState:
Collaboration graph

Public Member Functions

SUMOReal distanceTo (const Obstacle &obs, const bool includeMinGap=true) const
 
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 getMaxX (const bool includeMinGap=true) const
 return the maximum position on the lane More...
 
SUMOReal getMinGap () const
 return the minimum gap of the pedestrian More...
 
SUMOReal getMinX (const bool includeMinGap=true) const
 return the minimum position on the lane 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 SUMOReal relY) const
 
 PState (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
 
int stripe () const
 
int stripe (const 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...
 
const MSEdgegetNextEdge (const MSPerson::MSPersonStage_Walking &stage) const
 return the list of internal edges if the pedestrian is on an intersection 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 230 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

MSPModel_Striping::PState::~PState ( )
inline

Definition at line 245 of file MSPModel_Striping.h.

Member Function Documentation

SUMOReal MSPModel_Striping::PState::distanceTo ( const Obstacle obs,
const bool  includeMinGap = true 
) const
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 921 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, POSITION_EPS, and SUMOReal.

Referenced by MSPModel_Striping::moveInDirection(), and 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 1237 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, M_PI, PositionVector::rotationAtOffset(), 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 1216 of file MSPModel_Striping.cpp.

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

returns the impatience

Definition at line 1208 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

return the length of the pedestrian

Definition at line 872 of file MSPModel_Striping.cpp.

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

SUMOReal MSPModel_Striping::PState::getMaxX ( const bool  includeMinGap = true) const

return the maximum position on the lane

Definition at line 862 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

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

SUMOReal MSPModel_Striping::PState::getMinGap ( ) const

return the minimum gap of the pedestrian

Definition at line 878 of file MSPModel_Striping.cpp.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

SUMOReal MSPModel_Striping::PState::getMinX ( const bool  includeMinGap = true) const

return the minimum position on the lane

Definition at line 852 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

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

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

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

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

References gDebugFlag1.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

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

Definition at line 884 of file MSPModel_Striping.cpp.

References MSPModel_Striping::stripeWidth.

Field Documentation

bool MSPModel_Striping::PState::myAmJammed

whether the person is jammed

Definition at line 267 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

const MSLane* MSPModel_Striping::PState::myLane

the current lane of this pedestrian

Definition at line 249 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 263 of file MSPModel_Striping.h.

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

SUMOReal MSPModel_Striping::PState::myRelY
SUMOReal MSPModel_Striping::PState::mySpeed

the current walking speed

Definition at line 257 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 261 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: