Eclipse SUMO - Simulation of Urban MObility
MSPModel Class Referenceabstract

The pedestrian (and also sometimes container) movement model. More...

#include <MSPModel.h>

Inheritance diagram for MSPModel:
[legend]

Public Member Functions

virtual MSTransportableStateAdapteradd (MSTransportable *transportable, MSStageMoving *stage, SUMOTime now)=0
 register the given person as a pedestrian More...
 
virtual bool blockedAtDist (const SUMOTrafficObject *ego, const MSLane *lane, double vehSide, double vehWidth, double oncomingGap, std::vector< const MSPerson * > *collectBlockers)
 whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries More...
 
virtual void clearState ()=0
 Resets pedestrians when quick-loading state. More...
 
virtual int getActiveNumber ()=0
 return the number of active objects More...
 
virtual bool hasPedestrians (const MSLane *lane)
 whether the given lane has pedestrians on it More...
 
virtual MSTransportableStateAdapterloadState (MSTransportable *transportable, MSStageMoving *stage, std::istringstream &state)
 load the state of the given transportable More...
 
virtual PersonDist nextBlocking (const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0, bool bidi=false)
 returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0 More...
 
virtual void remove (MSTransportableStateAdapter *state)=0
 remove the specified person from the pedestrian simulation More...
 
virtual bool usingInternalLanes ()=0
 whether movements on intersections are modelled More...
 
virtual bool usingShortcuts ()
 whether travel times and distances can reliably be calculated from the network alone More...
 
virtual ~MSPModel ()
 

Static Public Member Functions

static int canTraverse (int dir, const ConstMSEdgeVector &route, int &passedEdges)
 

Static Public Attributes

static const int BACKWARD
 
static const int FORWARD
 
static const double RANDOM_POS_LAT
 magic value to encode randomized lateral offset for persons when starting a walk More...
 
static const double SAFETY_GAP
 
static const double SIDEWALK_OFFSET
 the offset for computing person positions when walking on edges without a sidewalk More...
 
static const int UNDEFINED_DIRECTION
 
static const double UNSPECIFIED_POS_LAT
 the default lateral offset for persons when starting a walk More...
 

Detailed Description

The pedestrian (and also sometimes container) movement model.

Definition at line 51 of file MSPModel.h.

Constructor & Destructor Documentation

◆ ~MSPModel()

virtual MSPModel::~MSPModel ( )
inlinevirtual

Definition at line 54 of file MSPModel.h.

Member Function Documentation

◆ add()

virtual MSTransportableStateAdapter* MSPModel::add ( MSTransportable transportable,
MSStageMoving stage,
SUMOTime  now 
)
pure virtual

register the given person as a pedestrian

Implemented in MSPModel_Striping, MSPModel_NonInteracting, and MSPModel_JuPedSim.

Referenced by MSStageWalking::proceed(), and MSStageTranship::proceed().

Here is the caller graph for this function:

◆ blockedAtDist()

virtual bool MSPModel::blockedAtDist ( const SUMOTrafficObject ego,
const MSLane lane,
double  vehSide,
double  vehWidth,
double  oncomingGap,
std::vector< const MSPerson * > *  collectBlockers 
)
inlinevirtual

whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries

Parameters
[in]egoThe object that inquires about blockage (and may electively ignore foes)
[in]laneThe crossing to check
[in]vehSideThe offset to the vehicle side near the start of the crossing
[in]vehWidthThe width of the vehicle
[in]oncomingGapThe distance which the vehicle wants to keep from oncoming pedestrians
[in]collectBlockersThe list of persons blocking the crossing
Returns
Whether the vehicle must wait

Reimplemented in MSPModel_Striping.

Definition at line 82 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLink::getLeaderInfo().

Here is the caller graph for this function:

◆ canTraverse()

int MSPModel::canTraverse ( int  dir,
const ConstMSEdgeVector route,
int &  passedEdges 
)
static

Definition at line 54 of file MSPModel.cpp.

References BACKWARD, FORWARD, MSEdge::getFromJunction(), MSEdge::getToJunction(), and UNDEFINED_DIRECTION.

Referenced by MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::PState(), and MSStageWalking::walkDistance().

