Eclipse SUMO - Simulation of Urban MObility
MSPModel_NonInteracting::CState Class Reference
Inheritance diagram for MSPModel_NonInteracting::CState:
[legend]
Collaboration diagram for MSPModel_NonInteracting::CState:
[legend]

Public Member Functions

SUMOTime computeDuration (const MSEdge *prev, const MSStageMoving &stage, SUMOTime currentTime)
 compute tranship time on edge and update state members More...
 
 CState (MoveToNextEdge *cmd, std::istringstream *in=nullptr)
 
double getAngle (const MSStageMoving &stage, SUMOTime now) const
 return the direction in which the container heading to More...
 
MoveToNextEdgegetCommand () const
 
SUMOTime getEventTime () const
 
virtual const MSLanegetLane () const
 the current lane of the transportable More...
 
virtual double getPathLength () const
 return the total length of the current lane (in particular for on a walkingarea) More...
 
Position getPosition (const MSStageMoving &stage, SUMOTime now) const
 return the network coordinate of the container More...
 
virtual bool isFinished () const
 whether the transportable has finished walking More...
 
virtual bool isJammed () const
 whether the transportable is jammed More...
 
virtual void moveTo (MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t)
 try to move transportable to the given position More...
 
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 More...
 
void saveState (std::ostringstream &out)
 Saves the current state into the given stream. More...
 
double getEdgePos (const MSStageMoving &stage, SUMOTime now) const
 abstract methods inherited from PedestrianState More...
 
int getDirection (const MSStageMoving &stage, SUMOTime now) const
 return the walking direction (FORWARD, BACKWARD) More...
 
SUMOTime getWaitingTime (const MSStageMoving &stage, SUMOTime now) const
 return the time the transportable spent standing More...
 
double getSpeed (const MSStageMoving &stage) const
 return the current speed of the transportable More...
 
const MSEdgegetNextEdge (const MSStageMoving &stage) const
 return the list of internal edges if the transportable is on an intersection More...
 

Static Public Attributes

static const double LATERAL_OFFSET
 the offset for computing container positions when being transhiped More...
 

Protected Attributes

MoveToNextEdgemyCommand
 
double myCurrentBeginPos
 
SUMOTime myCurrentDuration
 
double myCurrentEndPos
 
SUMOTime myLastEntryTime
 

Private Attributes

Position myCurrentBeginPosition
 
Position myCurrentEndPosition
 

Detailed Description

Definition at line 145 of file MSPModel_NonInteracting.h.

Constructor & Destructor Documentation

◆ CState()

MSPModel_NonInteracting::CState::CState ( MoveToNextEdge cmd,
std::istringstream *  in = nullptr 
)

Definition at line 230 of file MSPModel_NonInteracting.cpp.

Member Function Documentation

◆ computeDuration()

SUMOTime MSPModel_NonInteracting::CState::computeDuration ( const MSEdge prev,
const MSStageMoving stage,
SUMOTime  currentTime 
)
virtual

◆ getAngle()

double MSPModel_NonInteracting::CState::getAngle ( const MSStageMoving stage,
SUMOTime  now 
) const
virtual

return the direction in which the container heading to

Reimplemented from MSPModel_NonInteracting::PState.

Definition at line 243 of file MSPModel_NonInteracting.cpp.

References MSStageMoving::getEdge(), MSStage::getEdgeAngle(), and M_PI.

◆ getCommand()

MoveToNextEdge* MSPModel_NonInteracting::PState::getCommand ( ) const
inlineinherited

◆ getDirection()

int MSPModel_NonInteracting::PState::getDirection ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

return the walking direction (FORWARD, BACKWARD)

Implements MSTransportableStateAdapter.

Definition at line 166 of file MSPModel_NonInteracting.cpp.

References MSPModel::BACKWARD, MSPModel::FORWARD, and MSPModel::UNDEFINED_DIRECTION.

◆ getEdgePos()

double MSPModel_NonInteracting::PState::getEdgePos ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

abstract methods inherited from PedestrianState

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

Implements MSTransportableStateAdapter.

Definition at line 160 of file MSPModel_NonInteracting.cpp.

◆ getEventTime()

SUMOTime MSPModel_NonInteracting::PState::getEventTime ( ) const
inlineinherited

Definition at line 128 of file MSPModel_NonInteracting.h.

