46 #define DEBUG1 "disabled" 47 #define DEBUG2 "disabled" 48 #define DEBUGCOND(PEDID) (PEDID == DEBUG1 || PEDID == DEBUG2) 95 PState* state =
dynamic_cast<PState*
>(myParent.getPedestrianState());
96 const MSEdge* old = myParent.getEdge();
97 const bool arrived = myParent.moveToNextEdge(myPerson, currentTime);
112 myLastEntryTime = currentTime;
135 return myCurrentDuration;
142 return myCurrentBeginPos + (myCurrentEndPos - myCurrentBeginPos) / myCurrentDuration * (now - myLastEntryTime);
148 const MSLane* lane = getSidewalk<MSEdge, MSLane>(stage.
getEdge());
150 return stage.
getLanePosition(lane, getEdgePos(stage, now), lateral_offset);
const MSEdge * getNextEdge(const MSPerson::MSPersonStage_Walking &stage) const
return the list of internal edges if the pedestrian is on an intersection
bool blockedAtDist(const MSLane *lane, SUMOReal distToCrossing, std::vector< const MSPerson * > *collectBlockers)
whether a pedestrian is blocking the crossing of lane at offset distToCrossing
~MSPModel_NonInteracting()
const MSEdge * getNextRouteEdge() const
SUMOTime computeWalkingTime(const MSEdge *prev, const MSPerson::MSPersonStage_Walking &stage, SUMOTime currentTime)
compute walking time on edge and update state members
abstract base class for managing callbacks to retrieve various state information from the model ...
PedestrianState * add(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)
register the given person as a pedestrian
#define UNUSED_PARAMETER(x)
SUMOReal getEdgeAngle(const MSEdge *e, SUMOReal at) const
get angle of the edge at a certain position
The simulated network and simulation perfomer.
const MSEdge * getEdge() const
Returns the current edge.
A road/street connecting two junctions.
Position getLanePosition(const MSLane *lane, SUMOReal at, SUMOReal offset) const
get position on lane at length at with orthogonal offset
static const int UNDEFINED_DIRECTION
SUMOReal getLength() const
return the length of the edge
bool allowsVehicleClass(SUMOVehicleClass vclass) const
SUMOReal getAngle(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the direction in which the person faces in degrees
MSPModel_NonInteracting(const OptionsCont &oc, MSNet *net)
Constructor (it should not be necessary to construct more than one instance)
A point in 2D or 3D with translation and scaling methods.
SUMOTime getWaitingTime(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the time the person spent standing
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
MSNet * myNet
the net to which to issue moveToNextEdge commands
Position getPosition(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the network coordinate of the person
virtual SUMOTime addEvent(Command *operation, SUMOTime execTimeStep, AdaptType type)
Adds an Event.
abstract base class for managing callbacks to retrieve various state information from the model ...
SUMOReal getArrivalPos() const
static const SUMOReal SIDEWALK_OFFSET
the offset for computing person positions when walking on edges without a sidewalk ...
SUMOReal getDepartPos() const
A storage for options typed value containers)
static const int BACKWARD
Patch the time in a way that it is at least as high as the simulation begin time. ...
const MSJunction * getFromJunction() const
SUMOReal getSpeed(const MSPerson::MSPersonStage_Walking &stage) const
return the current speed of the person
SUMOReal getMaxSpeed() const
accessors to be used by MSPModel
Representation of a lane in the micro simulation.
SUMOTime execute(SUMOTime currentTime)
Executes the command.
const MSJunction * getToJunction() const
SUMOReal getEdgePos(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
abstract methods inherited from PedestrianState