Here is the caller graph for this function:

◆ clearState()

virtual void MSPModel::clearState ( )
pure virtual

Resets pedestrians when quick-loading state.

Implemented in MSPModel_JuPedSim, MSPModel_Striping, and MSPModel_NonInteracting.

Referenced by MSTransportableControl::clearState().

Here is the caller graph for this function:

◆ getActiveNumber()

virtual int MSPModel::getActiveNumber ( )
pure virtual

return the number of active objects

Implemented in MSPModel_JuPedSim, MSPModel_Striping, and MSPModel_NonInteracting.

Referenced by MSTransportableControl::getMovingNumber().

Here is the caller graph for this function:

◆ hasPedestrians()

virtual bool MSPModel::hasPedestrians ( const MSLane lane)
inlinevirtual

whether the given lane has pedestrians on it

Reimplemented in MSPModel_Striping.

Definition at line 94 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLane::hasPedestrians().

Here is the caller graph for this function:

◆ loadState()

virtual MSTransportableStateAdapter* MSPModel::loadState ( MSTransportable transportable,
MSStageMoving stage,
std::istringstream &  state 
)
inlinevirtual

load the state of the given transportable

Reimplemented in MSPModel_Striping, and MSPModel_NonInteracting.

Definition at line 60 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSStageWalking::loadState().

Here is the caller graph for this function:

◆ nextBlocking()

virtual PersonDist MSPModel::nextBlocking ( const MSLane lane,
double  minPos,
double  minRight,
double  maxLeft,
double  stopTime = 0,
bool  bidi = false 
)
inlinevirtual

returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0

Parameters
[in]lanethe lane to check
[in]minPosThe minimum offset along the lane after which to check
[in]minRightThe rightmost border of the vehicle (0 indicates driving on the right border)
[in]maxLeftThe leftmost border of the vehicle
[in]stopTimeThe time it would take the vehicle to come to a stop
[in]bidiWhether the vehicle is driving against the flow
Returns
The closest person and the distance to it

Reimplemented in MSPModel_Striping.

Definition at line 108 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLane::nextBlocking().

Here is the caller graph for this function:

◆ remove()

virtual void MSPModel::remove ( MSTransportableStateAdapter state)
pure virtual

remove the specified person from the pedestrian simulation

Implemented in MSPModel_JuPedSim, MSPModel_Striping, and MSPModel_NonInteracting.

Referenced by MSStageWalking::abort().

Here is the caller graph for this function:

◆ usingInternalLanes()

virtual bool MSPModel::usingInternalLanes ( )
pure virtual

whether movements on intersections are modelled

Implemented in MSPModel_JuPedSim, MSPModel_Striping, and MSPModel_NonInteracting.

Referenced by MSStageWalking::walkDistance().

Here is the caller graph for this function:

◆ usingShortcuts()

virtual bool MSPModel::usingShortcuts ( )
inlinevirtual

whether travel times and distances can reliably be calculated from the network alone

Reimplemented in MSPModel_JuPedSim.

Definition at line 145 of file MSPModel.h.

Field Documentation

◆ BACKWARD

◆ FORWARD

const int MSPModel::FORWARD
static

◆ RANDOM_POS_LAT

const double MSPModel::RANDOM_POS_LAT
static

magic value to encode randomized lateral offset for persons when starting a walk

Definition at line 133 of file MSPModel.h.

Referenced by MSPModel_JuPedSim::add(), MSRouteHandler::interpretDepartPosLat(), and MSPModel_Striping::PState::PState().

◆ SAFETY_GAP

const double MSPModel::SAFETY_GAP
static

◆ SIDEWALK_OFFSET

const double MSPModel::SIDEWALK_OFFSET
static

the offset for computing person positions when walking on edges without a sidewalk

Definition at line 127 of file MSPModel.h.

Referenced by MSPModel_NonInteracting::PState::getPosition(), GUINet::initGUIStructures(), LIBSUMO_NAMESPACE::Person::moveTo(), and MSPModel_Striping::PState::moveToXY().

◆ UNDEFINED_DIRECTION

◆ UNSPECIFIED_POS_LAT


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