SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSPModel Class Reference

The pedestrian following model. More...

#include <MSPModel.h>

Inheritance diagram for MSPModel:
MSPModel_NonInteracting MSPModel_Striping

Public Member Functions

virtual PedestrianStateadd (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)=0
 register the given person as a pedestrian
virtual bool blockedAtDist (const MSLane *lane, SUMOReal distToCrossing, std::vector< const MSPerson * > *collectBlockers)=0
 whether a pedestrian is blocking the crossing of lane at offset distToCrossing
virtual void cleanupHelper ()
virtual ~MSPModel ()

Static Public Member Functions

static bool canTraverse (int dir, const std::vector< const MSEdge * > &route)
 return whether the route may traversed with the given starting direction
static void cleanup ()
 remove state at simulation end
static MSPModelgetModel ()
static MSLanegetSidewalk (const MSEdge *edge)
 return the appropriate lane to walk on

Static Public Attributes

static const int BACKWARD
static const int FORWARD
static const SUMOReal SAFETY_GAP
static const SUMOReal SIDEWALK_OFFSET
 the offset for computing person positions when walking on edges without a sidewalk
static const int UNDEFINED_DIRECTION

Static Private Attributes

static MSPModelmyModel

Detailed Description

The pedestrian following model.

Definition at line 54 of file MSPModel.h.

Constructor & Destructor Documentation

virtual MSPModel::~MSPModel ( )
inlinevirtual

Definition at line 65 of file MSPModel.h.

Member Function Documentation

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, and MSPModel_NonInteracting.

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

virtual bool MSPModel::blockedAtDist ( const MSLane lane,
SUMOReal  distToCrossing,
std::vector< const MSPerson * > *  collectBlockers 
)
pure virtual

whether a pedestrian is blocking the crossing of lane at offset distToCrossing

Implemented in MSPModel_Striping, and MSPModel_NonInteracting.

bool MSPModel::canTraverse ( int  dir,
const std::vector< const MSEdge * > &  route 
)
static

return whether the route may traversed with the given starting direction

Definition at line 109 of file MSPModel.cpp.

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

Referenced by MSPModel_Striping::PState::PState().

void MSPModel::cleanup ( )
static

remove state at simulation end

Definition at line 83 of file MSPModel.cpp.

References cleanupHelper(), and myModel.

Referenced by MSNet::clearAll().

virtual void MSPModel::cleanupHelper ( )
inlinevirtual

Reimplemented in MSPModel_Striping.

Definition at line 73 of file MSPModel.h.

Referenced by cleanup().

MSPModel * MSPModel::getModel ( )
static
MSLane * MSPModel::getSidewalk ( const MSEdge edge)
static

Field Documentation

MSPModel * MSPModel::myModel
staticprivate

Definition at line 90 of file MSPModel.h.

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

const SUMOReal MSPModel::SAFETY_GAP
static

Definition at line 81 of file MSPModel.h.

Referenced by MSPModel_Striping::blockedAtDist().

const SUMOReal MSPModel::SIDEWALK_OFFSET
static

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

Definition at line 84 of file MSPModel.h.

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


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