SUMO - Simulation of Urban MObility
MSTransportable Class Referenceabstract

#include <MSTransportable.h>

Inheritance diagram for MSTransportable:
Inheritance graph
Collaboration diagram for MSTransportable:
Collaboration graph

Data Structures

class  Stage
 
class  Stage_Driving
 
class  Stage_Waiting
 

Public Types

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

Public Member Functions

virtual SUMOReal getAngle () const
 return the current angle of the transportable More...
 
MSTransportable::StagegetCurrentStage () 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 transportable More...
 
SUMOTime getDesiredDepart () const
 Returns the desired departure time. More...
 
const MSEdgegetDestination () const
 Returns the current destination. More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
virtual SUMOReal getEdgePos () const
 Return the position on the edge. More...
 
const MSEdgegetFromEdge () const
 Returns the departure edge. More...
 
const std::string & getID () const
 returns the id of the transportable More...
 
const MSEdgegetNextDestination () const
 Returns the destination after the current destination. More...
 
const SUMOVehicleParametergetParameter () const
 
virtual Position getPosition () const
 Return the Network coordinate of the transportable. More...
 
virtual SUMOReal getSpeed () const
 the current speed of the transportable More...
 
SUMOVehiclegetVehicle () const
 The vehicle associated with this transportable. More...
 
const MSVehicleTypegetVehicleType () const
 
virtual SUMOReal getWaitingSeconds () const
 the time this transportable spent waiting in seconds More...
 
bool isWaiting4Vehicle () const
 Whether the transportable waits for a vehicle. More...
 
bool isWaitingFor (const std::string &line) const
 Whether the transportable 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...
 
virtual void tripInfoOutput (OutputDevice &os) const =0
 Called on writing tripinfo output. More...
 
virtual ~MSTransportable ()
 destructor More...
 

Protected Attributes

const SUMOVehicleParametermyParameter
 the plan of the transportable More...
 
MSTransportablePlanmyPlan
 the plan of the transportable More...
 
MSTransportablePlan::iterator myStep
 the iterator over the route More...
 
const MSVehicleTypemyVType
 This transportable's type. (mainly used for drawing related information Note sure if it is really necessary. More...
 
bool myWriteEvents
 Whether events shall be written. More...
 

Static Protected Attributes

static const SUMOReal ROADSIDE_OFFSET
 the offset for computing positions when standing at an edge More...
 

Private Member Functions

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

Detailed Description

The class holds a simulated moveable object

Definition at line 58 of file MSTransportable.h.

Member Typedef Documentation

the structure holding the plan of a transportable

Definition at line 359 of file MSTransportable.h.

Member Enumeration Documentation

Enumerator
DRIVING 
WAITING 
MOVING_WITHOUT_VEHICLE 
WAITING_FOR_DEPART 

Definition at line 60 of file MSTransportable.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 322 of file MSTransportable.cpp.

References myPlan, and myStep.

MSTransportable::~MSTransportable ( )
virtual

destructor

Definition at line 327 of file MSTransportable.cpp.

References myParameter, and myPlan.

MSTransportable::MSTransportable ( const MSTransportable )
private

Invalidated copy constructor.

Member Function Documentation

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

Returns the current stage description as a string.

Definition at line 429 of file MSTransportable.h.

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

StageType MSTransportable::getCurrentStageType ( ) const
inline
SUMOTime MSTransportable::getDesiredDepart ( ) const
const MSEdge& MSTransportable::getDestination ( ) const
inline
const MSEdge* MSTransportable::getEdge ( ) const
inline
SUMOReal MSTransportable::getEdgePos ( ) const
virtual
const std::string & MSTransportable::getID ( ) const

returns the id of the transportable

Definition at line 339 of file MSTransportable.cpp.

References SUMOVehicleParameter::id, and myParameter.

Referenced by MSTransportableControl::abortWaiting(), MSVehicle::addContainer(), MSVehicle::addPerson(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSTransportableControl::erase(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSDevice_Transportable::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(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSContainer::routeOutput(), MSPerson::routeOutput(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), MSPModel_Striping::PState::walk(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().

const MSEdge& MSTransportable::getNextDestination ( ) const
inline

Returns the destination after the current destination.

Definition at line 394 of file MSTransportable.h.

References myStep.

Position MSTransportable::getPosition ( ) const
virtual
SUMOReal MSTransportable::getSpeed ( ) const
virtual

the current speed of the transportable

Reimplemented in GUIPerson, and GUIContainer.

Definition at line 374 of file MSTransportable.cpp.

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

SUMOVehicle* MSTransportable::getVehicle ( ) const
inline

The vehicle associated with this transportable.

Definition at line 463 of file MSTransportable.h.

SUMOReal MSTransportable::getWaitingSeconds ( ) const
virtual
bool MSTransportable::isWaiting4Vehicle ( ) const
inline

Whether the transportable waits for a vehicle.

Definition at line 458 of file MSTransportable.h.

Referenced by GUIContainer::drawGL(), GUIPerson::drawGL(), GUIContainer::getColorValue(), and GUIPerson::getColorValue().

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

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

Definition at line 453 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 MSPerson, and MSContainer.

Referenced by MSTransportableControl::erase().

void MSTransportable::setDeparted ( SUMOTime  now)

logs depart time of the current stage

Definition at line 349 of file MSTransportable.cpp.

References SUMOReal.

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

Referenced by MSTransportableControl::erase().

Field Documentation

const SUMOVehicleParameter* MSTransportable::myParameter
protected

the plan of the transportable

Definition at line 472 of file MSTransportable.h.

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

MSTransportablePlan::iterator MSTransportable::myStep
protected
const MSVehicleType* MSTransportable::myVType
protected

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

Definition at line 476 of file MSTransportable.h.

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

bool MSTransportable::myWriteEvents
protected

Whether events shall be written.

Definition at line 479 of file MSTransportable.h.

const SUMOReal MSTransportable::ROADSIDE_OFFSET
staticprotected

the offset for computing positions when standing at an edge

Definition at line 469 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Waiting::getPosition(), and MSTransportable::Stage_Driving::getPosition().


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