SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSTransportable Class Referenceabstract

#include <MSTransportable.h>

Inheritance diagram for MSTransportable:
MSContainer MSPerson GUIContainer GUIPerson

Data Structures

class  Stage
 

Public Types

typedef std::vector
< MSTransportable::Stage * > 
MSTransportablePlan
 the structure holding the plan of a container More...
 
enum  StageType { DRIVING = 0, WAITING = 1, MOVING_WITHOUT_VEHICLE = 2 }
 

Public Member Functions

virtual SUMOReal getAngle () const
 return the current angle of the container More...
 
MSTransportable::Stage * getCurrentStage () const
 Return the current stage. More...
 
std::string getCurrentStageDescription () const
 Returns the current stage description as a string. More...
 
StageType getCurrentStageType () const
 the current stage type of the container More...
 
SUMOTime getDesiredDepart () const
 Returns the desired departure time. More...
 
const MSEdge & getDestination () const
 Returns the current destination. More...
 
const MSEdge * getEdge () const
 Returns the current edge. More...
 
virtual SUMOReal getEdgePos () const
 Return the position on the edge. More...
 
const MSEdge * getFromEdge () const
 Returns the departure edge. More...
 
const std::string & getID () const
 returns the id of the transportable More...
 
const MSEdge & getNextDestination () const
 Returns the destination after the current destination. More...
 
const SUMOVehicleParameter & getParameter () const
 
virtual Position getPosition () const
 Return the Network coordinate of the container. More...
 
virtual SUMOReal getSpeed () const
 the current speed of the container More...
 
const MSVehicleType & getVehicleType () const
 
virtual SUMOReal getWaitingSeconds () const
 the time this container spent waiting in seconds More...
 
bool isWaiting4Vehicle () const
 Whether the container waits for a vehicle. More...
 
bool isWaitingFor (const std::string &line) const
 Whether the container waits for a vehicle of the line specified. More...
 
 MSTransportable (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportablePlan *plan)
 constructor More...
 
virtual bool proceed (MSNet *net, SUMOTime time)=0
 
virtual void routeOutput (OutputDevice &os) const =0
 Called on writing vehroute output. More...
 
void setDeparted (SUMOTime now)
 logs depart time of the current stage More...
 
void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
virtual ~MSTransportable ()
 destructor More...
 

Protected Attributes

const SUMOVehicleParameter * myParameter
 the plan of the container More...
 
MSTransportablePlan * myPlan
 the plan of the container More...
 
MSTransportablePlan::iterator myStep
 the iterator over the route More...
 
const MSVehicleType * myVType
 This container's type. (mainly used for drawing related information Note sure if it is really necessary. More...
 
bool myWriteEvents
 Whether events shall be written. More...
 

Private Member Functions

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

Detailed Description

The class holds a simulated moveable object

Definition at line 53 of file MSTransportable.h.

Member Typedef Documentation

the structure holding the plan of a container

Definition at line 174 of file MSTransportable.h.

Member Enumeration Documentation

Enumerator
DRIVING 
WAITING 
MOVING_WITHOUT_VEHICLE 

Definition at line 55 of file MSTransportable.h.

Constructor & Destructor Documentation

MSTransportable::MSTransportable ( const SUMOVehicleParameter *  pars,
const MSVehicleType *  vtype,
MSTransportablePlan *  plan 
)

constructor

Definition at line 95 of file MSTransportable.cpp.

References myPlan, and myStep.

MSTransportable::~MSTransportable ( )
virtual

destructor

Definition at line 100 of file MSTransportable.cpp.

References myParameter, and myPlan.

MSTransportable::MSTransportable ( const MSTransportable &  )
private

Invalidated copy constructor.

Member Function Documentation

SUMOReal MSTransportable::getAngle ( ) const
virtual

return the current angle of the container

Reimplemented in GUIPerson, and GUIContainer.

Definition at line 134 of file MSTransportable.cpp.

References MSNet::getCurrentTimeStep(), and MSNet::getInstance().

Referenced by GUIContainer::getAngle(), GUIPerson::getAngle(), TraCIServerAPI_Person::processGet(), and MSFCDExport::write().

MSTransportable::Stage* MSTransportable::getCurrentStage ( ) const
inline

Return the current stage.

Definition at line 249 of file MSTransportable.h.

References myStep.

Referenced by GUIPerson::drawAction_drawWalkingareaPath(), and MSEdge::transportable_by_position_sorter::operator()().

std::string MSTransportable::getCurrentStageDescription ( ) const
inline

Returns the current stage description as a string.

Definition at line 244 of file MSTransportable.h.

Referenced by GUIContainer::getParameterWindow(), and GUIPerson::getParameterWindow().

StageType MSTransportable::getCurrentStageType ( ) const
inline
SUMOTime MSTransportable::getDesiredDepart ( ) const

Returns the desired departure time.

Definition at line 114 of file MSTransportable.cpp.

References SUMOVehicleParameter::depart, and myParameter.

Referenced by MSContainerControl::erase(), MSPersonControl::erase(), MSPerson::routeOutput(), and MSContainer::routeOutput().

SUMOReal MSTransportable::getEdgePos ( ) const
virtual

Return the position on the edge.

Reimplemented in GUIPerson, and GUIContainer.

Definition at line 124 of file MSTransportable.cpp.

References MSNet::getCurrentTimeStep(), and MSNet::getInstance().

Referenced by GUIContainer::getEdgePos(), GUIPerson::getEdgePos(), TraCIServerAPI_Person::processGet(), and MSFCDExport::write().

const MSEdge* MSTransportable::getFromEdge ( ) const
inline
const std::string & MSTransportable::getID ( ) const

returns the id of the transportable

Definition at line 109 of file MSTransportable.cpp.

References SUMOVehicleParameter::id, and myParameter.

Referenced by MSContainerControl::abortWaiting(), MSPersonControl::abortWaiting(), MSVehicle::addContainer(), MSVehicle::addPerson(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSContainerControl::erase(), MSPersonControl::erase(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSPModel_Striping::by_xpos_sorter::operator()(), MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPModel_Striping::PState::PState(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSPerson::MSPersonStage_Waiting::routeOutput(), MSContainerControl::setTranship(), MSPersonControl::setWalking(), MSContainerControl::unsetTranship(), MSPersonControl::unsetWalking(), and MSFCDExport::write().

const MSEdge& MSTransportable::getNextDestination ( ) const
inline

Returns the destination after the current destination.

Definition at line 209 of file MSTransportable.h.

References myStep.

const SUMOVehicleParameter& MSTransportable::getParameter ( ) const
inline
Position MSTransportable::getPosition ( ) const
virtual
SUMOReal MSTransportable::getSpeed ( ) const
virtual

the current speed of the container

Reimplemented in GUIPerson, and GUIContainer.

Definition at line 144 of file MSTransportable.cpp.

Referenced by GUIContainer::getSpeed(), GUIPerson::getSpeed(), TraCIServerAPI_Person::processGet(), and MSFCDExport::write().

SUMOReal MSTransportable::getWaitingSeconds ( ) const
virtual

the time this container spent waiting in seconds

Reimplemented in GUIPerson, and GUIContainer.

Definition at line 139 of file MSTransportable.cpp.

References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.

Referenced by GUIContainer::getWaitingSeconds(), GUIPerson::getWaitingSeconds(), and TraCIServerAPI_Person::processGet().

bool MSTransportable::isWaitingFor ( const std::string &  line) const
inline

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

Definition at line 268 of file MSTransportable.h.

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

Invalidated assignment operator.

virtual void MSTransportable::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, and MSPerson.

Referenced by MSContainerControl::erase(), and MSPersonControl::erase().

void MSTransportable::setDeparted ( SUMOTime  now)

logs depart time of the current stage

Definition at line 119 of file MSTransportable.cpp.

void MSTransportable::tripInfoOutput ( OutputDevice &  os) const

Called on writing tripinfo output.

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

Definition at line 150 of file MSTransportable.cpp.

References myPlan.

Referenced by MSContainerControl::erase(), and MSPersonControl::erase().

Field Documentation

const SUMOVehicleParameter* MSTransportable::myParameter
protected

the plan of the container

Definition at line 279 of file MSTransportable.h.

Referenced by getDesiredDepart(), getID(), getParameter(), and ~MSTransportable().

MSTransportablePlan* MSTransportable::myPlan
protected
MSTransportablePlan::iterator MSTransportable::myStep
protected

the iterator over the route

Definition at line 292 of file MSTransportable.h.

Referenced by getCurrentStage(), getNextDestination(), MSTransportable(), MSPerson::proceed(), and MSContainer::proceed().

const MSVehicleType* MSTransportable::myVType
protected

This container's type. (mainly used for drawing related information Note sure if it is really necessary.

Definition at line 283 of file MSTransportable.h.

Referenced by getVehicleType().

bool MSTransportable::myWriteEvents
protected

Whether events shall be written.

Definition at line 286 of file MSTransportable.h.


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