SUMO - Simulation of Urban MObility

RORoute Class Reference

A complete router's route. More...

#include <RORoute.h>

Inheritance diagram for RORoute:
Named

Public Member Functions

void add (ROEdge *edge)
 Adds an edge to the end of the route.
const RGBColor * getColor () const
 Returns this route's color.
SUMOReal getCosts () const
 Returns the costs of the route.
const std::vector< const
ROEdge * > & 
getEdgeVector () const
 Returns the list of edges this route consists of.
const ROEdge * getFirst () const
 Returns the first edge in the route.
const std::string & getID () const
 Returns the id.
const ROEdge * getLast () const
 Returns the last edge in the route.
SUMOReal getProbability () const
 Returns the probability the driver will take this route with.
void recheckForLoops ()
 Checks whether this route contains loops and removes such.
 RORoute (const std::string &id, SUMOReal costs, SUMOReal prob, const std::vector< const ROEdge * > &route, const RGBColor *const color)
 Constructor.
 RORoute (const RORoute &src)
 Copy constructor.
void setCosts (SUMOReal costs)
 Sets the costs of the route.
void setID (const std::string &newID)
 resets the id
void setProbability (SUMOReal prob)
 Sets the probability of the route.
unsigned int size () const
 Returns the number of edges in this route.
OutputDevice & writeXMLDefinition (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &dev, const ROVehicle *const veh, bool asAlternatives, bool withExitTimes) const
 ~RORoute ()
 Destructor.

Protected Attributes

std::string myID
 The name of the object.

Private Member Functions

RORoute & operator= (const RORoute &src)
 Invalidated assignment operator.

Private Attributes

const RGBColor * myColor
 The color of the route.
SUMOReal myCosts
 The costs of the route.
SUMOReal myProbability
 The probability the driver will take this route with.
std::vector< const ROEdge * > myRoute
 The edges the route consists of.

Detailed Description

A complete router's route.

This class represents a single and complete vehicle route after being computed/imported.

Definition at line 57 of file RORoute.h.


Constructor & Destructor Documentation

RORoute::RORoute ( const std::string &  id,
SUMOReal  costs,
SUMOReal  prob,
const std::vector< const ROEdge * > &  route,
const RGBColor *const  color 
)

Constructor.

Parameters:
[in]idThe route's id
[in]costsThe route's costs
[in]probThe route's probability
[in]routeThe list of edges the route is made of
[in]colorThe (optional) color of this route
Todo:
Are costs/prob really mandatory?

Definition at line 50 of file RORoute.cpp.

RORoute::RORoute ( const RORoute &  src)

Copy constructor.

Parameters:
[in]srcThe route to copy

Definition at line 57 of file RORoute.cpp.

References myColor.

RORoute::~RORoute ( )

Destructor.

Definition at line 66 of file RORoute.cpp.

References myColor.


Member Function Documentation

void RORoute::add ( ROEdge *  edge)

Adds an edge to the end of the route.

Parameters:
[in]edgeThe edge to add
Todo:
What for? Isn't the route already complete?

Definition at line 72 of file RORoute.cpp.

References myRoute.

const RGBColor* RORoute::getColor ( ) const [inline]

Returns this route's color.

Returns:
This route's color

Definition at line 165 of file RORoute.h.

References myColor.

Referenced by RORouteDef_Alternatives::writeXMLDefinition().

SUMOReal RORoute::getCosts ( ) const [inline]

Returns the costs of the route.

Returns:
The route's costs (normally the time needed to pass it)
Todo:
Recheck why the costs are stored in a route

Definition at line 115 of file RORoute.h.

References myCosts.

Referenced by RORouteDef_Alternatives::addAlternative(), RORouteDef_Alternatives::calculateLogitProbabilities(), and RORouteDef_Alternatives::writeXMLDefinition().

const std::vector<const ROEdge*>& RORoute::getEdgeVector ( ) const [inline]
const ROEdge* RORoute::getFirst ( ) const [inline]

Returns the first edge in the route.

Returns:
The route's first edge

Definition at line 96 of file RORoute.h.

References myRoute.

