SUMO - Simulation of Urban MObility
MSPModel_NonInteracting Class Reference

The pedestrian following model. More...

#include <MSPModel_NonInteracting.h>

Inheritance diagram for MSPModel_NonInteracting:
Inheritance graph
Collaboration diagram for MSPModel_NonInteracting:
Collaboration graph

Data Structures

class  MoveToNextEdge
 
class  PState
 abstract base class for managing callbacks to retrieve various state information from the model More...
 

Public Member Functions

PedestrianStateadd (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)
 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...
 
 MSPModel_NonInteracting (const OptionsCont &oc, MSNet *net)
 Constructor (it should not be necessary to construct more than one instance) 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...
 
void remove (PedestrianState *state)
 remove the specified person from the pedestrian simulation More...
 
bool usingInternalLanes ()
 whether movements on intersections are modelled More...
 
 ~MSPModel_NonInteracting ()
 

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
 

Private Attributes

MSNetmyNet
 the net to which to issue moveToNextEdge commands More...
 

Detailed Description

The pedestrian following model.

Definition at line 49 of file MSPModel_NonInteracting.h.

Constructor & Destructor Documentation

◆ MSPModel_NonInteracting()

MSPModel_NonInteracting::MSPModel_NonInteracting ( const OptionsCont oc,
MSNet net 
)

Constructor (it should not be necessary to construct more than one instance)

Definition at line 59 of file MSPModel_NonInteracting.cpp.

References myNet, and UNUSED_PARAMETER.

◆ ~MSPModel_NonInteracting()

MSPModel_NonInteracting::~MSPModel_NonInteracting ( )

Definition at line 66 of file MSPModel_NonInteracting.cpp.

Member Function Documentation

◆ add()

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

register the given person as a pedestrian

Implements MSPModel.

Definition at line 71 of file MSPModel_NonInteracting.cpp.

References MSEventControl::addEvent(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSNet::getBeginOfTimestepEvents(), and myNet.

◆ blockedAtDist()

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

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 
)
staticinherited

◆ cleanup()

void MSPModel::cleanup ( )
staticinherited

remove state at simulation end

Definition at line 82 of file MSPModel.cpp.

References MSPModel::cleanupHelper(), and MSPModel::myModel.

Referenced by MSNet::clearAll().

◆ cleanupHelper()

virtual void MSPModel::cleanupHelper ( )
inlinevirtualinherited

Reimplemented in MSPModel_Striping, and MSPModel_Remote.

Definition at line 100 of file MSPModel.h.

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

◆ getModel()

◆ hasPedestrians()

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

◆ nextBlocking()

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

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()

void MSPModel_NonInteracting::remove ( PedestrianState state)
virtual

remove the specified person from the pedestrian simulation

Implements MSPModel.

Definition at line 83 of file MSPModel_NonInteracting.cpp.

◆ usingInternalLanes()

bool MSPModel_NonInteracting::usingInternalLanes ( )
inlinevirtual

whether movements on intersections are modelled

Implements MSPModel.

Definition at line 64 of file MSPModel_NonInteracting.h.

Field Documentation

◆ BACKWARD

◆ FORWARD

◆ myNet

MSNet* MSPModel_NonInteracting::myNet
private

the net to which to issue moveToNextEdge commands

Definition at line 121 of file MSPModel_NonInteracting.h.

Referenced by add(), and MSPModel_NonInteracting().

◆ SAFETY_GAP

const double MSPModel::SAFETY_GAP
staticinherited

Definition at line 108 of file MSPModel.h.

Referenced by MSLink::getLeaderInfo(), and MSPModel_Striping::getVehicleObstacles().

◆ SIDEWALK_OFFSET

const double MSPModel::SIDEWALK_OFFSET
staticinherited

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: