SUMO - Simulation of Urban MObility
MSTransportable::Stage_Driving Class Referenceabstract

#include <MSTransportable.h>

Inheritance diagram for MSTransportable::Stage_Driving:
Inheritance graph
Collaboration diagram for MSTransportable::Stage_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...
 
const 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...
 
virtual std::string getStageDescription () const =0
 return string representation 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...
 
virtual void proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)=0
 proceeds to this stage More...
 
virtual void routeOutput (OutputDevice &os) const =0
 Called on writing vehroute output. More...
 
void setArrived (SUMOTime now)
 marks arrival time and records driven distance More...
 
void setDeparted (SUMOTime now)
 logs end of the step More...
 
virtual void setSpeed (double)
 sets the walking speed (ignored in other stages) More...
 
void setVehicle (SUMOVehicle *v)
 
 Stage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines)
 constructor More...
 
virtual void tripInfoOutput (OutputDevice &os, MSTransportable *transportable) const =0
 Called on writing tripinfo output. More...
 
virtual ~Stage_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...
 
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...
 
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...
 

Private Member Functions

Stage_Drivingoperator= (const Stage_Driving &)
 Invalidated assignment operator. More...
 
 Stage_Driving (const Stage_Driving &)
 Invalidated copy constructor. 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 300 of file MSTransportable.h.

Constructor & Destructor Documentation

◆ Stage_Driving() [1/2]

MSTransportable::Stage_Driving::Stage_Driving ( const MSEdge destination,
MSStoppingPlace toStop,
const double  arrivalPos,
const std::vector< std::string > &  lines 
)

constructor

Definition at line 240 of file MSTransportable.cpp.

◆ ~Stage_Driving()

MSTransportable::Stage_Driving::~Stage_Driving ( )
virtual

destructor

Definition at line 249 of file MSTransportable.cpp.

◆ Stage_Driving() [2/2]

MSTransportable::Stage_Driving::Stage_Driving ( const Stage_Driving )
private

Invalidated copy constructor.

Member Function Documentation

◆ abort()

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

abort this stage (TraCI)

Reimplemented from MSTransportable::Stage.

Definition at line 361 of file MSTransportable.cpp.

References myVehicle.

◆ beginEventOutput()

void MSTransportable::Stage_Driving::beginEventOutput ( const MSTransportable 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 MSTransportable::Stage.

Definition at line 380 of file MSTransportable.cpp.

References 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
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 MSTransportable::Stage.

Definition at line 386 of file MSTransportable.cpp.

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

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

◆ getAngle()

double MSTransportable::Stage_Driving::getAngle ( SUMOTime  now) const
virtual

◆ getArrivalPos()

◆ getDestination()

◆ getDestinationStop()

const MSStoppingPlace* MSTransportable::Stage::getDestinationStop ( ) const
inlineinherited

◆ getEdge()

const MSEdge * MSTransportable::Stage_Driving::getEdge ( ) const
virtual

Returns the current edge.

Implements MSTransportable::Stage.

Definition at line 252 of file MSTransportable.cpp.

References MSLane::getEdge(), SUMOVehicle::getLane(), myVehicle, and myWaitingEdge.

Referenced by beginEventOutput(), endEventOutput(), and getEdgePos().

◆ getEdgeAngle()

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

◆ getEdgePos()

double MSTransportable::Stage_Driving::getEdgePos ( SUMOTime  now) const
virtual

◆ getEdgePosition()

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

get position on edge e at length at with orthogonal offset

Definition at line 83 of file MSTransportable.cpp.

References MSTransportable::Stage::getLanePosition(), and MSEdge::getLanes().

Referenced by MSTransportable::Stage_Waiting::getPosition(), getPosition(), and MSTransportable::Stage::getVehicle().

◆ getEdges()

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

the edges of the current stage

Implements MSTransportable::Stage.

Definition at line 328 of file MSTransportable.cpp.

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

◆ getFromEdge()

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

◆ getLanePosition()

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

◆ getPosition()

Position MSTransportable::Stage_Driving::getPosition ( SUMOTime  now) const
virtual

◆ getSpeed()

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

the speed of the transportable

Implements MSTransportable::Stage.

Definition at line 322 of file MSTransportable.cpp.

References SUMOVehicle::getSpeed(), isWaiting4Vehicle(), and myVehicle.

◆ getStageDescription()

virtual std::string MSTransportable::Stage::getStageDescription ( ) const
pure virtualinherited

◆ getStageType()

StageType MSTransportable::Stage::getStageType ( ) const
inlineinherited

◆ getVehicle()

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

◆ getWaitingDescription()

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

◆ getWaitingTime()

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

time spent waiting for a ride

Implements MSTransportable::Stage.

Definition at line 316 of file MSTransportable.cpp.

References isWaiting4Vehicle(), and MSTransportable::Stage::myDeparted.

◆ isWaiting4Vehicle()

bool MSTransportable::Stage_Driving::isWaiting4Vehicle ( ) const
virtual

◆ isWaitingFor()

bool MSTransportable::Stage_Driving::isWaitingFor ( const std::string &  line) const
virtual

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

Reimplemented from MSTransportable::Stage.

Definition at line 304 of file MSTransportable.cpp.

References myLines.

◆ operator=()

Stage_Driving& MSTransportable::Stage_Driving::operator= ( const Stage_Driving )
private

Invalidated assignment operator.

◆ proceed()

virtual void MSTransportable::Stage::proceed ( MSNet net,
MSTransportable transportable,
SUMOTime  now,
Stage previous 
)
pure virtualinherited

◆ routeOutput()

virtual void MSTransportable::Stage::routeOutput ( OutputDevice os) const
pure virtualinherited

◆ setArrived()

void MSTransportable::Stage_Driving::setArrived ( SUMOTime  now)
virtual

◆ setDeparted()

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

logs end of the step

Definition at line 66 of file MSTransportable.cpp.

References MSTransportable::Stage::myDeparted.

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

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

virtual void MSTransportable::Stage::tripInfoOutput ( OutputDevice os,
MSTransportable transportable 
) const
pure virtualinherited

Field Documentation

◆ myArrivalPos

◆ myArrived

◆ myDeparted

◆ myDestination

const MSEdge& MSTransportable::Stage::myDestination
protectedinherited

◆ myDestinationStop

◆ myLines

◆ myStopWaitPos

Position MSTransportable::Stage_Driving::myStopWaitPos
protected

Definition at line 375 of file MSTransportable.h.

Referenced by getPosition(), and MSPerson::MSPersonStage_Driving::proceed().

◆ myType

StageType MSTransportable::Stage::myType
protectedinherited

◆ myVehicle

◆ myVehicleDistance

double MSTransportable::Stage_Driving::myVehicleDistance
protected

◆ myVehicleID

std::string MSTransportable::Stage_Driving::myVehicleID
protected

cached vehicle data for output after the vehicle has been removed

Definition at line 366 of file MSTransportable.h.

Referenced by setVehicle(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().

◆ myVehicleLine

std::string MSTransportable::Stage_Driving::myVehicleLine
protected

◆ myVehicleVClass

SUMOVehicleClass MSTransportable::Stage_Driving::myVehicleVClass
protected

◆ myWaitingEdge

const MSEdge* MSTransportable::Stage_Driving::myWaitingEdge
protected

◆ myWaitingPos

double MSTransportable::Stage_Driving::myWaitingPos
protected

◆ myWaitingSince

SUMOTime MSTransportable::Stage_Driving::myWaitingSince
protected

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