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

#include <MSContainer.h>

Inheritance diagram for MSContainer::MSContainerStage_Tranship:
MSContainer::MSContainerStage

Public Member Functions

virtual void beginEventOutput (const MSContainer &c, SUMOTime t, OutputDevice &os) const
 Called for writing the events output. More...
 
virtual void endEventOutput (const MSContainer &c, 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 container. More...
 
SUMOReal getArrivalPos () const
 
CStategetContainerState () const
 
MSContainerStopgetDepartContainerStop () const
 returns the container stop from which the container departs More...
 
SUMOReal getDepartPos () 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
 Returns the offset from the start of the current edge measured in its natural direction. More...
 
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 first edge of the containers route. More...
 
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const
 get position on lane at length at with orthogonal offset More...
 
SUMOReal getMaxSpeed () const
 accessors to be used by MSCModel_NonInteracting More...
 
const MSEdgegetNextRouteEdge () const
 
Position getPosition (SUMOTime now) const
 Returns the position of the container. More...
 
SUMOReal getSpeed () const
 Returns the speed of the container. More...
 
std::string getStageDescription () const
 Returns the current stage description as a string. More...
 
StageType getStageType () const
 
const MSEdgegetToEdge () const
 Returns last edge of the containers route. More...
 
SUMOTime getWaitingTime (SUMOTime now) const
 Returns the time the 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...
 
bool moveToNextEdge (MSContainer *container, SUMOTime currentTime, MSEdge *nextInternal=0)
 move forward and return whether the container arrived More...
 
 MSContainerStage_Tranship (const std::vector< const MSEdge * > &route, MSContainerStop *toCS, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos)
 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_Tranship ()
 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_Tranship (const MSContainerStage_Tranship &)
 Invalidated copy constructor. More...
 
MSContainerStage_Transhipoperator= (const MSContainerStage_Tranship &)
 Invalidated assignment operator. More...
 

Private Attributes

SUMOReal myArrivalPos
 the arrival position More...
 
CStatemyContainerState
 state that is to be manipulated by MSCModel More...
 
MSEdgemyCurrentInternalEdge
 The current internal edge this container is on or 0. More...
 
MSContainerStopmyDepartContainerStop
 The container stop from which the container departs. More...
 
SUMOReal myDepartPos
 the depart position More...
 
MSContainerStopmyDestinationContainerStop
 the destination container stop More...
 
std::vector< const MSEdge * > myRoute
 The route of the container. More...
 
std::vector< const MSEdge * >::iterator myRouteStep
 current step More...
 
SUMOReal mySpeed
 the speed of the container More...
 

Friends

class MSCModel_NonInteracting
 

Detailed Description

A "real" stage performing the tranship of a container A container is in this stage if it gets transhipred between two stops that are assumed to be connected.

Definition at line 420 of file MSContainer.h.

Constructor & Destructor Documentation

MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship ( const std::vector< const MSEdge * > &  route,
MSContainerStop toCS,
SUMOReal  speed,
SUMOReal  departPos,
SUMOReal  arrivalPos 
)
MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship ( )

destructor

Definition at line 352 of file MSContainer.cpp.

MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship ( const MSContainerStage_Tranship )
private

Invalidated copy constructor.

Member Function Documentation

void MSContainer::MSContainerStage_Tranship::beginEventOutput ( const MSContainer c,
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 431 of file MSContainer.cpp.

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

void MSContainer::MSContainerStage_Tranship::endEventOutput ( const MSContainer c,
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 438 of file MSContainer.cpp.

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

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

Returns the angle of the container.

Implements MSContainer::MSContainerStage.

Definition at line 397 of file MSContainer.cpp.

SUMOReal MSContainer::MSContainerStage_Tranship::getArrivalPos ( ) const
inline

Definition at line 502 of file MSContainer.h.

References myArrivalPos.

Referenced by CState::computeTranshipTime().

CState* MSContainer::MSContainerStage_Tranship::getContainerState ( ) const
inline

Definition at line 510 of file MSContainer.h.

References myContainerState.

Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().

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

returns the container stop from which the container departs

Implements MSContainer::MSContainerStage.

Definition at line 412 of file MSContainer.cpp.

SUMOReal MSContainer::MSContainerStage_Tranship::getDepartPos ( ) const
inline

Definition at line 498 of file MSContainer.h.

References myDepartPos.

Referenced by CState::computeTranshipTime().

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

returns the destination edge

Definition at line 68 of file MSContainer.cpp.

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

Returns the current edge.

Implements MSContainer::MSContainerStage.

Definition at line 368 of file MSContainer.cpp.

Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute(), and CState::getAngle().

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_Tranship::getEdgePos ( SUMOTime  now) const
virtual

Returns the offset from the start of the current edge measured in its natural direction.

Implements MSContainer::MSContainerStage.

Definition at line 387 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_Tranship::getFromEdge ( ) const
virtual

Returns first edge of the containers route.

Implements MSContainer::MSContainerStage.

Definition at line 377 of file MSContainer.cpp.

Referenced by CState::computeTranshipTime().

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

SUMOReal MSContainer::MSContainerStage_Tranship::getMaxSpeed ( ) const
inline

accessors to be used by MSCModel_NonInteracting

Definition at line 494 of file MSContainer.h.

References mySpeed.

Referenced by CState::computeTranshipTime(), CState::getPosition(), and CState::getSpeed().

const MSEdge* MSContainer::MSContainerStage_Tranship::getNextRouteEdge ( ) const
inline

Definition at line 506 of file MSContainer.h.

References myRoute, and myRouteStep.

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

Returns the position of the container.

Implements MSContainer::MSContainerStage.

Definition at line 392 of file MSContainer.cpp.

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

Returns the speed of the container.

Implements MSContainer::MSContainerStage.

Definition at line 407 of file MSContainer.cpp.

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

Returns the current stage description as a string.

Implements MSContainer::MSContainerStage.

Definition at line 458 of file MSContainer.h.

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

Definition at line 108 of file MSContainer.h.

References MSContainer::MSContainerStage::myType.

const MSEdge * MSContainer::MSContainerStage_Tranship::getToEdge ( ) const

Returns last edge of the containers route.

Definition at line 382 of file MSContainer.cpp.

Referenced by CState::computeTranshipTime().

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

Returns the time the container spent waiting.

Implements MSContainer::MSContainerStage.

Definition at line 402 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.

bool MSContainer::MSContainerStage_Tranship::moveToNextEdge ( MSContainer container,
SUMOTime  currentTime,
MSEdge nextInternal = 0 
)
MSContainerStage_Tranship& MSContainer::MSContainerStage_Tranship::operator= ( const MSContainerStage_Tranship )
private

Invalidated assignment operator.

void MSContainer::MSContainerStage_Tranship::proceed ( MSNet net,
MSContainer container,
SUMOTime  now,
MSEdge previousEdge,
const SUMOReal  at 
)
virtual
void MSContainer::MSContainerStage_Tranship::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 423 of file MSContainer.cpp.

References OutputDevice::closeTag(), OutputDevice::openTag(), SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, 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_Tranship::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 417 of file MSContainer.cpp.

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

Friends And Related Function Documentation

friend class MSCModel_NonInteracting
friend

Definition at line 421 of file MSContainer.h.

Field Documentation

SUMOReal MSContainer::MSContainerStage_Tranship::myArrivalPos
private

the arrival position

Definition at line 525 of file MSContainer.h.

Referenced by getArrivalPos(), and MSContainerStage_Tranship().

SUMOTime MSContainer::MSContainerStage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 186 of file MSContainer.h.

CState* MSContainer::MSContainerStage_Tranship::myContainerState
private

state that is to be manipulated by MSCModel

Definition at line 537 of file MSContainer.h.

Referenced by getContainerState().

MSEdge* MSContainer::MSContainerStage_Tranship::myCurrentInternalEdge
private

The current internal edge this container is on or 0.

Definition at line 540 of file MSContainer.h.

MSContainerStop* MSContainer::MSContainerStage_Tranship::myDepartContainerStop
private

The container stop from which the container departs.

Definition at line 531 of file MSContainer.h.

SUMOTime MSContainer::MSContainerStage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 183 of file MSContainer.h.

SUMOReal MSContainer::MSContainerStage_Tranship::myDepartPos
private

the depart position

Definition at line 522 of file MSContainer.h.

Referenced by getDepartPos(), and MSContainerStage_Tranship().

const MSEdge& MSContainer::MSContainerStage::myDestination
protectedinherited

the next edge to reach by getting transported

Definition at line 180 of file MSContainer.h.

Referenced by MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting().

MSContainerStop* MSContainer::MSContainerStage_Tranship::myDestinationContainerStop
private

the destination container stop

Definition at line 528 of file MSContainer.h.

std::vector<const MSEdge*> MSContainer::MSContainerStage_Tranship::myRoute
private

The route of the container.

Definition at line 516 of file MSContainer.h.

Referenced by getNextRouteEdge(), and MSContainerStage_Tranship().

std::vector<const MSEdge*>::iterator MSContainer::MSContainerStage_Tranship::myRouteStep
private

current step

Definition at line 519 of file MSContainer.h.

Referenced by getNextRouteEdge().

SUMOReal MSContainer::MSContainerStage_Tranship::mySpeed
private

the speed of the container

Definition at line 534 of file MSContainer.h.

Referenced by getMaxSpeed().

StageType MSContainer::MSContainerStage::myType
protectedinherited

The type of this stage.

Definition at line 189 of file MSContainer.h.

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


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