SUMO - Simulation of Urban MObility
MSPerson::MSPersonStage_Walking Class Reference

#include <MSPerson.h>

Inheritance diagram for MSPerson::MSPersonStage_Walking:
MSPerson::MSPersonStage

Data Structures

class  arrival_finder
 

Public Member Functions

virtual void beginEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output. More...
 
virtual void endEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output (end of an action) More...
 
SUMOReal getAngle (SUMOTime now) const
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
 
SUMOReal getEdgePos (SUMOTime now) const
 
Position getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const
 get position on edge e at length at with orthogonal offset More...
 
const MSEdgegetFromEdge () const
 
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const
 get position on lane at length at with orthogonal offset More...
 
Position getPosition (SUMOTime now) const
 
SUMOReal getSpeed () const
 the time this person spent waiting More...
 
std::string getStageDescription () const
 return string representation of the current stage More...
 
StageType getStageType () const
 
SUMOTime getWaitingTime (SUMOTime now) const
 the time this person spent waiting More...
 
virtual bool isWaiting4Vehicle () const
 Whether the person waits for a vehicle. More...
 
virtual bool isWaitingFor (const std::string &line) const
 Whether the person waits for a vehicle of the line specified. More...
 
bool moveToNextEdge (MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0)
 move forward and return whether the person arrived More...
 
 MSPersonStage_Walking (const std::vector< const MSEdge * > &route, MSBusStop *toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos)
 constructor More...
 
