Eclipse SUMO - Simulation of Urban MObility
|
The abstract superclass for pedestrian models which actually interact with vehicles. More...
#include <MSPModel_Interacting.h>
Public Member Functions | |
virtual MSTransportableStateAdapter * | add (MSTransportable *transportable, MSStageMoving *stage, SUMOTime now)=0 |
register the given person as a pedestrian | |
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 | |
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 | |
virtual MSTransportableStateAdapter * | loadState (MSTransportable *transportable, MSStageMoving *stage, std::istringstream &state) |
load the state of the given transportable | |
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_Interacting () | |
Static Public Member Functions | |
static int | canTraverse (int dir, const ConstMSEdgeVector &route, int &passedEdges) |
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 | |
Protected Types | |
typedef std::map< const MSLane *, Pedestrians, ComparatorNumericalIdLess > | ActiveLanes |
typedef std::vector< MSPModel_InteractingState * > | Pedestrians |
Protected Member Functions | |
Pedestrians & | getPedestrians (const MSLane *lane) |
retrieves the pedestrian vector for the given lane (may be empty) | |
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 Pedestrians | noPedestrians |
empty pedestrian vector | |
The abstract superclass for pedestrian models which actually interact with vehicles.
Definition at line 41 of file MSPModel_Interacting.h.
|
protected |
Definition at line 98 of file MSPModel_Interacting.h.
|
protected |
Definition at line 97 of file MSPModel_Interacting.h.
MSPModel_Interacting::~MSPModel_Interacting | ( | ) |
Definition at line 41 of file MSPModel_Interacting.cpp.
References clearState().
|
pure virtualinherited |
register the given person as a pedestrian
Implemented in MSPModel_JuPedSim, MSPModel_NonInteracting, and MSPModel_Striping.
Referenced by MSStageWalking::proceed(), and MSStageTranship::proceed().
|
virtual |
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 70 of file MSPModel_Interacting.cpp.
References DEBUGCOND, MSPModel::FORWARD, Named::getID(), 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 MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::PState(), and MSStageWalking::walkDistance().
|
virtual |
Resets pedestrians when quick-loading state.
Implements MSPModel.
Reimplemented in MSPModel_JuPedSim.
Definition at line 47 of file MSPModel_Interacting.cpp.
References myActiveLanes, myAmActive, and myNumActivePedestrians.
Referenced by ~MSPModel_Interacting().
|
inlinevirtual |
return the number of active pedestrians
Implements MSPModel.
Definition at line 84 of file MSPModel_Interacting.h.
References myNumActivePedestrians.
|
protected |
retrieves the pedestrian vector for the given lane (may be empty)
Definition at line 164 of file MSPModel_Interacting.cpp.
References myActiveLanes, and noPedestrians.
Referenced by blockedAtDist(), MSPModel_Striping::getNextLaneObstacles(), hasPedestrians(), and nextBlocking().
|
virtual |
whether the given lane has pedestrians on it
Reimplemented from MSPModel.
Definition at line 108 of file MSPModel_Interacting.cpp.
References getPedestrians().
|
inlinevirtualinherited |
load the state of the given transportable
Reimplemented in MSPModel_NonInteracting, and MSPModel_Striping.
Definition at line 76 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSStageWalking::loadState().
|
virtual |
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 126 of file MSPModel_Interacting.cpp.
References DEBUGCOND, MSPModel::FORWARD, Named::getID(), getPedestrians(), and MSLane::getWidth().
|
inline |
increase the number of active pedestrians
Definition at line 89 of file MSPModel_Interacting.h.
References myNumActivePedestrians.
Referenced by MSPModel_Striping::PState::moveToXY().
|
virtual |
remove the specified person from the pedestrian simulation
Implements MSPModel.
Reimplemented in MSPModel_JuPedSim.
Definition at line 55 of file MSPModel_Interacting.cpp.
References MSTransportableStateAdapter::getLane(), MSPModel_InteractingState::getNextCrossing(), myActiveLanes, myNumActivePedestrians, and unregisterCrossingApproach().
Referenced by MSPModel_Striping::PState::moveToXY().
|
static |
unregister pedestrian approach with the junction model
Definition at line 175 of file MSPModel_Interacting.cpp.
References DEBUGCOND, Named::getID(), MSLane::getIncomingLanes(), MSPModel_InteractingState::getPerson(), and SIMTIME.
Referenced by MSPModel_Striping::getNextLane(), MSPModel_Striping::moveInDirectionOnLane(), and remove().
|
virtual |
whether movements on intersections are modelled /
Implements MSPModel.
Definition at line 114 of file MSPModel_Interacting.cpp.
References usingInternalLanesStatic().
|
static |
Definition at line 120 of file MSPModel_Interacting.cpp.
References MSNet::getInstance(), MSGlobals::gUsingInternalLanes, MSNet::hasInternalLinks(), and MSNet::hasPedestrianNetwork().
Referenced by MSPModel_Striping::getNextLane(), and 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.
|
staticinherited |
Definition at line 55 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), MSPModel_Striping::addCloserObstacle(), MSPModel_Striping::addCrossingVehs(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeDuration(), MSPModel_Striping::connectedDirection(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::PState::getAngle(), MSPModel_NonInteracting::PState::getDirection(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::getVehicleObstacles(), MSPModel_Striping::insertWalkArePaths(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSInductLoop::notifyLeave(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::walk(), and MSStageWalking::walkDistance().
|
staticinherited |
Definition at line 54 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), MSPModel_Striping::addCloserObstacle(), MSPModel_Striping::addCrossingVehs(), blockedAtDist(), MSPModel::canTraverse(), MSPModel_Striping::Obstacle::closer(), MSPModel_NonInteracting::PState::computeDuration(), MSPModel_Striping::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(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::getNextWalkingArea(), MSPModel_Striping::PState::getPosition(), MSPModel_Striping::getVehicleObstacles(), MSPModel_Striping::insertWalkArePaths(), MSE3Collector::leave(), MSPModel_Striping::PState::mergeObstacles(), MSPModel_Striping::moveInDirectionOnLane(), MSStageWalking::moveToNextEdge(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), nextBlocking(), MSInductLoop::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSE2Collector::notifyMovePerson(), MSInductLoop::notifyMovePerson(), MSE3Collector::notifyMovePerson(), MSPModel_Striping::PState::PState(), MSPModel_JuPedSim::PState::PState(), MSPModel_Striping::transformToCurrentLanePositions(), MSPModel_Striping::PState::walk(), and MSStageWalking::walkDistance().
|
protected |
store of all lanes which have pedestrians on them
Definition at line 107 of file MSPModel_Interacting.h.
Referenced by MSPModel_Striping::add(), MSPModel_Striping::arriveAndAdvance(), clearState(), MSPModel_JuPedSim::execute(), MSPModel_Striping::getActiveLanes(), getPedestrians(), MSPModel_Striping::loadState(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::PState::moveToXY(), remove(), and MSPModel_JuPedSim::remove().
|
protected |
whether an event for pedestrian processing was added
Definition at line 110 of file MSPModel_Interacting.h.
Referenced by MSPModel_Striping::add(), clearState(), and MSPModel_Striping::loadState().
|
protected |
all crossings being approached by pedestrians
Definition at line 113 of file MSPModel_Interacting.h.
|
protected |
the total number of active pedestrians
Definition at line 104 of file MSPModel_Interacting.h.
Referenced by MSPModel_JuPedSim::add(), MSPModel_Striping::add(), MSPModel_Striping::arriveAndAdvance(), clearState(), MSPModel_JuPedSim::clearState(), getActiveNumber(), MSPModel_Striping::loadState(), registerActive(), MSPModel_JuPedSim::registerArrived(), and remove().
|
staticprotected |
empty pedestrian vector
Definition at line 116 of file MSPModel_Interacting.h.
Referenced by getPedestrians().
|
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().
|
staticinherited |
Definition at line 59 of file MSPModel.h.
Referenced by MSLink::getLeaderInfo(), MSPModel_Striping::getVehicleObstacles(), MSLink::isInFront(), MSLane::isInsertionSuccess(), MSPModel_Striping::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().
|
staticinherited |
Definition at line 56 of file MSPModel.h.
Referenced by MSPModel_JuPedSim::add(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeDuration(), MSPModel_Striping::connectedDirection(), MSPModel_NonInteracting::PState::getDirection(), MSStage::getDirection(), MSStageDriving::getDirection(), MSStageMoving::getDirection(), GUIPerson::getDirection(), MSPModel_Striping::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().