SUMO - Simulation of Urban MObility
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) More...
 
virtual void endEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (end of an action) More...
 
virtual SUMOReal getAngle (SUMOTime now) const =0
 
const MSEdge & getDestination () const
 returns the destination edge More...
 
virtual const MSEdge * getEdge () const =0
 Returns the current edge. More...
 
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 More...
 
virtual const MSEdge * getFromEdge () const =0
 
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const
 get position on lane at length at with orthogonal offset More...
 
virtual Position getPosition (SUMOTime now) const =0
 
virtual SUMOReal getSpeed () const =0
 the time this person spent waiting More...
 
virtual std::string getStageDescription () const =0
 return string representation of the current stage More...
 
StageType getStageType () const
 
virtual SUMOTime getWaitingTime (SUMOTime now) const =0
 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...
 
 MSPersonStage (const MSEdge &destination, StageType type)
 constructor More...
 
virtual void proceed (MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)=0
 proceeds to the next step More...
 
virtual void routeOutput (OutputDevice &os) const =0
 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 =0
 Called on writing tripinfo output. More...
 
virtual ~MSPersonStage ()
 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 MSEdge & myDestination
 the next edge to reach (either by walking or driving) More...
 
StageType myType
 The type of this stage. More...
 

Private Member Functions

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

Detailed Description

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

Definition at line 83 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 ( ) 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().

virtual const MSEdge* MSPerson::MSPersonStage::getFromEdge ( ) const
pure virtual
Position MSPerson::MSPersonStage::getLanePosition ( const MSLane *  lane,
SUMOReal  at,
SUMOReal  offset 
) const

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

virtual Position MSPerson::MSPersonStage::getPosition ( SUMOTime  now) const
pure virtual
virtual SUMOReal MSPerson::MSPersonStage::getSpeed ( ) const
pure virtual
virtual std::string MSPerson::MSPersonStage::getStageDescription ( ) const
pure virtual

return string representation of the current stage

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

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

Definition at line 104 of file MSPerson.h.

References myType.

virtual SUMOTime MSPerson::MSPersonStage::getWaitingTime ( SUMOTime  now) const
pure virtual
virtual bool MSPerson::MSPersonStage::isWaiting4Vehicle ( ) const
inlinevirtual

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
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
virtual void MSPerson::MSPersonStage::routeOutput ( OutputDevice &  os) const
pure virtual

Called on writing vehroute 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.

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 175 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage::myDeparted
protected

the time at which this stage started

Definition at line 172 of file MSPerson.h.

const MSEdge& MSPerson::MSPersonStage::myDestination
protected

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

StageType MSPerson::MSPersonStage::myType
protected

The type of this stage.

Definition at line 178 of file MSPerson.h.

Referenced by getStageType().


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