SUMO - Simulation of Urban MObility
MSContainer::MSContainerStage Class Referenceabstract

#include <MSContainer.h>

Inheritance diagram for MSContainer::MSContainerStage:
MSContainer::MSContainerStage_Driving MSContainer::MSContainerStage_Tranship MSContainer::MSContainerStage_Waiting

Public Member Functions

virtual void beginEventOutput (const MSContainer &container, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (begin of an action) More...
 
virtual void endEventOutput (const MSContainer &container, SUMOTime t, OutputDevice &os) const =0
 Called for writing the events output (end of an action) More...
 
virtual SUMOReal getAngle (SUMOTime now) const =0
 returns the angle of the container More...
 
virtual MSContainerStopgetDepartContainerStop () const =0
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
virtual const MSEdgegetEdge () const =0
 Returns the current edge. More...
 
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
 get angle of the edge at a certain position More...
 
virtual SUMOReal getEdgePos (SUMOTime now) const =0
 
Position getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const
 get position on edge e at length at with orthogonal offset More...
 
virtual const MSEdgegetFromEdge () const =0
 
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const
 get position on lane at length at with orthogonal offset More...
 
virtual Position getPosition (SUMOTime now) const =0
 returns the position of the container More...
 
virtual SUMOReal getSpeed () const =0
 the speed of the container More...
 
virtual std::string getStageDescription () const =0
 return string representation of the current stage More...
 
StageType getStageType () const
 
virtual SUMOTime getWaitingTime (SUMOTime now) const =0
 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 (const MSEdge &destination, StageType type)
 constructor More...
 
virtual void proceed (MSNet *net, MSContainer *container, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)=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...
 
virtual void tripInfoOutput (OutputDevice &os) const =0
 Called on writing tripinfo output. More...
 
virtual ~MSContainerStage ()
 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 (const MSContainerStage &)
 Invalidated copy constructor. More...
 
MSContainerStageoperator= (const MSContainerStage &)
 Invalidated assignment operator. More...
 

Detailed Description

The "abstract" class for a single stage of a container movement Contains the destination of the current movement step

Definition at line 85 of file MSContainer.h.

Constructor & Destructor Documentation

MSContainer::MSContainerStage::MSContainerStage ( const MSEdge destination,
StageType  type 
)

constructor

Definition at line 62 of file MSContainer.cpp.

MSContainer::MSContainerStage::~MSContainerStage ( )
virtual

destructor

Definition at line 65 of file MSContainer.cpp.

MSContainer::MSContainerStage::MSContainerStage ( const MSContainerStage )
private

Invalidated copy constructor.

Member Function Documentation

virtual void MSContainer::MSContainerStage::beginEventOutput ( const MSContainer container,
SUMOTime  t,
OutputDevice os 
) const
pure virtual

Called for writing the events output (begin of an action)

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

Implemented in MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Waiting, and MSContainer::MSContainerStage_Driving.

virtual void MSContainer::MSContainerStage::endEventOutput ( const MSContainer container,
SUMOTime  t,
OutputDevice os 
) const
pure virtual

Called for writing the events output (end of an action)

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

Implemented in MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Waiting, and MSContainer::MSContainerStage_Driving.

virtual SUMOReal MSContainer::MSContainerStage::getAngle ( SUMOTime  now) const
pure virtual
virtual MSContainerStop* MSContainer::MSContainerStage::getDepartContainerStop ( ) const
pure virtual
const MSEdge & MSContainer::MSContainerStage::getDestination ( ) const

returns the destination edge

Definition at line 68 of file MSContainer.cpp.

virtual const MSEdge* MSContainer::MSContainerStage::getEdge ( ) const
pure virtual
SUMOReal MSContainer::MSContainerStage::getEdgeAngle ( const MSEdge e,
SUMOReal  at 
) const

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

virtual SUMOReal MSContainer::MSContainerStage::getEdgePos ( SUMOTime  now) const
pure virtual
Position MSContainer::MSContainerStage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const

get position on edge e at length at with orthogonal offset

Definition at line 90 of file MSContainer.cpp.

References MSEdge::getLanes().

virtual const MSEdge* MSContainer::MSContainerStage::getFromEdge ( ) const
pure virtual
Position MSContainer::MSContainerStage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const

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

virtual Position MSContainer::MSContainerStage::getPosition ( SUMOTime  now) const
pure virtual
virtual SUMOReal MSContainer::MSContainerStage::getSpeed ( ) const
pure virtual
virtual std::string MSContainer::MSContainerStage::getStageDescription ( ) const
pure virtual

return string representation of the current stage

Implemented in MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Waiting, and MSContainer::MSContainerStage_Driving.

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

Definition at line 108 of file MSContainer.h.

References myType.

virtual SUMOTime MSContainer::MSContainerStage::getWaitingTime ( SUMOTime  now) const
pure virtual
virtual bool MSContainer::MSContainerStage::isWaiting4Vehicle ( ) const
inlinevirtual

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
virtual

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& MSContainer::MSContainerStage::operator= ( const MSContainerStage )
private

Invalidated assignment operator.

virtual void MSContainer::MSContainerStage::proceed ( MSNet net,
MSContainer container,
SUMOTime  now,
MSEdge previousEdge,
const SUMOReal  at 
)
pure virtual
virtual void MSContainer::MSContainerStage::routeOutput ( OutputDevice os) const
pure virtual

Called on writing vehroute output.

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

Implemented in MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Waiting, and MSContainer::MSContainerStage_Driving.

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

logs end of the step

Definition at line 80 of file MSContainer.cpp.

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

logs end of the step

Definition at line 73 of file MSContainer.cpp.

virtual void MSContainer::MSContainerStage::tripInfoOutput ( OutputDevice os) const
pure virtual

Called on writing tripinfo output.

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

Implemented in MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Waiting, and MSContainer::MSContainerStage_Driving.

Field Documentation

SUMOTime MSContainer::MSContainerStage::myArrived
protected

the time at which this stage ended

Definition at line 186 of file MSContainer.h.

SUMOTime MSContainer::MSContainerStage::myDeparted
protected

the time at which this stage started

Definition at line 183 of file MSContainer.h.

const MSEdge& MSContainer::MSContainerStage::myDestination
protected

the next edge to reach by getting transported

Definition at line 180 of file MSContainer.h.

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

StageType MSContainer::MSContainerStage::myType
protected

The type of this stage.

Definition at line 189 of file MSContainer.h.

Referenced by getStageType().


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