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

#include <MSTransportable.h>

Inheritance diagram for MSTransportable::Stage:
Inheritance graph
Collaboration diagram for MSTransportable::Stage:
Collaboration graph

Public Member Functions

virtual void beginEventOutput (const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (begin of an action) More...
 
virtual void endEventOutput (const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (end of an action) More...
 
virtual SUMOReal getAngle (SUMOTime now) const =0
 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...
 
virtual const MSEdgegetEdge () const =0
 Returns the current edge. More...
 
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
 get angle of the edge at a certain position More...
 
virtual SUMOReal getEdgePos (SUMOTime now) const =0
 
Position getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const
 get position on edge e at length at with orthogonal offset More...
 
virtual const MSEdgegetFromEdge () const =0
 
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const
 get position on lane at length at with orthogonal offset More...
 
virtual Position getPosition (SUMOTime now) const =0
 returns the position of the transportable More...
 
virtual SUMOReal getSpeed () const =0
 the speed of the transportable More...
 
virtual std::string getStageDescription () const =0
 return string representation of the current stage More...
 
StageType getStageType () const
 
virtual SUMOVehiclegetVehicle () const
 Whether the transportable waits for a vehicle. More...
 
virtual SUMOTime getWaitingTime (SUMOTime now) const =0
 the time this transportable spent waiting More...
 
virtual bool isWaiting4Vehicle () const
 Whether the transportable waits for a vehicle. More...
 
virtual bool isWaitingFor (const std::string &line) const
 Whether the transportable waits for a vehicle of the line specified. More...
 
virtual void proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)=0
 proceeds to the next step More...
 
virtual void routeOutput (OutputDevice &os) const =0
 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...
 
 Stage (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, StageType type)
 constructor More...
 
virtual void tripInfoOutput (OutputDevice &os) const =0
 Called on writing tripinfo output. More...
 
virtual ~Stage ()
 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...
 
StageType myType
 The type of this stage. More...
 

Private Member Functions

Stageoperator= (const Stage &)
 Invalidated assignment operator. More...
 
 Stage (const Stage &)
 Invalidated copy constructor. More...
 

Detailed Description

The "abstract" class for a single stage of a movement Contains the destination of the current movement step

Definition at line 71 of file MSTransportable.h.

Constructor & Destructor Documentation

MSTransportable::Stage::Stage ( const MSEdge destination,
MSStoppingPlace toStop,
const SUMOReal  arrivalPos,
StageType  type 
)

constructor

Definition at line 57 of file MSTransportable.cpp.

MSTransportable::Stage::~Stage ( )
virtual

destructor

Definition at line 60 of file MSTransportable.cpp.

MSTransportable::Stage::Stage ( const Stage )
private

Invalidated copy constructor.

Member Function Documentation

virtual void MSTransportable::Stage::beginEventOutput ( const MSTransportable transportable,
SUMOTime  t,
OutputDevice os 
) const
pure virtual

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

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

Implemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.

Referenced by MSTransportable::Stage_Waiting::getStageDescription(), getVehicle(), and MSTransportable::Stage_Driving::setVehicle().

virtual void MSTransportable::Stage::endEventOutput ( const MSTransportable transportable,
SUMOTime  t,
OutputDevice os 
) const
pure virtual

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

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

Implemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.

Referenced by MSTransportable::Stage_Waiting::getStageDescription(), getVehicle(), and MSTransportable::Stage_Driving::setVehicle().

virtual SUMOReal MSTransportable::Stage::getAngle ( SUMOTime  now) const
pure virtual
SUMOReal MSTransportable::Stage::getArrivalPos ( ) const
inline
const MSEdge & MSTransportable::Stage::getDestination ( ) const
const MSStoppingPlace* MSTransportable::Stage::getDestinationStop ( ) const
inline
SUMOReal MSTransportable::Stage::getEdgeAngle ( const MSEdge e,
SUMOReal  at 
) const
Position MSTransportable::Stage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const

get position on edge e at length at with orthogonal offset

Definition at line 86 of file MSTransportable.cpp.

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

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

virtual const MSEdge* MSTransportable::Stage::getFromEdge ( ) const
pure virtual
Position MSTransportable::Stage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const
virtual Position MSTransportable::Stage::getPosition ( SUMOTime  now) const
pure virtual
virtual std::string MSTransportable::Stage::getStageDescription ( ) const
pure virtual
StageType MSTransportable::Stage::getStageType ( ) const
inline
virtual SUMOVehicle* MSTransportable::Stage::getVehicle ( ) const
inlinevirtual

Whether the transportable waits for a vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 128 of file MSTransportable.h.

References beginEventOutput(), endEventOutput(), getEdgeAngle(), getEdgePosition(), getLanePosition(), getSpeed(), getWaitingTime(), routeOutput(), SUMOReal, and tripInfoOutput().

virtual SUMOTime MSTransportable::Stage::getWaitingTime ( SUMOTime  now) const
pure virtual
virtual bool MSTransportable::Stage::isWaiting4Vehicle ( ) const
inlinevirtual

Whether the transportable waits for a vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 123 of file MSTransportable.h.

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

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

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 81 of file MSTransportable.cpp.

Referenced by getStageType().

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

Invalidated assignment operator.

virtual void MSTransportable::Stage::proceed ( MSNet net,
MSTransportable transportable,
SUMOTime  now,
Stage previous 
)
pure virtual
virtual void MSTransportable::Stage::routeOutput ( OutputDevice os) const
pure virtual
void MSTransportable::Stage::setArrived ( SUMOTime  now)

logs end of the step

Definition at line 76 of file MSTransportable.cpp.

References myArrived.

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

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

logs end of the step

Definition at line 69 of file MSTransportable.cpp.

References myDeparted.

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

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

Field Documentation

SUMOTime MSTransportable::Stage::myDeparted
protected

the time at which this stage started

Definition at line 182 of file MSTransportable.h.

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

const MSEdge& MSTransportable::Stage::myDestination
protected
MSStoppingPlace* const MSTransportable::Stage::myDestinationStop
protected

the stop to reach by getting transported (if any)

Definition at line 176 of file MSTransportable.h.

Referenced by getDestinationStop(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().

StageType MSTransportable::Stage::myType
protected

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