Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSPModel_Remote::PState Class Reference

Container for pedestrian state and individual position update function. More...

Inheritance diagram for MSPModel_Remote::PState:
[legend]
Collaboration diagram for MSPModel_Remote::PState:
[legend]

Public Member Functions

double getAngle (const MSStageMoving &stage, SUMOTime now) const override
 return the direction in which the transportable faces in degrees
 
int getDirection (const MSStageMoving &stage, SUMOTime now) const override
 return the walking direction (FORWARD, BACKWARD)
 
double getEdgePos (const MSStageMoving &stage, SUMOTime now) const override
 return the offset from the start of the current edge measured in its natural direction
 
virtual const MSLanegetLane () const
 whether the transportable is jammed
 
const MSEdgegetNextEdge (const MSStageMoving &stage) const override
 return the list of internal edges if the transportable is on an intersection
 
virtual double getPathLength () const
 return the total length of the current lane (in particular for on a walkingarea)
 
MSPersongetPerson ()
 
Position getPosition (const MSStageMoving &stage, SUMOTime now) const override
 return the network coordinate of the transportable
 
double getSpeed (const MSStageMoving &stage) const override
 return the current speed of the transportable
 
MSStageMovinggetStage ()
 
SUMOTime getWaitingTime (const MSStageMoving &stage, SUMOTime now) const override
 return the time the transportable spent standing
 
virtual bool isJammed () const
 whether the transportable is jammed
 
virtual void moveTo (MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t)
 try to move transportable to the given position
 
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 transportable to the given position
 
 PState (MSPerson *person, MSStageMoving *stage)
 
virtual void saveState (std::ostringstream &out)
 Saves the current state into the given stream.
 
void setPhi (double phi)
 
void setPosition (double x, double y)
 
 ~PState () override
 

Private Attributes

MSPersonmyPerson
 
double myPhi
 
Position myPosition
 
MSStageMovingmyStage
 

Detailed Description

Container for pedestrian state and individual position update function.

Definition at line 70 of file MSPModel_Remote.h.

Constructor & Destructor Documentation

◆ PState()

MSPModel_Remote::PState::PState ( MSPerson person,
MSStageMoving stage 
)

Definition at line 230 of file MSPModel_Remote.cpp.

◆ ~PState()

MSPModel_Remote::PState::~PState ( )
override

Definition at line 235 of file MSPModel_Remote.cpp.

Member Function Documentation

◆ getAngle()

double MSPModel_Remote::PState::getAngle ( const MSStageMoving stage,
SUMOTime  now 
) const
overridevirtual

return the direction in which the transportable faces in degrees

Implements MSTransportableStateAdapter.

Definition at line 252 of file MSPModel_Remote.cpp.

◆ getDirection()

int MSPModel_Remote::PState::getDirection ( const MSStageMoving stage,
SUMOTime  now 
) const
overridevirtual

return the walking direction (FORWARD, BACKWARD)

Implements MSTransportableStateAdapter.

Definition at line 243 of file MSPModel_Remote.cpp.

References MSPModel::UNDEFINED_DIRECTION.

◆ getEdgePos()

double MSPModel_Remote::PState::getEdgePos ( const MSStageMoving stage,
SUMOTime  now 
) const
overridevirtual

return the offset from the start of the current edge measured in its natural direction

Implements MSTransportableStateAdapter.

Definition at line 239 of file MSPModel_Remote.cpp.

◆ getLane()

virtual const MSLane * MSTransportableStateAdapter::getLane ( ) const
inlinevirtualinherited

whether the transportable is jammed

Reimplemented in MSPModel_Striping::PState.

Definition at line 207 of file MSPModel.h.

Referenced by MSStageMoving::getLane(), and MSPerson::MSPersonStage_Walking::loadState().

Here is the caller graph for this function:

◆ getNextEdge()

const MSEdge * MSPModel_Remote::PState::getNextEdge ( const MSStageMoving stage) const
overridevirtual

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

