SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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

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...
 
SUMOReal getAngle (SUMOTime now) const
 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...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
 get angle of the edge at a certain position More...
 
SUMOReal getEdgePos (SUMOTime now) const
 
Position getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const
 get position on edge e at length at with orthogonal offset More...
 
const MSEdgegetFromEdge () const
 
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal 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...
 
SUMOReal 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
 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...
 
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...
 
void setVehicle (SUMOVehicle *v)
 
 Stage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, const std::vector< std::string > &lines)
 constructor More...
 
virtual void tripInfoOutput (OutputDevice &os) const =0
 Called on writing tripinfo output. More...
 
virtual ~Stage_Driving ()
 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...
 
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...
 
const MSEdgemyWaitingEdge
 
SUMOReal 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 285 of file MSTransportable.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 222 of file MSTransportable.cpp.

MSTransportable::Stage_Driving::~Stage_Driving ( )
virtual

destructor

Definition at line 228 of file MSTransportable.cpp.

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

Invalidated copy constructor.

Member Function Documentation

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

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

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

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

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

returns the angle of the transportable

Implements MSTransportable::Stage.

Definition at line 269 of file MSTransportable.cpp.

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

SUMOReal MSTransportable::Stage::getArrivalPos ( ) const
inlineinherited

Definition at line 87 of file MSTransportable.h.

References MSTransportable::Stage::myArrivalPos.

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

returns the destination edge

Definition at line 63 of file MSTransportable.cpp.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

const MSStoppingPlace* MSTransportable::Stage::getDestinationStop ( ) const
inlineinherited
const MSEdge * MSTransportable::Stage_Driving::getEdge ( ) const
virtual

Returns the current edge.

Implements MSTransportable::Stage.

Definition at line 232 of file MSTransportable.cpp.

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

get angle of the edge at a certain position

Definition at line 96 of file MSTransportable.cpp.

References MSEdge::getLanes().

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

SUMOReal MSTransportable::Stage_Driving::getEdgePos ( SUMOTime  now) const
virtual
Position MSTransportable::Stage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on edge e at length at with orthogonal offset

Definition at line 86 of file MSTransportable.cpp.

References MSEdge::getLanes().

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

Implements MSTransportable::Stage.

Definition at line 241 of file MSTransportable.cpp.

Position MSTransportable::Stage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const
inherited
Position MSTransportable::Stage_Driving::getPosition ( SUMOTime  now) const
virtual

returns the position of the transportable

Implements MSTransportable::Stage.

Definition at line 257 of file MSTransportable.cpp.

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

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

the speed of the transportable

Implements MSTransportable::Stage.

Definition at line 301 of file MSTransportable.cpp.

References MSTransportable::isWaiting4Vehicle().

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

Definition at line 103 of file MSTransportable.h.

References MSTransportable::Stage::myType.

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

The vehicle the person is riding or 0.

Reimplemented from MSTransportable::Stage.

Definition at line 311 of file MSTransportable.h.

References myVehicle.

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

time spent waiting for a ride

Implements MSTransportable::Stage.

Definition at line 295 of file MSTransportable.cpp.

References MSTransportable::isWaiting4Vehicle().

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

Whether the person waits for a vehicle.

Reimplemented from MSTransportable::Stage.

Definition at line 289 of file MSTransportable.cpp.

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

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

Invalidated assignment operator.

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

Called on writing vehroute output.

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

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

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

logs end of the step

Definition at line 76 of file MSTransportable.cpp.

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

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

logs end of the step

Definition at line 69 of file MSTransportable.cpp.

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

Definition at line 320 of file MSTransportable.h.

References myVehicle.

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

Called on writing tripinfo output.

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

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

Field Documentation

SUMOReal MSTransportable::Stage::myArrivalPos
protectedinherited
SUMOTime MSTransportable::Stage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 185 of file MSTransportable.h.

SUMOTime MSTransportable::Stage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 182 of file MSTransportable.h.

const MSEdge& MSTransportable::Stage::myDestination
protectedinherited

the next edge to reach by getting transported

Definition at line 173 of file MSTransportable.h.

MSStoppingPlace* const MSTransportable::Stage::myDestinationStop
protectedinherited

the stop to reach by getting transported (if any)

Definition at line 176 of file MSTransportable.h.

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

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

the lines to choose from

Definition at line 338 of file MSTransportable.h.

Position MSTransportable::Stage_Driving::myStopWaitPos
protected

Definition at line 347 of file MSTransportable.h.

StageType MSTransportable::Stage::myType
protectedinherited

The type of this stage.

Definition at line 188 of file MSTransportable.h.

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

SUMOVehicle* MSTransportable::Stage_Driving::myVehicle
protected

The taken vehicle.

Definition at line 341 of file MSTransportable.h.

Referenced by getVehicle(), and setVehicle().

const MSEdge* MSTransportable::Stage_Driving::myWaitingEdge
protected

Definition at line 346 of file MSTransportable.h.

SUMOReal MSTransportable::Stage_Driving::myWaitingPos
protected

Definition at line 343 of file MSTransportable.h.

SUMOTime MSTransportable::Stage_Driving::myWaitingSince
protected

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

Definition at line 345 of file MSTransportable.h.


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