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:
[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. 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 ignoreTransientPermissions () const
 Returns whether this object is ignoring transient permission changes (during routing) More...
 
bool isPartOfFlow () const
 
bool isPublicTransport () const
 
 RORoutable (const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
 Constructor. More...
 
void setDepart (SUMOTime t)
 update depart time (for triggered persons) 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 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 ROVehicle, and ROPerson.

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

Here is the caller graph for this function:

◆ 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 ROVehicle, and ROPerson.

Referenced by RONet::createBulkRouteRequests().

Here is the caller graph for this function:

◆ 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 121 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 RONet::adaptIntermodalRouter(), 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 163 of file RORoutable.h.

References myRoutingSuccess.

Referenced by RONet::saveAndRemoveRoutesUntil().

Here is the caller graph for this function:

◆ 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:

◆ ignoreTransientPermissions()

bool RORoutable::ignoreTransientPermissions ( ) const
inline

Returns whether this object is ignoring transient permission changes (during routing)

Definition at line 116 of file RORoutable.h.

◆ isPartOfFlow()

bool RORoutable::isPartOfFlow ( ) const
inline

Definition at line 133 of file RORoutable.h.

References myParameter, and SUMOVehicleParameter::repetitionNumber.

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

Here is the caller graph for this function:

◆ isPublicTransport()

bool RORoutable::isPublicTransport ( ) const
inline

Definition at line 129 of file RORoutable.h.

References SUMOVehicleParameter::line, and myParameter.

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

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 ROVehicle, and ROPerson.

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

References saveAsXML().

Referenced by RONet::saveAndRemoveRoutesUntil().

Here is the caller graph for this function:

Field Documentation

◆ myParameter

SUMOVehicleParameter RORoutable::myParameter
private

The vehicle's parameter.

Definition at line 184 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 191 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 187 of file RORoutable.h.

Referenced by getType().


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