Eclipse SUMO - Simulation of Urban MObility
MSPerson::MSPersonStage_Access Class Reference

#include <MSPerson.h>

Inheritance diagram for MSPerson::MSPersonStage_Access:
[legend]
Collaboration diagram for MSPerson::MSPersonStage_Access:
[legend]

Data Structures

class  ProceedCmd
 

Public Member Functions

virtual void abort (MSTransportable *)
 abort this stage (TraCI) More...
 
MSStageclone () const
 
double getAngle (SUMOTime now) const
 returns the angle of the transportable More...
 
virtual double getArrivalPos () const
 
SUMOTime getArrived () const
 get arrival time of stage More...
 
SUMOTime getDeparted () const
 get departure time of stage More...
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
MSStoppingPlacegetDestinationStop () const
 returns the destination stop (if any) More...
 
virtual int getDirection () const
 Return the movement directon on the edge. More...
 
double getDistance () const
 get travel distance in this stage More...
 
virtual const MSEdgegetEdge () const
 Returns the current edge. More...
 
double getEdgeAngle (const MSEdge *e, double at) const
 get angle of the edge at a certain position More...
 
virtual double getEdgePos (SUMOTime now) const
 
Position getEdgePosition (const MSEdge *e, double at, double offset) const
 get position on edge e at length at with orthogonal offset More...
 
virtual ConstMSEdgeVector getEdges () const
 the edges of the current stage More...
 
virtual const MSEdgegetFromEdge () const
 
const std::string & getGroup () const
 return the id of the group of transportables traveling together More...
 
virtual const MSLanegetLane () const
 Returns the current lane (if applicable) More...
 
Position getLanePosition (const MSLane *lane, double at, double offset) const
 get position on lane at length at with orthogonal offset More...
 
virtual MSStoppingPlacegetOriginStop () const
 returns the origin stop (if any). only needed for MSStageTrip More...
 
Position getPosition (SUMOTime now) const
 returns the position of the transportable More...
 
virtual int getRoutePosition () const
 return index of current edge within route More...
 
double getSpeed () const
 the speed of the person in this stage More...
 
std::string getStageDescription (const bool isPerson) const
 returns the stage description as a string More...
 
std::string getStageSummary (const bool isPerson) const
 return string summary of the current stage More...
 
MSStageType getStageType () const
 
virtual SUMOVehiclegetVehicle () const
 Current vehicle in which the transportable is driving (or nullptr) More...
 
virtual SUMOTime getWaitingTime (SUMOTime now) const
 the time this transportable spent waiting More...
 
virtual bool isWaiting4Vehicle () const
 Whether the transportable waits for a vehicle. More...
 
virtual bool isWaitingFor (const SUMOVehicle *vehicle) const
 Whether the transportable waits for the given vehicle. More...
 
virtual void loadState (MSTransportable *transportable, std::istringstream &state)
 Reconstructs the current state, standard implementation does nothing. More...
 
void markSet (int what)
 
 MSPersonStage_Access (const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const double dist, const bool isExit)
 constructor More...
 
virtual void proceed (MSNet *net, MSTransportable *person, SUMOTime now, MSStage *previous)
 proceeds to the next step More...
 
void routeOutput (const bool, OutputDevice &, const bool, const MSStage *const) const
 Called on writing vehroute output. Currently does nothing. More...
 
virtual void saveState (std::ostringstream &out)
 Saves the current state into the given stream, standard implementation does nothing. More...
 
void setArrivalPos (double arrivalPos)
 
virtual const std::string setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
 logs end of the step More...
 
void setDeparted (SUMOTime now)
 logs end of the step More...
 
void setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop)
 
virtual void setSpeed (double)
 sets the walking speed (ignored in other stages) More...
 
void tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const
 Called on writing tripinfo output. More...
 
bool wasSet (int what) const
 
 ~MSPersonStage_Access ()
 destructor More...
 

Protected Attributes

double myArrivalPos
 the position at which we want to arrive More...
 
SUMOTime myArrived
 the time at which this stage ended More...
 
SUMOTime myDeparted
 the time at which this stage started More...
 
const MSEdgemyDestination
 the next edge to reach by getting transported More...
 
MSStoppingPlacemyDestinationStop
 the stop to reach by getting transported (if any) More...
 
const std::string myGroup
 The id of the group of transportables traveling together. More...
 
int myParametersSet
 Information on which parameter were set (mainly for vehroute output) More...
 
MSStageType myType
 The type of this stage. More...
 

Static Protected Attributes

static const double ROADSIDE_OFFSET
 the offset for computing positions when standing at an edge More...
 

Private Attributes

const bool myAmExit
 
const double myDist
 
SUMOTime myEstimatedArrival
 
PositionVector myPath
 

Detailed Description

An intermediate stage performing the access from or to public transport as given by the access elements of the public transport stop. The travel time is computed by the simulation

Definition at line 178 of file MSPerson.h.

Constructor & Destructor Documentation

◆ MSPersonStage_Access()

MSPerson::MSPersonStage_Access::MSPersonStage_Access ( const MSEdge destination,
MSStoppingPlace toStop,
const double  arrivalPos,
const double  dist,
const bool  isExit 
)

◆ ~MSPersonStage_Access()

MSPerson::MSPersonStage_Access::~MSPersonStage_Access ( )

destructor

Definition at line 441 of file MSPerson.cpp.

Member Function Documentation

◆ abort()

virtual void MSStage::abort ( MSTransportable )
inlinevirtualinherited

abort this stage (TraCI)

Reimplemented in MSPerson::MSPersonStage_Walking, MSStageWaiting, and MSStageDriving.

Definition at line 136 of file MSStage.h.

Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject().

Here is the caller graph for this function:

◆ clone()

MSStage * MSPerson::MSPersonStage_Access::clone ( ) const
virtual

Implements MSStage.

Definition at line 444 of file MSPerson.cpp.

◆ getAngle()

double MSPerson::MSPersonStage_Access::getAngle ( SUMOTime  now) const
virtual

returns the angle of the transportable

Implements MSStage.

Definition at line 476 of file MSPerson.cpp.

◆ getArrivalPos()

◆ getArrived()

SUMOTime MSStage::getArrived ( ) const
inherited

get arrival time of stage

Definition at line 122 of file MSStage.cpp.

References MSStage::myArrived.

Referenced by LIBSUMO_NAMESPACE::Person::getStage().

Here is the caller graph for this function:

◆ getDeparted()

SUMOTime MSStage::getDeparted ( ) const
inherited

get departure time of stage

Definition at line 117 of file MSStage.cpp.

References MSStage::myDeparted.

Referenced by LIBSUMO_NAMESPACE::Person::getStage().

Here is the caller graph for this function:

◆ getDestination()

◆ getDestinationStop()

◆ getDirection()

int MSStage::getDirection ( ) const
virtualinherited

Return the movement directon on the edge.

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 84 of file MSStage.cpp.

References MSPModel::UNDEFINED_DIRECTION.

◆ getDistance()

double MSPerson::MSPersonStage_Access::getDistance ( ) const
inlinevirtual

get travel distance in this stage

Implements MSStage.

Definition at line 201 of file MSPerson.h.

References myDist.

◆ getEdge()

const MSEdge * MSStage::getEdge ( ) const
virtualinherited

Returns the current edge.

Reimplemented in MSStageDriving, MSStageMoving, and MSStageTrip.

Definition at line 67 of file MSStage.cpp.

References MSStage::myDestination.