Implements MSTransportableStateAdapter.

Definition at line 267 of file MSPModel_Remote.cpp.

◆ getPathLength()

virtual double MSTransportableStateAdapter::getPathLength ( ) const
inlinevirtualinherited

return the total length of the current lane (in particular for on a walkingarea)

Reimplemented in MSPModel_Striping::PState.

Definition at line 212 of file MSPModel.h.

◆ getPerson()

MSPerson * MSPModel_Remote::PState::getPerson ( )

Definition at line 287 of file MSPModel_Remote.cpp.

◆ getPosition()

Position MSPModel_Remote::PState::getPosition ( const MSStageMoving stage,
SUMOTime  now 
) const
overridevirtual

return the network coordinate of the transportable

Implements MSTransportableStateAdapter.

Definition at line 247 of file MSPModel_Remote.cpp.

◆ getSpeed()

double MSPModel_Remote::PState::getSpeed ( const MSStageMoving stage) const
overridevirtual

return the current speed of the transportable

Implements MSTransportableStateAdapter.

Definition at line 262 of file MSPModel_Remote.cpp.

◆ getStage()

MSStageMoving * MSPModel_Remote::PState::getStage ( )

Definition at line 282 of file MSPModel_Remote.cpp.

◆ getWaitingTime()

SUMOTime MSPModel_Remote::PState::getWaitingTime ( const MSStageMoving stage,
SUMOTime  now 
) const
overridevirtual

return the time the transportable spent standing

Implements MSTransportableStateAdapter.

Definition at line 257 of file MSPModel_Remote.cpp.

◆ isJammed()

virtual bool MSTransportableStateAdapter::isJammed ( ) const
inlinevirtualinherited

whether the transportable is jammed

Reimplemented in MSPModel_Striping::PState.

Definition at line 202 of file MSPModel.h.

Referenced by MSPerson::isJammed().

Here is the caller graph for this function:

◆ moveTo()

virtual void MSTransportableStateAdapter::moveTo ( MSPerson p,
MSLane lane,
double  lanePos,
double  lanePosLat,
SUMOTime  t 
)
inlinevirtualinherited

try to move transportable to the given position

Reimplemented in MSPModel_Striping::PState.

Definition at line 176 of file MSPModel.h.

References TL, UNUSED_PARAMETER, and WRITE_WARNING.

Referenced by LIBSUMO_NAMESPACE::Person::moveTo().

Here is the caller graph for this function:

◆ moveToXY()

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

try to move transportable to the given position

Reimplemented in MSPModel_Striping::PState.

Definition at line 186 of file MSPModel.h.

References TL, UNUSED_PARAMETER, and WRITE_WARNING.

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

Here is the caller graph for this function:

◆ saveState()

virtual void MSTransportableStateAdapter::saveState ( std::ostringstream &  out)
inlinevirtualinherited

Saves the current state into the given stream.

Reimplemented in MSPModel_NonInteracting::PState, and MSPModel_Striping::PState.

Definition at line 218 of file MSPModel.h.

References UNUSED_PARAMETER.

◆ setPhi()

void MSPModel_Remote::PState::setPhi ( double  phi)

Definition at line 277 of file MSPModel_Remote.cpp.

◆ setPosition()

void MSPModel_Remote::PState::setPosition ( double  x,
double  y 
)

Definition at line 272 of file MSPModel_Remote.cpp.

Field Documentation

◆ myPerson

MSPerson* MSPModel_Remote::PState::myPerson
private

Definition at line 90 of file MSPModel_Remote.h.

◆ myPhi

double MSPModel_Remote::PState::myPhi
private

Definition at line 88 of file MSPModel_Remote.h.

◆ myPosition

Position MSPModel_Remote::PState::myPosition
private

Definition at line 87 of file MSPModel_Remote.h.

◆ myStage

MSStageMoving* MSPModel_Remote::PState::myStage
private

Definition at line 89 of file MSPModel_Remote.h.


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