61 double oncomingGap, std::vector<const MSPerson*>* collectBlockers);
98 typedef std::map<const MSLane*, Pedestrians, ComparatorNumericalIdLess>
ActiveLanes;
133 myEdgePos(stage != nullptr ? stage->getDepartPos() : 0.),
134 myPosLat(stage != nullptr ? stage->getDepartPosLat() : 0.),
204 virtual const std::string&
getID()
const {
239 mutable double myAngle = std::numeric_limits<double>::max();
std::pair< const MSPerson *, double > PersonDist
Representation of a lane in the micro simulation.
The abstract superclass for pedestrian models which actually interact with vehicles.
std::set< MSLink * > myApproachedCrossings
all crossings being approached by pedestrians
std::map< const MSLane *, Pedestrians, ComparatorNumericalIdLess > ActiveLanes
std::vector< MSPModel_InteractingState * > Pedestrians
bool usingInternalLanes()
whether movements on intersections are modelled /
Pedestrians & getPedestrians(const MSLane *lane)
retrieves the pedestrian vector for the given lane (may be empty)
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
ActiveLanes myActiveLanes
store of all lanes which have pedestrians on them
int getActiveNumber()
return the number of active pedestrians
bool myAmActive
whether an event for pedestrian processing was added
static Pedestrians noPedestrians
empty pedestrian vector
static bool usingInternalLanesStatic()
int myNumActivePedestrians
the total number of active pedestrians
void registerActive()
increase the number of active pedestrians
virtual void remove(MSTransportableStateAdapter *state)
remove the specified person from the pedestrian simulation
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
bool hasPedestrians(const MSLane *lane)
whether the given lane has pedestrians on it
virtual void clearState()
Resets pedestrians when quick-loading state.
static void unregisterCrossingApproach(const MSPModel_InteractingState &ped, const MSLane *crossing)
unregister pedestrian approach with the junction model
Container for pedestrian state and individual position update function.
SUMOTime myWaitingTime
the consecutive time spent at speed 0
MSPerson * myPerson
the person who is being represented
MSStageMoving * getStage() const
return the current stage
int myDir
the walking direction on the current lane (1 forward, -1 backward)
virtual const MSLane * getNextCrossing() const
placeholder function for the accessing the next crossing
double myEdgePos
the advancement along the current lane
virtual double getAngle(const MSStageMoving &, SUMOTime) const
return the current orientation in degrees
double getEdgePos(SUMOTime) const
abstract methods inherited from MSTransportableStateAdapter
MSPerson * getPerson() const
return the represented person
virtual const std::string & getID() const
return ID of the person (or sometimes vehicle) being represented
const Position & getRemotePosition() const
return the remote position if being controlled by TraCI or JuPedSim
virtual double getLatOffset() const
return the lateral offset to the lane center
const MSLane * myLane
the current lane of this pedestrian
double mySpeed
the current walking speed
MSStageMoving * myStage
the current stage of this pedestrian
double myAngle
cached angle
double myPosLat
the orthogonal shift on the current lane
double mySpeedLat
the current lateral walking speed
bool isWaitingToEnter() const
whether the person still waits to entere the network
Position myRemoteXYPos
remote-controlled position
MSPModel_InteractingState(MSPerson *person, MSStageMoving *stage, const MSLane *lane)
constructor
bool myWaitingToEnter
whether the pedestrian is waiting to start its walk
const MSLane * getLane() const
the current lane of the transportable
int getDirection() const
return the walking direction (FORWARD, BACKWARD, UNDEFINED_DIRECTION)
SUMOTime getWaitingTime() const
return the time the transportable spent standing
bool myAmJammed
whether the person is jammed
double getSpeed(const MSStageMoving &) const
return the current speed of the transportable
~MSPModel_InteractingState()
bool isJammed() const
whether the transportable is jammed
MSPModel_InteractingState & operator=(const MSPModel_InteractingState &)=delete
Invalidated assignment operator.
The pedestrian (and also sometimes container) movement model.
static const int UNDEFINED_DIRECTION
abstract base class for managing callbacks to retrieve various state information from the model
const std::string & getID() const
Returns the id.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
Representation of a vehicle, person, or container.