Eclipse SUMO - Simulation of Urban MObility
RORoutable Class Referenceabstract

A routable thing such as a vehicle or person. More...

#include <RORoutable.h>

Inheritance diagram for RORoutable:
Collaboration diagram for RORoutable:

Public Member Functions

virtual void computeRoute (const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler)=0
 
SUMOTime getDepart () const
 Returns the time the vehicle starts at, -1 for triggered vehicles. More...
 
virtual const ROEdgegetDepartEdge () const =0
 
const std::string & getID () const
 Returns the id of the routable. More...
 
double getMaxSpeed () const
 Returns the vehicle's maximum speed. More...
 
const SUMOVehicleParametergetParameter () const
 Returns the definition of the vehicle / person parameter. More...
 
bool getRoutingSuccess () const
 
const SUMOVTypeParametergetType () const
 Returns the type of the routable. More...
 
SUMOVehicleClass getVClass () const
 
bool isPartOfFlow () const
 
bool isPublicTransport () const
 
 RORoutable (const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
 Constructor. More...
 
void write (OutputDevice &os, OutputDevice *const altos, OutputDevice *const typeos, OptionsCont &options) const
 Saves the routable including the vehicle type (if it was not saved before). More...
 
virtual ~RORoutable ()
 Destructor. More...
 

Protected Member Functions

virtual void saveAsXML (OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options) const =0
 Saves the complete routable description. More...
 

Protected Attributes

bool myRoutingSuccess
 Whether the last routing was successful. More...
 

Private Member Functions

RORoutableoperator= (const RORoutable &src)
 Invalidated assignment operator. More...
 
 RORoutable (const RORoutable &src)
 Invalidated copy constructor. More...
 

Private Attributes

SUMOVehicleParameter myParameter
 The vehicle's parameter. More...
 
const SUMOVTypeParameter *const myType
 The type of the vehicle. More...
 

Detailed Description

A routable thing such as a vehicle or person.

Definition at line 55 of file RORoutable.h.

Constructor & Destructor Documentation

◆ RORoutable() [1/2]

RORoutable::RORoutable ( const SUMOVehicleParameter pars,
const SUMOVTypeParameter type 
)
inline

Constructor.

Parameters
[in]parsParameter of this routable
[in]typeThe type of the routable

Definition at line 62 of file RORoutable.h.

◆ ~RORoutable()

virtual RORoutable::~RORoutable ( )
inlinevirtual

Destructor.

Definition at line 67 of file RORoutable.h.

◆ RORoutable() [2/2]

RORoutable::RORoutable ( const RORoutable src)
private

Invalidated copy constructor.

Member Function Documentation

◆ computeRoute()

virtual void RORoutable::computeRoute ( const RORouterProvider provider,
const bool  removeLoops,
MsgHandler errorHandler 
)
pure virtual

◆ getDepart()

SUMOTime RORoutable::getDepart ( ) const
inline

Returns the time the vehicle starts at, -1 for triggered vehicles.

Returns
The vehicle's depart time

Definition at line 103 of file RORoutable.h.

References SUMOVehicleParameter::depart, and myParameter.

Referenced by RONet::addPerson(), RONet::addVehicle(), and ROVehicleByDepartureComperator::operator()().

◆ getDepartEdge()

virtual const ROEdge* RORoutable::getDepartEdge ( ) const
pure virtual

Implemented in ROPerson, and ROVehicle.

Referenced by RONet::createBulkRouteRequests(), and getMaxSpeed().

◆ getID()

◆ getMaxSpeed()

double RORoutable::getMaxSpeed ( ) const
inline

Returns the vehicle's maximum speed.

Definition at line 114 of file RORoutable.h.

References getDepartEdge(), SUMOVTypeParameter::maxSpeed, and myType.

Referenced by RONet::createBulkRouteRequests().

◆ getParameter()

const SUMOVehicleParameter& RORoutable::getParameter ( ) const
inline

◆ getRoutingSuccess()

bool RORoutable::getRoutingSuccess ( ) const
inline

Definition at line 154 of file RORoutable.h.

References myRoutingSuccess, and saveAsXML().

Referenced by RONet::saveAndRemoveRoutesUntil().

◆ getType()

const SUMOVTypeParameter* RORoutable::getType ( ) const
inline

◆ getVClass()

SUMOVehicleClass RORoutable::getVClass ( ) const
inline

◆ isPartOfFlow()

bool RORoutable::isPartOfFlow ( ) const
inline

◆ isPublicTransport()

bool RORoutable::isPublicTransport ( ) const
inline

Definition at line 122 of file RORoutable.h.

References SUMOVehicleParameter::line, and myParameter.

Referenced by RONet::addVehicle(), and RONet::saveAndRemoveRoutesUntil().

◆ operator=()

RORoutable& RORoutable::operator= ( const RORoutable src)
private

Invalidated assignment operator.

◆ saveAsXML()

virtual void RORoutable::saveAsXML ( OutputDevice os,
OutputDevice *const  typeos,
bool  asAlternatives,
OptionsCont options 
) const
protectedpure virtual

Saves the complete routable description.

Saves the routable itself including the route and stops.

Parameters
[in]osThe routes or alternatives output device to store the routable's description into
[in]typeosThe types - output device to store additional types into
[in]asAlternativesWhether the route shall be saved as route alternatives
[in]optionsto find out about defaults and whether exit times for the edges shall be written
Exceptions
IOErrorIf something fails (not yet implemented)

Implemented in ROPerson, and ROVehicle.

Referenced by getRoutingSuccess(), and write().

◆ write()

void RORoutable::write ( OutputDevice os,
OutputDevice *const  altos,
OutputDevice *const  typeos,
OptionsCont options 
) const
inline

Saves the routable including the vehicle type (if it was not saved before).

Parameters
[in]osThe routes - output device to store the vehicle's description into
[in]altosThe route alternatives - output device to store the vehicle's description into
[in]typeosThe types - output device to store the vehicle types into
Exceptions
IOErrorIf something fails (not yet implemented)

Definition at line 141 of file RORoutable.h.

References saveAsXML().

Referenced by RONet::saveAndRemoveRoutesUntil().

Field Documentation

◆ myParameter

SUMOVehicleParameter RORoutable::myParameter
private

The vehicle's parameter.

Definition at line 175 of file RORoutable.h.

Referenced by getDepart(), getID(), getParameter(), isPartOfFlow(), and isPublicTransport().

◆ myRoutingSuccess

bool RORoutable::myRoutingSuccess
protected

Whether the last routing was successful.

Definition at line 182 of file RORoutable.h.

Referenced by ROPerson::computeIntermodal(), ROVehicle::computeRoute(), ROPerson::computeRoute(), and getRoutingSuccess().

◆ myType

const SUMOVTypeParameter* const RORoutable::myType
private

The type of the vehicle.

Definition at line 178 of file RORoutable.h.

Referenced by getMaxSpeed(), and getType().


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