SUMO - Simulation of Urban MObility
MSPModel_NonInteracting::PState Class Reference

abstract base class for managing callbacks to retrieve various state information from the model More...

Inheritance diagram for MSPModel_NonInteracting::PState:
Inheritance graph
Collaboration diagram for MSPModel_NonInteracting::PState:
Collaboration graph

Public Member Functions

SUMOTime computeWalkingTime (const MSEdge *prev, const MSPerson::MSPersonStage_Walking &stage, SUMOTime currentTime)
 compute walking time on edge and update state members More...
 
MoveToNextEdgegetCommand ()
 
virtual 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...
 
 PState (MoveToNextEdge *cmd)
 
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...
 

Private Attributes

MoveToNextEdgemyCommand
 
double myCurrentBeginPos
 
SUMOTime myCurrentDuration
 
double myCurrentEndPos
 
SUMOTime myLastEntryTime
 

Detailed Description

abstract base class for managing callbacks to retrieve various state information from the model

Definition at line 90 of file MSPModel_NonInteracting.h.

Constructor & Destructor Documentation

◆ PState()

MSPModel_NonInteracting::PState::PState ( MoveToNextEdge cmd)
inline

Definition at line 92 of file MSPModel_NonInteracting.h.

Member Function Documentation

◆ computeWalkingTime()

◆ getAngle()

double MSPModel_NonInteracting::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 166 of file MSPModel_NonInteracting.cpp.

References MSPerson::MSPersonStage_Walking::getEdge(), MSTransportable::Stage::getEdgeAngle(), and M_PI.

◆ getCommand()

MoveToNextEdge* MSPModel_NonInteracting::PState::getCommand ( )
inline

Definition at line 106 of file MSPModel_NonInteracting.h.

◆ getEdgePos()

double MSPModel_NonInteracting::PState::getEdgePos ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

abstract methods inherited from PedestrianState

Implements PedestrianState.

Definition at line 142 of file MSPModel_NonInteracting.cpp.

◆ getNextEdge()

const MSEdge * MSPModel_NonInteracting::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 189 of file MSPModel_NonInteracting.cpp.

References MSPerson::MSPersonStage_Walking::getNextRouteEdge().

◆ getPosition()

Position MSPModel_NonInteracting::PState::getPosition ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

◆ getSpeed()

double MSPModel_NonInteracting::PState::getSpeed ( const MSPerson::MSPersonStage_Walking stage) const
virtual

return the current speed of the person

Implements PedestrianState.

Definition at line 183 of file MSPModel_NonInteracting.cpp.

References MSPerson::MSPersonStage_Walking::getMaxSpeed().

◆ getWaitingTime()

SUMOTime MSPModel_NonInteracting::PState::getWaitingTime ( const MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
) const
virtual

return the time the person spent standing

Implements PedestrianState.

Definition at line 177 of file MSPModel_NonInteracting.cpp.

◆ moveToXY()

virtual void PedestrianState::moveToXY ( MSPerson p,
Position  pos,
MSLane lane,
double  lanePos,
double  lanePosLat,
double  angle,
int  routeOffset,
const ConstMSEdgeVector edges,
SUMOTime  t 
)
inlinevirtualinherited

try to move person to the given position

Reimplemented in MSPModel_Striping::PState.

Definition at line 151 of file MSPModel.h.

References UNUSED_PARAMETER, and WRITE_WARNING.

Referenced by MSPerson::Influencer::postProcessRemoteControl().

Field Documentation

◆ myCommand

MoveToNextEdge* MSPModel_NonInteracting::PState::myCommand
private

Definition at line 115 of file MSPModel_NonInteracting.h.

◆ myCurrentBeginPos

double MSPModel_NonInteracting::PState::myCurrentBeginPos
private

Definition at line 113 of file MSPModel_NonInteracting.h.

◆ myCurrentDuration

SUMOTime MSPModel_NonInteracting::PState::myCurrentDuration
private

Definition at line 112 of file MSPModel_NonInteracting.h.

◆ myCurrentEndPos

double MSPModel_NonInteracting::PState::myCurrentEndPos
private

Definition at line 114 of file MSPModel_NonInteracting.h.

◆ myLastEntryTime

SUMOTime MSPModel_NonInteracting::PState::myLastEntryTime
private

Definition at line 111 of file MSPModel_NonInteracting.h.


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