Eclipse SUMO - Simulation of Urban MObility
MSPModel_Remote Class Reference

The pedestrian following model connected to the external JuPedSim simulation. More...

#include <MSPModel_Remote.h>

Inheritance diagram for MSPModel_Remote:
[legend]
Collaboration diagram for MSPModel_Remote:
[legend]

Data Structures

class  Event
 
class  PState
 Container for pedestrian state and individual position update function. More...
 

Public Member Functions

MSTransportableStateAdapteradd (MSTransportable *person, MSStageMoving *stage, SUMOTime now) override
 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...
 
SUMOTime execute (SUMOTime time)
 
int getActiveNumber ()
 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...
 
 MSPModel_Remote (const OptionsCont &oc, MSNet *net)
 
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 (MSTransportableStateAdapter *state) override
 remove the specified person from the pedestrian simulation More...
 
bool usingInternalLanes ()
 whether movements on intersections are modelled More...
 
 ~MSPModel_Remote ()
 

Static Public Member Functions

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

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 Member Functions

MSLanegetFirstPedestrianLane (const MSEdge *const &edge)
 
void initialize ()
 

Private Attributes

std::map< const MSEdge *, std::tuple< int, int > > edgesTransitionsMapping
 
Boundary myBoundary
 
int myLastId = 0
 
int myLastTransitionId = 0
 
MSNetmyNet
 
std::map< int, PState * > remoteIdPStateMapping
 
std::map< int, const MSEdge * > transitionsEdgesMapping
 

Detailed Description

The pedestrian following model connected to the external JuPedSim simulation.

Definition at line 35 of file MSPModel_Remote.h.

Constructor & Destructor Documentation

◆ MSPModel_Remote()

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

◆ ~MSPModel_Remote()

MSPModel_Remote::~MSPModel_Remote ( )

Definition at line 114 of file MSPModel_Remote.cpp.

Member Function Documentation

◆ add()

MSTransportableStateAdapter * MSPModel_Remote::add ( MSTransportable transportable,
MSStageMoving stage,
SUMOTime  now 
)
overridevirtual

register the given person as a pedestrian

Implements MSPModel.

Definition at line 40 of file MSPModel_Remote.cpp.

References MSTransportable::getCurrentStageType(), myLastId, and remoteIdPStateMapping.

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

Definition at line 52 of file MSPModel.cpp.

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

Referenced by MSPModel_Striping::PState::PState(), and MSPerson::MSPersonStage_Walking::walkDistance().

Here is the caller graph for this function:

◆ execute()

SUMOTime MSPModel_Remote::execute ( SUMOTime  time)

Definition at line 129 of file MSPModel_Remote.cpp.

References DELTA_T.

Referenced by MSPModel_Remote::Event::execute().

Here is the caller graph for this function:

◆ getActiveNumber()

int MSPModel_Remote::getActiveNumber ( )
inlinevirtual

return the number of active objects

Implements MSPModel.

Definition at line 57 of file MSPModel_Remote.h.

References remoteIdPStateMapping.

◆ getFirstPedestrianLane()

MSLane * MSPModel_Remote::getFirstPedestrianLane ( const MSEdge *const &  edge)
private

Definition at line 203 of file MSPModel_Remote.cpp.

References Named::getID(), MSEdge::getLanes(), and SVC_PEDESTRIAN.

◆ hasPedestrians()

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

whether the given lane has pedestrians on it

Reimplemented in MSPModel_Striping.

Definition at line 89 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLane::hasPedestrians().

Here is the caller graph for this function:

◆ initialize()

void MSPModel_Remote::initialize ( )
private

Definition at line 221 of file MSPModel_Remote.cpp.

Referenced by MSPModel_Remote().

Here is the caller graph for this function:

◆ loadState()

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

load the state of the given transportable

Reimplemented in MSPModel_NonInteracting.

Definition at line 60 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSPerson::MSPersonStage_Walking::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 
)
inlinevirtualinherited

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

Reimplemented in MSPModel_Striping.

Definition at line 95 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLane::nextBlocking().

Here is the caller graph for this function:

◆ remove()

void MSPModel_Remote::remove ( MSTransportableStateAdapter state)
overridevirtual

remove the specified person from the pedestrian simulation

Implements MSPModel.

Definition at line 214 of file MSPModel_Remote.cpp.

◆ usingInternalLanes()

bool MSPModel_Remote::usingInternalLanes ( )
virtual

whether movements on intersections are modelled

Implements MSPModel.

Definition at line 290 of file MSPModel_Remote.cpp.

References MSNet::getInstance(), MSGlobals::gUsingInternalLanes, and MSNet::hasInternalLinks().

Field Documentation

◆ BACKWARD

◆ edgesTransitionsMapping

std::map<const MSEdge*, std::tuple<int, int> > MSPModel_Remote::edgesTransitionsMapping
private

Definition at line 94 of file MSPModel_Remote.h.

◆ FORWARD

◆ myBoundary

Boundary MSPModel_Remote::myBoundary
private

Definition at line 90 of file MSPModel_Remote.h.

◆ myLastId

int MSPModel_Remote::myLastId = 0
private

Definition at line 96 of file MSPModel_Remote.h.

Referenced by add().

◆ myLastTransitionId

int MSPModel_Remote::myLastTransitionId = 0
private

Definition at line 97 of file MSPModel_Remote.h.

◆ myNet

MSNet* MSPModel_Remote::myNet
private

Definition at line 89 of file MSPModel_Remote.h.

◆ remoteIdPStateMapping

std::map<int, PState*> MSPModel_Remote::remoteIdPStateMapping
private

Definition at line 93 of file MSPModel_Remote.h.

Referenced by add(), and getActiveNumber().

◆ SAFETY_GAP

◆ SIDEWALK_OFFSET

const double MSPModel::SIDEWALK_OFFSET
staticinherited

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

Definition at line 113 of file MSPModel.h.

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

◆ transitionsEdgesMapping

std::map<int, const MSEdge*> MSPModel_Remote::transitionsEdgesMapping
private

Definition at line 95 of file MSPModel_Remote.h.

◆ UNDEFINED_DIRECTION


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