Eclipse SUMO - Simulation of Urban MObility
MSPModel_Remote Class Reference

#include <MSPModel_Remote.h>

Inheritance diagram for MSPModel_Remote:
Collaboration diagram for MSPModel_Remote:

Data Structures

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

Public Member Functions

PedestrianStateadd (MSPerson *person, MSPerson::MSPersonStage_Walking *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...
 
void cleanupHelper () override
 
SUMOTime execute (SUMOTime time)
 
virtual bool hasPedestrians (const MSLane *lane)
 whether the given lane has pedestrians on it 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 (PedestrianState *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 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 Member Functions

MSLanegetFirstPedestrianLane (const MSEdge *const &edge)
 
void handlePedestrianLane (MSLane *pLane, hybridsim::Scenario &scenario)
 
void handleShape (const PositionVector &shape, hybridsim::Scenario &scenario)
 
void handleWalkingArea (MSEdge *msEdge, hybridsim::Scenario &scenario)
 
void initialize ()
 
void makeStartOrEndTransition (Position position, Position scnd, double width, hybridsim::Scenario &scenario, hybridsim::Edge_Type type, int i)
 

Private Attributes

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

Static Private Attributes

static MSPModelmyModel
 

Detailed Description

Definition at line 26 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 118 of file MSPModel_Remote.cpp.

References myHybridsimStub.

Member Function Documentation

◆ add()

◆ 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 76 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 89 of file MSPModel.cpp.

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

Referenced by MSNet::clearAll().

◆ cleanupHelper()

void MSPModel_Remote::cleanupHelper ( )
overridevirtual

Reimplemented from MSPModel.

Definition at line 215 of file MSPModel_Remote.cpp.

References MSPModel::cleanupHelper().

◆ execute()

◆ getFirstPedestrianLane()

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

Definition at line 202 of file MSPModel_Remote.cpp.

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

Referenced by add().

◆ getModel()

◆ handlePedestrianLane()

void MSPModel_Remote::handlePedestrianLane ( MSLane pLane,
hybridsim::Scenario &  scenario 
)
private

◆ handleShape()

void MSPModel_Remote::handleShape ( const PositionVector shape,
hybridsim::Scenario &  scenario 
)
private

Definition at line 358 of file MSPModel_Remote.cpp.

References Boundary::add(), myBoundary, Position::x(), and Position::y().

Referenced by handlePedestrianLane(), and handleWalkingArea().

◆ handleWalkingArea()

void MSPModel_Remote::handleWalkingArea ( MSEdge msEdge,
hybridsim::Scenario &  scenario 
)
private

◆ hasPedestrians()

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

◆ initialize()

◆ makeStartOrEndTransition()

void MSPModel_Remote::makeStartOrEndTransition ( Position  position,
Position  scnd,
double  width,
hybridsim::Scenario &  scenario,
hybridsim::Edge_Type  type,
int  i 
)
private

Definition at line 337 of file MSPModel_Remote.cpp.

References Position::x(), and Position::y().

Referenced by handlePedestrianLane().

◆ 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 93 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_Remote::remove ( PedestrianState state)
overridevirtual

remove the specified person from the pedestrian simulation

Implements MSPModel.

Definition at line 211 of file MSPModel_Remote.cpp.

◆ usingInternalLanes()

bool MSPModel_Remote::usingInternalLanes ( )
virtual

whether movements on intersections are modelled

Implements MSPModel.

Definition at line 421 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 89 of file MSPModel_Remote.h.

Referenced by add(), and handlePedestrianLane().

◆ FORWARD

◆ myBoundary

Boundary MSPModel_Remote::myBoundary
private

Definition at line 80 of file MSPModel_Remote.h.

Referenced by handleShape(), and initialize().

◆ myHybridsimStub

std::unique_ptr<hybridsim::HybridSimulation::Stub> MSPModel_Remote::myHybridsimStub
private

Definition at line 79 of file MSPModel_Remote.h.

Referenced by add(), execute(), initialize(), MSPModel_Remote(), and ~MSPModel_Remote().

◆ myLastId

int MSPModel_Remote::myLastId = 0
private

Definition at line 91 of file MSPModel_Remote.h.

Referenced by add().

◆ myLastTransitionId

int MSPModel_Remote::myLastTransitionId = 0
private

Definition at line 92 of file MSPModel_Remote.h.

Referenced by handlePedestrianLane().

◆ myModel

MSPModel * MSPModel::myModel
staticprivateinherited

◆ myNet

MSNet* MSPModel_Remote::myNet
private

Definition at line 78 of file MSPModel_Remote.h.

Referenced by initialize().

◆ remoteIdPStateMapping

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

Definition at line 88 of file MSPModel_Remote.h.

Referenced by add(), and execute().

◆ 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 90 of file MSPModel_Remote.h.

Referenced by execute(), and handlePedestrianLane().

◆ UNDEFINED_DIRECTION


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