SUMO - Simulation of Urban MObility
|
A complete router's route. More...
#include <RORoute.h>
Public Member Functions | |
void | add (ROEdge *edge) |
Adds an edge to the end of the route. More... | |
void | addProbability (SUMOReal prob) |
add additional vehicles/probability More... | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
const RGBColor * | getColor () const |
Returns this route's color. More... | |
SUMOReal | getCosts () const |
Returns the costs of the route. More... | |
const std::vector< const ROEdge * > & | getEdgeVector () const |
Returns the list of edges this route consists of. More... | |
const ROEdge * | getFirst () const |
Returns the first edge in the route. More... | |
const std::string & | getID () const |
Returns the id. More... | |
const ROEdge * | getLast () const |
Returns the last edge in the route. More... | |
SUMOReal | getProbability () const |
Returns the probability the driver will take this route with. More... | |
void | recheckForLoops () |
Checks whether this route contains loops and removes such. More... | |
RORoute (const std::string &id, SUMOReal costs, SUMOReal prob, const std::vector< const ROEdge * > &route, const RGBColor *const color) | |
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... | |
OutputDevice & | writeXMLDefinition (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 | |
RORoute & | operator= (const RORoute &src) |
Invalidated assignment operator. More... | |
Private Attributes | |
const RGBColor * | myColor |
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... | |
std::vector< const ROEdge * > | myRoute |
The edges the route consists of. More... | |
A complete router's route.
This class represents a single and complete vehicle route after being computed/imported.
RORoute::RORoute | ( | const std::string & | id, |
SUMOReal | costs, | ||
SUMOReal | prob, | ||
const std::vector< const ROEdge * > & | route, | ||
const RGBColor *const | color | ||
) |
Constructor.
[in] | id | The route's id |
[in] | costs | The route's costs |
[in] | prob | The route's probability |
[in] | route | The list of edges the route is made of |
[in] | color | The (optional) color of this route |
Definition at line 50 of file RORoute.cpp.
RORoute::RORoute | ( | const RORoute & | src) |
Copy constructor.
[in] | src | The route to copy |
Definition at line 57 of file RORoute.cpp.
References myColor.
RORoute::~RORoute | ( | ) |
void RORoute::add | ( | ROEdge * | edge) |
Adds an edge to the end of the route.
[in] | edge | The edge to add |
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.
|
inlineinherited |
Adds this object to the given container.
in,filled] | cont The container to add this item to |
Definition at line 114 of file Named.h.
References Named::StoringVisitor::add().
|
inline |
Returns this route's color.
Definition at line 166 of file RORoute.h.
References myColor.
Referenced by RORouteDef::copy(), and RORouteDef::copyOrigDest().
|
inline |
Returns the costs of the route.
Definition at line 116 of file RORoute.h.
References myCosts.
Referenced by ROGawronCalculator::calculateProbabilities(), ROLogitCalculator::calculateProbabilities(), and ROGawronCalculator::setCosts().
|
inline |
Returns the list of edges this route consists of.
Definition at line 158 of file RORoute.h.
References myRoute.
Referenced by RORouteDef::addAlternative(), ROLogitCalculator::calculateProbabilities(), and RORouteDef::copy().
|
inline |
Returns the first edge in the route.
Definition at line 97 of file RORoute.h.
References myRoute.
Referenced by RORouteDef::copyOrigDest().
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), GUITrafficLightLogicWrapper::begin2TrackPhases(), 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(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), 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(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), RODFNet::getDetectorEdge(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), RODFDetectorCon::guessEmptyFlows(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), 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_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyMove(), GUIViewTraffic::onGamingClick(), 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_TLS::processGet(), TraCIServerAPI_Lane::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(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), GUITrafficLightLogicWrapper::switchTLSLogic(), 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(), 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(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inline |
Returns the last edge in the route.
Definition at line 106 of file RORoute.h.
References myRoute.
Referenced by RORouteDef::copyOrigDest().
|
inline |
Returns the probability the driver will take this route with.
Definition at line 126 of file RORoute.h.
References myProbability.
Referenced by RORouteDef::addAlternative(), ROGawronCalculator::calculateProbabilities(), and RORouteDef::ComparatorProbability::operator()().
void RORoute::recheckForLoops | ( | ) |
Checks whether this route contains loops and removes such.
Definition at line 90 of file RORoute.cpp.
References myRoute, and ROHelper::recheckForLoops().
Referenced by RONet::computeRoute().
void RORoute::setCosts | ( | SUMOReal | costs) |
Sets the costs of the route.
Definition at line 78 of file RORoute.cpp.
References myCosts.
Referenced by RORouteDef::addAlternative(), ROGawronCalculator::setCosts(), and ROLogitCalculator::setCosts().
|
inlineinherited |
resets the id
[in] | newID | The 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.
Definition at line 84 of file RORoute.cpp.
References myProbability.
Referenced by RORouteDef::addAlternative(), ROGawronCalculator::calculateProbabilities(), and ROLogitCalculator::calculateProbabilities().
|
inline |
Returns the number of edges in this route.
Definition at line 149 of file RORoute.h.
References myRoute.
Referenced by RONet::computeRoute().
OutputDevice & RORoute::writeXMLDefinition | ( | OutputDevice & | dev, |
const ROVehicle *const | veh, | ||
const bool | withCosts, | ||
const bool | withExitTimes | ||
) | const |
Definition at line 101 of file RORoute.cpp.
References OutputDevice::closeTag(), ROEdge::ET_DISTRICT, ROVehicle::getDepartureTime(), myColor, myCosts, myProbability, myRoute, OutputDevice::openTag(), OutputDevice::setPrecision(), STEPS2TIME, SUMO_ATTR_COLOR, SUMO_ATTR_COST, SUMO_ATTR_EDGES, SUMO_ATTR_PROB, SUMO_TAG_ROUTE, SUMOReal, toString(), and OutputDevice::writeAttr().
|
private |
The color of the route.
Definition at line 194 of file RORoute.h.
Referenced by getColor(), RORoute(), writeXMLDefinition(), and ~RORoute().
|
private |
The costs of the route.
Definition at line 185 of file RORoute.h.
Referenced by getCosts(), setCosts(), and writeXMLDefinition().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
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().
|
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().