SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.
void addProbability (SUMOReal prob)
 add additional vehicles/probability
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container.
const RGBColorgetColor () 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 ROEdgegetFirst () const
 Returns the first edge in the route.
const std::string & getID () const
 Returns the id.
const ROEdgegetLast () 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.
OutputDevicewriteXMLDefinition (OutputDevice &dev, const ROVehicle *const veh, const bool withCosts, const bool withExitTimes) const
 ~RORoute ()
 Destructor.

Protected Attributes

std::string myID
 The name of the object.

Private Member Functions

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

Private Attributes

const RGBColormyColor
 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 58 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.

void RORoute::addProbability ( SUMOReal  prob)

add additional vehicles/probability

Definition at line 95 of file RORoute.cpp.

References myProbability.

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters
in,filled]cont The container to add this item to

Definition at line 114 of file Named.h.

References Named::StoringVisitor::add().

const RGBColor* RORoute::getColor ( ) const
inline

Returns this route's color.

Returns
This route's color

Definition at line 166 of file RORoute.h.

References myColor.

Referenced by RORouteDef::copy(), and RORouteDef::copyOrigDest().

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 116 of file RORoute.h.

References myCosts.

Referenced by ROGawronCalculator::calculateProbabilities(), ROLogitCalculator::calculateProbabilities(), and ROGawronCalculator::setCosts().

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

Returns the list of edges this route consists of.

Returns
The edges this route consists of

Definition at line 158 of file RORoute.h.

References myRoute.

Referenced by RORouteDef::addAlternative(), ROLogitCalculator::calculateProbabilities(), and RORouteDef::copy().

const ROEdge* RORoute::getFirst ( ) const
inline

Returns the first edge in the route.

Returns
The route's first edge

Definition at line 97 of file RORoute.h.

References myRoute.

Referenced by RORouteDef::copyOrigDest().

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Reimplemented in MS_E2_ZS_CollectorOverLanes.

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), NLDetectorBuilder::convUncontE2PosLength(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::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(), AGStreet::print(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), NIXMLConnectionsHandler::validateLaneInfo(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSInductLoop::writeTypedXMLOutput(), MSFullExport::writeVehicles(), 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 106 of file RORoute.h.

References myRoute.

Referenced by RORouteDef::copyOrigDest().

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 126 of file RORoute.h.

References myProbability.

Referenced by RORouteDef::addAlternative(), ROGawronCalculator::calculateProbabilities(), and RORouteDef::ComparatorProbability::operator()().

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::addAlternative(), ROGawronCalculator::setCosts(), and ROLogitCalculator::setCosts().

void Named::setID ( const std::string &  newID)
inlineinherited

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

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::addAlternative(), ROGawronCalculator::calculateProbabilities(), and ROLogitCalculator::calculateProbabilities().

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 149 of file RORoute.h.

References myRoute.

Referenced by RONet::computeRoute().

Field Documentation

const RGBColor* RORoute::myColor
private

The color of the route.

Definition at line 194 of file RORoute.h.

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

SUMOReal RORoute::myCosts
private

The costs of the route.

Definition at line 185 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 188 of file RORoute.h.

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

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

The edges the route consists of.

Definition at line 191 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: