Eclipse SUMO - Simulation of Urban MObility
|
The pedestrian movement model using stripes on sidewalks. More...
#include <MSPModel_Striping.h>
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 WalkingAreaPath > | WalkingAreaPaths |
Public Member Functions | |
MSTransportableStateAdapter * | add (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 | |
MSTransportableStateAdapter * | loadState (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, ComparatorNumericalIdLess > | ActiveLanes |
typedef std::map< const MSLane *, double > | MinNextLengths |
typedef std::map< const MSLane *, Obstacles, ComparatorNumericalIdLess > | NextLanesObstacles |
typedef std::vector< Obstacle > | Obstacles |
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 ActiveLanes & | getActiveLanes () |
Pedestrians & | getPedestrians (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 Obstacles & | getNextLaneObstacles (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 WalkingAreaPath * | getArbitraryPath (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 MSLane * | getNextWalkingArea (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 WalkingAreaPath * | getWalkingAreaPath (const MSEdge *walkingArea, const MSLane *before, const MSLane *after) |
static const WalkingAreaPath * | guessPath (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 |
The pedestrian movement model using stripes on sidewalks.
Definition at line 49 of file MSPModel_Striping.h.
|
protectedinherited |
Definition at line 98 of file MSPModel_Interacting.h.
|
protected |
Definition at line 179 of file MSPModel_Striping.h.
|
protected |
Definition at line 178 of file MSPModel_Striping.h.
|
protected |
Definition at line 177 of file MSPModel_Striping.h.
|
protectedinherited |
Definition at line 97 of file MSPModel_Interacting.h.
typedef std::map<std::pair<const MSLane*, const MSLane*>, const WalkingAreaPath> MSPModel_Striping::WalkingAreaPaths |
Definition at line 76 of file MSPModel_Striping.h.
|
protected |
Enumerator | |
---|---|
OBSTACLE_NONE | |
OBSTACLE_PED | |
OBSTACLE_VEHICLE | |
OBSTACLE_END | |
OBSTACLE_NEXTEND | |
OBSTACLE_LINKCLOSED | |
OBSTACLE_ARRIVALPOS |
Definition at line 202 of file MSPModel_Striping.h.
MSPModel_Striping::MSPModel_Striping | ( | const OptionsCont & | oc, |
MSNet * | net | ||
) |
Constructor (it should not be necessary to construct more than one instance)
Definition at line 117 of file MSPModel_Striping.cpp.
References dawdling, DEFAULT_PEDTYPE_ID, OptionsCont::getBool(), OptionsCont::getFloat(), MSNet::getInstance(), OptionsCont::getInt(), MSNet::getNetworkVersion(), OptionsCont::getString(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), MSVehicleType::getWidth(), initWalkingAreaPaths(), jamFactor, jamTime, jamTimeCrossing, jamTimeNarrow, minGapToVehicle, myLegacyPosLat, myWalkingAreaDetail, RESERVE_FOR_ONCOMING_FACTOR, RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS, RESERVE_FOR_ONCOMING_MAX, string2time(), stripeWidth, SUMOTime_MAX, TL, USE_NET_SPEEDS, and WRITE_WARNINGF.
MSPModel_Striping::~MSPModel_Striping | ( | ) |
Definition at line 153 of file MSPModel_Striping.cpp.
References myMinNextLengths, myWalkingAreaFoes, and myWalkingAreaPaths.
|
virtual |
register the given person as a pedestrian
Implements MSPModel.
Definition at line 161 of file MSPModel_Striping.cpp.
References MSEventControl::addEvent(), MSStageMoving::checkDepartLane(), DELTA_T, MSNet::getBeginOfTimestepEvents(), MSTransportable::getCurrentStageType(), MSNet::getCurrentTimeStep(), MSStageMoving::getDepartLane(), MSTransportable::getEdge(), Named::getID(), MSNet::getInstance(), OptionsCont::getOptions(), MSTransportable::getVClass(), MSTransportable::isPerson(), MSPModel_Interacting::myActiveLanes, MSPModel_Interacting::myAmActive, MSPModel_Interacting::myNumActivePedestrians, time2string(), TL, TLF, WALKING, and WRITE_WARNINGF.
|
staticprivate |
Definition at line 835 of file MSPModel_Striping.cpp.
References MSPModel::BACKWARD, MSPModel::FORWARD, and numStripes().
Referenced by getNextLaneObstacles().
|
staticprivate |
add vehicles driving across
Definition at line 1230 of file MSPModel_Striping.cpp.
References MSPModel::BACKWARD, MSCFModel::brakeGap(), DEBUG_PRINT(), DEBUGCOND2, MSPModel::FORWARD, gDebugFlag1, MSVehicle::getCarFollowModel(), Named::getID(), MSLink::getLeaderInfo(), MSLane::getLength(), MSVehicleType::getLength(), MSLane::getLinkCont(), MSCFModel::getMaxDecel(), getReserved(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSVehicleType::getWidth(), MAX2(), MIN2(), minGapToVehicle, OBSTACLE_VEHICLE, RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS, SIMTIME, MSPModel_Striping::PState::stripe(), SUMO_const_haltingSpeed, MSPModel_Striping::Obstacle::type, MSPModel_Striping::Obstacle::xBack, and MSPModel_Striping::Obstacle::xFwd.
Referenced by getNextLaneObstacles(), and moveInDirectionOnLane().
|
staticprivate |
Definition at line 997 of file MSPModel_Striping.cpp.
References Position::INVALID, Position::x(), and Position::y().
Referenced by moveInDirection().
|
protected |
handle arrivals and lane advancement
Definition at line 1014 of file MSPModel_Striping.cpp.
References MSPModel_Striping::PState::distToLaneEnd(), MSPModel_InteractingState::getDirection(), MSPModel_InteractingState::getLane(), MSPModel_InteractingState::getPerson(), MSPModel_InteractingState::getStage(), MSPModel_Striping::PState::isRemoteControlled(), MSStageMoving::moveToNextEdge(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Interacting::myActiveLanes, and MSPModel_Interacting::myNumActivePedestrians.
Referenced by moveInDirection().
|
virtualinherited |
whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries
[in] | ego | The object that inquires about blockage (and may electively ignore foes) |
[in] | lane | The crossing to check |
[in] | vehside | The offset to the vehicle side near the start of the crossing |
[in] | vehWidth | The width of the vehicle |
[in] | oncomingGap | The distance which the vehicle wants to keep from oncoming pedestrians |
[in] | collectBlockers | The list of persons blocking the crossing |
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.
|
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().
|
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().
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().
|
staticprivate |
Definition at line 56 of file MSPModel_Striping.cpp.
Referenced by addCrossingVehs(), getNeighboringObstacles(), and moveInDirectionOnLane().
|
inlineprotected |
Definition at line 430 of file MSPModel_Striping.h.
References MSPModel_Interacting::myActiveLanes.
|
inlinevirtualinherited |
return the number of active pedestrians
Implements MSPModel.
Definition at line 84 of file MSPModel_Interacting.h.
References MSPModel_Interacting::myNumActivePedestrians.
|
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().
|
staticprivate |
Definition at line 647 of file MSPModel_Striping.cpp.
References DEBUG_PRINT(), DEBUGCOND, DIST_BEHIND, DIST_OVERLAP, MSPModel_Striping::PState::distanceTo(), MSPModel_InteractingState::getDirection(), MSPModel_InteractingState::getID(), Named::getID(), MSPModel_InteractingState::getPerson(), MSPModel_InteractingState::isJammed(), MSPModel_InteractingState::isWaitingToEnter(), MSPModel_Striping::PState::otherStripe(), SIMTIME, and MSPModel_Striping::PState::stripe().
Referenced by moveInDirectionOnLane().
|
staticprivate |
computes the successor lane for the given pedestrian and sets the link as well as the direction to use on the succesor lane
[in] | currentLane | The lane the pedestrian is currently on |
[in] | ped | The 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().
|
private |
Definition at line 708 of file MSPModel_Striping.cpp.
References addCloserObstacle(), addCrossingVehs(), MSPModel::BACKWARD, MSPModel::FORWARD, MSLane::getEdge(), Named::getID(), MSLane::getIncomingLanes(), MSLane::getLength(), MSPModel_Interacting::getPedestrians(), MSPModel_InteractingState::getPerson(), MSPModel_Striping::PState::getPosition(), MSPModel_Striping::PState::getPosLat(), MSLane::getShape(), MSPModel_InteractingState::getStage(), getStripeOffset(), MSLink::getTLLogic(), MSLane::getVehicleNumberWithPartials(), getVehicleObstacles(), MSTransportable::getVehicleType(), MSLane::getWidth(), MSVehicleType::getWidth(), MSLink::havePriority(), Position::INVALID, MSEdge::isCrossing(), MSPModel_InteractingState::isJammed(), MSPModel_InteractingState::isWaitingToEnter(), MSEdge::isWalkingArea(), MSPModel_Striping::PState::mergeObstacles(), myMinNextLengths, numStripes(), OBSTACLE_END, OBSTACLE_NEXTEND, OBSTACLE_PED, MSPModel_Striping::PState::otherStripe(), MSPModel_Striping::Obstacle::speed, MSPModel_Striping::PState::stripe(), stripeWidth, transformToCurrentLanePositions(), PositionVector::transformToVectorCoordinates(), WRITE_WARNINGF, Position::x(), and Position::y().
Referenced by moveInDirectionOnLane().
|
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().
|
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().
|
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().
|
staticprivate |
Definition at line 698 of file MSPModel_Striping.cpp.
Referenced by getNextLaneObstacles(), and MSPModel_Striping::PState::moveToNextLane().
|
staticprivate |
retrieve vehicle obstacles on the given lane
Definition at line 1335 of file MSPModel_Striping.cpp.
References MSLane::anyVehiclesBegin(), MSLane::anyVehiclesEnd(), MSLane::anyVehiclesUpstreamBegin(), MSLane::anyVehiclesUpstreamEnd(), MSPModel::BACKWARD, DEBUGCOND, DEBUGCOND2, DELTA_T, MSPModel::FORWARD, MSVehicle::getBackPositionOnLane(), MSLane::getBidiLane(), Named::getID(), MSVehicle::getLane(), MSVehicle::getLateralPositionOnLane(), MSLane::getLength(), MSVehicleType::getLength(), MSPModel_Striping::PState::getMaxX(), MSPModel_Striping::PState::getMinX(), MSPModel_InteractingState::getPerson(), MSPModel_Striping::PState::getPosLat(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSTransportable::getVehicleType(), MSVehicle::getWaitingTime(), MSLane::getWidth(), MSVehicleType::getWidth(), LOOKAHEAD_SAMEDIR, LOOKAROUND_VEHICLES, MAX2(), MIN2(), numStripes(), OBSTACLE_VEHICLE, MSPModel::SAFETY_GAP, SIMTIME, MSPModel_Striping::PState::stripe(), stripeWidth, and MSPModel_Striping::Obstacle::xFwd.
Referenced by getNextLaneObstacles(), and moveInDirectionOnLane().
|
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().
|
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().
|
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().
|
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().
|
staticprivate |
creates and inserts all paths into the given map
Definition at line 259 of file MSPModel_Striping.cpp.
References PositionVector::angleAt2D(), MSPModel::BACKWARD, PositionVector::bezier(), DEG2RAD, Position::distanceTo2D(), PositionVector::extrapolate(), MSPModel::FORWARD, Named::getID(), MSLane::getLength(), MSLane::getLinkTo(), MSEdge::getPredecessors(), MSLane::getShape(), MSEdge::getSuccessors(), MSLane::getWidth(), INVALID_DOUBLE, MSEdge::isWalkingArea(), MSPModel_Striping::WalkingAreaPath::length, PositionVector::length(), MIN2(), myMinNextLengths, myWalkingAreaDetail, PositionVector::push_back_noDoublePos(), and PositionVector::reverse().
Referenced by initWalkingAreaPaths().
|
virtual |
load the state of the given transportable
Reimplemented from MSPModel.
Definition at line 191 of file MSPModel_Striping.cpp.
References MSEventControl::addEvent(), MSNet::getBeginOfTimestepEvents(), MSNet::getInstance(), MSPModel_InteractingState::getLane(), MSPModel_Interacting::myActiveLanes, MSPModel_Interacting::myAmActive, MSPModel_Interacting::myNumActivePedestrians, and SIMSTEP.
|
protected |
move all pedestrians forward and advance to the next lane if applicable
Definition at line 844 of file MSPModel_Striping.cpp.
References Boundary::add(), addVehicleFoe(), arriveAndAdvance(), DEBUGCOND, MSPModel_Striping::WalkingAreaPath::dir, MSPModel_Striping::WalkingAreaPath::from, MSVehicle::getBackPosition(), Boundary::getCenter(), MSPModel_InteractingState::getDirection(), MSLane::getEdge(), MSPModel_InteractingState::getEdgePos(), Named::getID(), MSPModel_InteractingState::getPerson(), MSVehicle::getPosition(), MSPModel_Striping::PState::getPosition(), MSPModel_Striping::PState::getPosLat(), MSPModel_InteractingState::getStage(), MSBaseVehicle::getVehicleType(), MSLane::getWidth(), MSVehicleType::getWidth(), Boundary::getWidth(), Boundary::growWidth(), Position::INVALID, MSEdge::isWalkingArea(), MSPModel_Striping::WalkingAreaPath::length, MAX2(), MIN2(), PositionVector::move2side(), moveInDirectionOnLane(), MSPModel_Interacting::myActiveLanes, myWalkingAreaFoes, MSPModel_Striping::PState::myWalkingAreaPath, numStripes(), MSPModel_Striping::PState::reset(), MSPModel_Striping::PState::reverse(), MSPModel::SAFETY_GAP, MSPModel_Striping::WalkingAreaPath::shape, SIMSTEP, SIMTIME, stripeWidth, time2string(), MSPModel_Striping::WalkingAreaPath::to, PositionVector::transformToVectorCoordinates(), WRITE_WARNINGF, Position::x(), Position::y(), Boundary::ymax(), and Boundary::ymin().
|
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().
|
virtualinherited |
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or nullptr
[in] | lane | the lane to check |
[in] | minPos | The minimum offset along the lane after which to check |
[in] | minRight | The rightmost border of the vehicle (0 indicates driving on the right border) |
[in] | maxLeft | The leftmost border of the vehicle |
[in] | stopTime | The time it would take the vehicle to come to a stop |
[in] | bidi | Whether the vehicle is driving against the flow |
Reimplemented from MSPModel.
Definition at line 127 of file MSPModel_Interacting.cpp.
References DEBUGCOND, MSPModel::FORWARD, Named::getID(), MSPModel_Interacting::getPedestrians(), and MSLane::getWidth().
|
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().
|
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().
|
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().
|
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().
|
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().
|
staticprivate |
Definition at line 809 of file MSPModel_Striping.cpp.
References MSPModel::FORWARD.
Referenced by getNextLaneObstacles().
|
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().
|
virtualinherited |
whether movements on intersections are modelled /
Implements MSPModel.
Definition at line 115 of file MSPModel_Interacting.cpp.
References 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().
|
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.
Definition at line 51 of file MSPModel_Striping.h.
|
staticinherited |
Definition at line 55 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), addCloserObstacle(), addCrossingVehs(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeDuration(), connectedDirection(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::PState::getAngle(), MSPModel_NonInteracting::PState::getDirection(), getNextLane(), getNextLaneObstacles(), getVehicleObstacles(), insertWalkArePaths(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSInductLoop::notifyLeave(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::walk(), and MSStageWalking::walkDistance().
|
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().
|
staticprotected |
Definition at line 172 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::PState::distanceTo(), and getNeighboringObstacles().
|
staticprotected |
Definition at line 171 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::PState::distanceTo().
|
staticprotected |
Definition at line 173 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::PState::distanceTo(), getNeighboringObstacles(), moveInDirectionOnLane(), and MSPModel_Striping::PState::walk().
|
staticinherited |
Definition at line 54 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), addCloserObstacle(), addCrossingVehs(), MSPModel_Interacting::blockedAtDist(), MSPModel::canTraverse(), MSPModel_Striping::Obstacle::closer(), MSPModel_NonInteracting::PState::computeDuration(), connectedDirection(), MSPModel_Striping::PState::distanceTo(), MSPModel_Striping::PState::distToLaneEnd(), MSE3Collector::enter(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_NonInteracting::PState::getDirection(), MSStageDriving::getDirection(), MSPModel_Striping::PState::getMaxX(), MSPModel_Striping::PState::getMinX(), getNextLane(), getNextLaneObstacles(), getNextWalkingArea(), MSPModel_Striping::PState::getPosition(), getVehicleObstacles(), insertWalkArePaths(), MSE3Collector::leave(), MSPModel_Striping::PState::mergeObstacles(), moveInDirectionOnLane(), MSStageWalking::moveToNextEdge(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSPModel_Interacting::nextBlocking(), MSInductLoop::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSE2Collector::notifyMovePerson(), MSInductLoop::notifyMovePerson(), MSE3Collector::notifyMovePerson(), MSPModel_Striping::PState::PState(), MSPModel_JuPedSim::PState::PState(), transformToCurrentLanePositions(), MSPModel_Striping::PState::walk(), and MSStageWalking::walkDistance().
|
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().
|
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().
|
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().
|
static |
Definition at line 106 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().
|
static |
Definition at line 107 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::walk().
|
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().
|
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().
|
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().
|
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().
|
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().
|
static |
the distance (in m) to look around for vehicles
Definition at line 119 of file MSPModel_Striping.h.
Referenced by getVehicleObstacles().
|
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().
|
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().
|
static |
the safety buffer to vehicles
Definition at line 99 of file MSPModel_Striping.h.
Referenced by addCrossingVehs(), and MSPModel_Striping().
|
protectedinherited |
store of all lanes which have pedestrians on them
Definition at line 107 of file MSPModel_Interacting.h.
Referenced by add(), arriveAndAdvance(), MSPModel_Interacting::clearState(), MSPModel_JuPedSim::execute(), getActiveLanes(), MSPModel_Interacting::getPedestrians(), loadState(), moveInDirection(), MSPModel_Striping::PState::moveToXY(), MSPModel_Interacting::remove(), and MSPModel_JuPedSim::remove().
|
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().
|
protectedinherited |
all crossings being approached by pedestrians
Definition at line 113 of file MSPModel_Interacting.h.
|
static |
use old style departPosLat interpretation
Definition at line 112 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping(), and MSPModel_Striping::PState::PState().
|
staticprivate |
Definition at line 498 of file MSPModel_Striping.h.
Referenced by getNextLaneObstacles(), insertWalkArePaths(), and ~MSPModel_Striping().
|
protectedinherited |
the total number of active pedestrians
Definition at line 104 of file MSPModel_Interacting.h.
Referenced by MSPModel_JuPedSim::add(), add(), arriveAndAdvance(), MSPModel_Interacting::clearState(), MSPModel_JuPedSim::clearState(), MSPModel_Interacting::getActiveNumber(), loadState(), MSPModel_Interacting::registerActive(), MSPModel_JuPedSim::registerArrived(), and MSPModel_Interacting::remove().
|
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().
|
staticprivate |
Definition at line 497 of file MSPModel_Striping.h.
Referenced by initWalkingAreaPaths(), moveInDirection(), MSPModel_Striping::PState::walk(), and ~MSPModel_Striping().
|
staticprivate |
store for walkinArea elements
Definition at line 496 of file MSPModel_Striping.h.
Referenced by getArbitraryPath(), getWalkingAreaPath(), guessPath(), initWalkingAreaPaths(), MSPModel_Striping::PState::PState(), and ~MSPModel_Striping().
|
staticprotectedinherited |
empty pedestrian vector
Definition at line 116 of file MSPModel_Interacting.h.
Referenced by MSPModel_Interacting::getPedestrians().
|
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().
|
static |
the minimum utility that indicates obstruction
Definition at line 136 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::PState::walk().
|
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().
|
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().
|
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().
|
static |
Definition at line 143 of file MSPModel_Striping.h.
Referenced by addCrossingVehs(), MSPModel_Striping(), and MSPModel_Striping::PState::walk().
|
static |
Definition at line 144 of file MSPModel_Striping.h.
Referenced by getReserved(), and MSPModel_Striping().
|
staticinherited |
Definition at line 59 of file MSPModel.h.
Referenced by MSLink::getLeaderInfo(), getVehicleObstacles(), MSLink::isInFront(), MSLane::isInsertionSuccess(), moveInDirection(), and MSVehicle::planMoveInternal().
|
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().
|
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().
|
static |
model parameters
the width of a pedstrian stripe
Definition at line 93 of file MSPModel_Striping.h.
Referenced by getNextLaneObstacles(), getReserved(), getVehicleObstacles(), moveInDirection(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSPModel_Striping(), numStripes(), MSPModel_Striping::PState::otherStripe(), posLatConversion(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::stripe(), and MSPModel_Striping::PState::walk().
|
staticinherited |
Definition at line 56 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeDuration(), connectedDirection(), MSPModel_NonInteracting::PState::getDirection(), MSStage::getDirection(), MSStageDriving::getDirection(), MSStageMoving::getDirection(), GUIPerson::getDirection(), getNextLane(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::reset(), and MSStageWalking::walkDistance().
|
staticinherited |
the default lateral offset for persons when starting a walk
Definition at line 65 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), LIBSUMO_NAMESPACE::Person::appendWalkingStage(), LIBSUMO_NAMESPACE::Person::convertTraCIStage(), MSRouteHandler::interpretDepartPosLat(), LIBSUMO_NAMESPACE::Person::moveToXY(), MSPModel_Striping::PState::PState(), and MSPerson::replaceWalk().
|
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().