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

#include <MSPerson.h>

Inheritance diagram for MSPerson::MSPersonStage:
MSPerson::MSPersonStage_Driving MSPerson::MSPersonStage_Waiting MSPerson::MSPersonStage_Walking

Public Member Functions

virtual void beginEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (begin of an action)
 
virtual void endEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (end of an action)
 
virtual SUMOReal getAngle (SUMOTime now) const =0
 
const MSEdge & getDestination () const
 returns the destination edge
 
virtual const MSEdge * getEdge (SUMOTime now) const =0
 Returns the current edge.
 
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
 
virtual SUMOReal getEdgePos (SUMOTime now) const =0
 
Position getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const
 get position on edge e at length at with orthogonal offset
 
virtual const MSEdge * getFromEdge () const =0
 
virtual Position getPosition (SUMOTime now) const =0
 
StageType getStageType () const
 
virtual std::string getStageTypeName () const =0
 return string representation of the current stage
 
virtual bool isWaiting4Vehicle () const
 Whether the person waits for a vehicle.
 
virtual bool isWaitingFor (const std::string &line) const
 Whether the person waits for a vehicle of the line specified.
 
 MSPersonStage (const MSEdge &destination, StageType type)
 constructor
 
virtual void proceed (MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)=0
 proceeds to the next step
 
void setArrived (SUMOTime now)
 logs end of the step
 
void setDeparted (SUMOTime now)
 logs end of the step
 
virtual void tripInfoOutput (OutputDevice &os) const =0
 Called on writing tripinfo output.
 
virtual ~MSPersonStage ()
 destructor
 

Protected Attributes

SUMOTime myArrived
 the time at which this stage ended
 
SUMOTime myDeparted
 the time at which this stage started
 
const MSEdge & myDestination
 the next edge to reach (either by walking or driving)
 
StageType myType
 The type of this stage.
 

Private Member Functions

 MSPersonStage (const MSPersonStage &)
 Invalidated copy constructor.
 
MSPersonStage & operator= (const MSPersonStage &)
 Invalidated assignment operator.
 

Detailed Description

The "abstract" class for a single stage of a persons movement Contains the destination of the current movement step

Definition at line 79 of file MSPerson.h.

Constructor & Destructor Documentation

MSPerson::MSPersonStage::MSPersonStage ( const MSEdge &  destination,
StageType  type 
)

constructor

Definition at line 62 of file MSPerson.cpp.

MSPerson::MSPersonStage::~MSPersonStage ( )
virtual

destructor

Definition at line 66 of file MSPerson.cpp.

MSPerson::MSPersonStage::MSPersonStage ( const MSPersonStage &  )
private

Invalidated copy constructor.

Member Function Documentation

virtual void MSPerson::MSPersonStage::beginEventOutput ( const MSPerson &  p,
SUMOTime  t,
OutputDevice &  os 
) const
pure virtual

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

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

Implemented in MSPerson::MSPersonStage_Waiting, MSPerson::MSPersonStage_Driving, and MSPerson::MSPersonStage_Walking.

virtual void MSPerson::MSPersonStage::endEventOutput ( const MSPerson &  p,
SUMOTime  t,
OutputDevice &  os 
) const
pure virtual

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

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

Implemented in MSPerson::MSPersonStage_Waiting, MSPerson::MSPersonStage_Driving, and MSPerson::MSPersonStage_Walking.

virtual SUMOReal MSPerson::MSPersonStage::getAngle ( SUMOTime  now) const
pure virtual
const MSEdge & MSPerson::MSPersonStage::getDestination ( ) const

returns the destination edge

Definition at line 70 of file MSPerson.cpp.

virtual const MSEdge* MSPerson::MSPersonStage::getEdge ( SUMOTime  now) const
pure virtual
SUMOReal MSPerson::MSPersonStage::getEdgeAngle ( const MSEdge *  e,
SUMOReal  at 
) const
virtual SUMOReal MSPerson::MSPersonStage::getEdgePos ( SUMOTime  now) const
pure virtual
Position MSPerson::MSPersonStage::getEdgePosition ( const MSEdge *  e,
SUMOReal  at,
SUMOReal  offset 
) const

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().

virtual const MSEdge* MSPerson::MSPersonStage::getFromEdge ( ) const
pure virtual
virtual Position MSPerson::MSPersonStage::getPosition ( SUMOTime  now) const
pure virtual
StageType MSPerson::MSPersonStage::getStageType ( ) const
inline

Definition at line 100 of file MSPerson.h.

References myType.

virtual std::string MSPerson::MSPersonStage::getStageTypeName ( ) const
pure virtual

return string representation of the current stage

Implemented in MSPerson::MSPersonStage_Waiting, MSPerson::MSPersonStage_Driving, and MSPerson::MSPersonStage_Walking.

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

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
virtual

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

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 90 of file MSPerson.cpp.

MSPersonStage& MSPerson::MSPersonStage::operator= ( const MSPersonStage &  )
private

Invalidated assignment operator.

virtual void MSPerson::MSPersonStage::proceed ( MSNet *  net,
MSPerson *  person,
SUMOTime  now,
MSEdge *  previousEdge,
const SUMOReal  at 
)
pure virtual
void MSPerson::MSPersonStage::setArrived ( SUMOTime  now)

logs end of the step

Definition at line 84 of file MSPerson.cpp.

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

logs end of the step

Definition at line 76 of file MSPerson.cpp.

virtual void MSPerson::MSPersonStage::tripInfoOutput ( OutputDevice &  os) const
pure virtual

Called on writing tripinfo output.

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

Implemented in MSPerson::MSPersonStage_Waiting, MSPerson::MSPersonStage_Driving, and MSPerson::MSPersonStage_Walking.

Field Documentation

SUMOTime MSPerson::MSPersonStage::myArrived
protected

the time at which this stage ended

Definition at line 156 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage::myDeparted
protected

the time at which this stage started

Definition at line 153 of file MSPerson.h.

const MSEdge& MSPerson::MSPersonStage::myDestination
protected

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().

StageType MSPerson::MSPersonStage::myType
protected

The type of this stage.

Definition at line 159 of file MSPerson.h.

Referenced by getStageType().


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