SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSTransportable::Stage_Waiting Class Reference

#include <MSTransportable.h>

Inheritance diagram for MSTransportable::Stage_Waiting:
Inheritance graph
Collaboration diagram for MSTransportable::Stage_Waiting:
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...
 
std::string getStageDescription () const
 return string representation of the current stage More...
 
StageType getStageType () const
 
SUMOTime getUntil () const
 
virtual SUMOVehiclegetVehicle () const
 Whether the transportable waits for a vehicle. More...
 
SUMOTime getWaitingTime (SUMOTime now) const
 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)
 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...
 
 Stage_Waiting (const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType, const bool initial)
 constructor More...
 
virtual void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
virtual ~Stage_Waiting ()
 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

Stage_Waitingoperator= (const Stage_Waiting &)
 Invalidated assignment operator. More...
 
 Stage_Waiting (const Stage_Waiting &)
 Invalidated copy constructor. More...
 

Private Attributes

std::string myActType
 The type of activity. More...
 
SUMOTime myWaitingDuration
 the time the person is waiting More...
 
SUMOTime myWaitingStart
 the time the person is waiting More...
 
SUMOTime myWaitingUntil
 the time until the person is waiting More...
 

Detailed Description

A "real" stage performing a waiting over the specified time

Definition at line 202 of file MSTransportable.h.

Constructor & Destructor Documentation

MSTransportable::Stage_Waiting::Stage_Waiting ( const MSEdge destination,
SUMOTime  duration,
SUMOTime  until,
SUMOReal  pos,
const std::string &  actType,
const bool  initial 
)

constructor

Definition at line 104 of file MSTransportable.cpp.

MSTransportable::Stage_Waiting::~Stage_Waiting ( )
virtual

destructor

Definition at line 116 of file MSTransportable.cpp.

MSTransportable::Stage_Waiting::Stage_Waiting ( const Stage_Waiting )
private

Invalidated copy constructor.

Member Function Documentation

void MSTransportable::Stage_Waiting::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 193 of file MSTransportable.cpp.

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

void MSTransportable::Stage_Waiting::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 200 of file MSTransportable.cpp.

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

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

returns the angle of the transportable

Implements MSTransportable::Stage.

Definition at line 150 of file MSTransportable.cpp.

References 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_Waiting::getEdge ( ) const
virtual

Returns the current edge.

Implements MSTransportable::Stage.

Definition at line 120 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_Waiting::getEdgePos ( SUMOTime  now) const
virtual

Implements MSTransportable::Stage.

Definition at line 132 of file MSTransportable.cpp.

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_Waiting::getFromEdge ( ) const
virtual

Implements MSTransportable::Stage.

Definition at line 126 of file MSTransportable.cpp.

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

returns the position of the transportable

Implements MSTransportable::Stage.

Definition at line 144 of file MSTransportable.cpp.

References MSTransportable::ROADSIDE_OFFSET.

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

the speed of the transportable

Implements MSTransportable::Stage.

Definition at line 213 of file MSTransportable.cpp.

std::string MSTransportable::Stage_Waiting::getStageDescription ( ) const
inlinevirtual

return string representation of the current stage

Implements MSTransportable::Stage.

Definition at line 226 of file MSTransportable.h.

References myActType.

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

Definition at line 103 of file MSTransportable.h.

References MSTransportable::Stage::myType.

SUMOTime MSTransportable::Stage_Waiting::getUntil ( ) const

Definition at line 138 of file MSTransportable.cpp.

virtual SUMOVehicle* MSTransportable::Stage::getVehicle ( ) const
inlinevirtualinherited

Whether the transportable waits for a vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 128 of file MSTransportable.h.

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

the time this transportable spent waiting

Implements MSTransportable::Stage.

Definition at line 207 of file MSTransportable.cpp.

virtual bool MSTransportable::Stage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

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
virtualinherited

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

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 81 of file MSTransportable.cpp.

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

Invalidated assignment operator.

void MSTransportable::Stage_Waiting::proceed ( MSNet net,
MSTransportable transportable,
SUMOTime  now,
Stage previous 
)
virtual
void MSTransportable::Stage_Waiting::routeOutput ( OutputDevice os) 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 178 of file MSTransportable.cpp.

References OutputDevice::closeTag(), MSTransportable::getDestination(), MSTransportable::getID(), OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), MSTransportable::WAITING_FOR_DEPART, and OutputDevice::writeAttr().

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_Waiting::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 170 of file MSTransportable.cpp.

References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), MSTransportable::WAITING_FOR_DEPART, and OutputDevice::writeAttr().

Field Documentation

std::string MSTransportable::Stage_Waiting::myActType
private

The type of activity.

Definition at line 270 of file MSTransportable.h.

Referenced by getStageDescription().

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

StageType MSTransportable::Stage::myType
protectedinherited

The type of this stage.

Definition at line 188 of file MSTransportable.h.

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

SUMOTime MSTransportable::Stage_Waiting::myWaitingDuration
private

the time the person is waiting

Definition at line 261 of file MSTransportable.h.

SUMOTime MSTransportable::Stage_Waiting::myWaitingStart
private

the time the person is waiting

Definition at line 267 of file MSTransportable.h.

SUMOTime MSTransportable::Stage_Waiting::myWaitingUntil
private

the time until the person is waiting

Definition at line 264 of file MSTransportable.h.


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