Eclipse SUMO - Simulation of Urban MObility
|
The pedestrian following model. More...
#include <MSPModel_NonInteracting.h>
Data Structures | |
class | CState |
class | MoveToNextEdge |
class | PState |
implementation of callbacks to retrieve various state information from the model More... | |
Public Member Functions | |
MSTransportableStateAdapter * | add (MSTransportable *transportable, MSStageMoving *stage, SUMOTime now) |
register the given transportable | |
virtual bool | blockedAtDist (const SUMOTrafficObject *ego, const MSLane *lane, double vehSide, double vehWidth, double oncomingGap, std::vector< const MSPerson * > *collectBlockers) |
whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries | |
void | clearState () |
Resets pedestrians when quick-loading state. | |
int | getActiveNumber () |
return the number of active objects | |
virtual 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_NonInteracting (const OptionsCont &oc, MSNet *net) | |
Constructor (it should not be necessary to construct more than one instance) | |
virtual PersonDist | nextBlocking (const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0, bool bidi=false) |
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or nullptr | |
void | registerArrived () |
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_NonInteracting () | |
Static Public Member Functions | |
static int | canTraverse (int dir, const ConstMSEdgeVector &route, int &passedEdges) |
Static Public Attributes | |
static const int | BACKWARD |
static const int | FORWARD |
static const double | RANDOM_POS_LAT |
magic value to encode randomized lateral offset for persons when starting a walk | |
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 | |
Private Attributes | |
MSNet * | myNet |
the net to which to issue moveToNextEdge commands | |
int | myNumActivePedestrians |
the total number of active pedestrians | |
The pedestrian following model.
Definition at line 47 of file MSPModel_NonInteracting.h.
MSPModel_NonInteracting::MSPModel_NonInteracting | ( | const OptionsCont & | oc, |
MSNet * | net | ||
) |
Constructor (it should not be necessary to construct more than one instance)
Definition at line 46 of file MSPModel_NonInteracting.cpp.
References myNet, and UNUSED_PARAMETER.
MSPModel_NonInteracting::~MSPModel_NonInteracting | ( | ) |
Definition at line 54 of file MSPModel_NonInteracting.cpp.
|
virtual |
register the given transportable
Implements MSPModel.
Definition at line 59 of file MSPModel_NonInteracting.cpp.
References MSEventControl::addEvent(), MSPModel_NonInteracting::PState::computeDuration(), MSNet::getBeginOfTimestepEvents(), MSTransportable::isPerson(), myNet, and myNumActivePedestrians.
|
inlinevirtualinherited |
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 in MSPModel_Interacting.
Definition at line 98 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLink::getLeaderInfo().
|
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.
Definition at line 78 of file MSPModel_NonInteracting.cpp.
References myNumActivePedestrians.
|
inlinevirtual |
return the number of active objects
Implements MSPModel.
Definition at line 73 of file MSPModel_NonInteracting.h.
References myNumActivePedestrians.
|
inlinevirtualinherited |
whether the given lane has pedestrians on it
Reimplemented in MSPModel_Interacting.
Definition at line 110 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLane::hasPedestrians().
|
virtual |
load the state of the given transportable
Reimplemented from MSPModel.
Definition at line 69 of file MSPModel_NonInteracting.cpp.
References MSEventControl::addEvent(), MSNet::getBeginOfTimestepEvents(), MSPModel_NonInteracting::PState::getEventTime(), MSTransportable::isPerson(), myNet, and myNumActivePedestrians.
|
inlinevirtualinherited |
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 in MSPModel_Interacting.
Definition at line 124 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLane::nextBlocking().
|
inline |
Definition at line 77 of file MSPModel_NonInteracting.h.
References myNumActivePedestrians.
Referenced by MSPModel_NonInteracting::MoveToNextEdge::execute().
|
virtual |
remove the specified person from the pedestrian simulation
Implements MSPModel.
Definition at line 83 of file MSPModel_NonInteracting.cpp.
References myNumActivePedestrians.
|
inlinevirtual |
whether movements on intersections are modelled
Implements MSPModel.
Definition at line 68 of file MSPModel_NonInteracting.h.
|
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(), MSPModel_Interacting::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(), MSPModel_Interacting::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().
|
private |
the net to which to issue moveToNextEdge commands
Definition at line 168 of file MSPModel_NonInteracting.h.
Referenced by add(), loadState(), and MSPModel_NonInteracting().
|
private |
the total number of active pedestrians
Definition at line 171 of file MSPModel_NonInteracting.h.
Referenced by add(), clearState(), getActiveNumber(), loadState(), registerArrived(), and remove().
|
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().