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

void abort (MSTransportable *)
 abort this stage (TraCI) More...
 
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...
 
double getAngle (SUMOTime now) const
 returns the angle of the transportable More...
 
double getArrivalPos () const
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
MSStoppingPlacegetDestinationStop () const
 returns the destination stop (if any) More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
double getEdgeAngle (const MSEdge *e, double at) const
 get angle of the edge at a certain position More...
 
double getEdgePos (SUMOTime now) const
 
Position getEdgePosition (const MSEdge *e, double at, double offset) const
 get position on edge e at length at with orthogonal offset More...
 
ConstMSEdgeVector getEdges () const
 the edges of the current stage More...
 
const MSEdgegetFromEdge () const
 
Position getLanePosition (const MSLane *lane, double at, double 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...
 
double getSpeed () const
 the speed of the transportable More...
 
std::string getStageDescription () const
 returns the stage description as a string More...
 
std::string getStageSummary () const
 return string summary of the current stage More...
 
StageType getStageType () const
 
SUMOVehiclegetVehicle () const
 Whether the transportable waits for a vehicle. More...
 
std::string getWaitingDescription () const
 Return where the person waits and for what. 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 double arrivalPos, const std::vector< std::string > &lines, const std::string &intendedVeh="", SUMOTime intendedDepart=-1)
 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 bool withRouteLength) const
 Called on writing vehroute output. More...
 
void setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now)
 marks arrival time and records driven distance More...
 
void setDeparted (SUMOTime now)
 logs end of the step More...
 
void setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop)
 
virtual void setSpeed (double)
 sets the walking speed (ignored in other stages) More...
 
void setVehicle (SUMOVehicle *v)
 
virtual void tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const
 Called on writing tripinfo output. More...
 
 ~MSPersonStage_Driving ()
 destructor More...
 

Protected Attributes

double 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...
 
MSStoppingPlacemyDestinationStop
 the stop to reach by getting transported (if any) More...
 
SUMOTime myIntendedDepart
 
std::string myIntendedVehicleID
 
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...
 
double myVehicleDistance
 
std::string myVehicleID
 cached vehicle data for output after the vehicle has been removed More...
 
std::string myVehicleLine
 
SUMOVehicleClass myVehicleVClass
 
const MSEdgemyWaitingEdge
 
double 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 236 of file MSPerson.h.

Constructor & Destructor Documentation

◆ MSPersonStage_Driving()

MSPerson::MSPersonStage_Driving::MSPersonStage_Driving ( const MSEdge destination,
MSStoppingPlace toStop,
const double  arrivalPos,
const std::vector< std::string > &  lines,
const std::string &  intendedVeh = "",
SUMOTime  intendedDepart = -1 
)

constructor

Definition at line 366 of file MSPerson.cpp.

◆ ~MSPersonStage_Driving()

MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving ( )

destructor

Definition at line 377 of file MSPerson.cpp.

Member Function Documentation

◆ abort()

void MSTransportable::Stage_Driving::abort ( MSTransportable t)
virtualinherited

abort this stage (TraCI)

Reimplemented from MSTransportable::Stage.

Definition at line 585 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::myVehicle.

◆ beginEventOutput()

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

◆ endEventOutput()

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

◆ getAngle()

◆ getArrivalPos()

◆ getDestination()

◆ getDestinationStop()

◆ getEdge()

◆ getEdgeAngle()

double MSTransportable::Stage::getEdgeAngle ( const MSEdge e,
double  at 
) const
inherited

◆ getEdgePos()

◆ getEdgePosition()

Position MSTransportable::Stage::getEdgePosition ( const MSEdge e,
double  at,
double  offset 
) const
inherited

◆ getEdges()

ConstMSEdgeVector MSTransportable::Stage_Driving::getEdges ( ) const
virtualinherited

the edges of the current stage

Reimplemented from MSTransportable::Stage.

Definition at line 540 of file MSTransportable.cpp.