References MSPModel_NonInteracting::PState::myCurrentDuration, and MSPModel_NonInteracting::PState::myLastEntryTime.

Referenced by MSPModel_NonInteracting::loadState().

Here is the caller graph for this function:

◆ getLane()

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

the current lane of the transportable

Reimplemented in MSPModel_Striping::PState.

Definition at line 218 of file MSPModel.h.

Referenced by MSStageMoving::getLane(), and MSStageWalking::loadState().

Here is the caller graph for this function:

◆ getNextEdge()

const MSEdge * MSPModel_NonInteracting::PState::getNextEdge ( const MSStageMoving stage) const
virtualinherited

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

Implements MSTransportableStateAdapter.

Definition at line 216 of file MSPModel_NonInteracting.cpp.

References MSStageMoving::getNextRouteEdge().

◆ 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 223 of file MSPModel.h.

Referenced by MSStageWalking::moveToNextEdge().

Here is the caller graph for this function:

◆ getPosition()

Position MSPModel_NonInteracting::CState::getPosition ( const MSStageMoving stage,
SUMOTime  now 
) const
virtual

return the network coordinate of the container

Reimplemented from MSPModel_NonInteracting::PState.

Definition at line 235 of file MSPModel_NonInteracting.cpp.

References Position::distanceTo2D(), MSStageMoving::getMaxSpeed(), MIN2(), PositionVector::positionAtOffset2D(), and STEPS2TIME.

◆ getSpeed()

double MSPModel_NonInteracting::PState::getSpeed ( const MSStageMoving stage) const
virtualinherited

return the current speed of the transportable

Implements MSTransportableStateAdapter.

Definition at line 210 of file MSPModel_NonInteracting.cpp.

References MSStageMoving::getMaxSpeed().

◆ getWaitingTime()

SUMOTime MSPModel_NonInteracting::PState::getWaitingTime ( const MSStageMoving stage,
SUMOTime  now 
) const
virtualinherited

return the time the transportable spent standing

Implements MSTransportableStateAdapter.

Definition at line 204 of file MSPModel_NonInteracting.cpp.

◆ isFinished()

virtual bool MSTransportableStateAdapter::isFinished ( ) const
inlinevirtualinherited

whether the transportable has finished walking

Reimplemented in MSPModel_JuPedSim::PState.

Definition at line 213 of file MSPModel.h.

Referenced by MSStageMoving::~MSStageMoving().

Here is the caller graph for this function:

◆ isJammed()

virtual bool MSTransportableStateAdapter::isJammed ( ) const
inlinevirtualinherited

whether the transportable is jammed

Reimplemented in MSPModel_Striping::PState.

Definition at line 208 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 182 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 192 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()

void MSPModel_NonInteracting::PState::saveState ( std::ostringstream &  out)
virtualinherited

Saves the current state into the given stream.

Reimplemented from MSTransportableStateAdapter.

Definition at line 222 of file MSPModel_NonInteracting.cpp.

Field Documentation

◆ LATERAL_OFFSET

const double MSPModel_NonInteracting::CState::LATERAL_OFFSET
static

the offset for computing container positions when being transhiped

Definition at line 150 of file MSPModel_NonInteracting.h.

◆ myCommand

MoveToNextEdge* MSPModel_NonInteracting::PState::myCommand
protectedinherited

◆ myCurrentBeginPos

double MSPModel_NonInteracting::PState::myCurrentBeginPos
protectedinherited

Definition at line 139 of file MSPModel_NonInteracting.h.

◆ myCurrentBeginPosition

Position MSPModel_NonInteracting::CState::myCurrentBeginPosition
private

Definition at line 160 of file MSPModel_NonInteracting.h.

◆ myCurrentDuration

SUMOTime MSPModel_NonInteracting::PState::myCurrentDuration
protectedinherited

◆ myCurrentEndPos

double MSPModel_NonInteracting::PState::myCurrentEndPos
protectedinherited

Definition at line 140 of file MSPModel_NonInteracting.h.

◆ myCurrentEndPosition

Position MSPModel_NonInteracting::CState::myCurrentEndPosition
private

Definition at line 161 of file MSPModel_NonInteracting.h.

◆ myLastEntryTime

SUMOTime MSPModel_NonInteracting::PState::myLastEntryTime
protectedinherited

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