Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
RORoutable Class Referenceabstract

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

#include <RORoutable.h>

Inheritance diagram for RORoutable:
[legend]
Collaboration diagram for RORoutable:
[legend]

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.
 
virtual const ROEdge * getDepartEdge () const =0
 
const std::string & getID () const
 Returns the id of the routable.
 
double getMaxSpeed () const
 Returns the vehicle's maximum speed.
 
const SUMOVehicleParameter & getParameter () const
 Returns the definition of the vehicle / person parameter.
 
bool getRoutingSuccess () const
 
const SUMOVTypeParameter * getType () const
 Returns the type of the routable.
 
SUMOVehicleClass getVClass () const
 
bool isPartOfFlow () const
 
bool isPublicTransport () const
 
 RORoutable (const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
 Constructor.
 
void setDepart (SUMOTime t)
 update depart time (for triggered persons)
 
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).
 
virtual ~RORoutable ()
 Destructor.
 

Protected Member Functions

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

Protected Attributes

bool myRoutingSuccess
 Whether the last routing was successful.
 

Private Member Functions

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

Private Attributes

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

Detailed Description

A routable thing such as a vehicle or person.

Definition at line 52 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 59 of file RORoutable.h.

◆ ~RORoutable()

virtual RORoutable::~RORoutable ( )
inlinevirtual

Destructor.

Definition at line 64 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

Implemented in ROPerson, and ROVehicle.

◆ 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 100 of file RORoutable.h.

References SUMOVehicleParameter::depart, and myParameter.

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

Here is the caller graph for this function:

◆ getDepartEdge()

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

Implemented in ROPerson, and ROVehicle.

◆ getID()

const std::string & RORoutable::getID ( ) const
inline

Returns the id of the routable.

Returns
The id of the routable

Definition at line 91 of file RORoutable.h.

References SUMOVehicleParameter::id, and myParameter.

Referenced by RORouteDef::addAlternative(), RONet::addPerson(), ROVehicle::addStop(), ROPerson::computeIntermodal(), ROVehicle::computeRoute(), RONet::createBulkRouteRequests(), RORoute::isValid(), ROVehicleByDepartureComperator::operator()(), RORouteDef::preComputeCurrentRoute(), and RORouteDef::repairCurrentRoute().

Here is the caller graph for this function:

◆ getMaxSpeed()

double RORoutable::getMaxSpeed ( ) const
inline

Returns the vehicle's maximum speed.

Definition at line 115 of file RORoutable.h.

References Parameterised::getParameter(), getType(), and MIN2().

Referenced by ROPerson::computeIntermodal(), RONet::createBulkRouteRequests(), ROEdge::getEffort(), ROEdge::getNoiseEffort(), and ROEdge::getTravelTime().

Here is the caller graph for this function:

◆ getParameter()

const SUMOVehicleParameter & RORoutable::getParameter ( ) const
inline

Returns the definition of the vehicle / person parameter.

Returns
The vehicle / person's parameter

Definition at line 71 of file RORoutable.h.

References myParameter.

Referenced by ROVehicle::addStop(), RONet::addVehicle(), ROVehicle::collectJumps(), ROPerson::computeRoute(), ROVehicle::computeRoute(), ROVehicle::getDepartureTime(), ROVehicle::ROVehicle(), ROPerson::saveAsXML(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ getRoutingSuccess()

bool RORoutable::getRoutingSuccess ( ) const
inline

Definition at line 157 of file RORoutable.h.

References myRoutingSuccess.

◆ getType()

const SUMOVTypeParameter * RORoutable::getType ( ) const
inline

Returns the type of the routable.

Returns
The routable's type
Todo:
Why not return a reference?

Definition at line 82 of file RORoutable.h.

References myType.

Referenced by ROVehicle::getChosenSpeedFactor(), ROEdge::getEmissionEffort(), ROVehicle::getLength(), getMaxSpeed(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getTravelTime(), getVClass(), ROVehicle::getVehicleType(), ROEdge::restricts(), ROPerson::saveAsXML(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ getVClass()

SUMOVehicleClass RORoutable::getVClass ( ) const
inline

Definition at line 109 of file RORoutable.h.

References getType(), SVC_IGNORING, and SUMOVTypeParameter::vehicleClass.

Referenced by ROPerson::computeIntermodal(), ROVehicle::computeRoute(), RONet::createBulkRouteRequests(), RORoute::isValid(), ROEdge::prohibits(), RORouteDef::repairCurrentRoute(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ isPartOfFlow()

bool RORoutable::isPartOfFlow ( ) const
inline

Definition at line 127 of file RORoutable.h.

References myParameter, and SUMOVehicleParameter::repetitionNumber.

Referenced by RONet::addVehicle().

Here is the caller graph for this function:

◆ isPublicTransport()

bool RORoutable::isPublicTransport ( ) const
inline

Definition at line 123 of file RORoutable.h.

References SUMOVehicleParameter::line, and myParameter.

Referenced by RONet::addVehicle().

Here is the caller graph for this function:

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

Here is the caller graph for this function:

◆ setDepart()

void RORoutable::setDepart ( SUMOTime  t)
inline

update depart time (for triggered persons)

Definition at line 105 of file RORoutable.h.

References SUMOVehicleParameter::depart, and myParameter.

◆ 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 142 of file RORoutable.h.

References saveAsXML().

Field Documentation

◆ myParameter

SUMOVehicleParameter RORoutable::myParameter
private

The vehicle's parameter.

Definition at line 178 of file RORoutable.h.

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

◆ myRoutingSuccess

bool RORoutable::myRoutingSuccess
protected

Whether the last routing was successful.

Definition at line 185 of file RORoutable.h.

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

◆ myType

const SUMOVTypeParameter* const RORoutable::myType
private

The type of the vehicle.

Definition at line 181 of file RORoutable.h.

Referenced by getType().


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