SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RORoute Class Reference

A complete router's route. More...

#include <RORoute.h>

Inheritance diagram for RORoute:
Named

Public Member Functions

void addProbability (SUMOReal prob)
 add additional vehicles/probability More...
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
const RGBColorgetColor () const
 Returns this route's color. More...
 
SUMOReal getCosts () const
 Returns the costs of the route. More...
 
const ConstROEdgeVectorgetEdgeVector () const
 Returns the list of edges this route consists of. More...
 
const ROEdgegetFirst () const
 Returns the first edge in the route. More...
 
const std::string & getID () const
 Returns the id. More...
 
const ROEdgegetLast () const
 Returns the last edge in the route. More...
 
SUMOReal getProbability () const
 Returns the probability the driver will take this route with. More...
 
const std::vector
< SUMOVehicleParameter::Stop > & 
getStops () const
 Returns the list of stops this route contains. More...
 
void recheckForLoops ()
 Checks whether this route contains loops and removes such. More...
 
 RORoute (const std::string &id, SUMOReal costs, SUMOReal prob, const ConstROEdgeVector &route, const RGBColor *const color, const std::vector< SUMOVehicleParameter::Stop > &stops)
 Constructor. More...
 
 RORoute (const RORoute &src)
 Copy constructor. More...
 
void setCosts (SUMOReal costs)
 Sets the costs of the route. More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setProbability (SUMOReal prob)
 Sets the probability of the route. More...
 
unsigned int size () const
 Returns the number of edges in this route. More...
 
OutputDevicewriteXMLDefinition (OutputDevice &dev, const ROVehicle *const veh, const bool withCosts, const bool withExitTimes) const
 
 ~RORoute ()
 Destructor. More...
 

Protected Attributes

std::string myID
 The name of the object. More...
 

Private Member Functions

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

Private Attributes

const RGBColormyColor
 The color of the route. More...
 
SUMOReal myCosts
 The costs of the route. More...
 
SUMOReal myProbability
 The probability the driver will take this route with. More...
 
ConstROEdgeVector myRoute
 The edges the route consists of. More...
 
std::vector
< SUMOVehicleParameter::Stop
myStops
 List of the stops on the parsed route. More...
 

Detailed Description

A complete router's route.

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

Definition at line 62 of file RORoute.h.

Constructor & Destructor Documentation

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

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 51 of file RORoute.cpp.

RORoute::RORoute ( const RORoute src)

Copy constructor.

Parameters
[in]srcThe route to copy

Definition at line 59 of file RORoute.cpp.

References myColor.

RORoute::~RORoute ( )

Destructor.

Definition at line 68 of file RORoute.cpp.

References myColor.

Member Function Documentation

void RORoute::addProbability ( SUMOReal  prob)

add additional vehicles/probability

Definition at line 91 of file RORoute.cpp.

References myProbability.

Referenced by ROMAAssignments::addRoute().

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 121 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 163 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 113 of file RORoute.h.

References myCosts.

const ConstROEdgeVector& RORoute::getEdgeVector ( ) const
inline

Returns the list of edges this route consists of.

Returns
The edges this route consists of

Definition at line 155 of file RORoute.h.

References myRoute.

Referenced by RORouteDef::addAlternative(), ROVehicle::addStop(), RORouteDef::copy(), and ROMAAssignments::sue().

const ROEdge* RORoute::getFirst ( ) const
inline

Returns the first edge in the route.

Returns
The route's first edge

Definition at line 94 of file RORoute.h.

References myRoute.

Referenced by RORouteDef::copyOrigDest().

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

Returns the id.

Returns
The stored id

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBEdge::addSidewalk(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NBNode::buildCrossings(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBNode::buildInnerEdges(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNode::buildWalkingAreas(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSVehicleControl::getWaitingVehicle(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), MSPModel_Striping::moveInDirection(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_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(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), MSLink::setRequestInformation(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSLCM_JE2013::wantsChange(), 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(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMO::Polygon::writeXML(), 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 103 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 123 of file RORoute.h.

References myProbability.

Referenced by RORouteDef::addAlternative(), RORouteDef::ComparatorProbability::operator()(), and ROMAAssignments::sue().

const std::vector<SUMOVehicleParameter::Stop>& RORoute::getStops ( ) const
inline

Returns the list of stops this route contains.

Returns
list of stops

Definition at line 184 of file RORoute.h.

References myStops.

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

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 86 of file RORoute.cpp.

References myRoute, and ROHelper::recheckForLoops().

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 74 of file RORoute.cpp.

References myCosts.

Referenced by RORouteDef::addAlternative(), and ROMAAssignments::sue().

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 80 of file RORoute.cpp.

References myProbability.

Referenced by RORouteDef::addAlternative(), and ROMAAssignments::sue().

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

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

SUMOReal RORoute::myCosts
private

The costs of the route.

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

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

ConstROEdgeVector RORoute::myRoute
private

The edges the route consists of.

Definition at line 196 of file RORoute.h.

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

std::vector<SUMOVehicleParameter::Stop> RORoute::myStops
private

List of the stops on the parsed route.

Definition at line 202 of file RORoute.h.

Referenced by getStops().


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