Referenced by MSStageDriving::loadState(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSPerson::MSPersonStage_Walking::proceed(), MSStageDriving::proceed(), MSStageWaiting::proceed(), MSTransportable::proceed(), and MSStageDriving::routeOutput().

Here is the caller graph for this function:

◆ getEdgeAngle()

double MSStage::getEdgeAngle ( const MSEdge e,
double  at 
) const
inherited

get angle of the edge at a certain position

Definition at line 149 of file MSStage.cpp.

References MSEdge::getLanes().

Referenced by MSPModel_NonInteracting::PState::getAngle(), MSPModel_NonInteracting::CState::getAngle(), MSStageDriving::getAngle(), MSStageTrip::getAngle(), and MSStageWaiting::getAngle().

Here is the caller graph for this function:

◆ getEdgePos()

double MSStage::getEdgePos ( SUMOTime  now) const
virtualinherited

Reimplemented in MSStageDriving, MSStageMoving, and MSStageTrip.

Definition at line 79 of file MSStage.cpp.

References MSStage::myArrivalPos.

Referenced by MSEdge::transportable_by_position_sorter::operator()(), MSPerson::MSPersonStage_Walking::proceed(), MSStageDriving::proceed(), and MSStageTranship::proceed().

Here is the caller graph for this function:

◆ getEdgePosition()

Position MSStage::getEdgePosition ( const MSEdge e,
double  at,
double  offset 
) const
inherited

get position on edge e at length at with orthogonal offset

Definition at line 138 of file MSStage.cpp.

References MSStage::getLanePosition(), and MSEdge::getLanes().

Referenced by MSStageDriving::getPosition(), MSStageTrip::getPosition(), and MSStageWaiting::getPosition().

Here is the caller graph for this function:

◆ getEdges()

ConstMSEdgeVector MSStage::getEdges ( ) const
virtualinherited

the edges of the current stage

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 102 of file MSStage.cpp.

References MSStage::getDestination().

Referenced by LIBSUMO_NAMESPACE::Person::getStage(), LIBSUMO_NAMESPACE::Person::rerouteTraveltime(), and MSStageTrip::setArrived().

Here is the caller graph for this function:

◆ getFromEdge()

const MSEdge * MSStage::getFromEdge ( ) const
virtualinherited

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 73 of file MSStage.cpp.

References MSStage::myDestination.

Referenced by MSTransportable::rerouteParkingArea().

Here is the caller graph for this function:

◆ getGroup()

const std::string & MSStage::getGroup ( ) const
inlineinherited

return the id of the group of transportables traveling together

Definition at line 122 of file MSStage.h.

References MSStage::myGroup.

◆ getLane()

virtual const MSLane * MSStage::getLane ( ) const
inlinevirtualinherited

Returns the current lane (if applicable)

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 112 of file MSStage.h.

◆ getLanePosition()

Position MSStage::getLanePosition ( const MSLane lane,
double  at,
double  offset 
) const
inherited

get position on lane at length at with orthogonal offset

Definition at line 143 of file MSStage.cpp.

References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().

Referenced by MSPModel_NonInteracting::CState::computeDuration(), MSStage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().

Here is the caller graph for this function:

◆ getOriginStop()

virtual MSStoppingPlace * MSStage::getOriginStop ( ) const
inlinevirtualinherited

returns the origin stop (if any). only needed for MSStageTrip

Reimplemented in MSStageDriving, and MSStageTrip.

Definition at line 85 of file MSStage.h.

Referenced by GUIPerson::getGUIPosition(), MSTransportableControl::loadAnyWaiting(), MSStageDriving::loadState(), MSStageDriving::proceed(), and MSTransportable::proceed().

Here is the caller graph for this function:

◆ getPosition()

Position MSPerson::MSPersonStage_Access::getPosition ( SUMOTime  now) const
virtual

returns the position of the transportable

Implements MSStage.

Definition at line 470 of file MSPerson.cpp.

◆ getRoutePosition()

virtual int MSStage::getRoutePosition ( ) const
inlinevirtualinherited

return index of current edge within route

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 176 of file MSStage.h.

◆ getSpeed()

double MSPerson::MSPersonStage_Access::getSpeed ( ) const
virtual

the speed of the person in this stage

Reimplemented from MSStage.

Definition at line 482 of file MSPerson.cpp.

References MAX2(), and STEPS2TIME.

◆ getStageDescription()

std::string MSPerson::MSPersonStage_Access::getStageDescription ( const bool  isPerson) const
virtual

returns the stage description as a string

Implements MSStage.

Definition at line 458 of file MSPerson.cpp.

◆ getStageSummary()

std::string MSPerson::MSPersonStage_Access::getStageSummary ( const bool  isPerson) const
virtual

return string summary of the current stage

Implements MSStage.

Definition at line 464 of file MSPerson.cpp.

◆ getStageType()

MSStageType MSStage::getStageType ( ) const
inlineinherited

Definition at line 117 of file MSStage.h.

References MSStage::myType.

Referenced by MSPerson::checkAccess(), LIBSUMO_NAMESPACE::Person::getStage(), MSStageDriving::loadState(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), MSStageDriving::routeOutput(), and MSStageTrip::routeOutput().

Here is the caller graph for this function:

◆ getVehicle()

virtual SUMOVehicle * MSStage::getVehicle ( ) const
inlinevirtualinherited

Current vehicle in which the transportable is driving (or nullptr)

Reimplemented in MSStageDriving.

Definition at line 162 of file MSStage.h.

Referenced by GUIPerson::getVehicleID().

Here is the caller graph for this function:

◆ getWaitingTime()

SUMOTime MSStage::getWaitingTime ( SUMOTime  now) const
virtualinherited

the time this transportable spent waiting

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 90 of file MSStage.cpp.

◆ isWaiting4Vehicle()

virtual bool MSStage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

Whether the transportable waits for a vehicle.

Reimplemented in MSStageDriving.

Definition at line 157 of file MSStage.h.

◆ isWaitingFor()

bool MSStage::isWaitingFor ( const SUMOVehicle vehicle) const
virtualinherited

Whether the transportable waits for the given vehicle.

Reimplemented in MSStageDriving.

Definition at line 133 of file MSStage.cpp.

◆ loadState()

virtual void MSStage::loadState ( MSTransportable transportable,
std::istringstream &  state 
)
inlinevirtualinherited

Reconstructs the current state, standard implementation does nothing.

Reimplemented in MSPerson::MSPersonStage_Walking, MSStageDriving, and MSStageWaiting.

Definition at line 219 of file MSStage.h.

References UNUSED_PARAMETER.

◆ markSet()

void MSStage::markSet ( int  what)
inlineinherited

Definition at line 228 of file MSStage.h.

References MSStage::myParametersSet.

Referenced by MSStageTrip::setArrived().

Here is the caller graph for this function:

◆ proceed()

void MSPerson::MSPersonStage_Access::proceed ( MSNet net,
MSTransportable person,
SUMOTime  now,
MSStage previous 
)
virtual

◆ routeOutput()

void MSPerson::MSPersonStage_Access::routeOutput ( const bool  ,
OutputDevice ,
const bool  ,
const MSStage * const   
) const
inlinevirtual

Called on writing vehroute output. Currently does nothing.

Implements MSStage.

Definition at line 217 of file MSPerson.h.

◆ saveState()

virtual void MSStage::saveState ( std::ostringstream &  out)
inlinevirtualinherited

Saves the current state into the given stream, standard implementation does nothing.

Reimplemented in MSPerson::MSPersonStage_Walking, MSStageDriving, and MSStageWaiting.

Definition at line 213 of file MSStage.h.

References UNUSED_PARAMETER.

◆ setArrivalPos()

void MSStage::setArrivalPos ( double  arrivalPos)
inlineinherited

Definition at line 93 of file MSStage.h.

References MSStage::myArrivalPos.

Referenced by MSTransportable::rerouteParkingArea(), and MSStageTrip::setArrived().

Here is the caller graph for this function:

◆ setArrived()

const std::string MSStage::setArrived ( MSNet net,
MSTransportable transportable,
SUMOTime  now,
const bool  vehicleArrived 
)
virtualinherited

logs end of the step

Reimplemented in MSStageDriving, and MSStageTrip.

Definition at line 127 of file MSStage.cpp.

References MSStage::myArrived.

Referenced by MSTransportable::proceed(), MSStageDriving::setArrived(), and MSStageTrip::setArrived().

Here is the caller graph for this function:

◆ setDeparted()

void MSStage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 110 of file MSStage.cpp.

References MSStage::myDeparted.

◆ setDestination()

void MSStage::setDestination ( const MSEdge newDestination,
MSStoppingPlace newDestStop 
)
inherited

Definition at line 155 of file MSStage.cpp.

References MSStoppingPlace::getBeginLanePosition(), MSStoppingPlace::getEndLanePosition(), MSStage::myArrivalPos, MSStage::myDestination, and MSStage::myDestinationStop.

Referenced by MSTransportable::rerouteParkingArea().

Here is the caller graph for this function:

◆ setSpeed()

virtual void MSStage::setSpeed ( double  )
inlinevirtualinherited

sets the walking speed (ignored in other stages)

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 139 of file MSStage.h.

◆ tripInfoOutput()

void MSPerson::MSPersonStage_Access::tripInfoOutput ( OutputDevice os,
const MSTransportable *const  transportable 
) const
virtual

Called on writing tripinfo output.

Parameters
[in]osThe stream to write the information into
[in]transportableThe person to write information about
Exceptions
IOErrornot yet implemented

Implements MSStage.

Definition at line 487 of file MSPerson.cpp.

References OutputDevice::closeTag(), Named::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

◆ wasSet()

bool MSStage::wasSet ( int  what) const
inlineinherited

Definition at line 224 of file MSStage.h.

References MSStage::myParametersSet.

Referenced by MSStageTrip::routeOutput(), and MSStageTrip::setArrived().

Here is the caller graph for this function:

Field Documentation

◆ myAmExit

const bool MSPerson::MSPersonStage_Access::myAmExit
private

Definition at line 235 of file MSPerson.h.

◆ myArrivalPos

◆ myArrived

◆ myDeparted

◆ myDestination

◆ myDestinationStop

◆ myDist

const double MSPerson::MSPersonStage_Access::myDist
private

Definition at line 234 of file MSPerson.h.

Referenced by getDistance().

◆ myEstimatedArrival

SUMOTime MSPerson::MSPersonStage_Access::myEstimatedArrival
private

Definition at line 236 of file MSPerson.h.

◆ myGroup

const std::string MSStage::myGroup
protectedinherited

The id of the group of transportables traveling together.

Definition at line 253 of file MSStage.h.

Referenced by MSStageDriving::abort(), MSStageDriving::clone(), MSStageTrip::clone(), MSStage::getGroup(), MSStageDriving::registerWaiting(), MSStageTrip::routeOutput(), and MSStageTrip::setArrived().

◆ myParametersSet

int MSStage::myParametersSet
protectedinherited

Information on which parameter were set (mainly for vehroute output)

Definition at line 256 of file MSStage.h.

Referenced by MSStage::markSet(), and MSStage::wasSet().

◆ myPath

PositionVector MSPerson::MSPersonStage_Access::myPath
private

Definition at line 237 of file MSPerson.h.

Referenced by MSPersonStage_Access().

◆ myType

MSStageType MSStage::myType
protectedinherited

◆ ROADSIDE_OFFSET

const double MSStage::ROADSIDE_OFFSET
staticprotectedinherited

the offset for computing positions when standing at an edge

Definition at line 259 of file MSStage.h.

Referenced by MSStageDriving::getPosition(), MSStageTrip::getPosition(), and MSStageWaiting::getPosition().


The documentation for this class was generated from the following files: