![]() |
Eclipse SUMO - Simulation of Urban MObility
|
The pedestrian following model connected to the external JuPedSim simulation. More...
#include <MSPModel_Remote.h>
Data Structures | |
class | Event |
class | PState |
Container for pedestrian state and individual position update function. More... | |
Public Member Functions | |
MSTransportableStateAdapter * | add (MSTransportable *person, MSStageMoving *stage, SUMOTime now) override |
register the given person as a pedestrian More... | |
virtual bool | blockedAtDist (const MSLane *lane, double vehSide, double vehWidth, double oncomingGap, std::vector< const MSPerson * > *collectBlockers) |
whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries More... | |
void | clearState () |
Resets pedestrians when quick-loading state. More... | |
SUMOTime | execute (SUMOTime time) |
int | getActiveNumber () |
return the number of active objects More... | |
virtual bool | hasPedestrians (const MSLane *lane) |
whether the given lane has pedestrians on it More... | |
virtual MSTransportableStateAdapter * | loadState (MSTransportable *transportable, MSStageMoving *stage, std::istringstream &state) |
load the state of the given transportable More... | |
MSPModel_Remote (const OptionsCont &oc, MSNet *net) | |
virtual PersonDist | nextBlocking (const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0, bool bidi=false) |
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0 More... | |
void | remove (MSTransportableStateAdapter *state) override |
remove the specified person from the pedestrian simulation More... | |
bool | usingInternalLanes () |
whether movements on intersections are modelled More... | |
~MSPModel_Remote () | |
Static Public Member Functions | |
static int | canTraverse (int dir, const ConstMSEdgeVector &route) |
Static Public Attributes | |
static const int | BACKWARD |
static const int | FORWARD |
static const double | RANDOM_POS_LAT |
magic value to encode randomized lateral offset for persons when starting a walk More... | |
static const double | SAFETY_GAP |
static const double | SIDEWALK_OFFSET |
the offset for computing person positions when walking on edges without a sidewalk More... | |
static const int | UNDEFINED_DIRECTION |
static const double | UNSPECIFIED_POS_LAT |
the default lateral offset for persons when starting a walk More... | |
Private Member Functions | |
MSLane * | getFirstPedestrianLane (const MSEdge *const &edge) |
void | initialize () |
Private Attributes | |
std::map< const MSEdge *, std::tuple< int, int > > | edgesTransitionsMapping |
Boundary | myBoundary |
int | myLastId = 0 |
int | myLastTransitionId = 0 |
MSNet * | myNet |
std::map< int, PState * > | remoteIdPStateMapping |
std::map< int, const MSEdge * > | transitionsEdgesMapping |
The pedestrian following model connected to the external JuPedSim simulation.
Definition at line 36 of file MSPModel_Remote.h.
MSPModel_Remote::MSPModel_Remote | ( | const OptionsCont & | oc, |
MSNet * | net | ||
) |
Definition at line 32 of file MSPModel_Remote.cpp.
References MSEventControl::addEvent(), DELTA_T, MSNet::getBeginOfTimestepEvents(), MSNet::getCurrentTimeStep(), and initialize().
MSPModel_Remote::~MSPModel_Remote | ( | ) |
Definition at line 114 of file MSPModel_Remote.cpp.
|
overridevirtual |
register the given person as a pedestrian
Implements MSPModel.
Definition at line 40 of file MSPModel_Remote.cpp.
References MSTransportable::getCurrentStageType(), myLastId, and remoteIdPStateMapping.
|
inlinevirtualinherited |
whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries
[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_Striping.
Definition at line 81 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::PState::PState(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
virtual |
Resets pedestrians when quick-loading state.
Implements MSPModel.
Definition at line 298 of file MSPModel_Remote.cpp.
Definition at line 129 of file MSPModel_Remote.cpp.
References DELTA_T.
Referenced by MSPModel_Remote::Event::execute().
|
inlinevirtual |
return the number of active objects
Implements MSPModel.
Definition at line 58 of file MSPModel_Remote.h.
References remoteIdPStateMapping.
Definition at line 203 of file MSPModel_Remote.cpp.
References Named::getID(), MSEdge::getLanes(), and SVC_PEDESTRIAN.
|
inlinevirtualinherited |
whether the given lane has pedestrians on it
Reimplemented in MSPModel_Striping.
Definition at line 92 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLane::hasPedestrians().
|
private |
Definition at line 221 of file MSPModel_Remote.cpp.
Referenced by MSPModel_Remote().
|
inlinevirtualinherited |
load the state of the given transportable
Reimplemented in MSPModel_NonInteracting, and MSPModel_Striping.
Definition at line 60 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSPerson::MSPersonStage_Walking::loadState().
|
inlinevirtualinherited |
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0
[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_Striping.
Definition at line 106 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLane::nextBlocking().
|
overridevirtual |
remove the specified person from the pedestrian simulation
Implements MSPModel.
Definition at line 214 of file MSPModel_Remote.cpp.
|
virtual |
whether movements on intersections are modelled
Implements MSPModel.
Definition at line 293 of file MSPModel_Remote.cpp.
References MSNet::getInstance(), MSGlobals::gUsingInternalLanes, and MSNet::hasInternalLinks().
|
staticinherited |
Definition at line 118 of file MSPModel.h.
Referenced by 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::initWalkingAreaPaths(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSInductLoop::notifyLeave(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::walk(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
private |
Definition at line 99 of file MSPModel_Remote.h.
|
staticinherited |
Definition at line 117 of file MSPModel.h.
Referenced by MSPModel_Striping::addCloserObstacle(), MSPModel_Striping::addCrossingVehs(), MSPModel_Striping::blockedAtDist(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeDuration(), MSPModel_Striping::connectedDirection(), MSPModel_Striping::PState::distanceTo(), MSPModel_Striping::PState::distToLaneEnd(), MSE3Collector::enter(), MSPModel_Striping::MovePedestrians::execute(), MSStageDriving::getDirection(), MSPModel_NonInteracting::PState::getDirection(), MSPModel_Striping::PState::getMaxX(), MSPModel_Striping::PState::getMinX(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::getNextWalkingArea(), MSPModel_Striping::getVehicleObstacles(), MSPModel_Striping::initWalkingAreaPaths(), MSE3Collector::leave(), MSPModel_Striping::PState::mergeObstacles(), MSPModel_Striping::moveInDirectionOnLane(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSPModel_Striping::nextBlocking(), MSInductLoop::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSE2Collector::notifyMovePerson(), MSInductLoop::notifyMovePerson(), MSE3Collector::notifyMovePerson(), MSPModel_Striping::PState::PState(), MSPModel_Striping::transformToCurrentLanePositions(), MSPModel_Striping::PState::walk(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
private |
Definition at line 95 of file MSPModel_Remote.h.
|
private |
Definition at line 101 of file MSPModel_Remote.h.
Referenced by add().
|
private |
Definition at line 102 of file MSPModel_Remote.h.
|
private |
Definition at line 94 of file MSPModel_Remote.h.
|
staticinherited |
magic value to encode randomized lateral offset for persons when starting a walk
Definition at line 131 of file MSPModel.h.
Referenced by MSRouteHandler::interpretDepartPosLat(), and MSPModel_Striping::PState::PState().
|
private |
Definition at line 98 of file MSPModel_Remote.h.
Referenced by add(), and getActiveNumber().
|
staticinherited |
Definition at line 122 of file MSPModel.h.
Referenced by MSLink::checkWalkingAreaFoe(), MSLink::getLeaderInfo(), MSPModel_Striping::PStateVehicle::getMaxX(), MSPModel_Striping::PStateVehicle::getMinX(), MSPModel_Striping::getVehicleObstacles(), and MSLink::isInFront().
|
staticinherited |
the offset for computing person positions when walking on edges without a sidewalk
Definition at line 125 of file MSPModel.h.
Referenced by MSPModel_NonInteracting::PState::getPosition(), GUINet::initGUIStructures(), LIBSUMO_NAMESPACE::Person::moveTo(), and MSPModel_Striping::PState::moveToXY().
|
private |
Definition at line 100 of file MSPModel_Remote.h.
|
staticinherited |
Definition at line 119 of file MSPModel.h.
Referenced by MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeDuration(), MSPModel_Striping::connectedDirection(), MSStage::getDirection(), MSStageDriving::getDirection(), MSStageMoving::getDirection(), GUIPerson::getDirection(), MSPModel_NonInteracting::PState::getDirection(), MSPModel_Remote::PState::getDirection(), MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::moveToXY(), MSPModel_Striping::PState::PState(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
staticinherited |
the default lateral offset for persons when starting a walk
Definition at line 128 of file MSPModel.h.
Referenced by LIBSUMO_NAMESPACE::Person::appendWalkingStage(), LIBSUMO_NAMESPACE::Person::convertTraCIStage(), MSRouteHandler::interpretDepartPosLat(), LIBSUMO_NAMESPACE::Person::moveToXY(), MSPModel_Striping::PState::PState(), and MSPerson::reroute().