Eclipse SUMO - Simulation of Urban MObility
MSPModel_Striping::PStateVehicle Class Reference

#include <MSPModel_Striping.h>

Inheritance diagram for MSPModel_Striping::PStateVehicle:
Collaboration diagram for MSPModel_Striping::PStateVehicle:

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...
 
const std::string & getID () const
 return the person id 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...
 
double getWidth () const
 return the person width More...
 
bool ignoreRed (const MSLink *link) const
 whether the pedestrian may ignore a red light 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
 
 PStateVehicle (const MSVehicle *veh, const MSLane *walkingarea, double relX, double relY)
 
int stripe () const
 
void walk (const Obstacles &obs, SUMOTime currentTime)
 perform position update More...
 
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...
 
void moveToXY (MSPerson *p, Position pos, MSLane *lane, double lanePos, double lanePosLat, double angle, int routeOffset, const ConstMSEdgeVector &edges, SUMOTime t)
 try to move person to the given position More...
 

Static Public Member Functions

static void mergeObstacles (Obstacles &into, const Obstacles &obs2, int dir, int offset)
 replace obstacles in the first vector with obstacles from the second if they are closer in the given direction More...
 
static int stripe (const double relY)
 

Data Fields

bool myAmJammed
 whether the person is jammed More...
 
double myAngle
 cached angle 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...
 
Position myRemoteXYPos
 remote-controlled position 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...
 

Private Attributes

const MSVehiclemyVehicle
 

Detailed Description

Definition at line 371 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

◆ PStateVehicle()

MSPModel_Striping::PStateVehicle::PStateVehicle ( const MSVehicle veh,
const MSLane walkingarea,
double  relX,
double  relY 
)

Member Function Documentation

◆ distanceTo()

◆ distToLaneEnd()

◆ getAngle()

◆ getEdgePos()

double MSPModel_Striping::PState::getEdgePos ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtualinherited

abstract methods inherited from PedestrianState

Implements PedestrianState.

Definition at line 1785 of file MSPModel_Striping.cpp.

References MSPModel_Striping::PState::myRelX.

◆ getID()

const std::string & MSPModel_Striping::PStateVehicle::getID ( ) const
virtual

return the person id

Reimplemented from MSPModel_Striping::PState.

Definition at line 2003 of file MSPModel_Striping.cpp.

References MSBaseVehicle::getID(), and myVehicle.

◆ getImpatience()

◆ getLength()

double MSPModel_Striping::PState::getLength ( ) const
inherited

◆ getMaxX()

double MSPModel_Striping::PStateVehicle::getMaxX ( const bool  includeMinGap = true) const
virtual

return the maximum position on the lane

Reimplemented from MSPModel_Striping::PState.

Definition at line 2018 of file MSPModel_Striping.cpp.

References MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), MSPModel_Striping::PState::myRelX, myVehicle, and MSPModel::SAFETY_GAP.

◆ getMinGap()

double MSPModel_Striping::PState::getMinGap ( ) const
inherited

◆ getMinX()

double MSPModel_Striping::PStateVehicle::getMinX ( const bool  includeMinGap = true) const
virtual

return the minimum position on the lane

Reimplemented from MSPModel_Striping::PState.

Definition at line 2013 of file MSPModel_Striping.cpp.

References MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), MSPModel_Striping::PState::myRelX, myVehicle, and MSPModel::SAFETY_GAP.

◆ getNextEdge()

const MSEdge * MSPModel_Striping::PState::getNextEdge ( const MSPerson::MSPersonStage_Walking stage) const
virtualinherited

return the list of internal edges if the pedestrian is on an intersection

Implements PedestrianState.

Definition at line 1848 of file MSPModel_Striping.cpp.

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

◆ getPosition()

◆ getSpeed()

double MSPModel_Striping::PState::getSpeed ( const MSPerson::MSPersonStage_Walking stage) const
virtualinherited

return the current speed of the person

Implements PedestrianState.

Definition at line 1842 of file MSPModel_Striping.cpp.

References MSPModel_Striping::PState::mySpeed.

◆ getWaitingTime()

SUMOTime MSPModel_Striping::PState::getWaitingTime ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtualinherited

return the time the person spent standing

Implements PedestrianState.

Definition at line 1836 of file MSPModel_Striping.cpp.

References MSPModel_Striping::PState::myWaitingTime.

◆ getWidth()

double MSPModel_Striping::PStateVehicle::getWidth ( ) const
virtual

return the person width

Reimplemented from MSPModel_Striping::PState.

Definition at line 2008 of file MSPModel_Striping.cpp.

References MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), and myVehicle.

◆ ignoreRed()

◆ mergeObstacles() [1/2]

void MSPModel_Striping::PState::mergeObstacles ( Obstacles into,
const Obstacles obs2 
)
inherited

◆ mergeObstacles() [2/2]

void MSPModel_Striping::PState::mergeObstacles ( Obstacles into,
const Obstacles obs2,
int  dir,
int  offset 
)
staticinherited

replace obstacles in the first vector with obstacles from the second if they are closer in the given direction

Definition at line 1945 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

◆ moveToNextLane()

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

