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

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...
 
double getImpatience (SUMOTime now) const
 returns the impatience More...
 
double getLength () const
 return the length of the pedestrian More...
 
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...
 
double 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 double relY) const
 
 PState (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
 
int stripe () const
 
int stripe (const double relY) 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...
 

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
 
double myRelX
 the advancement along the current lane More...
 
double myRelY
 the orthogonal shift on the current lane 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...
 

Detailed Description

Container for pedestrian state and individual position update function.

Definition at line 241 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

◆ PState()

◆ ~PState()

MSPModel_Striping::PState::~PState ( )
inline

Definition at line 256 of file MSPModel_Striping.h.

Member Function Documentation

◆ distanceTo()

◆ distToLaneEnd()

double MSPModel_Striping::PState::distToLaneEnd ( ) const

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

References MSPModel::BACKWARD, MSLane::getShape(), M_PI, myDir, myLane, myRelX, myWalkingAreaPath, PositionVector::rotationAtOffset(), and MSPModel_Striping::WalkingAreaPath::shape.

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

References myRelX.

◆ getImpatience()

◆ getLength()

double MSPModel_Striping::PState::getLength ( ) const

◆ getMaxX()

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

return the maximum position on the lane

Definition at line 925 of file MSPModel_Striping.cpp.

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

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

◆ getMinGap()

double MSPModel_Striping::PState::getMinGap ( ) const

return the minimum gap of the pedestrian

Definition at line 941 of file MSPModel_Striping.cpp.

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

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

◆ getMinX()

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

return the minimum position on the lane

Definition at line 915 of file MSPModel_Striping.cpp.

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

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

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

References MSLane::getEdge(), MSPModel_Striping::NextLaneInfo::lane, and myNLI.

◆ getPosition()

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

References mySpeed.

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

References myWaitingTime.

◆ mergeObstacles()

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

References distanceTo(), and gDebugFlag1.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

◆ moveToNextLane()

◆ 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) const

Definition at line 947 of file MSPModel_Striping.cpp.

References MSPModel_Striping::stripeWidth.

◆ walk()

void MSPModel_Striping::PState::walk ( const Obstacles obs,
SUMOTime  currentTime 
)

perform position update

Definition at line 1103 of file MSPModel_Striping.cpp.

References abs, MSPModel::BACKWARD, MSPModel_Striping::dawdling, MSPModel_Striping::DEBUG_PRINT(), DEBUGCOND, DELTA_T, DIST2SPEED, MSPModel_Striping::DIST_OVERLAP, distanceTo(), MSPModel::FORWARD, MSPerson::MSPersonStage_Walking::getEdge(), MSLane::getEdge(), Named::getID(), MSTransportable::getID(), MSNet::getInstance(), MSPerson::MSPersonStage_Walking::getMaxSpeed(), MSNet::getPersonControl(), MSPerson::MSPersonStage_Walking::getWaitingTime(), MSPModel_Striping::INAPPROPRIATE_PENALTY, MSEdge::isCrossing(), MSEdge::isWalkingArea(), MSPModel_Striping::jamTime, MSPModel_Striping::LATERAL_PENALTY, MSPModel_Striping::LATERAL_SPEED_FACTOR, MSPModel_Striping::LOOKAHEAD_ONCOMING, MSPModel_Striping::LOOKAHEAD_SAMEDIR, MAX2(), MIN2(), MIN3(), MSPModel_Striping::MIN_STARTUP_DIST, myAmJammed, myDir, myLane, myPerson, myRelX, myRelY, mySpeed, myStage, myWaitingTime, myWaitingToEnter, NUMERICAL_EPS, MSPModel_Striping::numStripes(), MSPModel_Striping::OBSTRUCTED_PENALTY, MSPModel_Striping::OBSTRUCTION_THRESHOLD, MSPModel_Striping::ONCOMING_CONFLICT_PENALTY, otherStripe(), RandHelper::rand(), MSTransportableControl::registerJammed(), MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR, MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS, SIMTIME, SPEED2DIST, stripe(), MSPModel_Striping::stripeWidth, SUMO_const_haltingSpeed, time2string(), toString(), and WRITE_WARNING.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

Field Documentation

◆ myAmJammed

bool MSPModel_Striping::PState::myAmJammed

whether the person is jammed

Definition at line 278 of file MSPModel_Striping.h.

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

◆ myDir

◆ myLane

const MSLane* MSPModel_Striping::PState::myLane

◆ myNLI

NextLaneInfo MSPModel_Striping::PState::myNLI

information about the upcoming lane

Definition at line 274 of file MSPModel_Striping.h.

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

◆ myPerson

◆ myRelX

◆ myRelY

double MSPModel_Striping::PState::myRelY

◆ mySpeed

double MSPModel_Striping::PState::mySpeed

◆ myStage

◆ myWaitingTime

SUMOTime MSPModel_Striping::PState::myWaitingTime

the consecutive time spent at speed 0

Definition at line 272 of file MSPModel_Striping.h.

Referenced by getWaitingTime(), and walk().

◆ myWaitingToEnter

bool MSPModel_Striping::PState::myWaitingToEnter

◆ myWalkingAreaPath

WalkingAreaPath* MSPModel_Striping::PState::myWalkingAreaPath

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