SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSPerson::MSPersonStage_Walking Class Reference

#include <MSPerson.h>

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

Data Structures

class  arrival_finder
 
class  MoveToNextEdge
 

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 (SUMOTime now) 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 getPosition (SUMOTime now) const
 
StageType getStageType () const
 
std::string getStageTypeName () const
 return string representation of the current stage 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...
 
SUMOTime moveToNextEdge (MSPerson *person, SUMOTime currentTime)
 
 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...
 
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...
 

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

bool checkNoDuration (MSNet *net, MSPerson *person, SUMOTime duration, SUMOTime now)
 
void computeWalkingTime (const MSEdge *const e, SUMOReal fromPos, SUMOReal toPos, MSBusStop *bs)
 
 MSPersonStage_Walking (const MSPersonStage_Walking &)
 Invalidated copy constructor. More...
 
MSPersonStage_Walkingoperator= (const MSPersonStage_Walking &)
 Invalidated assignment operator. More...
 

Private Attributes

SUMOReal myArrivalPos
 
SUMOReal myCurrentBeginPos
 
SUMOReal myCurrentDuration
 
SUMOReal myCurrentLength
 
SUMOReal myDepartPos
 A vector of computed times an edge is reached. More...
 
MSBusStopmyDestinationBusStop
 
SUMOTime myLastEntryTime
 
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...
 

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 175 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 139 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 237 of file MSPerson.cpp.

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

bool MSPerson::MSPersonStage_Walking::checkNoDuration ( MSNet net,
MSPerson person,
SUMOTime  duration,
SUMOTime  now 
)
private

Definition at line 178 of file MSPerson.cpp.

void MSPerson::MSPersonStage_Walking::computeWalkingTime ( const MSEdge *const  e,
SUMOReal  fromPos,
SUMOReal  toPos,
MSBusStop bs 
)
private

Definition at line 212 of file MSPerson.cpp.

References MSBusStop::getEndLanePosition(), MSEdge::getLanes(), MAX2(), and SUMOReal.

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 248 of file MSPerson.cpp.

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

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

Implements MSPerson::MSPersonStage.

Definition at line 170 of file MSPerson.cpp.

References MSPerson::getEdge(), STEPS2TIME, and SUMOReal.

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 ( SUMOTime  now) const
virtual

Returns the current edge.

Implements MSPerson::MSPersonStage.

Definition at line 143 of file MSPerson.cpp.

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 155 of file MSPerson.cpp.

References STEPS2TIME, and SUMOReal.

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(), MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), PositionVector::move2side(), and PositionVector::positionAtLengthPosition().

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

Implements MSPerson::MSPersonStage.

Definition at line 149 of file MSPerson.cpp.

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

Implements MSPerson::MSPersonStage.

Definition at line 162 of file MSPerson.cpp.

References MSPerson::getEdge(), MSPerson::SIDEWALK_OFFSET, STEPS2TIME, and SUMOReal.

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

Definition at line 100 of file MSPerson.h.

References MSPerson::MSPersonStage::myType.

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

return string representation of the current stage

Implements MSPerson::MSPersonStage.

Definition at line 196 of file MSPerson.h.

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

Whether the person waits for a vehicle.

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 120 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.

SUMOTime MSPerson::MSPersonStage_Walking::moveToNextEdge ( MSPerson person,
SUMOTime  currentTime 
)
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::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 229 of file MSPerson.cpp.

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

Field Documentation

SUMOReal MSPerson::MSPersonStage_Walking::myArrivalPos
private

Definition at line 257 of file MSPerson.h.

Referenced by MSPersonStage_Walking().

SUMOTime MSPerson::MSPersonStage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 156 of file MSPerson.h.

SUMOReal MSPerson::MSPersonStage_Walking::myCurrentBeginPos
private

Definition at line 262 of file MSPerson.h.

SUMOReal MSPerson::MSPersonStage_Walking::myCurrentDuration
private

Definition at line 262 of file MSPerson.h.

SUMOReal MSPerson::MSPersonStage_Walking::myCurrentLength
private

Definition at line 262 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 153 of file MSPerson.h.

SUMOReal MSPerson::MSPersonStage_Walking::myDepartPos
private

A vector of computed times an edge is reached.

Definition at line 256 of file MSPerson.h.

Referenced by MSPersonStage_Walking().

const MSEdge& MSPerson::MSPersonStage::myDestination
protectedinherited

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

Definition at line 150 of file MSPerson.h.

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

MSBusStop* MSPerson::MSPersonStage_Walking::myDestinationBusStop
private

Definition at line 258 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage_Walking::myLastEntryTime
private

Definition at line 259 of file MSPerson.h.

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

The route of the person.

Definition at line 248 of file MSPerson.h.

Referenced by MSPersonStage_Walking().

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

Definition at line 251 of file MSPerson.h.

SUMOReal MSPerson::MSPersonStage_Walking::mySpeed
private

Definition at line 260 of file MSPerson.h.

Referenced by MSPersonStage_Walking().

StageType MSPerson::MSPersonStage::myType
protectedinherited

The type of this stage.

Definition at line 159 of file MSPerson.h.

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

SUMOTime MSPerson::MSPersonStage_Walking::myWalkingTime
private

the time the person is walking

Definition at line 245 of file MSPerson.h.


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