45 #define DEBUG1 "disabled"
46 #define DEBUG2 "disabled"
47 #define DEBUGCOND(PEDID) (PEDID == DEBUG1 || PEDID == DEBUG2)
111 myLastEntryTime = currentTime;
134 return myCurrentDuration;
141 return myCurrentBeginPos + (myCurrentEndPos - myCurrentBeginPos) / myCurrentDuration * (now - myLastEntryTime);
149 return stage.
getLanePosition(lane, getEdgePos(stage, now), lateral_offset);
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
Position getLanePosition(const MSLane *lane, SUMOReal at, SUMOReal offset) const
get position on lane at length at with orthogonal offset
SUMOTime computeWalkingTime(const MSEdge *prev, const MSPerson::MSPersonStage_Walking &stage, SUMOTime currentTime)
compute walking time on edge and update state members
MSPerson::MSPersonStage_Walking & myParent
static MSLane * getSidewalk(const MSEdge *edge)
return the appropriate lane to walk on
abstract base class for managing callbacks to retrieve various state information from the model ...
SUMOReal getEdgeAngle(const MSEdge *e, SUMOReal at) const
PedestrianState * add(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)
register the given person as a pedestrian
#define UNUSED_PARAMETER(x)
The simulated network and simulation perfomer.
const MSEdge * getEdge() const
Returns the current edge.
A road/street connecting two junctions.
static const int UNDEFINED_DIRECTION
SUMOReal getLength() const
return the length of the edge
bool allowsVehicleClass(SUMOVehicleClass vclass) const
bool moveToNextEdge(MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0)
move forward and return whether the person arrived
PedestrianState * getPedestrianState() 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