return whether this pedestrian has passed the end of the current lane and update myRelX if so

Definition at line 1445 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, DEBUGCOND, MSPModel_Striping::NextLaneInfo::dir, MSPModel_Striping::PState::distToLaneEnd(), EDGEFUNC_NORMAL, MSPModel::FORWARD, MSPModel_Striping::WalkingAreaPath::from, MSPerson::MSPersonStage_Walking::getArrivalPos(), MSLane::getEdge(), MSEdge::getFromJunction(), MSEdge::getFunction(), Named::getID(), MSTransportable::getID(), Named::getIDSecure(), MSLane::getLength(), MSPModel_Striping::getNextLane(), MSPerson::MSPersonStage_Walking::getNextRouteEdge(), OptionsCont::getOptions(), MSPerson::MSPersonStage_Walking::getRoute(), MSPerson::MSPersonStage_Walking::getRouteEdge(), MSPerson::MSPersonStage_Walking::getRouteStep(), MSPModel_Striping::getStripeOffset(), MSEdge::getToJunction(), MSEdge::isWalkingArea(), MSPModel_Striping::NextLaneInfo::lane, MSPModel_Striping::WalkingAreaPath::length, MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSPModel_Striping::PState::myDir, MSPModel_Striping::PState::myLane, MSPModel_Striping::PState::myNLI, MSPModel_Striping::PState::myPerson, MSPModel_Striping::PState::myRelX, MSPModel_Striping::PState::myRelY, MSPModel_Striping::PState::myStage, MSPModel_Striping::PState::myWalkingAreaPath, MSPModel_Striping::myWalkingAreaPaths, MSPModel_Striping::numStripes(), MSPModel_Striping::WalkingAreaPath::shape, SIMTIME, MSPModel_Striping::stripeWidth, MSPModel_Striping::WalkingAreaPath::to, MSPModel::UNDEFINED_DIRECTION, and UNUSED_PARAMETER.

Referenced by MSPModel_Striping::arriveAndAdvance().

◆ moveToXY()

◆ otherStripe() [1/2]

◆ otherStripe() [2/2]

int MSPModel_Striping::PState::otherStripe ( const double  relY) const
inherited

◆ stripe() [1/2]

◆ stripe() [2/2]

int MSPModel_Striping::PState::stripe ( const double  relY)
staticinherited

Definition at line 1397 of file MSPModel_Striping.cpp.

References MSPModel_Striping::stripeWidth.

◆ walk()

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

perform position update

Definition at line 1569 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, MSPModel_Striping::dawdling, MSPModel_Striping::DEBUG_PRINT(), DEBUGCOND, DELTA_T, DIST2SPEED, MSPModel_Striping::DIST_OVERLAP, MSPModel_Striping::PState::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::jamTimeCrossing, 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, MSPModel_Striping::PState::myAmJammed, MSPModel_Striping::PState::myAngle, MSPModel_Striping::PState::myDir, MSPModel_Striping::PState::myLane, MSPModel_Striping::PState::myPerson, MSPModel_Striping::PState::myRelX, MSPModel_Striping::PState::myRelY, MSPModel_Striping::PState::mySpeed, MSPModel_Striping::PState::myStage, MSPModel_Striping::PState::myWaitingTime, MSPModel_Striping::PState::myWaitingToEnter, NUMERICAL_EPS, MSPModel_Striping::numStripes(), MSPModel_Striping::OBSTACLE_END, MSPModel_Striping::OBSTACLE_PED, MSPModel_Striping::OBSTACLE_VEHICLE, MSPModel_Striping::OBSTRUCTED_PENALTY, MSPModel_Striping::OBSTRUCTION_THRESHOLD, MSPModel_Striping::ONCOMING_CONFLICT_PENALTY, MSPModel_Striping::PState::otherStripe(), RandHelper::rand(), MSTransportableControl::registerJammed(), MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR, MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS, SIMTIME, SPEED2DIST, MSPModel_Striping::PState::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
inherited

◆ myAngle

double MSPModel_Striping::PState::myAngle
mutableinherited

◆ myDir

◆ myLane

◆ myNLI

NextLaneInfo MSPModel_Striping::PState::myNLI
inherited

◆ myPerson

◆ myRelX

◆ myRelY

◆ myRemoteXYPos

Position MSPModel_Striping::PState::myRemoteXYPos
inherited

remote-controlled position

Definition at line 309 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::PState::moveToXY().

◆ mySpeed

double MSPModel_Striping::PState::mySpeed
inherited

◆ myStage

◆ myVehicle

const MSVehicle* MSPModel_Striping::PStateVehicle::myVehicle
private

Definition at line 379 of file MSPModel_Striping.h.

Referenced by getID(), getMaxX(), getMinX(), and getWidth().

◆ myWaitingTime

SUMOTime MSPModel_Striping::PState::myWaitingTime
inherited

the consecutive time spent at speed 0

Definition at line 301 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::blockedAtDist(), MSPModel_Striping::PState::getWaitingTime(), and MSPModel_Striping::PState::walk().

◆ myWaitingToEnter

bool MSPModel_Striping::PState::myWaitingToEnter
inherited

◆ myWalkingAreaPath


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