Eclipse SUMO - Simulation of Urban MObility
MSPModel_JuPedSim Class Reference

A pedestrian following model that acts as a proxy for pedestrian models provided by the JuPedSim third-party simulation framework. More...

#include <MSPModel_JuPedSim.h>

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

Data Structures

struct  AreaData
 Structure that keeps data related to vanishing areas (and other types of areas). More...
 
class  Event
 
class  PState
 Holds pedestrian state and performs updates. More...
 

Public Member Functions

MSTransportableStateAdapteradd (MSTransportable *person, MSStageMoving *stage, SUMOTime now) override
 register the given person as a pedestrian More...
 
virtual bool blockedAtDist (const SUMOTrafficObject *ego, 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 clearState () override
 Resets pedestrians when quick-loading state. More...
 
SUMOTime execute (SUMOTime time)
 
int getActiveNumber () override
 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_JuPedSim (const OptionsCont &oc, MSNet *net)
 
virtual PersonDist nextBlocking (const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0, bool bidi=false)
 returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0 More...
 
void registerArrived ()
 
void remove (MSTransportableStateAdapter *state) override
 remove the specified person from the pedestrian simulation More...
 
bool usingInternalLanes () override
 whether movements on intersections are modelled More...
 
bool usingShortcuts () override
 whether travel times and distances can reliably be calculated from the network alone More...
 
 ~MSPModel_JuPedSim ()
 

Static Public Member Functions

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

Static Public Attributes

static const int BACKWARD
 
static const int FORWARD
 
static const double RANDOM_POS_LAT
 magic value to encode randomized lateral offset for persons when starting a walk More...
 
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 const double UNSPECIFIED_POS_LAT
 the default lateral offset for persons when starting a walk More...
 

Private Member Functions

bool addWaypoint (JPS_JourneyDescription journey, JPS_StageId &predecessor, const Position &point, const std::string &agentID, const double radius)
 
GEOSGeometry * buildPedestrianNetwork (MSNet *network)
 
void initialize (const OptionsCont &oc)
 
void preparePolygonForDrawing (const GEOSGeometry *polygon, const std::string &polygonId, const RGBColor &color)
 
void removePolygonFromDrawing (const std::string &polygonId)
 
void tryPedestrianInsertion (PState *state, const Position &p)
 

Static Private Member Functions

static JPS_Geometry buildJPSGeometryFromGEOSGeometry (const GEOSGeometry *polygon)
 
static GEOSCoordSequence * convertToGEOSPoints (PositionVector shape)
 
static std::vector< JPS_Point > convertToJPSPoints (const GEOSGeometry *geometry)
 
static PositionVector convertToSUMOPoints (const GEOSGeometry *geometry)
 
static GEOSGeometry * createGeometryFromAnchors (const Position &anchor, const MSLane *const lane, const Position &otherAnchor, const MSLane *const otherLane)
 
static GEOSGeometry * createGeometryFromCenterLine (PositionVector centerLine, double width, int capStyle)
 
static GEOSGeometry * createGeometryFromShape (PositionVector shape, std::string junctionID=std::string(""), std::string shapeID=std::string(""), bool isInternalShape=false)
 
static void dumpGeometry (const GEOSGeometry *polygon, const std::string &filename, bool useGeoCoordinates=false)
 
static const MSEdgeVector getAdjacentEdgesOfEdge (const MSEdge *const edge)
 
static const PositiongetAnchor (const MSLane *const lane, const MSEdge *const edge, MSEdgeVector incoming)
 
static const GEOSGeometry * getLargestComponent (const GEOSGeometry *polygon, int &nbrComponents, double &maxArea, double &totalArea)
 
static double getLinearRingArea (const GEOSGeometry *linearRing)
 
static MSLanegetNextPedestrianLane (const MSLane *const currentLane)
 
static double getRadius (const MSVehicleType &vehType)
 
static const MSEdgegetWalkingAreaInbetween (const MSEdge *const edge, const MSEdge *const otherEdge)
 

Private Attributes

std::vector< SUMOTrafficObject::NumericalIDmyAllStoppedTrainIDs
 Array of stopped trains, used to detect whether to add carriages and ramps to the geometry. More...
 
std::vector< AreaDatamyAreas
 Array of special areas. More...
 
const double myExitTolerance
 Threshold to decide if a pedestrian has ended its journey or not. More...
 
GEOSGeometry * myGEOSPedestrianNetwork
 The GEOS polygon containing all computed connected components of the pedestrian network. More...
 
const GEOSGeometry * myGEOSPedestrianNetworkLargestComponent
 The GEOS polygon representing the largest (by area) connected component of the pedestrian network. More...
 
bool myHaveAdditionalWalkableAreas
 
const SUMOTime myJPSDeltaT
 Timestep used in the JuPedSim simulator. More...
 
JPS_Geometry myJPSGeometry
 The JPS polygon representing the largest connected component of the pedestrian network. More...
 
JPS_Geometry myJPSGeometryWithTrainsAndRamps
 The JPS polygon representing the largest connected component plus carriages and ramps. More...
 
JPS_OperationalModel myJPSModel
 
JPS_Simulation myJPSSimulation
 
MSNet *const myNetwork
 The network on which the simulation runs. More...
 
int myNumActivePedestrians = 0
 
std::vector< PState * > myPedestrianStates
 
ShapeContainermyShapeContainer
 The shape container used to add polygons to the rendering pipeline. More...
 

Static Private Attributes

static const double CARRIAGE_RAMP_LENGTH = 2.0
 
static const double GEOS_BUFFERED_SEGMENT_WIDTH = 0.5 * SUMO_const_laneWidth
 
static const double GEOS_MIN_AREA = 1
 
static const double GEOS_MITRE_LIMIT = 5.0
 
static const int GEOS_QUADRANT_SEGMENTS = 16
 
static const RGBColor PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_COLOR = RGBColor(255, 217, 179, 255)
 
static const std::string PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_ID = "jupedsim.pedestrian_network.carriages_and_ramps"
 
static const RGBColor PEDESTRIAN_NETWORK_COLOR = RGBColor(179, 217, 255, 255)
 
static const std::string PEDESTRIAN_NETWORK_ID = "jupedsim.pedestrian_network"
 

Detailed Description

A pedestrian following model that acts as a proxy for pedestrian models provided by the JuPedSim third-party simulation framework.

Definition at line 42 of file MSPModel_JuPedSim.h.

Constructor & Destructor Documentation

◆ MSPModel_JuPedSim()

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

◆ ~MSPModel_JuPedSim()

MSPModel_JuPedSim::~MSPModel_JuPedSim ( )

Member Function Documentation

◆ add()

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

register the given person as a pedestrian

Implements MSPModel.

Definition at line 155 of file MSPModel_JuPedSim.cpp.

References addWaypoint(), PositionVector::around(), SUMOVehicleParameter::departPosProcedure, NamedObjectCont< T >::get(), MSPModel_JuPedSim::PState::getAgentId(), MSStage::getArrivalPos(), PositionVector::getBoxBoundary(), MSTransportable::getCurrentStageIndex(), MSTransportable::getCurrentStageType(), MSStageMoving::getDepartPos(), MSStageMoving::getDepartPosLat(), MSStage::getDestination(), Parameterised::getDouble(), MSStage::getEdge(), MSTransportable::getEdge(), MSStageMoving::getEdges(), Named::getID(), MSTransportable::getNextStage(), OptionsCont::getOptions(), MSTransportable::getParameter(), Parameterised::getParameter(), ShapeContainer::getPolygons(), MSPModel_JuPedSim::PState::getPosition(), getRadius(), MSStageMoving::getRoute(), SUMOPolygon::getShape(), MSLane::getShape(), MSNet::getShapeContainer(), MSPModel_JuPedSim::PState::getStage(), MSTransportable::getVehicleType(), MSLane::getWidth(), Position::INVALID, MSEdge::isTazConnector(), MSPModel_JuPedSim::PState::isWaitingToEnter(), myExitTolerance, myJPSSimulation, myNetwork, myNumActivePedestrians, myPedestrianStates, PositionVector::positionAtOffset(), RandHelper::rand(), RANDOM_LOCATION, MSPModel::RANDOM_POS_LAT, MSPModel_JuPedSim::PState::reinit(), PositionVector::rotationAtOffset(), MSPModel_JuPedSim::PState::setAngle(), MSPModel_JuPedSim::PState::setLanePosition(), MSPModel_JuPedSim::PState::setPosition(), MSPModel_JuPedSim::PState::setPreviousPosition(), Position::setx(), Position::sety(), SIMSTEP, time2string(), TL, TLF, tryPedestrianInsertion(), MSPModel::UNSPECIFIED_POS_LAT, WALKING, WRITE_WARNINGF, Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().

◆ addWaypoint()

bool MSPModel_JuPedSim::addWaypoint ( JPS_JourneyDescription  journey,
JPS_StageId &  predecessor,
const Position point,
const std::string &  agentID,
const double  radius 
)
private

Definition at line 125 of file MSPModel_JuPedSim.cpp.

References myJPSSimulation, TL, WRITE_WARNINGF, Position::x(), and Position::y().

Referenced by add().

Here is the caller graph for this function:

◆ blockedAtDist()

virtual bool MSPModel::blockedAtDist ( const SUMOTrafficObject ego,
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]egoThe object that inquires about blockage (and may electively ignore foes)
[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 82 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLink::getLeaderInfo().

Here is the caller graph for this function:

◆ buildJPSGeometryFromGEOSGeometry()

JPS_Geometry MSPModel_JuPedSim::buildJPSGeometryFromGEOSGeometry ( const GEOSGeometry *  polygon)
staticprivate

Definition at line 888 of file MSPModel_JuPedSim.cpp.

References convertToJPSPoints(), GEOS_MIN_AREA, getLinearRingArea(), and TLF.

Referenced by execute(), and initialize().

Here is the caller graph for this function:

◆ buildPedestrianNetwork()

GEOSGeometry * MSPModel_JuPedSim::buildPedestrianNetwork ( MSNet network)
private

◆ canTraverse()

int MSPModel::canTraverse ( int  dir,
const ConstMSEdgeVector route,
int &  passedEdges 
)
staticinherited

Definition at line 54 of file MSPModel.cpp.

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

Referenced by MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::PState(), and MSStageWalking::walkDistance().

Here is the caller graph for this function:

◆ clearState()

void MSPModel_JuPedSim::clearState ( )
overridevirtual

Resets pedestrians when quick-loading state.

Implements MSPModel.

Definition at line 528 of file MSPModel_JuPedSim.cpp.

References myNumActivePedestrians, and myPedestrianStates.

Referenced by ~MSPModel_JuPedSim().

Here is the caller graph for this function:

◆ convertToGEOSPoints()

GEOSCoordSequence * MSPModel_JuPedSim::convertToGEOSPoints ( PositionVector  shape)
staticprivate

Definition at line 785 of file MSPModel_JuPedSim.cpp.

Referenced by createGeometryFromCenterLine(), createGeometryFromShape(), and dumpGeometry().

Here is the caller graph for this function:

◆ convertToJPSPoints()

std::vector< JPS_Point > MSPModel_JuPedSim::convertToJPSPoints ( const GEOSGeometry *  geometry)
staticprivate

Definition at line 812 of file MSPModel_JuPedSim.cpp.

Referenced by buildJPSGeometryFromGEOSGeometry().

Here is the caller graph for this function:

◆ convertToSUMOPoints()

PositionVector MSPModel_JuPedSim::convertToSUMOPoints ( const GEOSGeometry *  geometry)
staticprivate

Definition at line 795 of file MSPModel_JuPedSim.cpp.

Referenced by dumpGeometry(), and preparePolygonForDrawing().

Here is the caller graph for this function:

◆ createGeometryFromAnchors()

GEOSGeometry * MSPModel_JuPedSim::createGeometryFromAnchors ( const Position anchor,
const MSLane *const  lane,
const Position otherAnchor,
const MSLane *const  otherLane 
)
staticprivate

Definition at line 644 of file MSPModel_JuPedSim.cpp.

References createGeometryFromCenterLine(), GEOS_MITRE_LIMIT, GEOS_QUADRANT_SEGMENTS, MSLane::getWidth(), Position::x(), and Position::y().

Referenced by buildPedestrianNetwork().

Here is the caller graph for this function:

◆ createGeometryFromCenterLine()

GEOSGeometry * MSPModel_JuPedSim::createGeometryFromCenterLine ( PositionVector  centerLine,
double  width,
int  capStyle 
)
staticprivate

Definition at line 570 of file MSPModel_JuPedSim.cpp.

References convertToGEOSPoints(), GEOS_MITRE_LIMIT, and GEOS_QUADRANT_SEGMENTS.

Referenced by buildPedestrianNetwork(), and createGeometryFromAnchors().

Here is the caller graph for this function:

◆ createGeometryFromShape()

GEOSGeometry * MSPModel_JuPedSim::createGeometryFromShape ( PositionVector  shape,
std::string  junctionID = std::string(""),
std::string  shapeID = std::string(""),
bool  isInternalShape = false 
)
staticprivate

Definition at line 580 of file MSPModel_JuPedSim.cpp.

References convertToGEOSPoints(), GEOS_BUFFERED_SEGMENT_WIDTH, GEOS_MITRE_LIMIT, GEOS_QUADRANT_SEGMENTS, TL, toString(), and WRITE_WARNINGF.

Referenced by buildPedestrianNetwork(), and execute().

Here is the caller graph for this function:

◆ dumpGeometry()

void MSPModel_JuPedSim::dumpGeometry ( const GEOSGeometry *  polygon,
const std::string &  filename,
bool  useGeoCoordinates = false 
)
staticprivate

Definition at line 922 of file MSPModel_JuPedSim.cpp.

References GeoConvHelper::cartesian2geo(), convertToGEOSPoints(), convertToSUMOPoints(), and GeoConvHelper::getFinal().

Referenced by buildPedestrianNetwork(), and initialize().

Here is the caller graph for this function:

◆ execute()

SUMOTime MSPModel_JuPedSim::execute ( SUMOTime  time)

Definition at line 275 of file MSPModel_JuPedSim.cpp.

References MSStageWalking::activateEntryReminders(), MSPModel_JuPedSim::PState::advanceNextWaypoint(), buildJPSGeometryFromGEOSGeometry(), MSTrainHelper::CARRIAGE_DOOR_WIDTH, CARRIAGE_RAMP_LENGTH, MSTrainHelper::computeDoorPositions(), createGeometryFromShape(), DELTA_T, Position::distanceTo2D(), MSPModel_JuPedSim::PState::getAgentId(), MSTrainHelper::getCarriages(), MSTransportable::getCurrentStage(), MSLane::getEdge(), MSStageMoving::getEdge(), MSStageMoving::getEdges(), MSTrainHelper::getHalfWidth(), Named::getID(), getLargestComponent(), MSTransportable::getMaxSpeed(), MSPModel_JuPedSim::PState::getNextWaypoint(), MSTransportable::getNumRemainingStages(), MSPModel_JuPedSim::PState::getPerson(), MSPModel_JuPedSim::PState::getPosition(), MSStageMoving::getRoute(), MSStageMoving::getRouteStep(), MSLane::getSpeedLimit(), MSPModel_JuPedSim::PState::getStage(), MSNet::getStoppingPlaces(), MSTransportable::getVClass(), MSEdge::isNormal(), MSPModel_JuPedSim::PState::isWaitingToEnter(), Position::length2D(), MIN2(), MSStageWalking::moveToNextEdge(), MSStageMoving::moveToNextEdge(), libsumo::Helper::moveToXYMap_matchingRoutePosition(), myAllStoppedTrainIDs, myAreas, myGEOSPedestrianNetworkLargestComponent, myJPSDeltaT, myJPSGeometry, myJPSGeometryWithTrainsAndRamps, myJPSSimulation, myNetwork, myPedestrianStates, Position::norm2D(), PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_COLOR, PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_ID, PEDESTRIAN_NETWORK_COLOR, PEDESTRIAN_NETWORK_ID, preparePolygonForDrawing(), RandHelper::rand(), registerArrived(), removePolygonFromDrawing(), MSPModel_JuPedSim::PState::setAngle(), MSPModel_JuPedSim::PState::setLanePosition(), MSPModel_JuPedSim::PState::setPosition(), MSPModel_JuPedSim::PState::setPreviousPosition(), Position::setx(), Position::sety(), string2time(), SUMO_TAG_BUS_STOP, TL, StringUtils::toDouble(), tryPedestrianInsertion(), TS, UNUSED_PARAMETER, WRITE_ERRORF, WRITE_MESSAGEF, WRITE_WARNING, WRITE_WARNINGF, Position::x(), and Position::y().

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

Here is the caller graph for this function:

◆ getActiveNumber()

int MSPModel_JuPedSim::getActiveNumber ( )
overridevirtual

return the number of active objects

Implements MSPModel.

Definition at line 523 of file MSPModel_JuPedSim.cpp.

References myNumActivePedestrians.

◆ getAdjacentEdgesOfEdge()

const MSEdgeVector MSPModel_JuPedSim::getAdjacentEdgesOfEdge ( const MSEdge *const  edge)
staticprivate

Definition at line 545 of file MSPModel_JuPedSim.cpp.

References MSEdge::getPredecessors(), and MSEdge::getSuccessors().

Referenced by getWalkingAreaInbetween().

Here is the caller graph for this function:

◆ getAnchor()

const Position & MSPModel_JuPedSim::getAnchor ( const MSLane *const  lane,
const MSEdge *const  edge,
MSEdgeVector  incoming 
)
staticprivate

Definition at line 535 of file MSPModel_JuPedSim.cpp.

References MSLane::getShape().

Referenced by buildPedestrianNetwork().

Here is the caller graph for this function:

◆ getLargestComponent()

const GEOSGeometry * MSPModel_JuPedSim::getLargestComponent ( const GEOSGeometry *  polygon,
int &  nbrComponents,
double &  maxArea,
double &  totalArea 
)
staticprivate

Definition at line 868 of file MSPModel_JuPedSim.cpp.

Referenced by execute(), and initialize().

Here is the caller graph for this function:

◆ getLinearRingArea()

double MSPModel_JuPedSim::getLinearRingArea ( const GEOSGeometry *  linearRing)
staticprivate

Definition at line 830 of file MSPModel_JuPedSim.cpp.

Referenced by buildJPSGeometryFromGEOSGeometry(), and preparePolygonForDrawing().

Here is the caller graph for this function:

◆ getNextPedestrianLane()

MSLane * MSPModel_JuPedSim::getNextPedestrianLane ( const MSLane *const  currentLane)
staticprivate

◆ getRadius()

double MSPModel_JuPedSim::getRadius ( const MSVehicleType vehType)
staticprivate

Definition at line 961 of file MSPModel_JuPedSim.cpp.

References MSVehicleType::getLength(), MSVehicleType::getWidth(), and MAX2().

Referenced by add(), and tryPedestrianInsertion().

Here is the caller graph for this function:

◆ getWalkingAreaInbetween()

const MSEdge * MSPModel_JuPedSim::getWalkingAreaInbetween ( const MSEdge *const  edge,
const MSEdge *const  otherEdge 
)
staticprivate

Definition at line 555 of file MSPModel_JuPedSim.cpp.

References getAdjacentEdgesOfEdge().

Referenced by buildPedestrianNetwork().

Here is the caller graph for this function:

◆ hasPedestrians()

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

whether the given lane has pedestrians on it

Reimplemented in MSPModel_Striping.

Definition at line 94 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLane::hasPedestrians().

Here is the caller graph for this function:

◆ initialize()

◆ loadState()

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

load the state of the given transportable

Reimplemented in MSPModel_Striping, and MSPModel_NonInteracting.

Definition at line 60 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSStageWalking::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,
bool  bidi = false 
)
inlinevirtualinherited

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

Parameters
[in]lanethe lane to check
[in]minPosThe minimum offset along the lane after which to check
[in]minRightThe rightmost border of the vehicle (0 indicates driving on the right border)
[in]maxLeftThe leftmost border of the vehicle
[in]stopTimeThe time it would take the vehicle to come to a stop
[in]bidiWhether the vehicle is driving against the flow
Returns
The closest person and the distance to it

Reimplemented in MSPModel_Striping.

Definition at line 108 of file MSPModel.h.

References UNUSED_PARAMETER.

Referenced by MSLane::nextBlocking().

Here is the caller graph for this function:

◆ preparePolygonForDrawing()

void MSPModel_JuPedSim::preparePolygonForDrawing ( const GEOSGeometry *  polygon,
const std::string &  polygonId,
const RGBColor color 
)
private

Definition at line 846 of file MSPModel_JuPedSim.cpp.

References ShapeContainer::addPolygon(), convertToSUMOPoints(), GEOS_MIN_AREA, NamedObjectCont< T >::get(), getLinearRingArea(), ShapeContainer::getPolygons(), myShapeContainer, and SUMOPolygon::setHoles().

Referenced by execute(), and initialize().

Here is the caller graph for this function:

◆ registerArrived()

void MSPModel_JuPedSim::registerArrived ( )

Definition at line 518 of file MSPModel_JuPedSim.cpp.

References myNumActivePedestrians.

Referenced by execute().

Here is the caller graph for this function:

◆ remove()

void MSPModel_JuPedSim::remove ( MSTransportableStateAdapter state)
overridevirtual

remove the specified person from the pedestrian simulation

Implements MSPModel.

Definition at line 265 of file MSPModel_JuPedSim.cpp.

References MSPModel_JuPedSim::PState::getStage(), MSStageMoving::setPState(), and MSPModel_JuPedSim::PState::setStage().

◆ removePolygonFromDrawing()

void MSPModel_JuPedSim::removePolygonFromDrawing ( const std::string &  polygonId)
private

Definition at line 840 of file MSPModel_JuPedSim.cpp.

References myShapeContainer, and ShapeContainer::removePolygon().

Referenced by execute().

Here is the caller graph for this function:

◆ tryPedestrianInsertion()

void MSPModel_JuPedSim::tryPedestrianInsertion ( PState state,
const Position p 
)
private

Definition at line 91 of file MSPModel_JuPedSim.cpp.

References Named::getID(), MSPModel_JuPedSim::PState::getJourneyId(), MSTransportable::getMaxSpeed(), MSPModel_JuPedSim::PState::getPerson(), getRadius(), MSPModel_JuPedSim::PState::getStageId(), MSTransportable::getVehicleType(), myJPSSimulation, MSPModel_JuPedSim::PState::setAgentId(), TL, WRITE_WARNINGF, Position::x(), and Position::y().

Referenced by add(), and execute().

Here is the caller graph for this function:

◆ usingInternalLanes()

bool MSPModel_JuPedSim::usingInternalLanes ( )
overridevirtual

whether movements on intersections are modelled

Implements MSPModel.

Definition at line 513 of file MSPModel_JuPedSim.cpp.

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

◆ usingShortcuts()

bool MSPModel_JuPedSim::usingShortcuts ( )
inlineoverridevirtual

whether travel times and distances can reliably be calculated from the network alone

Reimplemented from MSPModel.

Definition at line 52 of file MSPModel_JuPedSim.h.

References myHaveAdditionalWalkableAreas.

Field Documentation

◆ BACKWARD

◆ CARRIAGE_RAMP_LENGTH

const double MSPModel_JuPedSim::CARRIAGE_RAMP_LENGTH = 2.0
staticprivate

Definition at line 202 of file MSPModel_JuPedSim.h.

Referenced by execute().

◆ FORWARD

const int MSPModel::FORWARD
staticinherited

◆ GEOS_BUFFERED_SEGMENT_WIDTH

const double MSPModel_JuPedSim::GEOS_BUFFERED_SEGMENT_WIDTH = 0.5 * SUMO_const_laneWidth
staticprivate

Definition at line 201 of file MSPModel_JuPedSim.h.

Referenced by createGeometryFromShape().

◆ GEOS_MIN_AREA

const double MSPModel_JuPedSim::GEOS_MIN_AREA = 1
staticprivate

◆ GEOS_MITRE_LIMIT

const double MSPModel_JuPedSim::GEOS_MITRE_LIMIT = 5.0
staticprivate

◆ GEOS_QUADRANT_SEGMENTS

const int MSPModel_JuPedSim::GEOS_QUADRANT_SEGMENTS = 16
staticprivate

◆ myAllStoppedTrainIDs

std::vector<SUMOTrafficObject::NumericalID> MSPModel_JuPedSim::myAllStoppedTrainIDs
private

Array of stopped trains, used to detect whether to add carriages and ramps to the geometry.

Definition at line 196 of file MSPModel_JuPedSim.h.

Referenced by execute().

◆ myAreas

std::vector<AreaData> MSPModel_JuPedSim::myAreas
private

Array of special areas.

Definition at line 193 of file MSPModel_JuPedSim.h.

Referenced by execute(), and initialize().

◆ myExitTolerance

const double MSPModel_JuPedSim::myExitTolerance
private

Threshold to decide if a pedestrian has ended its journey or not.

Definition at line 160 of file MSPModel_JuPedSim.h.

Referenced by add().

◆ myGEOSPedestrianNetwork

GEOSGeometry* MSPModel_JuPedSim::myGEOSPedestrianNetwork
private

The GEOS polygon containing all computed connected components of the pedestrian network.

Definition at line 166 of file MSPModel_JuPedSim.h.

Referenced by initialize(), and ~MSPModel_JuPedSim().

◆ myGEOSPedestrianNetworkLargestComponent

const GEOSGeometry* MSPModel_JuPedSim::myGEOSPedestrianNetworkLargestComponent
private

The GEOS polygon representing the largest (by area) connected component of the pedestrian network.

Definition at line 169 of file MSPModel_JuPedSim.h.

Referenced by execute(), and initialize().

◆ myHaveAdditionalWalkableAreas

bool MSPModel_JuPedSim::myHaveAdditionalWalkableAreas
private

Definition at line 171 of file MSPModel_JuPedSim.h.

Referenced by buildPedestrianNetwork(), and usingShortcuts().

◆ myJPSDeltaT

const SUMOTime MSPModel_JuPedSim::myJPSDeltaT
private

Timestep used in the JuPedSim simulator.

Definition at line 157 of file MSPModel_JuPedSim.h.

Referenced by execute(), and initialize().

◆ myJPSGeometry

JPS_Geometry MSPModel_JuPedSim::myJPSGeometry
private

The JPS polygon representing the largest connected component of the pedestrian network.

Definition at line 174 of file MSPModel_JuPedSim.h.

Referenced by execute(), initialize(), and ~MSPModel_JuPedSim().

◆ myJPSGeometryWithTrainsAndRamps

JPS_Geometry MSPModel_JuPedSim::myJPSGeometryWithTrainsAndRamps
private

The JPS polygon representing the largest connected component plus carriages and ramps.

Definition at line 177 of file MSPModel_JuPedSim.h.

Referenced by execute(), initialize(), and ~MSPModel_JuPedSim().

◆ myJPSModel

JPS_OperationalModel MSPModel_JuPedSim::myJPSModel
private

Definition at line 178 of file MSPModel_JuPedSim.h.

Referenced by initialize(), and ~MSPModel_JuPedSim().

◆ myJPSSimulation

JPS_Simulation MSPModel_JuPedSim::myJPSSimulation
private

◆ myNetwork

MSNet* const MSPModel_JuPedSim::myNetwork
private

The network on which the simulation runs.

Definition at line 151 of file MSPModel_JuPedSim.h.

Referenced by add(), buildPedestrianNetwork(), execute(), and initialize().

◆ myNumActivePedestrians

int MSPModel_JuPedSim::myNumActivePedestrians = 0
private

Definition at line 162 of file MSPModel_JuPedSim.h.

Referenced by add(), clearState(), getActiveNumber(), and registerArrived().

◆ myPedestrianStates

std::vector<PState*> MSPModel_JuPedSim::myPedestrianStates
private

Definition at line 163 of file MSPModel_JuPedSim.h.

Referenced by add(), clearState(), and execute().

◆ myShapeContainer

ShapeContainer& MSPModel_JuPedSim::myShapeContainer
private

The shape container used to add polygons to the rendering pipeline.

Definition at line 154 of file MSPModel_JuPedSim.h.

Referenced by preparePolygonForDrawing(), and removePolygonFromDrawing().

◆ PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_COLOR

const RGBColor MSPModel_JuPedSim::PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_COLOR = RGBColor(255, 217, 179, 255)
staticprivate

Definition at line 204 of file MSPModel_JuPedSim.h.

Referenced by execute().

◆ PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_ID

const std::string MSPModel_JuPedSim::PEDESTRIAN_NETWORK_CARRIAGES_AND_RAMPS_ID = "jupedsim.pedestrian_network.carriages_and_ramps"
staticprivate

Definition at line 206 of file MSPModel_JuPedSim.h.

Referenced by execute().

◆ PEDESTRIAN_NETWORK_COLOR

const RGBColor MSPModel_JuPedSim::PEDESTRIAN_NETWORK_COLOR = RGBColor(179, 217, 255, 255)
staticprivate

Definition at line 203 of file MSPModel_JuPedSim.h.

Referenced by execute(), and initialize().

◆ PEDESTRIAN_NETWORK_ID

const std::string MSPModel_JuPedSim::PEDESTRIAN_NETWORK_ID = "jupedsim.pedestrian_network"
staticprivate

Definition at line 205 of file MSPModel_JuPedSim.h.

Referenced by execute(), and initialize().

◆ RANDOM_POS_LAT

const double MSPModel::RANDOM_POS_LAT
staticinherited

magic value to encode randomized lateral offset for persons when starting a walk

Definition at line 133 of file MSPModel.h.

Referenced by add(), MSRouteHandler::interpretDepartPosLat(), and MSPModel_Striping::PState::PState().

◆ SAFETY_GAP

const double MSPModel::SAFETY_GAP
staticinherited

◆ SIDEWALK_OFFSET

const double MSPModel::SIDEWALK_OFFSET
staticinherited

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

Definition at line 127 of file MSPModel.h.

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

◆ UNDEFINED_DIRECTION

◆ UNSPECIFIED_POS_LAT

const double MSPModel::UNSPECIFIED_POS_LAT
staticinherited

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