Eclipse SUMO - Simulation of Urban MObility
MSPModel Class Referenceabstract

The pedestrian following model. More...

#include <MSPModel.h>

Inheritance diagram for MSPModel:
Collaboration diagram for MSPModel:

Public Member Functions

virtual PedestrianStateadd (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)=0
 register the given person as a pedestrian More...
 
virtual bool blockedAtDist (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 cleanupHelper ()
 
virtual bool hasPedestrians (const MSLane *lane)
 whether the given lane has pedestrians on it More...
 
virtual PersonDist nextBlocking (const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0)
 returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0 More...
 
virtual void remove (PedestrianState *state)=0
 remove the specified person from the pedestrian simulation More...
 
virtual bool usingInternalLanes ()=0
 whether movements on intersections are modelled More...
 
virtual ~MSPModel ()
 

Static Public Member Functions

static int canTraverse (int dir, const ConstMSEdgeVector &route)
 
static void cleanup ()
 remove state at simulation end More...
 
static MSPModelgetModel ()
 

Static Public Attributes

static const int BACKWARD
 
static const int FORWARD
 
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 Private Attributes

static MSPModelmyModel
 

Detailed Description

The pedestrian following model.

Definition at line 50 of file MSPModel.h.

Constructor & Destructor Documentation

◆ ~MSPModel()

virtual MSPModel::~MSPModel ( )
inlinevirtual

Definition at line 58 of file MSPModel.h.

References add().

Member Function Documentation

◆ add()

virtual PedestrianState* MSPModel::add ( MSPerson person,
MSPerson::MSPersonStage_Walking stage,
SUMOTime  now 
)
pure virtual

register the given person as a pedestrian

Implemented in MSPModel_Striping, MSPModel_NonInteracting, and MSPModel_Remote.

Referenced by MSPerson::MSPersonStage_Walking::proceed(), and ~MSPModel().

◆ blockedAtDist()

virtual bool MSPModel::blockedAtDist ( 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]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 74 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLink::getLeaderInfo().

◆ canTraverse()

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

◆ cleanup()

void MSPModel::cleanup ( )
static

remove state at simulation end

Definition at line 82 of file MSPModel.cpp.

References cleanupHelper(), and myModel.

Referenced by MSNet::clearAll().

◆ cleanupHelper()

virtual void MSPModel::cleanupHelper ( )
inlinevirtual

Reimplemented in MSPModel_Striping, and MSPModel_Remote.

Definition at line 100 of file MSPModel.h.

Referenced by cleanup(), and MSPModel_Remote::cleanupHelper().

◆ getModel()

◆ hasPedestrians()

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

◆ nextBlocking()

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

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

Reimplemented in MSPModel_Striping.

Definition at line 91 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSLaneChanger::checkChange(), MSLane::checkForPedestrians(), MSLane::detectCollisions(), MSVehicle::planMoveInternal(), and MSLCM_SL2015::updateExpectedSublaneSpeeds().

◆ remove()

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

remove the specified person from the pedestrian simulation

Implemented in MSPModel_Striping, MSPModel_NonInteracting, and MSPModel_Remote.

Referenced by MSPerson::MSPersonStage_Walking::abort().

◆ usingInternalLanes()

virtual bool MSPModel::usingInternalLanes ( )
pure virtual

whether movements on intersections are modelled

Implemented in MSPModel_Striping, MSPModel_NonInteracting, and MSPModel_Remote.

Referenced by MSPerson::MSPersonStage_Walking::walkDistance().

Field Documentation

◆ BACKWARD

◆ FORWARD

◆ myModel

MSPModel * MSPModel::myModel
staticprivate

Definition at line 122 of file MSPModel.h.

Referenced by cleanup(), MSPModel_Striping::MovePedestrians::execute(), and getModel().

◆ SAFETY_GAP

◆ SIDEWALK_OFFSET

const double MSPModel::SIDEWALK_OFFSET
static

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

Definition at line 111 of file MSPModel.h.

Referenced by MSPModel_NonInteracting::PState::getPosition(), and GUINet::initGUIStructures().

◆ UNDEFINED_DIRECTION


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