Eclipse SUMO - Simulation of Urban MObility
MSContainer::MSContainerStage_Driving Class Reference

#include <MSContainer.h>

Inheritance diagram for MSContainer::MSContainerStage_Driving:
Collaboration diagram for MSContainer::MSContainerStage_Driving:

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...
 
Stageclone () const
 
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
 
SUMOTime getDeparted () const
 get departure time of stage More...
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
MSStoppingPlacegetDestinationStop () const
 returns the destination stop (if any) More...
 
double getDistance () const
 get travel distance in this stage 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
 
SUMOTime getIntendedDepart () const
 
std::string getIntendedVehicleID () const
 
Position getLanePosition (const MSLane *lane, double at, double offset) const
 get position on lane at length at with orthogonal offset More...
 
const std::set< std::string > & getLines () const
 
virtual const MSStoppingPlacegetOriginStop () const
 returns the origin stop (if any). only needed for Stage_Trip 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 SUMOVehicle *vehicle) const
 Whether the person waits for the given vehicle. More...
 
 MSContainerStage_Driving (const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines)
 constructor More...
 
virtual void proceed (MSNet *net, MSTransportable *container, 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...
 
 ~MSContainerStage_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 A container is in this stage if it is on a ride or if its waiting for a ride. The given route will be chosen. The travel time is computed by the simulation

Definition at line 70 of file MSContainer.h.

Constructor & Destructor Documentation

◆ MSContainerStage_Driving()

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

constructor

Definition at line 48 of file MSContainer.cpp.

◆ ~MSContainerStage_Driving()

MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving ( )

destructor

Definition at line 57 of file MSContainer.cpp.

Member Function Documentation

◆ abort()

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

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

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

◆ clone()

MSTransportable::Stage * MSContainer::MSContainerStage_Driving::clone ( ) const
virtual

Implements MSTransportable::Stage.

Definition at line 60 of file MSContainer.cpp.

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

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

◆ getAngle()

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

returns the angle of the transportable

Implements MSTransportable::Stage.

Definition at line 551 of file MSTransportable.cpp.

References MSVehicle::getAngle(), MSNet::getInstance(), MSTransportable::isWaiting4Vehicle(), MSNet::lefthand(), and M_PI.

◆ getArrivalPos()

◆ getDeparted()

SUMOTime MSTransportable::Stage::getDeparted ( ) const
inherited

get departure time of stage

Definition at line 109 of file MSTransportable.cpp.

◆ getDestination()

const MSEdge * MSTransportable::Stage::getDestination ( ) const
inherited

◆ getDestinationStop()

◆ getDistance()

double MSTransportable::Stage_Driving::getDistance ( ) const
inlinevirtualinherited

get travel distance in this stage

Implements MSTransportable::Stage.

Definition at line 460 of file MSTransportable.h.

References MSTransportable::Stage_Driving::myVehicleDistance.

◆ getEdge()

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

Returns the current edge.

Reimplemented from MSTransportable::Stage.

Definition at line 510 of file MSTransportable.cpp.

◆ getEdgeAngle()

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

get angle of the edge at a certain position

Definition at line 134 of file MSTransportable.cpp.

References MSEdge::getLanes().

Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().

◆ getEdgePos()

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

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

References MSEdge::getLanes().

◆ getEdges()

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

the edges of the current stage

Reimplemented from MSTransportable::Stage.

Definition at line 591 of file MSTransportable.cpp.

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

◆ getFromEdge()

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

Reimplemented from MSTransportable::Stage.

Definition at line 522 of file MSTransportable.cpp.

◆ getIntendedDepart()

SUMOTime MSTransportable::Stage_Driving::getIntendedDepart ( ) const
inlineinherited

◆ getIntendedVehicleID()

std::string MSTransportable::Stage_Driving::getIntendedVehicleID ( ) const
inlineinherited

◆ getLanePosition()

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

◆ getLines()

const std::set<std::string>& MSTransportable::Stage_Driving::getLines ( ) const
inlineinherited

◆ getOriginStop()

virtual const MSStoppingPlace* MSTransportable::Stage::getOriginStop ( ) const
inlinevirtualinherited

returns the origin stop (if any). only needed for Stage_Trip

Reimplemented in MSTransportable::Stage_Trip.

Definition at line 91 of file MSTransportable.h.

Referenced by MSPerson::MSPersonStage_Driving::proceed().

◆ getPosition()

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

returns the position of the transportable

Implements MSTransportable::Stage.

Definition at line 538 of file MSTransportable.cpp.

References MSNet::getInstance(), Position::INVALID, MSTransportable::isWaiting4Vehicle(), and MSTransportable::ROADSIDE_OFFSET.

◆ getSpeed()

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

the speed of the transportable

Reimplemented from MSTransportable::Stage.

Definition at line 585 of file MSTransportable.cpp.

References MSTransportable::isWaiting4Vehicle().

◆ getStageDescription()

std::string MSContainer::MSContainerStage_Driving::getStageDescription ( ) const
virtual

returns the stage description as a string

Implements MSTransportable::Stage.

Definition at line 89 of file MSContainer.cpp.

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

◆ getStageSummary()

std::string MSContainer::MSContainerStage_Driving::getStageSummary ( ) const
virtual

return string summary of the current stage

Implements MSTransportable::Stage.

Definition at line 95 of file MSContainer.cpp.

References MSTransportable::getDestination(), Named::getID(), MSTransportable::isWaiting4Vehicle(), and joinToString().

◆ getStageType()

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

◆ getVehicle()

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

Whether the transportable waits for a vehicle.

Reimplemented from MSTransportable::Stage.

Definition at line 473 of file MSTransportable.h.

References MSTransportable::Stage_Driving::myVehicle.

Referenced by MSTransportable::rerouteParkingArea(), and MSTransportable::~MSTransportable().

◆ getWaitingDescription()

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

Return where the person waits and for what.

Definition at line 640 of file MSTransportable.cpp.

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

Referenced by MSTransportableControl::abortAnyWaitingForVehicle().

◆ getWaitingTime()

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

time spent waiting for a ride

Reimplemented from MSTransportable::Stage.

Definition at line 579 of file MSTransportable.cpp.

References MSTransportable::isWaiting4Vehicle().

◆ isWaiting4Vehicle()

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

Whether the person waits for a vehicle.

Reimplemented from MSTransportable::Stage.

Definition at line 573 of file MSTransportable.cpp.

◆ isWaitingFor()

bool MSTransportable::Stage_Driving::isWaitingFor ( const SUMOVehicle vehicle) const
virtualinherited

Whether the person waits for the given vehicle.

Reimplemented from MSTransportable::Stage.

Definition at line 565 of file MSTransportable.cpp.

References SUMOTrafficObject::getID(), SUMOVehicle::getParameter(), SUMOVehicleParameter::line, and SUMOVehicle::stopsAt().

◆ proceed()

◆ routeOutput()

void MSContainer::MSContainerStage_Driving::routeOutput ( OutputDevice os,
const bool  withRouteLength 
) const
virtual

Called on writing vehroute output.

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

Implements MSTransportable::Stage.

Definition at line 124 of file MSContainer.cpp.

References OutputDevice::closeTag(), MSTransportable::getDestination(), MSTransportable::getFromEdge(), MSTransportable::getID(), OutputDevice::openTag(), SUMO_ATTR_FROM, SUMO_ATTR_LINES, SUMO_ATTR_TO, and OutputDevice::writeAttr().

◆ setArrived()

void MSTransportable::Stage_Driving::setArrived ( MSNet net,
MSTransportable transportable,
SUMOTime  now 
)
virtualinherited

marks arrival time and records driven distance

Reimplemented from MSTransportable::Stage.

Definition at line 599 of file MSTransportable.cpp.

References MSTransportable::Stage::setArrived().

◆ setDeparted()

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

logs end of the step

Definition at line 102 of file MSTransportable.cpp.

◆ setDestination()

void MSTransportable::Stage::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 128 of file MSTransportable.h.

◆ setVehicle()

void MSTransportable::Stage_Driving::setVehicle ( SUMOVehicle v)
inherited

◆ tripInfoOutput()

void MSContainer::MSContainerStage_Driving::tripInfoOutput ( OutputDevice os,
const MSTransportable *const  transportable 
) 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 107 of file MSContainer.cpp.

References OutputDevice::closeTag(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), OutputDevice::openTag(), time2string(), toString(), and OutputDevice::writeAttr().

Field Documentation

◆ myArrivalPos

double MSTransportable::Stage::myArrivalPos
protectedinherited

◆ myArrived

SUMOTime MSTransportable::Stage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 216 of file MSTransportable.h.

◆ myDeparted

SUMOTime MSTransportable::Stage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 213 of file MSTransportable.h.

◆ myDestination

const MSEdge* MSTransportable::Stage::myDestination
protectedinherited

the next edge to reach by getting transported

Definition at line 204 of file MSTransportable.h.

◆ myDestinationStop

MSStoppingPlace* MSTransportable::Stage::myDestinationStop
protectedinherited

the stop to reach by getting transported (if any)

Definition at line 207 of file MSTransportable.h.

Referenced by MSTransportable::Stage::getDestinationStop(), and MSPerson::MSPersonStage_Access::MSPersonStage_Access().

◆ myIntendedDepart

SUMOTime MSTransportable::Stage_Driving::myIntendedDepart
protectedinherited

◆ myIntendedVehicleID

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

◆ myLines

const std::set<std::string> MSTransportable::Stage_Driving::myLines
protectedinherited

the lines to choose from

Definition at line 515 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::getLines().

◆ myStopWaitPos

Position MSTransportable::Stage_Driving::myStopWaitPos
protectedinherited

Definition at line 530 of file MSTransportable.h.

◆ myType

StageType MSTransportable::Stage::myType
protectedinherited

The type of this stage.

Definition at line 219 of file MSTransportable.h.

Referenced by MSTransportable::Stage::getStageType().

◆ myVehicle

SUMOVehicle* MSTransportable::Stage_Driving::myVehicle
protectedinherited

The taken vehicle.

Definition at line 518 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::getVehicle().

◆ myVehicleDistance

double MSTransportable::Stage_Driving::myVehicleDistance
protectedinherited

Definition at line 524 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::getDistance().

◆ myVehicleID

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

cached vehicle data for output after the vehicle has been removed

Definition at line 520 of file MSTransportable.h.

◆ myVehicleLine

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

Definition at line 521 of file MSTransportable.h.

◆ myVehicleVClass

SUMOVehicleClass MSTransportable::Stage_Driving::myVehicleVClass
protectedinherited

Definition at line 523 of file MSTransportable.h.

◆ myWaitingEdge

const MSEdge* MSTransportable::Stage_Driving::myWaitingEdge
protectedinherited

Definition at line 529 of file MSTransportable.h.

◆ myWaitingPos

double MSTransportable::Stage_Driving::myWaitingPos
protectedinherited

Definition at line 526 of file MSTransportable.h.

◆ myWaitingSince

SUMOTime MSTransportable::Stage_Driving::myWaitingSince
protectedinherited

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

Definition at line 528 of file MSTransportable.h.


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