58 const double arrivalPos,
const double arrivalPosLat,
const double dist,
const bool isExit,
62 myPath.push_back(startPos);
114 return myPath.angleAt2D(0);
170 if (prevStop !=
nullptr) {
171 const MSEdge*
const accessEdge = waitAtStop ? prior->
getDestination() : (*myStep)->getFromEdge();
173 if (access !=
nullptr) {
204 platformEntry = plat2;
208 trainExit, platformEntry);
245 if (nextEdge !=
nullptr) {
246 return nextEdge->
getID();
256 assert(walkingStage !=
nullptr);
266 assert(nextIndex > firstIndex);
283 for (
int i = nextIndex - 1; i >= firstIndex; i--) {
357 assert(s !=
nullptr);
std::vector< const MSEdge * > ConstMSEdgeVector
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
A road/street connecting two junctions.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
virtual void addTransportable(MSTransportable *t) const
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
Representation of a lane in the micro simulation.
virtual const PositionVector & getShape(bool) const
MSEdge & getEdge() const
Returns the lane's edge.
double getWidth() const
Returns the lane's width.
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
The simulated network and simulation perfomer.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
virtual MSTransportableControl & getPersonControl()
Returns the person control.
static const double MAX_WAIT_TOLERANCE
the time pedestrians take to reach maximum impatience
static const double UNSPECIFIED_POS_LAT
the default lateral offset for persons when starting a walk
Changes the wished person speed and position.
SUMOTime myLastRemoteAccess
void postProcessRemoteControl(MSPerson *p)
ConstMSEdgeVector myRemoteRoute
void setRemoteControlled(Position xyPos, MSLane *l, double pos, double posLat, double angle, int edgeOffset, const ConstMSEdgeVector &route, SUMOTime t)
bool isRemoteAffected(SUMOTime t) const
bool isRemoteControlled() const
SUMOTime execute(SUMOTime currentTime)
Executes the command.
MSTransportable *const myPerson
Position getPosition(SUMOTime now) const
returns the position of the transportable
SUMOTime myEstimatedArrival
MSPersonStage_Access(const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const double arrivalPosLat, const double dist, const bool isExit, const Position &startPos, const Position &endPos)
constructor
double getSpeed() const
the speed of the person in this stage
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, MSStage *previous)
proceeds to the next step
double getAngle(SUMOTime now) const
returns the angle of the transportable
std::string getStageDescription(const bool isPerson) const
returns the stage description as a string
std::string getStageSummary(const bool isPerson) const
return string summary of the current stage
~MSPersonStage_Access()
destructor
bool checkAccess(const MSStage *const prior, const bool waitAtStop=true)
Influencer * myInfluencer
An instance of a speed/position influencing instance; built in "getInfluencer".
const MSEdge * getNextEdgePtr() const
returns the next edge ptr if this person is walking and the pedestrian model allows it
double getImpatience() const
double myChosenSpeedFactor
double myTimegapCrossing
value may be sampled from distribution and therefore must be cached
void replaceWalk(const ConstMSEdgeVector &newEdges, double departPos, int firstIndex, int nextIndex)
set new walk and replace the stages with relative indices in the interval [firstIndex,...
virtual ~MSPerson()
destructor
Influencer & getInfluencer()
Returns the velocity/lane influencer.
const std::string & getNextEdge() const
return the list of internal edges if this person is walking and the pedestrian model allows it
MSPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, const double speedFactor)
constructor
const MSEdge * getDestination() const
returns the destination edge
double myArrivalPosLat
the lateral position at which we want to arrive
virtual double getEdgePos(SUMOTime now) const
virtual SUMOTime getJumpDuration() const
Return the current jump duration (if applicable).
virtual double getEdgePosLat(SUMOTime now) const
MSStageTrip * getTrip() const
virtual double getArrivalPos() const
void setTrip(MSStageTrip *trip)
MSStoppingPlace * myDestinationStop
the stop to reach by getting transported (if any)
virtual MSStoppingPlace * getOriginStop() const
returns the origin stop (if any). only needed for MSStageTrip
virtual Position getPosition(SUMOTime now) const =0
returns the position of the transportable
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
MSStageType getStageType() const
MSStage(const MSStageType type, const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const double arrivalPosLat=0.0, const std::string &group="")
constructor
virtual SUMOTime getDuration() const
SUMOTime myArrived
the time at which this stage ended
virtual double getArrivalPosLat() const
double myArrivalPos
the longitudinal position at which we want to arrive
const MSEdge * myDestination
the next edge to reach by getting transported
SUMOTime myDeparted
the time at which this stage started
MSTransportableStateAdapter * getPState() const
A lane area vehicles can halt at.
const Access * getAccess(const MSEdge *edge) const
the access on the given edge to the stop, nullptr if there is none
double getBeginLanePosition() const
Returns the begin position of this stop.
double getEndLanePosition() const
Returns the end position of this stop.
const MSLane & getLane() const
Returns the lane this stop is located at.
virtual void erase(MSTransportable *transportable)
removes a single transportable
const MSEdge * getDestination() const
Returns the current destination.
MSStageType getStageType(int next) const
the stage type for the nth next stage
MSStage * getNextStage(int offset) const
Return the next (or previous) stage denoted by the offset.
MSStage * getCurrentStage() const
Return the current stage.
double getMaxSpeed() const override
Returns the maximum speed (the minimum of desired and physical maximum speed).
MSTransportablePlan::iterator myStep
the iterator over the route
MSTransportablePlan * myPlan
the plan of the transportable
void removeStage(int next, bool stayInSim=true)
removes the nth next stage
double getArrivalPos() const
returns the final arrival pos
MSStageType getCurrentStageType() const
the current stage type of the transportable
MSTransportable(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportablePlan *plan, const bool isPerson)
constructor
const MSVehicleType & getVehicleType() const override
Returns the object's "vehicle" type.
void appendStage(MSStage *stage, int next=-1)
Appends the given stage to the current plan.
std::vector< MSStage * > MSTransportablePlan
the structure holding the plan of a 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 const MSEdge * getNextEdge(const MSStageMoving &stage) const =0
return the list of internal edges if the transportable is on an intersection
The car-following model and parameter.
const std::string & getID() const
Returns the id.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String).
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
A point in 2D or 3D with translation and scaling methods.
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions)
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
Position transformToVectorCoordinates(const Position &p, bool extend=false) const
return position p within the length-wise coordinate system defined by this position vector....
double getFloatParam(const std::string ¶mName, const bool required=false, const double deflt=INVALID_DOUBLE, bool checkDist=true) const
Retrieve a floating point parameter for the traffic object.
Structure representing possible vehicle parameter.
static std::string emptyString
An empty string.