99 double oncomingGap, std::vector<const MSPerson*>* collectBlockers) {
191 double lanePosLat,
double angle,
int routeOffset,
202 WRITE_WARNING(
TL(
"moveToXY is ignored by the current movement model"));
std::vector< const MSEdge * > ConstMSEdgeVector
std::pair< const MSPerson *, double > PersonDist
#define WRITE_WARNING(msg)
#define UNUSED_PARAMETER(x)
A road/street connecting two junctions.
The base class for an intersection.
Representation of a lane in the micro simulation.
The simulated network and simulation perfomer.
The pedestrian (and also sometimes container) movement model.
static const int BACKWARD
static int canTraverse(int dir, const ConstMSEdgeVector &route, int &passedEdges)
virtual int getActiveNumber()=0
return the number of active objects
virtual void clearState()=0
Resets pedestrians when quick-loading state.
virtual 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
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
virtual MSTransportableStateAdapter * add(MSTransportable *transportable, MSStageMoving *stage, SUMOTime now)=0
register the given person as a pedestrian
static const double RANDOM_POS_LAT
magic value to encode randomized lateral offset for persons when starting a walk
static const double SIDEWALK_OFFSET
the offset for computing person positions when walking on edges without a sidewalk
virtual MSTransportableStateAdapter * loadState(MSTransportable *transportable, MSStageMoving *stage, std::istringstream &state)
load the state of the given transportable
virtual bool usingInternalLanes()=0
whether movements on intersections are modelled
virtual void remove(MSTransportableStateAdapter *state)=0
remove the specified person from the pedestrian simulation
static const int UNDEFINED_DIRECTION
virtual bool usingShortcuts()
whether travel times and distances can reliably be calculated from the network alone
virtual bool hasPedestrians(const MSLane *lane)
whether the given lane has pedestrians on it
static const double UNSPECIFIED_POS_LAT
the default lateral offset for persons when starting a walk
static const double SAFETY_GAP
abstract base class for managing callbacks to retrieve various state information from the model
virtual double getSpeed(const MSStageMoving &stage) const =0
return the current speed of the transportable
virtual void moveToXY(MSPerson *p, Position pos, MSLane *lane, double lanePos, double lanePosLat, double angle, int routeOffset, const ConstMSEdgeVector &edges, SUMOTime t)
try to move transportable to the given position
virtual Position getPosition(const MSStageMoving &stage, SUMOTime now) const =0
return the network coordinate of the transportable
virtual const MSLane * getLane() const
the current lane of the transportable
virtual SUMOTime getWaitingTime() const =0
return the time the transportable spent standing
virtual int getDirection() const =0
return the walking direction (FORWARD, BACKWARD, UNDEFINED_DIRECTION)
virtual bool isJammed() const
whether the transportable is jammed
virtual const MSEdge * getNextEdge(const MSStageMoving &stage) const =0
return the list of internal edges if the transportable is on an intersection
virtual ~MSTransportableStateAdapter()
virtual void moveTo(MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t)
try to move transportable to the given position
virtual bool isFinished() const
whether the transportable has finished walking
virtual double getAngle(const MSStageMoving &stage, SUMOTime now) const =0
return the direction in which the transportable faces in degrees
virtual double getEdgePos(SUMOTime now=0) const =0
return the offset from the start of the current edge measured in its natural direction
virtual void saveState(std::ostringstream &out)
Saves the current state into the given stream.
virtual double getPathLength() const
return the total length of the current lane (in particular for on a walkingarea)
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle, person, or container.