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

#include <MSContainer.h>

Inheritance diagram for MSContainer::MSContainerStage_Driving:
Inheritance graph
Collaboration diagram for MSContainer::MSContainerStage_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 MSEdge & getDestination () const
 returns the destination edge More...
 
const MSStoppingPlace * getDestinationStop () const
 returns the destination stop (if any) More...
 
const MSEdge * getEdge () 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 MSEdge * getFromEdge () 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...
 
StageType getStageType () const
 
SUMOVehicle * getVehicle () 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...
 
 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
 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 setSpeed (double)
 sets the walking speed (ignored in other stages) More...
 
void setVehicle (SUMOVehicle *v)
 
virtual void tripInfoOutput (OutputDevice &os) 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 MSEdge & myDestination
 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...
 
SUMOVehicle * myVehicle
 The taken vehicle. More...
 
const MSEdge * myWaitingEdge
 
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 77 of file MSContainer.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 54 of file MSContainer.cpp.

MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving ( )

destructor

Definition at line 59 of file MSContainer.cpp.

Member Function Documentation

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

abort this stage (TraCI)

Reimplemented from MSTransportable::Stage.

Definition at line 319 of file MSTransportable.cpp.

References MSTransportable::Stage_Driving::myVehicle.

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 329 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 335 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 MSStoppingPlace* MSTransportable::Stage::getDestinationStop ( ) const
inlineinherited

returns the destination stop (if any)

Definition at line 85 of file MSTransportable.h.

References MSTransportable::Stage::myDestinationStop.

Referenced by MSPModel_Striping::moveInDirectionOnLane(), proceed(), and MSPerson::MSPersonStage_Driving::proceed().

double MSTransportable::Stage::getEdgeAngle ( const MSEdge *  e,
double  at 
) const
inherited
Position MSTransportable::Stage::getEdgePosition ( const MSEdge *  e,
double  at,
double  offset 
) const
inherited
ConstMSEdgeVector MSTransportable::Stage_Driving::getEdges ( ) const
virtualinherited

the edges of the current stage

Implements MSTransportable::Stage.

Definition at line 311 of file MSTransportable.cpp.

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

const MSEdge * MSTransportable::Stage_Driving::getFromEdge ( ) const
virtualinherited
Position MSTransportable::Stage::getLanePosition ( const MSLane *  lane,
double  at,
double  offset 
) const
inherited
double MSTransportable::Stage_Driving::getSpeed ( ) const
virtualinherited
std::string MSContainer::MSContainerStage_Driving::getStageDescription ( ) const
virtual

returns the stage description as a string

Implements MSTransportable::Stage.

Definition at line 88 of file MSContainer.cpp.

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

StageType MSTransportable::Stage::getStageType ( ) const
inlineinherited
SUMOVehicle* MSTransportable::Stage_Driving::getVehicle ( ) const
inlinevirtualinherited

The vehicle the person is riding or 0.

Reimplemented from MSTransportable::Stage.

Definition at line 327 of file MSTransportable.h.

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

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

References MSTransportable::Stage_Driving::myLines.

void MSContainer::MSContainerStage_Driving::routeOutput ( OutputDevice &  os) const
virtual
void MSTransportable::Stage::setArrived ( SUMOTime  now)
inherited

logs end of the step

Definition at line 72 of file MSTransportable.cpp.

References MSTransportable::Stage::myArrived.

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

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

logs end of the step

Definition at line 65 of file MSTransportable.cpp.

References MSTransportable::Stage::myDeparted.

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

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

sets the walking speed (ignored in other stages)

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 119 of file MSTransportable.h.

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

Referenced by MSTransportable::getVehicle().

void MSTransportable::Stage_Driving::setVehicle ( SUMOVehicle *  v)
inlineinherited
void MSContainer::MSContainerStage_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 94 of file MSContainer.cpp.

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

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

Field Documentation

SUMOTime MSTransportable::Stage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 193 of file MSTransportable.h.

Referenced by MSTransportable::Stage::setDeparted(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().

const MSEdge& MSTransportable::Stage::myDestination
protectedinherited
MSStoppingPlace* const MSTransportable::Stage::myDestinationStop
protectedinherited
const std::set<std::string> MSTransportable::Stage_Driving::myLines
protectedinherited
Position MSTransportable::Stage_Driving::myStopWaitPos
protectedinherited
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 363 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Driving::getWaitingTime(), proceed(), and MSPerson::MSPersonStage_Driving::proceed().


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