const std::string& Named::getID ( ) const [inline, inherited]

Returns the id.

Returns:
The stored id

Reimplemented in MS_E2_ZS_CollectorOverLanes.

Definition at line 61 of file Named.h.

References Named::myID.

Referenced by ShapeContainer::add(), MSDetectorControl::add(), RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NLHandler::addConnection(), NBLoadedSUMOTLDef::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), RORouteDef_Complete::buildCurrentRoute(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), MSVTypeProbe::execute(), Command_SaveTLSSwitches::execute(), NBTrafficLightLogicCont::extract(), NBNodeCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSUnboundActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NIImporter_SUMO::initTrafficLightLogic(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBDistrictCont::insert(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSTriggeredRerouter::myStartElement(), MSLaneSpeedTrigger::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), Named::ComparatorIdLess::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), NWWriter_SUMO::prohibitionConnection(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NBEdge::startShapeAt(), NIXMLConnectionsHandler::validateLaneInfo(), MSInstantInductLoop::write(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), MSInductLoop::writeTypedXMLOutput(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

const ROEdge* RORoute::getLast ( ) const [inline]

Returns the last edge in the route.

Returns:
The route's last edge

Definition at line 105 of file RORoute.h.

References myRoute.

SUMOReal RORoute::getProbability ( ) const [inline]

Returns the probability the driver will take this route with.

Returns:
The probability to choose the route
Todo:
Recheck why the probability is stored in a route

Definition at line 125 of file RORoute.h.

References myProbability.

Referenced by RORouteDef_Alternatives::addAlternative(), and RORouteDef_Alternatives::writeXMLDefinition().

RORoute& RORoute::operator= ( const RORoute &  src) [private]

Invalidated assignment operator.

void RORoute::recheckForLoops ( )

Checks whether this route contains loops and removes such.

Definition at line 90 of file RORoute.cpp.

References myRoute.

Referenced by RONet::computeRoute().

void RORoute::setCosts ( SUMOReal  costs)

Sets the costs of the route.

Todo:
Recheck why the costs are stored in a route

Definition at line 78 of file RORoute.cpp.

References myCosts.

Referenced by RORouteDef_OrigDest::addAlternative(), RORouteDef_Alternatives::addAlternative(), and RORouteDef_Alternatives::buildCurrentRoute().

void Named::setID ( const std::string &  newID) [inline, inherited]

resets the id

Definition at line 67 of file Named.h.

References Named::myID.

void RORoute::setProbability ( SUMOReal  prob)

Sets the probability of the route.

Todo:
Recheck why the probability is stored in a route

Definition at line 84 of file RORoute.cpp.

References myProbability.

Referenced by RORouteDef_Alternatives::addAlternative(), and RORouteDef_Alternatives::calculateLogitProbabilities().

unsigned int RORoute::size ( ) const [inline]

Returns the number of edges in this route.

Returns:
The number of edges the route is made of

Definition at line 148 of file RORoute.h.

References myRoute.

Referenced by RONet::computeRoute().

OutputDevice & RORoute::writeXMLDefinition ( SUMOAbstractRouter< ROEdge, ROVehicle > &  router,
OutputDevice &  dev,
const ROVehicle *const  veh,
bool  asAlternatives,
bool  withExitTimes 
) const

Field Documentation

const RGBColor* RORoute::myColor [private]

The color of the route.

Definition at line 189 of file RORoute.h.

Referenced by getColor(), RORoute(), writeXMLDefinition(), and ~RORoute().

SUMOReal RORoute::myCosts [private]

The costs of the route.

Definition at line 180 of file RORoute.h.

Referenced by getCosts(), setCosts(), and writeXMLDefinition().

SUMOReal RORoute::myProbability [private]

The probability the driver will take this route with.

Definition at line 183 of file RORoute.h.

Referenced by getProbability(), setProbability(), and writeXMLDefinition().

std::vector<const ROEdge*> RORoute::myRoute [private]

The edges the route consists of.

Definition at line 186 of file RORoute.h.

Referenced by add(), getEdgeVector(), getFirst(), getLast(), recheckForLoops(), size(), and writeXMLDefinition().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines