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

#include <MSContainer.h>

Inheritance diagram for MSContainer::MSContainerStage_Waiting:
MSContainer::MSContainerStage

Public Member Functions

virtual void beginEventOutput (const MSContainer &container, SUMOTime t, OutputDevice &os) const
 Called for writing the events output. More...
 
virtual void endEventOutput (const MSContainer &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...
 
MSContainerStopgetDepartContainerStop () const
 
const MSEdgegetDestination () const
 returns the destination edge 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 container 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...
 
SUMOTime getWaitingTime (SUMOTime now) const
 the time this container spent waiting More...
 
virtual bool isWaiting4Vehicle () const
 Whether the container waits for a vehicle. More...
 
virtual bool isWaitingFor (const std::string &line) const
 Whether the container 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, MSContainer *container, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
 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

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...
 
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...
 
MSContainerStopmyCurrentContainerStop
 the container stop at which the container is waiting More...
 
SUMOReal myStartPos
 
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 316 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 
)
MSContainer::MSContainerStage_Waiting::~MSContainerStage_Waiting ( )

destructor

Definition at line 251 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 MSContainer 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 MSContainer::MSContainerStage.

Definition at line 325 of file MSContainer.cpp.

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

void MSContainer::MSContainerStage_Waiting::endEventOutput ( const MSContainer 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 MSContainer::MSContainerStage.

Definition at line 331 of file MSContainer.cpp.

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

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

the angle of the edge minus 90deg

Implements MSContainer::MSContainerStage.

Definition at line 279 of file MSContainer.cpp.

MSContainerStop * MSContainer::MSContainerStage_Waiting::getDepartContainerStop ( ) const
virtual

Implements MSContainer::MSContainerStage.

Definition at line 294 of file MSContainer.cpp.

const MSEdge & MSContainer::MSContainerStage::getDestination ( ) const
inherited

returns the destination edge

Definition at line 68 of file MSContainer.cpp.

const MSEdge * MSContainer::MSContainerStage_Waiting::getEdge ( ) const
virtual

Returns the current edge.

Implements MSContainer::MSContainerStage.

Definition at line 254 of file MSContainer.cpp.

SUMOReal MSContainer::MSContainerStage::getEdgeAngle ( const MSEdge e,
SUMOReal  at 
) const
inherited

get angle of the edge at a certain position

Definition at line 100 of file MSContainer.cpp.

References MSEdge::getLanes(), and PositionVector::rotationDegreeAtOffset().

Referenced by CState::getAngle().

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

Implements MSContainer::MSContainerStage.

Definition at line 264 of file MSContainer.cpp.

Position MSContainer::MSContainerStage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on edge e at length at with orthogonal offset

Definition at line 90 of file MSContainer.cpp.

References MSEdge::getLanes().

const MSEdge * MSContainer::MSContainerStage_Waiting::getFromEdge ( ) const
virtual

Returns the current edge.

Implements MSContainer::MSContainerStage.

Definition at line 259 of file MSContainer.cpp.

Position MSContainer::MSContainerStage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on lane at length at with orthogonal offset

Definition at line 95 of file MSContainer.cpp.

References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().

Referenced by CState::computeTranshipTime().

Position MSContainer::MSContainerStage_Waiting::getPosition ( SUMOTime  now) const
virtual

returns the position of the container

Implements MSContainer::MSContainerStage.

Definition at line 274 of file MSContainer.cpp.

References MSContainer::ROADSIDE_OFFSET.

SUMOReal MSContainer::MSContainerStage_Waiting::getSpeed ( ) const
virtual

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

Implements MSContainer::MSContainerStage.

Definition at line 289 of file MSContainer.cpp.

std::string MSContainer::MSContainerStage_Waiting::getStageDescription ( ) const
inlinevirtual

Returns the current stage description as a string.

Implements MSContainer::MSContainerStage.

Definition at line 347 of file MSContainer.h.

References myActType.

StageType MSContainer::MSContainerStage::getStageType ( ) const
inlineinherited

Definition at line 108 of file MSContainer.h.

References MSContainer::MSContainerStage::myType.

SUMOTime MSContainer::MSContainerStage_Waiting::getUntil ( ) const

Returns time until the container waits.

Definition at line 269 of file MSContainer.cpp.

Referenced by MSContainer::routeOutput().

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

the time this container spent waiting

Implements MSContainer::MSContainerStage.

Definition at line 284 of file MSContainer.cpp.

virtual bool MSContainer::MSContainerStage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

Whether the container waits for a vehicle.

Reimplemented in MSContainer::MSContainerStage_Driving.

Definition at line 128 of file MSContainer.h.

bool MSContainer::MSContainerStage::isWaitingFor ( const std::string &  line) const
virtualinherited

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

Reimplemented in MSContainer::MSContainerStage_Driving.

Definition at line 85 of file MSContainer.cpp.

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

Invalidated assignment operator.

void MSContainer::MSContainerStage_Waiting::proceed ( MSNet net,
MSContainer container,
SUMOTime  now,
MSEdge previousEdge,
const SUMOReal  at 
)
virtual

proceeds to the next step

Implements MSContainer::MSContainerStage.

Definition at line 299 of file MSContainer.cpp.

References MSEdge::addContainer(), MSNet::getContainerControl(), MAX3(), and MSContainerControl::setWaitEnd().

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 MSContainer::MSContainerStage.

Definition at line 313 of file MSContainer.cpp.

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

void MSContainer::MSContainerStage::setArrived ( SUMOTime  now)
inherited

logs end of the step

Definition at line 80 of file MSContainer.cpp.

void MSContainer::MSContainerStage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 73 of file MSContainer.cpp.

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 MSContainer::MSContainerStage.

Definition at line 308 of file MSContainer.cpp.

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

Field Documentation

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

The type of activity.

Definition at line 398 of file MSContainer.h.

Referenced by getStageDescription().

SUMOTime MSContainer::MSContainerStage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 186 of file MSContainer.h.

MSContainerStop* MSContainer::MSContainerStage_Waiting::myCurrentContainerStop
private

the container stop at which the container is waiting

Definition at line 403 of file MSContainer.h.

SUMOTime MSContainer::MSContainerStage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 183 of file MSContainer.h.

const MSEdge& MSContainer::MSContainerStage::myDestination
protectedinherited

the next edge to reach by getting transported

Definition at line 180 of file MSContainer.h.

Referenced by MSContainerStage_Waiting().

SUMOReal MSContainer::MSContainerStage_Waiting::myStartPos
private

Definition at line 400 of file MSContainer.h.

Referenced by MSContainerStage_Waiting().

StageType MSContainer::MSContainerStage::myType
protectedinherited

The type of this stage.

Definition at line 189 of file MSContainer.h.

Referenced by MSContainer::MSContainerStage::getStageType().

SUMOTime MSContainer::MSContainerStage_Waiting::myWaitingDuration
private

the time the container is waiting

Definition at line 389 of file MSContainer.h.

SUMOTime MSContainer::MSContainerStage_Waiting::myWaitingStart
private

the time the container started waiting

Definition at line 395 of file MSContainer.h.

SUMOTime MSContainer::MSContainerStage_Waiting::myWaitingUntil
private

the time until the container is waiting

Definition at line 392 of file MSContainer.h.


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