virtual void proceed (MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
 proceeds to the next step More...
 
virtual void routeOutput (OutputDevice &os) const
 Called on writing vehroute output. More...
 
void setArrived (SUMOTime now)
 logs end of the step More...
 
void setDeparted (SUMOTime now)
 logs end of the step More...
 
virtual void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
 ~MSPersonStage_Walking ()
 destructor More...
 
SUMOReal getMaxSpeed () const
 accessors to be used by MSPModel More...
 
SUMOReal getDepartPos () const
 
SUMOReal getArrivalPos () const
 
const MSEdgegetRouteEdge () const
 
const MSEdgegetNextRouteEdge () const
 
const std::vector< const MSEdge * > & getRoute () const
 
PedestrianStategetPedestrianState () const
 

Protected Attributes

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 (either by walking or driving) More...
 
StageType myType
 The type of this stage. More...
 

Private Member Functions

SUMOReal computeAverageSpeed () const
 
 MSPersonStage_Walking (const MSPersonStage_Walking &)
 Invalidated copy constructor. More...
 
MSPersonStage_Walkingoperator= (const MSPersonStage_Walking &)
 Invalidated assignment operator. More...
 

Private Attributes

SUMOReal myArrivalPos
 
MSEdgemyCurrentInternalEdge
 The current internal edge this person is on or 0. More...
 
SUMOReal myDepartPos
 A vector of computed times an edge is reached. More...
 
MSBusStopmyDestinationBusStop
 
PedestrianStatemyPedestrianState
 state that is to be manipulated by MSPModel More...
 
std::vector< const MSEdge * > myRoute
 The route of the person. More...
 
std::vector< const MSEdge * >::iterator myRouteStep
 
SUMOReal mySpeed
 
SUMOTime myWalkingTime
 the time the person is walking More...
 

Friends

class GUIPerson
 
class MSPModel
 

Detailed Description

A "real" stage performing the walking to an edge The walking does not need any route as it is not simulated. Only the duration is needed

Definition at line 194 of file MSPerson.h.

Constructor & Destructor Documentation

MSPerson::MSPersonStage_Walking::MSPersonStage_Walking ( const std::vector< const MSEdge * > &  route,
MSBusStop toBS,
SUMOTime  walkingTime,
SUMOReal  speed,
SUMOReal  departPos,
SUMOReal  arrivalPos 
)
MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking ( )

destructor

Definition at line 138 of file MSPerson.cpp.

MSPerson::MSPersonStage_Walking::MSPersonStage_Walking ( const MSPersonStage_Walking )
private

Invalidated copy constructor.

Member Function Documentation

void MSPerson::MSPersonStage_Walking::beginEventOutput ( const MSPerson p,
SUMOTime  t,
OutputDevice os 
) const
virtual

Called for writing the events output.

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

Implements MSPerson::MSPersonStage.

Definition at line 242 of file MSPerson.cpp.

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

SUMOReal MSPerson::MSPersonStage_Walking::computeAverageSpeed ( ) const
private

Definition at line 212 of file MSPerson.cpp.

References STEPS2TIME, and SUMOReal.

Referenced by MSPersonStage_Walking().

void MSPerson::MSPersonStage_Walking::endEventOutput ( const MSPerson p,
SUMOTime  t,
OutputDevice os 
) const
virtual

Called for writing the events output (end of an action)

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

Implements MSPerson::MSPersonStage.

Definition at line 249 of file MSPerson.cpp.

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

SUMOReal MSPerson::MSPersonStage_Walking::getAngle ( SUMOTime  now) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 171 of file MSPerson.cpp.

SUMOReal MSPerson::MSPersonStage_Walking::getArrivalPos ( ) const
inline
SUMOReal MSPerson::MSPersonStage_Walking::getDepartPos ( ) const
inline

Definition at line 259 of file MSPerson.h.

References myDepartPos.

Referenced by MSPModel_NonInteracting::PState::computeWalkingTime().

const MSEdge & MSPerson::MSPersonStage::getDestination ( ) const
inherited

returns the destination edge

Definition at line 70 of file MSPerson.cpp.

const MSEdge * MSPerson::MSPersonStage_Walking::getEdge ( ) const
virtual
SUMOReal MSPerson::MSPersonStage::getEdgeAngle ( const MSEdge e,
SUMOReal  at 
) const
inherited
SUMOReal MSPerson::MSPersonStage_Walking::getEdgePos ( SUMOTime  now) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 159 of file MSPerson.cpp.

Position MSPerson::MSPersonStage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on edge e at length at with orthogonal offset

Definition at line 96 of file MSPerson.cpp.

References MSEdge::getLanes().

const MSEdge * MSPerson::MSPersonStage_Walking::getFromEdge ( ) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 153 of file MSPerson.cpp.

Position MSPerson::MSPersonStage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on lane at length at with orthogonal offset

Definition at line 102 of file MSPerson.cpp.

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

Referenced by MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().

SUMOReal MSPerson::MSPersonStage_Walking::getMaxSpeed ( ) const
inline
const MSEdge* MSPerson::MSPersonStage_Walking::getNextRouteEdge ( ) const
inline
PedestrianState* MSPerson::MSPersonStage_Walking::getPedestrianState ( ) const
inline

Definition at line 276 of file MSPerson.h.

References myPedestrianState.

Referenced by GUIPerson::drawGL(), and MSPModel_NonInteracting::MoveToNextEdge::execute().

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

Implements MSPerson::MSPersonStage.

Definition at line 165 of file MSPerson.cpp.

const std::vector<const MSEdge*>& MSPerson::MSPersonStage_Walking::getRoute ( ) const
inline

Definition at line 272 of file MSPerson.h.

References myRoute.

Referenced by MSPModel_Striping::getNextLane(), and MSPModel_Striping::PState::PState().

const MSEdge* MSPerson::MSPersonStage_Walking::getRouteEdge ( ) const
inline

Definition at line 266 of file MSPerson.h.

References myRouteStep.

SUMOReal MSPerson::MSPersonStage_Walking::getSpeed ( ) const
virtual

the time this person spent waiting

Implements MSPerson::MSPersonStage.

Definition at line 183 of file MSPerson.cpp.

std::string MSPerson::MSPersonStage_Walking::getStageDescription ( ) const
inlinevirtual

return string representation of the current stage

Implements MSPerson::MSPersonStage.

Definition at line 222 of file MSPerson.h.

StageType MSPerson::MSPersonStage::getStageType ( ) const
inlineinherited

Definition at line 104 of file MSPerson.h.

References MSPerson::MSPersonStage::myType.

SUMOTime MSPerson::MSPersonStage_Walking::getWaitingTime ( SUMOTime  now) const
virtual

the time this person spent waiting

Implements MSPerson::MSPersonStage.

Definition at line 177 of file MSPerson.cpp.

virtual bool MSPerson::MSPersonStage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

Whether the person waits for a vehicle.

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 124 of file MSPerson.h.

bool MSPerson::MSPersonStage::isWaitingFor ( const std::string &  line) const
virtualinherited

Whether the person waits for a vehicle of the line specified.

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 90 of file MSPerson.cpp.

bool MSPerson::MSPersonStage_Walking::moveToNextEdge ( MSPerson person,
SUMOTime  currentTime,
MSEdge nextInternal = 0 
)
MSPersonStage_Walking& MSPerson::MSPersonStage_Walking::operator= ( const MSPersonStage_Walking )
private

Invalidated assignment operator.

void MSPerson::MSPersonStage_Walking::proceed ( MSNet net,
MSPerson person,
SUMOTime  now,
MSEdge previousEdge,
const SUMOReal  at 
)
virtual
void MSPerson::MSPersonStage_Walking::routeOutput ( OutputDevice os) const
virtual

Called on writing vehroute output.

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

Implements MSPerson::MSPersonStage.

Definition at line 230 of file MSPerson.cpp.

References OutputDevice::closeTag(), OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, time2string(), and OutputDevice::writeAttr().

void MSPerson::MSPersonStage::setArrived ( SUMOTime  now)
inherited

logs end of the step

Definition at line 84 of file MSPerson.cpp.

void MSPerson::MSPersonStage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 76 of file MSPerson.cpp.

void MSPerson::MSPersonStage_Walking::tripInfoOutput ( OutputDevice os) const
virtual

Called on writing tripinfo output.

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

Implements MSPerson::MSPersonStage.

Definition at line 224 of file MSPerson.cpp.

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

Friends And Related Function Documentation

friend class GUIPerson
friend

Definition at line 196 of file MSPerson.h.

friend class MSPModel
friend

Definition at line 195 of file MSPerson.h.

Field Documentation

SUMOReal MSPerson::MSPersonStage_Walking::myArrivalPos
private

Definition at line 306 of file MSPerson.h.

Referenced by getArrivalPos(), and MSPersonStage_Walking().

SUMOTime MSPerson::MSPersonStage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 175 of file MSPerson.h.

MSEdge* MSPerson::MSPersonStage_Walking::myCurrentInternalEdge
private

The current internal edge this person is on or 0.

Definition at line 300 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 172 of file MSPerson.h.

SUMOReal MSPerson::MSPersonStage_Walking::myDepartPos
private

A vector of computed times an edge is reached.

Definition at line 305 of file MSPerson.h.

Referenced by getDepartPos(), and MSPersonStage_Walking().

const MSEdge& MSPerson::MSPersonStage::myDestination
protectedinherited

the next edge to reach (either by walking or driving)

Definition at line 169 of file MSPerson.h.

Referenced by MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting().

MSBusStop* MSPerson::MSPersonStage_Walking::myDestinationBusStop
private

Definition at line 307 of file MSPerson.h.

PedestrianState* MSPerson::MSPersonStage_Walking::myPedestrianState
private

state that is to be manipulated by MSPModel

Definition at line 311 of file MSPerson.h.

Referenced by getPedestrianState().

std::vector<const MSEdge*> MSPerson::MSPersonStage_Walking::myRoute
private

The route of the person.

Definition at line 294 of file MSPerson.h.

Referenced by getNextRouteEdge(), getRoute(), and MSPersonStage_Walking().

std::vector<const MSEdge*>::iterator MSPerson::MSPersonStage_Walking::myRouteStep
private

Definition at line 297 of file MSPerson.h.

Referenced by getNextRouteEdge(), and getRouteEdge().

SUMOReal MSPerson::MSPersonStage_Walking::mySpeed
private

Definition at line 308 of file MSPerson.h.

Referenced by getMaxSpeed(), and MSPersonStage_Walking().

StageType MSPerson::MSPersonStage::myType
protectedinherited

The type of this stage.

Definition at line 178 of file MSPerson.h.

Referenced by MSPerson::MSPersonStage::getStageType().

SUMOTime MSPerson::MSPersonStage_Walking::myWalkingTime
private

the time the person is walking

Definition at line 291 of file MSPerson.h.


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