Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSPModel_Striping Class Reference

The pedestrian movement model using stripes on sidewalks. More...

#include <MSPModel_Striping.h>

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

Data Structures

class  by_xpos_sorter
 sorts the persons by position on the lane. If dir is forward, higher x positions come first. More...
 
class  MovePedestrians
 
struct  NextLaneInfo
 
struct  Obstacle
 information regarding surround Pedestrians (and potentially other things) More...
 
class  PState
 Container for pedestrian state and individual position update function. More...
 
class  PStateVehicle
 
class  walkingarea_path_sorter
 
struct  WalkingAreaPath
 

Public Types

typedef std::map< std::pair< const MSLane *, const MSLane * >, const WalkingAreaPathWalkingAreaPaths
 

Public Member Functions

MSTransportableStateAdapteradd (MSTransportable *transportable, MSStageMoving *stage, SUMOTime now)
 register the given person as a pedestrian
 
bool blockedAtDist (const SUMOTrafficObject *ego, const MSLane *lane, double vehCenter, double vehWidth, double oncomingGap, std::vector< const MSPerson * > *collectBlockers)
 whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries
 
virtual void clearState ()
 Resets pedestrians when quick-loading state.
 
int getActiveNumber ()
 return the number of active pedestrians
 
bool hasPedestrians (const MSLane *lane)
 whether the given lane has pedestrians on it
 
MSTransportableStateAdapterloadState (MSTransportable *transportable, MSStageMoving *stage, std::istringstream &in)
 load the state of the given transportable
 
 MSPModel_Striping (const OptionsCont &oc, MSNet *net)
 Constructor (it should not be necessary to construct more than one instance)
 
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 nullptr
 
void registerActive ()
 increase the number of active pedestrians
 
virtual void remove (MSTransportableStateAdapter *state)
 remove the specified person from the pedestrian simulation
 
bool usingInternalLanes ()
 whether movements on intersections are modelled /
 
virtual bool usingShortcuts ()
 whether travel times and distances can reliably be calculated from the network alone
 
 ~MSPModel_Striping ()
 

Static Public Member Functions

static int canTraverse (int dir, const ConstMSEdgeVector &route, int &passedEdges)
 
static double posLatConversion (const double posLat, const double laneWidth)
 Convert the striping to the vehicle lateral position and vice versa.
 
static void unregisterCrossingApproach (const MSPModel_InteractingState &ped, const MSLane *crossing)
 unregister pedestrian approach with the junction model
 
static bool usingInternalLanesStatic ()
 

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
 
static const double SAFETY_GAP
 
static const double SIDEWALK_OFFSET
 the offset for computing person positions when walking on edges without a sidewalk
 
static const int UNDEFINED_DIRECTION
 
static const double UNSPECIFIED_POS_LAT
 the default lateral offset for persons when starting a walk
 
static double stripeWidth
 model parameters
 
static double dawdling
 the factor for random slow-down
 
static double minGapToVehicle
 the safety buffer to vehicles
 
static int myWalkingAreaDetail
 intermediate points to smooth out lanes within the walkingarea
 
static SUMOTime jamTime
 the time threshold before becoming jammed
 
static SUMOTime jamTimeCrossing
 
static SUMOTime jamTimeNarrow
 
static double jamFactor
 the factor on speed when jammed
 
static bool myLegacyPosLat
 use old style departPosLat interpretation
 
static const double LOOKAHEAD_SAMEDIR
 the distance (in seconds) to look ahead for changing stripes
 
static const double LOOKAHEAD_ONCOMING
 the distance (in seconds) to look ahead for changing stripes (regarding oncoming pedestrians)
 
static const double LOOKAROUND_VEHICLES
 the distance (in m) to look around for vehicles
 
static const double LOOKAHEAD_ONCOMING_DIST
 the distance (in m) to look ahead for obstacles on a subsequent edge
 
static const double LATERAL_PENALTY
 the utility penalty for moving sideways (corresponds to meters)
 
static const double OBSTRUCTED_PENALTY
 the utility penalty for obstructed (physically blocking me) stripes (corresponds to meters)
 
static const double INAPPROPRIATE_PENALTY
 the utility penalty for inappropriate (reserved for oncoming traffic or may violate my min gap) stripes (corresponds to meters)
 
static const double ONCOMING_CONFLICT_PENALTY
 the utility penalty for oncoming conflicts on stripes (corresponds to meters)
 
static const double OBSTRUCTION_THRESHOLD
 the minimum utility that indicates obstruction
 
static const double SQUEEZE
 the factor by which pedestrian width is reduced when sqeezing past each other
 
static double RESERVE_FOR_ONCOMING_FACTOR
 fraction of the leftmost lanes to reserve for oncoming traffic
 
static double RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS
 
static double RESERVE_FOR_ONCOMING_MAX
 
static bool USE_NET_SPEEDS
 whether to use speed limits embedded in the network
 
static const double MAX_WAIT_TOLERANCE
 the time pedestrians take to reach maximum impatience
 
static const double LATERAL_SPEED_FACTOR
 the fraction of forward speed to be used for lateral movemenk
 
static const double MIN_STARTUP_DIST
 the minimum distance to the next obstacle in order to start walking after stopped
 

Protected Types

typedef std::map< const MSLane *, Pedestrians, ComparatorNumericalIdLessActiveLanes
 
typedef std::map< const MSLane *, double > MinNextLengths
 
typedef std::map< const MSLane *, Obstacles, ComparatorNumericalIdLessNextLanesObstacles
 
typedef std::vector< ObstacleObstacles
 
enum  ObstacleType {
  OBSTACLE_NONE = 0 , OBSTACLE_PED = 1 , OBSTACLE_VEHICLE = 3 , OBSTACLE_END = 4 ,
  OBSTACLE_NEXTEND = 5 , OBSTACLE_LINKCLOSED = 6 , OBSTACLE_ARRIVALPOS = 7
}
 
typedef std::vector< MSPModel_InteractingState * > Pedestrians
 

Protected Member Functions

void arriveAndAdvance (Pedestrians &pedestrians, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
 handle arrivals and lane advancement
 
const ActiveLanesgetActiveLanes ()
 
PedestriansgetPedestrians (const MSLane *lane)
 retrieves the pedestrian vector for the given lane (may be empty)
 
void moveInDirection (SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
 move all pedestrians forward and advance to the next lane if applicable
 
void moveInDirectionOnLane (Pedestrians &pedestrians, const MSLane *lane, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir, bool debug)
 move pedestrians forward on one lane
 

Protected Attributes

ActiveLanes myActiveLanes
 store of all lanes which have pedestrians on them
 
bool myAmActive = false
 whether an event for pedestrian processing was added
 
std::set< MSLink * > myApproachedCrossings
 all crossings being approached by pedestrians
 
int myNumActivePedestrians = 0
 the total number of active pedestrians
 

Static Protected Attributes

static const double DIST_BEHIND
 
static const double DIST_FAR_AWAY
 
static const double DIST_OVERLAP
 
static Pedestrians noPedestrians
 empty pedestrian vector
 

Private Member Functions

const ObstaclesgetNextLaneObstacles (NextLanesObstacles &nextLanesObs, const MSLane *lane, const MSLane *nextLane, int stripes, int nextDir, double currentLength, int currentDir)
 

Static Private Member Functions

static void addCloserObstacle (Obstacles &obs, double x, int stripe, int numStripes, const std::string &id, double width, int dir, ObstacleType type)
 
static bool addCrossingVehs (const MSLane *crossing, int stripes, double lateral_offset, int dir, Obstacles &crossingVehs, bool prio)
 add vehicles driving across
 
static bool addVehicleFoe (const MSVehicle *veh, const MSLane *walkingarea, const Position &relPos, double xWidth, double yWidth, double lateral_offset, double minY, double maxY, Pedestrians &toDelete, Pedestrians &transformedPeds)
 
static int connectedDirection (const MSLane *from, const MSLane *to)
 returns the direction in which these lanes are connectioned or 0 if they are not
 
static void DEBUG_PRINT (const Obstacles &obs)
 
static const WalkingAreaPathgetArbitraryPath (const MSEdge *walkingArea)
 return an arbitrary path across the given walkingArea
 
static Obstacles getNeighboringObstacles (const Pedestrians &pedestrians, int egoIndex, int stripes)
 
static NextLaneInfo getNextLane (const PState &ped, const MSLane *currentLane, const MSLane *prevLane)
 computes the successor lane for the given pedestrian and sets the link as well as the direction to use on the succesor lane
 
static const MSLanegetNextWalkingArea (const MSLane *currentLane, const int dir, const MSLink *&link)
 return the next walkingArea in the given direction
 
static int getReserved (int stripes, double factor)
 
static int getStripeOffset (int origStripes, int destStripes, bool addRemainder)
 
static Obstacles getVehicleObstacles (const MSLane *lane, int dir, PState *ped=0)
 retrieve vehicle obstacles on the given lane
 
static const WalkingAreaPathgetWalkingAreaPath (const MSEdge *walkingArea, const MSLane *before, const MSLane *after)
 
static const WalkingAreaPathguessPath (const MSEdge *walkingArea, const MSEdge *before, const MSEdge *after)
 
static void initWalkingAreaPaths (const MSNet *net)
 
static void insertWalkArePaths (const MSEdge *edge, WalkingAreaPaths &into)
 creates and inserts all paths into the given map
 
static int numStripes (const MSLane *lane)
 return the maximum number of pedestrians walking side by side
 
static void registerCrossingApproach (const PState &ped, const MSLane *crossing, const MSLane *beforeWA)
 register pedestrian approach with the junction model
 
static void transformToCurrentLanePositions (Obstacles &o, int currentDir, int nextDir, double currentLength, double nextLength)
 

Static Private Attributes

static MinNextLengths myMinNextLengths
 
static std::map< const MSEdge *, std::vector< const MSLane * > > myWalkingAreaFoes
 
static WalkingAreaPaths myWalkingAreaPaths
 store for walkinArea elements
 

Friends

class GUIPerson
 

Detailed Description

The pedestrian movement model using stripes on sidewalks.

Definition at line 49 of file MSPModel_Striping.h.

Member Typedef Documentation

◆ ActiveLanes

typedef std::map<const MSLane*, Pedestrians, ComparatorNumericalIdLess> MSPModel_Interacting::ActiveLanes
protectedinherited

Definition at line 98 of file MSPModel_Interacting.h.

◆ MinNextLengths

typedef std::map<const MSLane*, double> MSPModel_Striping::MinNextLengths
protected

Definition at line 179 of file MSPModel_Striping.h.

◆ NextLanesObstacles

Definition at line 178 of file MSPModel_Striping.h.

◆ Obstacles

typedef std::vector<Obstacle> MSPModel_Striping::Obstacles
protected

Definition at line 177 of file MSPModel_Striping.h.

◆ Pedestrians

typedef std::vector<MSPModel_InteractingState*> MSPModel_Interacting::Pedestrians
protectedinherited

Definition at line 97 of file MSPModel_Interacting.h.

◆ WalkingAreaPaths

typedef std::map<std::pair<const MSLane*, const MSLane*>, const WalkingAreaPath> MSPModel_Striping::WalkingAreaPaths

Definition at line 76 of file MSPModel_Striping.h.

Member Enumeration Documentation

◆ ObstacleType

Enumerator
OBSTACLE_NONE 
OBSTACLE_PED 
OBSTACLE_VEHICLE 
OBSTACLE_END 
OBSTACLE_NEXTEND 
OBSTACLE_LINKCLOSED 
OBSTACLE_ARRIVALPOS 

Definition at line 202 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

◆ MSPModel_Striping()

◆ ~MSPModel_Striping()

MSPModel_Striping::~MSPModel_Striping ( )

Definition at line 153 of file MSPModel_Striping.cpp.

References myMinNextLengths, myWalkingAreaFoes, and myWalkingAreaPaths.

Member Function Documentation

◆ add()

◆ addCloserObstacle()

void MSPModel_Striping::addCloserObstacle ( Obstacles obs,
double  x,
int  stripe,
int  numStripes,
const std::string &  id,
double  width,
int  dir,
ObstacleType  type 
)
staticprivate

Definition at line 835 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, MSPModel::FORWARD, and numStripes().

Referenced by getNextLaneObstacles().

Here is the caller graph for this function:

◆ addCrossingVehs()

bool MSPModel_Striping::addCrossingVehs ( const MSLane crossing,
int  stripes,
double  lateral_offset,
int  dir,
Obstacles crossingVehs,
bool  prio 
)
staticprivate

◆ addVehicleFoe()

bool MSPModel_Striping::addVehicleFoe ( const MSVehicle veh,
const MSLane walkingarea,
const Position relPos,
double  xWidth,
double  yWidth,
double  lateral_offset,
double  minY,
double  maxY,
Pedestrians toDelete,
Pedestrians transformedPeds 
)
staticprivate

Definition at line 997 of file MSPModel_Striping.cpp.

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

Referenced by moveInDirection().

Here is the caller graph for this function:

◆ arriveAndAdvance()

void MSPModel_Striping::arriveAndAdvance ( Pedestrians pedestrians,
SUMOTime  currentTime,
std::set< MSPerson * > &  changedLane,
int  dir 
)
protected

◆ blockedAtDist()

bool MSPModel_Interacting::blockedAtDist ( const SUMOTrafficObject ego,
const MSLane lane,
double  vehCenter,
double  vehWidth,
double  oncomingGap,
std::vector< const MSPerson * > *  collectBlockers 
)
virtualinherited

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 from MSPModel.

Definition at line 71 of file MSPModel_Interacting.cpp.

References DEBUGCOND, MSPModel::FORWARD, Named::getID(), MSPModel_Interacting::getPedestrians(), MSLink::ignoreFoe(), SIMTIME, and TIME2STEPS.

◆ 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 getNextLane(), MSPModel_Striping::PState::PState(), and MSStageWalking::walkDistance().

Here is the caller graph for this function:

◆ clearState()

void MSPModel_Interacting::clearState ( )
virtualinherited

Resets pedestrians when quick-loading state.

Implements MSPModel.

Reimplemented in MSPModel_JuPedSim.

Definition at line 48 of file MSPModel_Interacting.cpp.

References MSPModel_Interacting::myActiveLanes, MSPModel_Interacting::myAmActive, and MSPModel_Interacting::myNumActivePedestrians.

Referenced by MSPModel_Interacting::~MSPModel_Interacting().

Here is the caller graph for this function:

◆ connectedDirection()

int MSPModel_Striping::connectedDirection ( const MSLane from,
const MSLane to 
)
staticprivate

returns the direction in which these lanes are connectioned or 0 if they are not

Definition at line 212 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, MSPModel::FORWARD, MSLane::getLinkTo(), and MSPModel::UNDEFINED_DIRECTION.

Referenced by getNextLane().

Here is the caller graph for this function:

◆ DEBUG_PRINT()

void MSPModel_Striping::DEBUG_PRINT ( const Obstacles obs)
staticprivate

Definition at line 56 of file MSPModel_Striping.cpp.

Referenced by addCrossingVehs(), getNeighboringObstacles(), and moveInDirectionOnLane().

Here is the caller graph for this function:

◆ getActiveLanes()

const ActiveLanes & MSPModel_Striping::getActiveLanes ( )
inlineprotected

Definition at line 430 of file MSPModel_Striping.h.

References MSPModel_Interacting::myActiveLanes.

◆ getActiveNumber()

int MSPModel_Interacting::getActiveNumber ( )
inlinevirtualinherited

return the number of active pedestrians

Implements MSPModel.

Definition at line 84 of file MSPModel_Interacting.h.

References MSPModel_Interacting::myNumActivePedestrians.

◆ getArbitraryPath()

const MSPModel_Striping::WalkingAreaPath * MSPModel_Striping::getArbitraryPath ( const MSEdge walkingArea)
staticprivate

return an arbitrary path across the given walkingArea

Definition at line 338 of file MSPModel_Striping.cpp.

References Named::getID(), MSEdge::getPredecessors(), MSEdge::getSuccessors(), MSEdge::isWalkingArea(), myWalkingAreaPaths, and TLF.

Referenced by getWalkingAreaPath(), guessPath(), and MSPModel_Striping::PState::PState().

Here is the caller graph for this function:

◆ getNeighboringObstacles()

MSPModel_Striping::Obstacles MSPModel_Striping::getNeighboringObstacles ( const Pedestrians pedestrians,
int  egoIndex,
int  stripes 
)
staticprivate

◆ getNextLane()

MSPModel_Striping::NextLaneInfo MSPModel_Striping::getNextLane ( const PState ped,
const MSLane currentLane,
const MSLane prevLane 
)
staticprivate

computes the successor lane for the given pedestrian and sets the link as well as the direction to use on the succesor lane

Parameters
[in]currentLaneThe lane the pedestrian is currently on
[in]pedThe pedestrian for which to compute the next lane

Definition at line 404 of file MSPModel_Striping.cpp.

References MSPModel::BACKWARD, MSPModel::canTraverse(), PedestrianRouter< E, L, N, V >::compute(), connectedDirection(), DEBUGCOND, MSPModel::FORWARD, MSStage::getArrivalPos(), MSLane::getCanonicalSuccessorLane(), MSPModel_InteractingState::getDirection(), MSLane::getEdge(), MSEdge::getFromJunction(), Named::getID(), MSNet::getInstance(), MSLane::getInternalFollowingLane(), MSEdge::getLanes(), MSEdge::getLength(), MSLane::getLength(), MSLane::getLinkCont(), MSLane::getLinkTo(), MSLane::getLogicalPredecessorLane(), MSStageMoving::getMaxSpeed(), MSStageMoving::getNextRouteEdge(), getNextWalkingArea(), OptionsCont::getOptions(), MSNet::getPedestrianRouter(), MSPModel_InteractingState::getPerson(), MSStageMoving::getRoute(), MSStage::getRoutePosition(), MSPModel_InteractingState::getStage(), MSLink::getTLLogic(), MSEdge::getToJunction(), MSTransportable::getVClass(), MSLink::getViaLaneOrLane(), MSEdge::isCrossing(), MSLane::isCrossing(), MSEdge::isInternal(), MSEdge::isWalkingArea(), registerCrossingApproach(), SIMTIME, time2string(), toString(), MSPModel::UNDEFINED_DIRECTION, MSPModel_Interacting::unregisterCrossingApproach(), MSPModel_Interacting::usingInternalLanesStatic(), and WRITE_WARNING.

Referenced by moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), and MSPModel_Striping::PState::PState().

Here is the caller graph for this function:

◆ getNextLaneObstacles()

const MSPModel_Striping::Obstacles & MSPModel_Striping::getNextLaneObstacles ( NextLanesObstacles nextLanesObs,
const MSLane lane,
const MSLane nextLane,
int  stripes,
int  nextDir,
double  currentLength,
int  currentDir 
)
private

◆ getNextWalkingArea()

const MSLane * MSPModel_Striping::getNextWalkingArea ( const MSLane currentLane,
const int  dir,
const MSLink *&  link 
)
staticprivate

return the next walkingArea in the given direction

Definition at line 625 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, MSLane::getIncomingLanes(), MSLink::getLane(), and MSLane::getLinkCont().

Referenced by getNextLane().

Here is the caller graph for this function:

◆ getPedestrians()

MSPModel_Interacting::Pedestrians & MSPModel_Interacting::getPedestrians ( const MSLane lane)
protectedinherited

retrieves the pedestrian vector for the given lane (may be empty)

Definition at line 165 of file MSPModel_Interacting.cpp.

References MSPModel_Interacting::myActiveLanes, and MSPModel_Interacting::noPedestrians.

Referenced by MSPModel_Interacting::blockedAtDist(), getNextLaneObstacles(), MSPModel_Interacting::hasPedestrians(), and MSPModel_Interacting::nextBlocking().

Here is the caller graph for this function:

◆ getReserved()

int MSPModel_Striping::getReserved ( int  stripes,
double  factor 
)
staticprivate

Definition at line 1895 of file MSPModel_Striping.cpp.

References MIN2(), RESERVE_FOR_ONCOMING_MAX, and stripeWidth.

Referenced by addCrossingVehs(), and MSPModel_Striping::PState::walk().

Here is the caller graph for this function:

◆ getStripeOffset()

int MSPModel_Striping::getStripeOffset ( int  origStripes,
int  destStripes,
bool  addRemainder 
)
staticprivate

Definition at line 698 of file MSPModel_Striping.cpp.

Referenced by getNextLaneObstacles(), and MSPModel_Striping::PState::moveToNextLane().

Here is the caller graph for this function:

◆ getVehicleObstacles()

◆ getWalkingAreaPath()

const MSPModel_Striping::WalkingAreaPath * MSPModel_Striping::getWalkingAreaPath ( const MSEdge walkingArea,
const MSLane before,
const MSLane after 
)
staticprivate

Definition at line 382 of file MSPModel_Striping.cpp.

References getArbitraryPath(), MSEdge::getPredecessors(), MSEdge::isWalkingArea(), and myWalkingAreaPaths.

Referenced by guessPath(), MSPModel_Striping::PState::moveToNextLane(), and registerCrossingApproach().

Here is the caller graph for this function:

◆ guessPath()

const MSPModel_Striping::WalkingAreaPath * MSPModel_Striping::guessPath ( const MSEdge walkingArea,
const MSEdge before,
const MSEdge after 
)
staticprivate

Definition at line 354 of file MSPModel_Striping.cpp.

References getArbitraryPath(), MSEdge::getPredecessors(), MSEdge::getSuccessors(), getWalkingAreaPath(), MSEdge::isWalkingArea(), and myWalkingAreaPaths.

Referenced by MSPModel_Striping::PState::moveTo(), and MSPModel_Striping::PState::moveToXY().

Here is the caller graph for this function:

◆ hasPedestrians()

bool MSPModel_Interacting::hasPedestrians ( const MSLane lane)
virtualinherited

whether the given lane has pedestrians on it

Reimplemented from MSPModel.

Definition at line 109 of file MSPModel_Interacting.cpp.

References MSPModel_Interacting::getPedestrians().

◆ initWalkingAreaPaths()

void MSPModel_Striping::initWalkingAreaPaths ( const MSNet net)
staticprivate

Definition at line 226 of file MSPModel_Striping.cpp.

References MSEdge::getAllEdges(), MSEdge::getLanes(), insertWalkArePaths(), MSEdge::isCrossing(), MSEdge::isWalkingArea(), myWalkingAreaFoes, and myWalkingAreaPaths.

Referenced by MSPModel_Striping().

Here is the caller graph for this function:

◆ insertWalkArePaths()

void MSPModel_Striping::insertWalkArePaths ( const MSEdge edge,
WalkingAreaPaths into 
)
staticprivate

◆ loadState()

MSTransportableStateAdapter * MSPModel_Striping::loadState ( MSTransportable transportable,
MSStageMoving stage,
std::istringstream &  in 
)
virtual

◆ moveInDirection()

void MSPModel_Striping::moveInDirection ( SUMOTime  currentTime,
std::set< MSPerson * > &  changedLane,
int  dir 
)
protected

◆ moveInDirectionOnLane()

void MSPModel_Striping::moveInDirectionOnLane ( Pedestrians pedestrians,
const MSLane lane,
SUMOTime  currentTime,
std::set< MSPerson * > &  changedLane,
int  dir,
bool  debug 
)
protected

move pedestrians forward on one lane

Definition at line 1043 of file MSPModel_Striping.cpp.

References addCrossingVehs(), MSPModel_Striping::Obstacle::closer(), DEBUG_PRINT(), DEBUGCOND, DELTA_T, MSPModel_Striping::NextLaneInfo::dir, DIST_OVERLAP, MSPModel_Striping::PState::distanceTo(), MSPModel_Striping::PState::distToLaneEnd(), MSPModel::FORWARD, MSPModel_Striping::WalkingAreaPath::from, MSGlobals::gCheck4Accidents, gDebugFlag1, MSStage::getArrivalPos(), MSStageMoving::getConfiguredSpeed(), MSStage::getDestination(), MSStage::getDestinationStop(), MSPModel_InteractingState::getDirection(), MSLane::getEdge(), MSPModel_InteractingState::getEdgePos(), Named::getID(), MSPModel_Striping::PState::getImpatience(), MSPModel_InteractingState::getLane(), MSLane::getLength(), MSPModel_Striping::PState::getLength(), MSStageMoving::getMaxSpeed(), MSPModel_Striping::PState::getMinGap(), getNeighboringObstacles(), getNextLane(), getNextLaneObstacles(), MSStoppingPlace::getNumWaitingPersons(), MSPModel_InteractingState::getPerson(), MSPModel_InteractingState::getRemotePosition(), MSPModel_InteractingState::getSpeed(), MSPModel_InteractingState::getStage(), MSPerson::getTimegapCrossing(), MSLane::getVehicleMaxSpeed(), MSLane::getVehicleNumberWithPartials(), getVehicleObstacles(), MSLink::getViaLaneOrLane(), MSStoppingPlace::getWaitingCapacity(), MSPModel_Striping::PState::ignoreRed(), Position::INVALID, MSEdge::isCrossing(), MSLane::isInternal(), MSPModel_InteractingState::isJammed(), MSLane::isNormal(), MSPModel_InteractingState::isWaitingToEnter(), MSPModel_Striping::NextLaneInfo::lane, MSPModel_Striping::WalkingAreaPath::length, MSPModel_Striping::NextLaneInfo::link, LOOKAHEAD_ONCOMING_DIST, LOOKAHEAD_SAMEDIR, MSPModel_Striping::PState::mergeObstacles(), MSPModel_Striping::PState::myNLI, MSPModel_Striping::PState::myWalkingAreaPath, numStripes(), OBSTACLE_ARRIVALPOS, OBSTACLE_LINKCLOSED, MSLink::opened(), MSPModel_Striping::PState::otherStripe(), SIMTIME, MSPModel_Striping::Obstacle::speed, MSPModel_Striping::PState::stopForYellow(), MSPModel_Striping::PState::stripe(), time2string(), MSPModel_Interacting::unregisterCrossingApproach(), UNUSED_PARAMETER, USE_NET_SPEEDS, MSPModel_Striping::PState::walk(), and WRITE_WARNING.

Referenced by moveInDirection().

Here is the caller graph for this function:

◆ nextBlocking()

PersonDist MSPModel_Interacting::nextBlocking ( const MSLane lane,
double  minPos,
double  minRight,
double  maxLeft,
double  stopTime = 0,
bool  bidi = false 
)
virtualinherited

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

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 (or nullptr) and the distance to it

Reimplemented from MSPModel.

Definition at line 127 of file MSPModel_Interacting.cpp.

References DEBUGCOND, MSPModel::FORWARD, Named::getID(), MSPModel_Interacting::getPedestrians(), and MSLane::getWidth().

◆ numStripes()

int MSPModel_Striping::numStripes ( const MSLane lane)
staticprivate

return the maximum number of pedestrians walking side by side

Definition at line 206 of file MSPModel_Striping.cpp.

References MSLane::getWidth(), MAX2(), and stripeWidth.

Referenced by addCloserObstacle(), getNextLaneObstacles(), getVehicleObstacles(), moveInDirection(), moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::otherStripe(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::stripe(), and MSPModel_Striping::PState::walk().

Here is the caller graph for this function:

◆ posLatConversion()

static double MSPModel_Striping::posLatConversion ( const double  posLat,
const double  laneWidth 
)
inlinestatic

Convert the striping to the vehicle lateral position and vice versa.

Definition at line 165 of file MSPModel_Striping.h.

References stripeWidth.

Referenced by MSPModel_Striping::PState::getLatOffset(), and MSPModel_Striping::PState::PState().

Here is the caller graph for this function:

◆ registerActive()

void MSPModel_Interacting::registerActive ( )
inlineinherited

increase the number of active pedestrians

Definition at line 89 of file MSPModel_Interacting.h.

References MSPModel_Interacting::myNumActivePedestrians.

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

Here is the caller graph for this function:

◆ registerCrossingApproach()

void MSPModel_Striping::registerCrossingApproach ( const PState ped,
const MSLane crossing,
const MSLane beforeWA 
)
staticprivate

register pedestrian approach with the junction model

Definition at line 1214 of file MSPModel_Striping.cpp.

References dawdling, DEBUGCOND, MSLane::getEdge(), Named::getID(), MSLane::getIncomingLanes(), MSPModel_InteractingState::getLane(), MSLane::getLength(), MSStageMoving::getMaxSpeed(), MSPModel_InteractingState::getPerson(), MSPModel_InteractingState::getStage(), getWalkingAreaPath(), MSLane::isWalkingArea(), MSPModel_Striping::WalkingAreaPath::length, SIMSTEP, SIMTIME, and TIME2STEPS.

Referenced by getNextLane().

Here is the caller graph for this function:

◆ remove()

void MSPModel_Interacting::remove ( MSTransportableStateAdapter state)
virtualinherited

remove the specified person from the pedestrian simulation

Implements MSPModel.

Reimplemented in MSPModel_JuPedSim.

Definition at line 56 of file MSPModel_Interacting.cpp.

References MSTransportableStateAdapter::getLane(), MSPModel_InteractingState::getNextCrossing(), MSPModel_Interacting::myActiveLanes, MSPModel_Interacting::myNumActivePedestrians, and MSPModel_Interacting::unregisterCrossingApproach().

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

Here is the caller graph for this function:

◆ transformToCurrentLanePositions()

void MSPModel_Striping::transformToCurrentLanePositions ( Obstacles o,
int  currentDir,
int  nextDir,
double  currentLength,
double  nextLength 
)
staticprivate

Definition at line 809 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD.

Referenced by getNextLaneObstacles().

Here is the caller graph for this function:

◆ unregisterCrossingApproach()

void MSPModel_Interacting::unregisterCrossingApproach ( const MSPModel_InteractingState ped,
const MSLane crossing 
)
staticinherited

unregister pedestrian approach with the junction model

Definition at line 176 of file MSPModel_Interacting.cpp.

References DEBUGCOND, Named::getID(), MSLane::getIncomingLanes(), MSPModel_InteractingState::getPerson(), and SIMTIME.

Referenced by getNextLane(), moveInDirectionOnLane(), and MSPModel_Interacting::remove().

Here is the caller graph for this function:

◆ usingInternalLanes()

bool MSPModel_Interacting::usingInternalLanes ( )
virtualinherited

whether movements on intersections are modelled /

Note
function declared as member for sake of inheritance (delegates to static function)

Implements MSPModel.

Definition at line 115 of file MSPModel_Interacting.cpp.

References MSPModel_Interacting::usingInternalLanesStatic().

◆ usingInternalLanesStatic()

bool MSPModel_Interacting::usingInternalLanesStatic ( )
staticinherited

Definition at line 121 of file MSPModel_Interacting.cpp.

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

Referenced by getNextLane(), and MSPModel_Interacting::usingInternalLanes().

Here is the caller graph for this function:

◆ usingShortcuts()

virtual bool MSPModel::usingShortcuts ( )
inlinevirtualinherited

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

Reimplemented in MSPModel_JuPedSim.

Definition at line 138 of file MSPModel.h.

Friends And Related Symbol Documentation

◆ GUIPerson

friend class GUIPerson
friend

Definition at line 51 of file MSPModel_Striping.h.

Field Documentation

◆ BACKWARD

◆ dawdling

double MSPModel_Striping::dawdling
static

the factor for random slow-down

Definition at line 96 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping(), registerCrossingApproach(), and MSPModel_Striping::PState::walk().

◆ DIST_BEHIND

const double MSPModel_Striping::DIST_BEHIND
staticprotected

◆ DIST_FAR_AWAY

const double MSPModel_Striping::DIST_FAR_AWAY
staticprotected

Definition at line 171 of file MSPModel_Striping.h.

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

◆ DIST_OVERLAP

const double MSPModel_Striping::DIST_OVERLAP
staticprotected

◆ FORWARD

◆ INAPPROPRIATE_PENALTY

const double MSPModel_Striping::INAPPROPRIATE_PENALTY
static

the utility penalty for inappropriate (reserved for oncoming traffic or may violate my min gap) stripes (corresponds to meters)

Definition at line 130 of file MSPModel_Striping.h.

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

◆ jamFactor

double MSPModel_Striping::jamFactor
static

the factor on speed when jammed

Definition at line 109 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().

◆ jamTime

SUMOTime MSPModel_Striping::jamTime
static

the time threshold before becoming jammed

Definition at line 105 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().

◆ jamTimeCrossing

SUMOTime MSPModel_Striping::jamTimeCrossing
static

Definition at line 106 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().

◆ jamTimeNarrow

SUMOTime MSPModel_Striping::jamTimeNarrow
static

Definition at line 107 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().

◆ LATERAL_PENALTY

const double MSPModel_Striping::LATERAL_PENALTY
static

the utility penalty for moving sideways (corresponds to meters)

Definition at line 124 of file MSPModel_Striping.h.

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

◆ LATERAL_SPEED_FACTOR

const double MSPModel_Striping::LATERAL_SPEED_FACTOR
static

the fraction of forward speed to be used for lateral movemenk

Definition at line 153 of file MSPModel_Striping.h.

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

◆ LOOKAHEAD_ONCOMING

const double MSPModel_Striping::LOOKAHEAD_ONCOMING
static

the distance (in seconds) to look ahead for changing stripes (regarding oncoming pedestrians)

Definition at line 117 of file MSPModel_Striping.h.

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

◆ LOOKAHEAD_ONCOMING_DIST

const double MSPModel_Striping::LOOKAHEAD_ONCOMING_DIST
static

the distance (in m) to look ahead for obstacles on a subsequent edge

Definition at line 121 of file MSPModel_Striping.h.

Referenced by moveInDirectionOnLane().

◆ LOOKAHEAD_SAMEDIR

const double MSPModel_Striping::LOOKAHEAD_SAMEDIR
static

the distance (in seconds) to look ahead for changing stripes

Definition at line 115 of file MSPModel_Striping.h.

Referenced by getVehicleObstacles(), moveInDirectionOnLane(), and MSPModel_Striping::PState::walk().

◆ LOOKAROUND_VEHICLES

const double MSPModel_Striping::LOOKAROUND_VEHICLES
static

the distance (in m) to look around for vehicles

Definition at line 119 of file MSPModel_Striping.h.

Referenced by getVehicleObstacles().

◆ MAX_WAIT_TOLERANCE

const double MSPModel_Striping::MAX_WAIT_TOLERANCE
static

the time pedestrians take to reach maximum impatience

Definition at line 150 of file MSPModel_Striping.h.

Referenced by MSPerson::getImpatience(), and MSPModel_Striping::PState::getImpatience().

◆ MIN_STARTUP_DIST

const double MSPModel_Striping::MIN_STARTUP_DIST
static

the minimum distance to the next obstacle in order to start walking after stopped

Definition at line 156 of file MSPModel_Striping.h.

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

◆ minGapToVehicle

double MSPModel_Striping::minGapToVehicle
static

the safety buffer to vehicles

Definition at line 99 of file MSPModel_Striping.h.

Referenced by addCrossingVehs(), and MSPModel_Striping().

◆ myActiveLanes

◆ myAmActive

bool MSPModel_Interacting::myAmActive = false
protectedinherited

whether an event for pedestrian processing was added

Definition at line 110 of file MSPModel_Interacting.h.

Referenced by add(), MSPModel_Interacting::clearState(), and loadState().

◆ myApproachedCrossings

std::set<MSLink*> MSPModel_Interacting::myApproachedCrossings
protectedinherited

all crossings being approached by pedestrians

Definition at line 113 of file MSPModel_Interacting.h.

◆ myLegacyPosLat

bool MSPModel_Striping::myLegacyPosLat
static

use old style departPosLat interpretation

Definition at line 112 of file MSPModel_Striping.h.

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

◆ myMinNextLengths

MSPModel_Striping::MinNextLengths MSPModel_Striping::myMinNextLengths
staticprivate

◆ myNumActivePedestrians

◆ myWalkingAreaDetail

int MSPModel_Striping::myWalkingAreaDetail
static

intermediate points to smooth out lanes within the walkingarea

Definition at line 102 of file MSPModel_Striping.h.

Referenced by insertWalkArePaths(), and MSPModel_Striping().

◆ myWalkingAreaFoes

std::map< const MSEdge *, std::vector< const MSLane * > > MSPModel_Striping::myWalkingAreaFoes
staticprivate

◆ myWalkingAreaPaths

MSPModel_Striping::WalkingAreaPaths MSPModel_Striping::myWalkingAreaPaths
staticprivate

◆ noPedestrians

MSPModel_Interacting::Pedestrians MSPModel_Interacting::noPedestrians
staticprotectedinherited

empty pedestrian vector

Definition at line 116 of file MSPModel_Interacting.h.

Referenced by MSPModel_Interacting::getPedestrians().

◆ OBSTRUCTED_PENALTY

const double MSPModel_Striping::OBSTRUCTED_PENALTY
static

the utility penalty for obstructed (physically blocking me) stripes (corresponds to meters)

Definition at line 127 of file MSPModel_Striping.h.

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

◆ OBSTRUCTION_THRESHOLD

const double MSPModel_Striping::OBSTRUCTION_THRESHOLD
static

the minimum utility that indicates obstruction

Definition at line 136 of file MSPModel_Striping.h.

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

◆ ONCOMING_CONFLICT_PENALTY

const double MSPModel_Striping::ONCOMING_CONFLICT_PENALTY
static

the utility penalty for oncoming conflicts on stripes (corresponds to meters)

Definition at line 133 of file MSPModel_Striping.h.

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

◆ 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 68 of file MSPModel.h.

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

◆ RESERVE_FOR_ONCOMING_FACTOR

double MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR
static

fraction of the leftmost lanes to reserve for oncoming traffic

Definition at line 142 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().

◆ RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS

double MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS
static

◆ RESERVE_FOR_ONCOMING_MAX

double MSPModel_Striping::RESERVE_FOR_ONCOMING_MAX
static

Definition at line 144 of file MSPModel_Striping.h.

Referenced by getReserved(), and MSPModel_Striping().

◆ 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 62 of file MSPModel.h.

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

◆ SQUEEZE

const double MSPModel_Striping::SQUEEZE
static

the factor by which pedestrian width is reduced when sqeezing past each other

Definition at line 139 of file MSPModel_Striping.h.

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

◆ stripeWidth

◆ UNDEFINED_DIRECTION

◆ UNSPECIFIED_POS_LAT

const double MSPModel::UNSPECIFIED_POS_LAT
staticinherited

◆ USE_NET_SPEEDS

bool MSPModel_Striping::USE_NET_SPEEDS
static

whether to use speed limits embedded in the network

Definition at line 147 of file MSPModel_Striping.h.

Referenced by moveInDirectionOnLane(), MSPModel_Striping(), and MSPModel_Striping::PState::walk().


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