References MSTransportable::Stage::getDestination(), and MSTransportable::Stage_Driving::getFromEdge().

◆ getFromEdge()

const MSEdge * MSTransportable::Stage_Driving::getFromEdge ( ) const
virtualinherited

◆ getLanePosition()

Position MSTransportable::Stage::getLanePosition ( const MSLane lane,
double  at,
double  offset 
) const
inherited

◆ getPosition()

◆ getSpeed()

double MSTransportable::Stage_Driving::getSpeed ( ) const
virtualinherited

◆ getStageDescription()

std::string MSPerson::MSPersonStage_Driving::getStageDescription ( ) const
virtual

returns the stage description as a string

Implements MSTransportable::Stage.

Definition at line 408 of file MSPerson.cpp.

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

◆ getStageSummary()

◆ getStageType()

◆ getVehicle()

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

◆ getWaitingDescription()

std::string MSTransportable::Stage_Driving::getWaitingDescription ( ) const
inherited

◆ getWaitingTime()

SUMOTime MSTransportable::Stage_Driving::getWaitingTime ( SUMOTime  now) const
virtualinherited

time spent waiting for a ride

Reimplemented from MSTransportable::Stage.

Definition at line 528 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::isWaiting4Vehicle(), and MSTransportable::Stage_Driving::myWaitingSince.

◆ isWaiting4Vehicle()

◆ isWaitingFor()

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 516 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::myLines.

◆ proceed()

◆ routeOutput()

◆ setArrived()

◆ setDeparted()

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

logs end of the step

Definition at line 101 of file MSTransportable.cpp.

References MSTransportable::Stage::myDeparted.

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

◆ setDestination()

void MSTransportable::Stage_Driving::setDestination ( const MSEdge newDestination,
MSStoppingPlace newDestStop 
)
inherited

◆ setSpeed()

virtual void MSTransportable::Stage::setSpeed ( double  )
inlinevirtualinherited

sets the walking speed (ignored in other stages)

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 121 of file MSTransportable.h.

References MSTransportable::Stage::isWaitingFor(), MSTransportable::Stage::setArrived(), and MSTransportable::Stage::setDeparted().

Referenced by MSTransportable::getVehicle().

◆ setVehicle()

◆ tripInfoOutput()

void MSPerson::MSPersonStage_Driving::tripInfoOutput ( OutputDevice os,
const MSTransportable *const  transportable 
) const
virtual

Field Documentation

◆ myArrivalPos

◆ myArrived

◆ myDeparted

◆ myDestination

◆ myDestinationStop

◆ myIntendedDepart

SUMOTime MSTransportable::Stage_Driving::myIntendedDepart
protectedinherited

Definition at line 477 of file MSTransportable.h.

Referenced by getStageSummary(), and routeOutput().

◆ myIntendedVehicleID

std::string MSTransportable::Stage_Driving::myIntendedVehicleID
protectedinherited

Definition at line 476 of file MSTransportable.h.

Referenced by getStageSummary(), and routeOutput().

◆ myLines

◆ myStopWaitPos

Position MSTransportable::Stage_Driving::myStopWaitPos
protectedinherited

Definition at line 474 of file MSTransportable.h.

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

◆ myType

StageType MSTransportable::Stage::myType
protectedinherited

◆ myVehicle

◆ myVehicleDistance

◆ myVehicleID

std::string MSTransportable::Stage_Driving::myVehicleID
protectedinherited

cached vehicle data for output after the vehicle has been removed

Definition at line 464 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::setVehicle(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and tripInfoOutput().

◆ myVehicleLine

std::string MSTransportable::Stage_Driving::myVehicleLine
protectedinherited

◆ myVehicleVClass

SUMOVehicleClass MSTransportable::Stage_Driving::myVehicleVClass
protectedinherited

◆ myWaitingEdge

◆ myWaitingPos

◆ myWaitingSince

SUMOTime MSTransportable::Stage_Driving::myWaitingSince
protectedinherited

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