![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSPModel_Remote.h>
Data Structures | |
class | Event |
class | PState |
Container for pedestrian state and individual position update function. More... | |
Public Member Functions | |
PedestrianState * | add (MSPerson *person, MSPerson::MSPersonStage_Walking *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 | cleanupHelper () override |
SUMOTime | execute (SUMOTime time) |
virtual bool | hasPedestrians (const MSLane *lane) |
whether the given lane has pedestrians on it More... | |
MSPModel_Remote (const OptionsCont &oc, MSNet *net) | |
virtual PersonDist | nextBlocking (const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0) |
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0 More... | |
void | remove (PedestrianState *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 void | cleanup () |
remove state at simulation end More... | |
static MSPModel * | getModel () |
Static Public Attributes | |
static const int | BACKWARD |
static const int | FORWARD |
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 |
Private Member Functions | |
MSLane * | getFirstPedestrianLane (const MSEdge *const &edge) |
void | handlePedestrianLane (MSLane *pLane, hybridsim::Scenario &scenario) |
void | handleShape (const PositionVector &shape, hybridsim::Scenario &scenario) |
void | handleWalkingArea (MSEdge *msEdge, hybridsim::Scenario &scenario) |
void | initialize () |
void | makeStartOrEndTransition (Position position, Position scnd, double width, hybridsim::Scenario &scenario, hybridsim::Edge_Type type, int i) |
Private Attributes | |
std::map< const MSEdge *, std::tuple< int, int > > | edgesTransitionsMapping |
Boundary | myBoundary |
std::unique_ptr< hybridsim::HybridSimulation::Stub > | myHybridsimStub |
int | myLastId = 0 |
int | myLastTransitionId = 0 |
MSNet * | myNet |
std::map< int, PState * > | remoteIdPStateMapping |
std::map< int, const MSEdge * > | transitionsEdgesMapping |
Static Private Attributes | |
static MSPModel * | myModel |
Definition at line 27 of file MSPModel_Remote.h.
MSPModel_Remote::MSPModel_Remote | ( | const OptionsCont & | oc, |
MSNet * | net | ||
) |
Definition at line 33 of file MSPModel_Remote.cpp.
References MSEventControl::addEvent(), DELTA_T, MSNet::getBeginOfTimestepEvents(), MSNet::getCurrentTimeStep(), OptionsCont::getString(), initialize(), and myHybridsimStub.
MSPModel_Remote::~MSPModel_Remote | ( | ) |
Definition at line 119 of file MSPModel_Remote.cpp.
References myHybridsimStub.
|
overridevirtual |
register the given person as a pedestrian
Implements MSPModel.
Definition at line 44 of file MSPModel_Remote.cpp.
References MSPModel::BACKWARD, edgesTransitionsMapping, MSPModel::FORWARD, MSPerson::MSPersonStage_Walking::getArrivalPos(), MSTransportable::getCurrentStageType(), MSPerson::MSPersonStage_Walking::getDepartPos(), getFirstPedestrianLane(), MSEdge::getFromJunction(), Named::getID(), MSTransportable::getID(), MSPerson::MSPersonStage_Walking::getRoute(), MSLane::getShape(), MSEdge::getToJunction(), MSTransportable::MOVING_WITHOUT_VEHICLE, myHybridsimStub, myLastId, PositionVector::positionAtOffset(), remoteIdPStateMapping, Position::x(), and Position::y().
|
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 74 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLink::getLeaderInfo().
|
staticinherited |
Definition at line 92 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().
|
staticinherited |
remove state at simulation end
Definition at line 82 of file MSPModel.cpp.
References MSPModel::cleanupHelper(), and MSPModel::myModel.
Referenced by MSNet::clearAll().
|
overridevirtual |
Reimplemented from MSPModel.
Definition at line 216 of file MSPModel_Remote.cpp.
References MSPModel::cleanupHelper().
Definition at line 132 of file MSPModel_Remote.cpp.
References DELTA_T, MSPerson::MSPersonStage_Walking::getNextRouteEdge(), MSPModel_Remote::PState::getPerson(), MSPModel_Remote::PState::getStage(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), myHybridsimStub, remoteIdPStateMapping, MSPModel_Remote::PState::setPhi(), MSPModel_Remote::PState::setPosition(), toString(), and transitionsEdgesMapping.
Referenced by MSPModel_Remote::Event::execute().
Definition at line 203 of file MSPModel_Remote.cpp.
References Named::getID(), MSEdge::getLanes(), and SVC_PEDESTRIAN.
Referenced by add().
|
staticinherited |
Definition at line 59 of file MSPModel.cpp.
References MSNet::getInstance(), OptionsCont::getOptions(), OptionsCont::getString(), and MSPModel::myModel.
Referenced by MSPerson::MSPersonStage_Walking::abort(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSLaneChanger::checkChange(), MSLane::checkForPedestrians(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSLink::getLeaderInfo(), MSPModel_Striping::PState::moveToXY(), MSVehicle::planMoveInternal(), MSPerson::MSPersonStage_Walking::proceed(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
private |
Definition at line 300 of file MSPModel_Remote.cpp.
References edgesTransitionsMapping, MSLane::getEdge(), MSLane::getShape(), MSLane::getWidth(), handleShape(), MSEdge::isCrossing(), MSEdge::isWalkingArea(), makeStartOrEndTransition(), PositionVector::move2side(), myLastTransitionId, and transitionsEdgesMapping.
Referenced by initialize().
|
private |
Definition at line 359 of file MSPModel_Remote.cpp.
References Boundary::add(), myBoundary, Position::x(), and Position::y().
Referenced by handlePedestrianLane(), and handleWalkingArea().
|
private |
Definition at line 277 of file MSPModel_Remote.cpp.
References MSEdge::getLanes(), MSLane::getShape(), handleShape(), Position::x(), and Position::y().
Referenced by initialize().
|
inlinevirtualinherited |
whether the given lane has pedestrians on it
Reimplemented in MSPModel_Striping.
Definition at line 85 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLaneChanger::checkChange(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSVehicle::planMoveInternal(), and MSLCM_SL2015::updateExpectedSublaneSpeeds().
|
private |
Definition at line 220 of file MSPModel_Remote.cpp.
References MSNet::getEdgeControl(), MSEdgeControl::getEdges(), handlePedestrianLane(), handleWalkingArea(), myBoundary, myHybridsimStub, myNet, SVC_PEDESTRIAN, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by MSPModel_Remote().
|
private |
Definition at line 338 of file MSPModel_Remote.cpp.
References Position::x(), and Position::y().
Referenced by handlePedestrianLane().
|
inlinevirtualinherited |
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0
Reimplemented in MSPModel_Striping.
Definition at line 91 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSLaneChanger::checkChange(), MSLane::checkForPedestrians(), MSLane::detectCollisions(), MSVehicle::planMoveInternal(), and MSLCM_SL2015::updateExpectedSublaneSpeeds().
|
overridevirtual |
remove the specified person from the pedestrian simulation
Implements MSPModel.
Definition at line 212 of file MSPModel_Remote.cpp.
|
virtual |
whether movements on intersections are modelled
Implements MSPModel.
Definition at line 422 of file MSPModel_Remote.cpp.
References MSNet::getInstance(), MSGlobals::gUsingInternalLanes, and MSNet::hasInternalLinks().
|
staticinherited |
Definition at line 104 of file MSPModel.h.
Referenced by add(), MSPModel_Striping::addCloserObstacle(), MSPModel_Striping::addCrossingVehs(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::connectedDirection(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::PState::getAngle(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::getVehicleObstacles(), MSPModel_Striping::initWalkingAreaPaths(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::PState(), MSPModel_Striping::PState::walk(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
private |
Definition at line 90 of file MSPModel_Remote.h.
Referenced by add(), and handlePedestrianLane().
|
staticinherited |
Definition at line 100 of file MSPModel.h.
Referenced by add(), MSPModel_Striping::addCloserObstacle(), MSPModel_Striping::addCrossingVehs(), MSPModel_Striping::blockedAtDist(), MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::connectedDirection(), MSPModel_Striping::PState::distanceTo(), MSPModel_Striping::PState::distToLaneEnd(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::PState::getMaxX(), MSPModel_Striping::PState::getMinX(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::getNextWalkingArea(), MSPModel_Striping::getVehicleObstacles(), MSPModel_Striping::initWalkingAreaPaths(), MSPModel_Striping::PState::mergeObstacles(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::nextBlocking(), MSPModel_Striping::PState::PState(), MSPModel_Striping::transformToCurrentLanePositions(), MSPModel_Striping::PState::walk(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
private |
Definition at line 81 of file MSPModel_Remote.h.
Referenced by handleShape(), and initialize().
|
private |
Definition at line 80 of file MSPModel_Remote.h.
Referenced by add(), execute(), initialize(), MSPModel_Remote(), and ~MSPModel_Remote().
|
private |
Definition at line 92 of file MSPModel_Remote.h.
Referenced by add().
|
private |
Definition at line 93 of file MSPModel_Remote.h.
Referenced by handlePedestrianLane().
|
staticprivateinherited |
Definition at line 122 of file MSPModel.h.
Referenced by MSPModel::cleanup(), MSPModel_Striping::MovePedestrians::execute(), and MSPModel::getModel().
|
private |
Definition at line 79 of file MSPModel_Remote.h.
Referenced by initialize().
|
private |
Definition at line 89 of file MSPModel_Remote.h.
|
staticinherited |
Definition at line 108 of file MSPModel.h.
Referenced by MSLink::checkWalkingAreaFoe(), MSLink::getLeaderInfo(), MSPModel_Striping::PStateVehicle::getMaxX(), MSPModel_Striping::PStateVehicle::getMinX(), and MSPModel_Striping::getVehicleObstacles().
|
staticinherited |
the offset for computing person positions when walking on edges without a sidewalk
Definition at line 111 of file MSPModel.h.
Referenced by MSPModel_NonInteracting::PState::getPosition(), and GUINet::initGUIStructures().
|
private |
Definition at line 91 of file MSPModel_Remote.h.
Referenced by execute(), and handlePedestrianLane().
|
staticinherited |
Definition at line 105 of file MSPModel.h.
Referenced by MSPModel::canTraverse(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::connectedDirection(), MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::moveToNextLane(), MSPModel_Striping::PState::PState(), and MSPerson::MSPersonStage_Walking::walkDistance().