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

#include <MSPerson.h>

Inheritance diagram for MSPerson::MSPersonStage_Driving:
Inheritance graph
Collaboration diagram for MSPerson::MSPersonStage_Driving:
Collaboration graph

Public Member Functions

virtual void beginEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output. More...
 
virtual void endEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output (end of an action) More...
 
SUMOReal getAngle (SUMOTime now) const
 returns the angle of the transportable More...
 
SUMOReal getArrivalPos () const
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
const MSStoppingPlacegetDestinationStop () const
 returns the destination stop (if any) More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
 get angle of the edge at a certain position More...
 
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
 returns the position of the transportable More...
 
SUMOReal getSpeed () const
 the speed of the transportable More...
 
std::string getStageDescription () const
 returns the stage description as a string More...
 
StageType getStageType () const
 
SUMOVehiclegetVehicle () const
 The vehicle the person is riding or 0. More...
 
SUMOTime getWaitingTime (SUMOTime now) const
 time spent waiting for a ride More...
 
bool isWaiting4Vehicle () const
 Whether the person waits for a vehicle. More...
 
bool isWaitingFor (const std::string &line) const
 Whether the person waits for a vehicle of the line specified. More...
 
 MSPersonStage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, const std::vector< std::string > &lines)
 constructor More...
 
virtual void proceed (MSNet *net, MSTransportable *person, SUMOTime now, Stage *previous)
 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...
 
void setVehicle (SUMOVehicle *v)
 
virtual void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
 ~MSPersonStage_Driving ()
 destructor More...
 

Protected Attributes

SUMOReal 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...
 
MSStoppingPlace *const myDestinationStop
 the stop to reach by getting transported (if any) More...
 
const std::set< std::string > myLines
 the lines to choose from More...
 
Position myStopWaitPos
 
StageType myType
 The type of this stage. More...
 
SUMOVehiclemyVehicle
 The taken vehicle. More...
 
const MSEdgemyWaitingEdge
 
SUMOReal myWaitingPos
 
SUMOTime myWaitingSince
 The time since which this person is waiting for a ride. More...
 

Detailed Description

A "real" stage performing the travelling by a transport system The given route will be chosen. The travel time is computed by the simulation

Definition at line 219 of file MSPerson.h.

Constructor & Destructor Documentation

MSPerson::MSPersonStage_Driving::MSPersonStage_Driving ( const MSEdge destination,
MSStoppingPlace toStop,
const SUMOReal  arrivalPos,
const std::vector< std::string > &  lines 
)

constructor

Definition at line 223 of file MSPerson.cpp.

MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving ( )

destructor

Definition at line 228 of file MSPerson.cpp.

Member Function Documentation

void MSTransportable::Stage_Driving::beginEventOutput ( const MSTransportable p,
SUMOTime  t,
OutputDevice os 
) const
virtualinherited

Called for writing the events output.

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

Implements MSTransportable::Stage.

Definition at line 307 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().

void MSTransportable::Stage_Driving::endEventOutput ( const MSTransportable p,
SUMOTime  t,
OutputDevice os 
) const
virtualinherited

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

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

Implements MSTransportable::Stage.

Definition at line 313 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().

const MSEdge & MSTransportable::Stage::getDestination ( ) const
inherited
const MSStoppingPlace* MSTransportable::Stage::getDestinationStop ( ) const
inlineinherited

returns the destination stop (if any)

Definition at line 83 of file MSTransportable.h.

References MSTransportable::Stage::myDestinationStop.

Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::proceed(), and proceed().

SUMOReal MSTransportable::Stage::getEdgeAngle ( const MSEdge e,
SUMOReal  at 
) const
inherited
Position MSTransportable::Stage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const
inherited
const MSEdge * MSTransportable::Stage_Driving::getFromEdge ( ) const
virtualinherited
Position MSTransportable::Stage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const
inherited
SUMOReal MSTransportable::Stage_Driving::getSpeed ( ) const
virtualinherited
std::string MSPerson::MSPersonStage_Driving::getStageDescription ( ) const
virtual

returns the stage description as a string

Implements MSTransportable::Stage.

Definition at line 259 of file MSPerson.cpp.

References MSTransportable::Stage_Driving::isWaiting4Vehicle(), joinToString(), and MSTransportable::Stage_Driving::myLines.

SUMOVehicle* MSTransportable::Stage_Driving::getVehicle ( ) const
inlinevirtualinherited

The vehicle the person is riding or 0.

Reimplemented from MSTransportable::Stage.

Definition at line 311 of file MSTransportable.h.

References MSTransportable::Stage::getSpeed(), MSTransportable::Stage::getWaitingTime(), and SUMOReal.

SUMOTime MSTransportable::Stage_Driving::getWaitingTime ( SUMOTime  now) const
virtualinherited
bool MSTransportable::Stage_Driving::isWaitingFor ( const std::string &  line) const
virtualinherited

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

Reimplemented from MSTransportable::Stage.

Definition at line 283 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::myLines.

void MSPerson::MSPersonStage_Driving::routeOutput ( OutputDevice os) const
virtual
void MSTransportable::Stage::setArrived ( SUMOTime  now)
inherited

logs end of the step

Definition at line 76 of file MSTransportable.cpp.

References MSTransportable::Stage::myArrived.

Referenced by MSTransportable::Stage::getStageType(), MSContainer::proceed(), and MSPerson::proceed().

void MSTransportable::Stage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 69 of file MSTransportable.cpp.

References MSTransportable::Stage::myDeparted.

Referenced by MSTransportable::Stage::getStageType(), and MSTransportable::getVehicleType().

void MSTransportable::Stage_Driving::setVehicle ( SUMOVehicle v)
inlineinherited
void MSPerson::MSPersonStage_Driving::tripInfoOutput ( OutputDevice os) const
virtual

Called on writing tripinfo output.

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

Implements MSTransportable::Stage.

Definition at line 265 of file MSPerson.cpp.

References OutputDevice::closeTag(), MSTransportable::Stage::myArrived, MSTransportable::Stage::myDeparted, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

Field Documentation

SUMOTime MSTransportable::Stage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 182 of file MSTransportable.h.

Referenced by MSTransportable::Stage::setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and tripInfoOutput().

const MSEdge& MSTransportable::Stage::myDestination
protectedinherited
MSStoppingPlace* const MSTransportable::Stage::myDestinationStop
protectedinherited
Position MSTransportable::Stage_Driving::myStopWaitPos
protectedinherited

Definition at line 347 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::getPosition(), and proceed().

StageType MSTransportable::Stage::myType
protectedinherited
SUMOTime MSTransportable::Stage_Driving::myWaitingSince
protectedinherited

The time since which this person is waiting for a ride.

Definition at line 345 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::getWaitingTime(), MSContainer::MSContainerStage_Driving::proceed(), and proceed().


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