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

References MSPModel::BACKWARD, MSLane::getShape(), M_PI, myDir, myLane, myRelX, myWalkingAreaPath, PositionVector::rotationAtOffset(), MSPModel_Striping::WalkingAreaPath::shape, 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 1218 of file MSPModel_Striping.cpp.

References myRelX.

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

return the maximum position on the lane

Definition at line 864 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, getLength(), getMinGap(), myDir, myRelX, and SUMOReal.

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

SUMOReal MSPModel_Striping::PState::getMinGap ( ) const

return the minimum gap of the pedestrian

Definition at line 880 of file MSPModel_Striping.cpp.

References MSVehicleType::getMinGap(), MSTransportable::getVehicleType(), and myPerson.

Referenced by getMaxX(), getMinX(), and MSPModel_Striping::moveInDirectionOnLane().

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

return the minimum position on the lane

Definition at line 854 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, getLength(), getMinGap(), myDir, myRelX, and SUMOReal.

Referenced by distanceTo(), and 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 1266 of file MSPModel_Striping.cpp.

References MSLane::getEdge(), MSPModel_Striping::NextLaneInfo::lane, myNLI, 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 1260 of file MSPModel_Striping.cpp.

References mySpeed.

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

References myWaitingTime, and SUMOReal.

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

References distanceTo(), and gDebugFlag1.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

int MSPModel_Striping::PState::otherStripe ( const SUMOReal  relY) const
int MSPModel_Striping::PState::stripe ( const SUMOReal  relY) const

Definition at line 886 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(), and walk().

const MSLane* MSPModel_Striping::PState::myLane
NextLaneInfo MSPModel_Striping::PState::myNLI

information about the upcoming lane

Definition at line 263 of file MSPModel_Striping.h.

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

SUMOReal MSPModel_Striping::PState::mySpeed

the current walking speed

Definition at line 257 of file MSPModel_Striping.h.

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

SUMOTime MSPModel_Striping::PState::myWaitingTime

the consecutive time spent at speed 0

Definition at line 261 of file MSPModel_Striping.h.

Referenced by getWaitingTime(), and walk().

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

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