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

#include <MSContainer.h>

Inheritance diagram for MSContainer::MSContainerStage_Waiting:
Inheritance graph
Collaboration diagram for MSContainer::MSContainerStage_Waiting:
Collaboration graph

Public Member Functions

virtual void beginEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const
 Called for writing the events output. More...
 
virtual void endEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const
 Called for writing the events output (end of an action) More...
 
SUMOReal getAngle (SUMOTime now) const
 the angle of the edge minus 90deg More...
 
SUMOReal getArrivalPos () const
 
MSStoppingPlacegetDepartContainerStop () 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
 Returns the current edge. More...
 
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
 Returns the speed of the container which is always zero in that stage. More...
 
std::string getStageDescription () const
 Returns the current stage description as a string. More...
 
StageType getStageType () const
 
SUMOTime getUntil () const
 Returns time until the container waits. More...
 
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...
 
 MSContainerStage_Waiting (const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType)
 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 tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
 ~MSContainerStage_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

 MSContainerStage_Waiting (const MSContainerStage_Waiting &)
 Invalidated copy constructor. More...
 
MSContainerStage_Waitingoperator= (const MSContainerStage_Waiting &)
 Invalidated assignment operator. More...
 

Private Attributes

std::string myActType
 The type of activity. More...
 
MSStoppingPlacemyCurrentContainerStop
 the container stop at which the container is waiting More...
 
SUMOTime myWaitingDuration
 the time the container is waiting More...
 
SUMOTime myWaitingStart
 the time the container started waiting More...
 
SUMOTime myWaitingUntil
 the time until the container is waiting More...
 

Detailed Description

A "real" stage performing a waiting over the specified time A container is in this stage if it is not on a ride or waiting for a ride, e.g. if it is stored, or if gets filled or emptied.

Definition at line 192 of file MSContainer.h.

Constructor & Destructor Documentation

MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting ( const MSEdge destination,
SUMOTime  duration,
SUMOTime  until,
SUMOReal  pos,
const std::string &  actType 
)

constructor

Definition at line 196 of file MSContainer.cpp.

MSContainer::MSContainerStage_Waiting::~MSContainerStage_Waiting ( )

destructor

Definition at line 205 of file MSContainer.cpp.

MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting ( const MSContainerStage_Waiting )
private

Invalidated copy constructor.

Member Function Documentation

void MSContainer::MSContainerStage_Waiting::beginEventOutput ( const MSTransportable container,
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 278 of file MSContainer.cpp.

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

void MSContainer::MSContainerStage_Waiting::endEventOutput ( const MSTransportable container,
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 284 of file MSContainer.cpp.

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

SUMOReal MSContainer::MSContainerStage_Waiting::getAngle ( SUMOTime  now) const
virtual
MSStoppingPlace * MSContainer::MSContainerStage_Waiting::getDepartContainerStop ( ) const

Definition at line 248 of file MSContainer.cpp.

References myCurrentContainerStop.

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

Returns the current edge.

Implements MSTransportable::Stage.

Definition at line 208 of file MSContainer.cpp.

References MSTransportable::Stage::myDestination.

Referenced by beginEventOutput(), and endEventOutput().

SUMOReal MSContainer::MSContainerStage_Waiting::getEdgePos ( SUMOTime  now) const
virtual

Implements MSTransportable::Stage.

Definition at line 218 of file MSContainer.cpp.

References MSTransportable::Stage::myArrivalPos.

Position MSTransportable::Stage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const
inherited
const MSEdge * MSContainer::MSContainerStage_Waiting::getFromEdge ( ) const
virtual

Returns the current edge.

Implements MSTransportable::Stage.

Definition at line 213 of file MSContainer.cpp.

References MSTransportable::Stage::myDestination, and SUMOReal.

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

Returns the speed of the container which is always zero in that stage.

Implements MSTransportable::Stage.

Definition at line 243 of file MSContainer.cpp.

SUMOTime MSContainer::MSContainerStage_Waiting::getUntil ( ) const

Returns time until the container waits.

Definition at line 223 of file MSContainer.cpp.

References myWaitingUntil.

Referenced by MSContainer::routeOutput().

SUMOTime MSContainer::MSContainerStage_Waiting::getWaitingTime ( SUMOTime  now) const
virtual

the time this transportable spent waiting

Implements MSTransportable::Stage.

Definition at line 238 of file MSContainer.cpp.

References myWaitingStart, and SUMOReal.

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

Whether the transportable waits for a vehicle.

Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.

Definition at line 119 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 MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.

Definition at line 72 of file MSTransportable.cpp.

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

MSContainerStage_Waiting& MSContainer::MSContainerStage_Waiting::operator= ( const MSContainerStage_Waiting )
private

Invalidated assignment operator.

void MSContainer::MSContainerStage_Waiting::proceed ( MSNet net,
MSTransportable container,
SUMOTime  now,
Stage previous 
)
virtual
void MSContainer::MSContainerStage_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 266 of file MSContainer.cpp.

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

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

logs end of the step

Definition at line 67 of file MSTransportable.cpp.

References MSTransportable::Stage::myArrived.

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

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

logs end of the step

Definition at line 60 of file MSTransportable.cpp.

References MSTransportable::Stage::myDeparted.

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

void MSContainer::MSContainerStage_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 261 of file MSContainer.cpp.

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

Field Documentation

std::string MSContainer::MSContainerStage_Waiting::myActType
private

The type of activity.

Definition at line 274 of file MSContainer.h.

Referenced by beginEventOutput(), and endEventOutput().

MSStoppingPlace* MSContainer::MSContainerStage_Waiting::myCurrentContainerStop
private

the container stop at which the container is waiting

Definition at line 277 of file MSContainer.h.

Referenced by getDepartContainerStop().

SUMOTime MSTransportable::Stage::myDeparted
protectedinherited
MSStoppingPlace* const MSTransportable::Stage::myDestinationStop
protectedinherited
StageType MSTransportable::Stage::myType
protectedinherited

The type of this stage.

Definition at line 184 of file MSTransportable.h.

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

SUMOTime MSContainer::MSContainerStage_Waiting::myWaitingDuration
private

the time the container is waiting

Definition at line 265 of file MSContainer.h.

Referenced by proceed(), and routeOutput().

SUMOTime MSContainer::MSContainerStage_Waiting::myWaitingStart
private

the time the container started waiting

Definition at line 271 of file MSContainer.h.

Referenced by getWaitingTime(), and proceed().

SUMOTime MSContainer::MSContainerStage_Waiting::myWaitingUntil
private

the time until the container is waiting

Definition at line 268 of file MSContainer.h.

Referenced by getUntil(), proceed(), and routeOutput().


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